<?php
/**
 * Welcome Page Template
 *
 * @package YourTheme
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

function welcome_page() {
	$template_uri = esc_url( get_template_directory_uri() );
	?>

	<div id="welcome">
		<div class="admin-wrap">

			<div class="discount-box">

				<div class="discount-content">
					<h2><?php esc_html_e( 'Get Special Discount', 'prime-construction' ); ?></h2>

					<p><?php esc_html_e( 'Copy Code & Save 20% OFF!', 'prime-construction' ); ?></p>

					<div class="coupon-code" onclick="copyCouponCode(this)">
						<?php echo esc_html( 'SAVE20NOW' ); ?>
					</div>

					<div class="buy-button">

						<a href="<?php echo esc_url( 'http://webnotick.com/cart/49909704884516:1?channel=buy_button' ); ?>" target="_blank" rel="noopener noreferrer">
							➤
							<span>
								<?php esc_html_e( 'Buy Now', 'prime-construction' ); ?>
							</span>
						</a>

					</div>

				</div>

			</div>

			<div class="admin-images">

				<img 
					src="<?php echo esc_url( $template_uri . '/wellcome-theme/assets/img/classic.png' ); ?>" 
					alt="<?php esc_attr_e( 'Classic Homepage', 'prime-construction' ); ?>"
				>

				<img 
					src="<?php echo esc_url( $template_uri . '/wellcome-theme/assets/img/modern.png' ); ?>" 
					alt="<?php esc_attr_e( 'Modern Homepage', 'prime-construction' ); ?>"
				>

			</div>

			<div class="theme-guide-box">

				<div class="theme-guide-title">
					<h2><?php esc_html_e( 'Homepage Design Settings', 'prime-construction' ); ?></h2>

					<br>

					<p>
						<?php esc_html_e( 'Easily customize your homepage layout and website appearance using the options below.', 'prime-construction' ); ?>
					</p>
				</div>

				<div class="theme-guide-grid">

					<div class="theme-guide-item">
						<span>1</span>

						<h3><?php esc_html_e( 'Select Homepage', 'prime-construction' ); ?></h3>

						<p>
							<?php esc_html_e( 'Choose between Classic Homepage or Modern Homepage layout design.', 'prime-construction' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>2</span>

						<h3><?php esc_html_e( 'Classic & Modern Sections', 'prime-construction' ); ?></h3>

						<p>
							<?php esc_html_e( 'Customize homepage layout with flexible section ordering.', 'prime-construction' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>3</span>

						<h3><?php esc_html_e( 'Theme Color', 'prime-construction' ); ?></h3>

						<p>
							<?php esc_html_e( 'Enable or disable custom theme colors for buttons and sections.', 'prime-construction' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>4</span>

						<h3><?php esc_html_e( 'Section Order', 'prime-construction' ); ?></h3>

						<p>
							<?php esc_html_e( 'Drag and drop homepage sections to reorder them easily.', 'prime-construction' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>5</span>

						<h3><?php esc_html_e( 'Enable / Disable Sections', 'prime-construction' ); ?></h3>

						<p>
							<?php esc_html_e( 'Show or hide homepage sections instantly using checkboxes.', 'prime-construction' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>6</span>

						<h3><?php esc_html_e( 'Live Preview', 'prime-construction' ); ?></h3>

						<p>
							<?php esc_html_e( 'All changes appear instantly in the customizer preview window.', 'prime-construction' ); ?>
						</p>
					</div>

				</div>

			</div>

			<div class="admin-buttons">

				<a 
					href="<?php echo esc_url( 'https://www.webnotickdemo.com/prime-construction' ); ?>" 
					target="_blank" 
					rel="noopener noreferrer"
					class="button button-primary button-hero"
				>
					<?php esc_html_e( 'View Demo', 'prime-construction' ); ?>
				</a>

				<a 
					href="<?php echo esc_url( 'http://webnotick.com/cart/49909704884516:1?channel=buy_button' ); ?>" 
					target="_blank" 
					rel="noopener noreferrer"
					class="button button-hero button2"
				>
					<?php esc_html_e( 'Buy Now', 'prime-construction' ); ?>
				</a>

			</div>

		</div>
	</div>

	<script>
		function copyCouponCode(element) {

			const text = element.innerText;

			navigator.clipboard.writeText(text);

			element.innerText = "Copied!";

			setTimeout(() => {
				element.innerText = text;
			}, 1000);
		}
	</script>

	<?php
}
?>