2nd update

This commit is contained in:
“VeLiTi”
2025-05-26 15:07:22 +02:00
parent cd0e04981c
commit 580f835fff
46 changed files with 16006 additions and 952 deletions

250
home.php
View File

@@ -1,148 +1,124 @@
<?php
// ++++++++++++++++++++++++++++++
// Prevent direct access to file
// ++++++++++++++++++++++++++++++
defined(security_key) or exit;
//LINK to products page:
$products_link = url(link_to_collection);
// ++++++++++++++++++++++++++++++
// Include header
// ++++++++++++++++++++++++++++++
$view = template_header($home_text, '');
template_header_top($home_text);
$view = '
<div class="featured" style="background-image:url('.featured_image.');background-position: center center;">
'.template_menu().'
<h2>'.$h2_brand_name_1.'</h2>
<p>'.$h2_brand_name_2.'</p>
<a class="link-button action-btn" role="button" href="'.$products_link.'" title="'.$h2_brand_visit.'">'.$h2_brand_visit.'</a>
</div>
<div class="container highlight-section">
<h2 class="title-message" href="'.$products_link.'">
'.$h2_brand_wow.'
</h2>
<p class="paragraph neutral-paragraph-text" style="font-size: 30px;">
</p>
</div>';
//SHOW OFFER
if(show_offer_home_page){
$view .='
<div class="" style="text-align: center;">
<p class="p.paragraph.neutral-paragraph-text-1" style="font-family:\'gerb\';font-size: 15px;">'.(${show_offer_home_text} ?? show_offer_home_text).'</p>
</div>';
}
$view .='
<section class="news-section">
<div class="news-container">
<div class="news-header">
<h2>Latest News</h2>
<p>Stay updated with the latest from Morval Watches</p>
</div>
<div class="news-grid">
<article class="news-card">
<div class="news-card-content">
<div class="news-meta">
<span class="news-date">February 10, 2025</span>
<span class="news-tag">New Release</span>
</div>
<h3 class="news-title">New Thomas II Collection Released</h3>
<p class="news-preview">Discover our latest Thomas II collection featuring premium Swiss movements and unique colorways.</p>
<a href="#" class="read-more">Read More</a>
</div>
</article>
<article class="news-card">
<div class="news-card-content">
<div class="news-meta">
<span class="news-date">February 5, 2025</span>
<span class="news-tag">Limited Edition</span>
</div>
<h3 class="news-title">Limited Edition Navy Blue Now Available</h3>
<p class="news-preview">Experience the depth of our signature Navy Blue finish, now available in a special limited edition run.</p>
<a href="#" class="read-more">Read More</a>
</div>
</article>
<article class="news-card">
<div class="news-card-content">
<div class="news-meta">
<span class="news-date">January 28, 2025</span>
<span class="news-tag">Press</span>
</div>
<h3 class="news-title">Morval Featured in Watch Magazine</h3>
<p class="news-preview">Our commitment to Dutch craftsmanship and Swiss quality gains international recognition.</p>
<a href="#" class="read-more">Read More</a>
</div>
</article>
</div>
<div class="view-all-container">
<a href="#" class="view-all-btn">View All News</a>
</div>
$view .= '
<!-- Hero Section -->
<section class="hero">
<div class="hero-content">
<h1>'.$h2_brand_name_1.'<br>'.$h2_brand_name_2.'</h1>
<a href="'.url(link_to_collection).'" class="hero-btn">'.$h2_brand_visit.'</a>
</div>
</section>';
//SHOW HIGHLIGHTS
if (category_id_highlighted_products_1){
$view .='
<section class="container neutral-cover-section-1" style="background-image:url(custom/assets/morval_checkout.jpg);background-size: cover;background-repeat: no-repeat;background-position: 50% 50%;">
<div class="recentlyadded">';
$view .= highlightedProducts($clientsecret,category_id_highlighted_products_1,($highlight_1 ?? 'highlight 1'));
$view .='
</div>
</section>';
}
if (category_id_highlighted_products_2){
$view .='
<section class="container neutral-cover-section-1">
<div class="recentlyadded"> ';
$view .= highlightedProducts($clientsecret,category_id_highlighted_products_2, ($highlight_2 ?? 'highlight 2'));
$view .='
</div>
</section>';
}
$view .='
<section class="container neutral-features-section-4-1" style="background-image:url(custom/assets/picture2.jpg);background-size: cover;background-repeat: no-repeat;background-position: 50% 50%;">
<div class="container neutral-three-columns-1">
<div class="container neutral-feature-wrapper-1 neutral-left-align-items-1">
<div class="container container-feature-icon-wrapper-1"><span class="icon"></span>
<h4 class="neutral-feature-title-1 neutral-margin-left-1">'.($home_timeless ?? 'Timeless').'</h4>
</div>
<p class="paragraph neutral-paragraph-text-1">
'.($home_timeless_text ?? 'Morval Watches are unique, robust, stylish and timeless timepieces that will last for generations!').'
</p>
<a class="link-text neutral-text-link-1" href="'.$products_link.'">'.($shop_action ?? 'shop now').'&gt;</a>
</div>
<div class="container neutral-feature-wrapper-1 neutral-left-align-items-1">
<div class="container container-feature-icon-wrapper-1"><span class="icon"></span>
<h4 class="neutral-feature-title-1 neutral-margin-left-1">'.($home_quality ?? 'Quality').'</h4>
</div>
<p class="paragraph neutral-paragraph-text-1">
'.($home_quality_text ?? ' Morval watches meet the highest quality requirements and can compete with the well-known Swiss brands. The parts are supplied by renowned manufacturers from Europe and beyond. A Morval contains a Swiss-made caliber (STP) that is known for its reliable quality.').'
</p>
<a class="link-text neutral-text-link-1" href="'.$products_link.'">'.($shop_action ?? 'shop now').' &gt;</a>
</div>
<div class="container neutral-feature-wrapper-1 neutral-left-align-items-1">
<div class="container container-feature-icon-wrapper-1"><span class="icon"></span>
<h4 class="neutral-feature-title-1 neutral-margin-left-1">'.($home_price ?? 'Price').'</h4>
</div>
<p class="paragraph neutral-paragraph-text-1">
'.($home_price_text ?? 'Morval stands for an excellent price-quality ratio').'
</p>
<a class="link-text neutral-text-link-1" href="'.$products_link.'">'.($shop_action ?? 'shop now').'&gt;</a>
</div>
</div>
</section>
<!-- Store Description -->
<div class="store-description">
<p>'.$h2_brand_wow.'</p>
</div>';
//OUTPUT
echo $view;
// ++++++++++++++++++++++++++++++
// Include highlighted Products
// ++++++++++++++++++++++++++++++
$view .= highlightedProducts2($clientsecret,category_id_highlighted_products_2, ($highlight_2 ?? 'highlight 2'),'');
template_footer()
$view .= '
<section class="watch-ad-section">
<div class="top-section">
<div class="watch-image">
</div>
<div class="top-content">
<h2>'.($ad_watch_1 ?? 'Dutch design and Swiss craftsmanship').'</h2>
<a href="'.url('index.php?page=about').'" class="btn">'.($btn_readmore ?? 'Read more').'</a>
</div>
</div>
<div class="bottom-section">
<div class="bottom-content">
<h2>'.($ad_watch_2 ?? 'Timeless timepieces that will last for generations!').'</h2>
<a href="'.url(link_to_collection).'" class="btn">'.$h2_brand_visit.'</a>
</div>
</div>
</section>';
$view .= '
<section class="features">
<div class="container features-container">
<div class="feature-item">
<h2>'.($home_timeless ?? 'Timeless').'</h2>
<p>'.($home_timeless_text ?? 'Morval Watches are unique, robust, stylish and timeless timepieces that will last for generations!').'</p>
</div>
<div class="feature-item">
<h2>'.($home_quality ?? 'Quality').'</h2>
<p>'.($home_quality_text ?? ' Morval watches meet the highest quality requirements and can compete with the well-known Swiss brands. The parts are supplied by renowned manufacturers from Europe and beyond. A Morval contains a Swiss-made caliber (STP) that is known for its reliable quality.').'</p>
</div>
<div class="feature-item">
<h2>'.($home_price ?? 'Price').'</h2>
<p>'.($home_price_text ?? 'Morval stands for an excellent price-quality ratio').'</p>
</div>
</div>
</section>';
// ++++++++++++++++++++++++++++++
// Include footer
// ++++++++++++++++++++++++++++++
$view .= template_footer();
// ++++++++++++++++++++++++++++++
// Additional JS scripts for page
// ++++++++++++++++++++++++++++++
$view .='
<script>
// Basic slider functionality
const prevBtn = document.querySelector(\'.prev-btn\');
const nextBtn = document.querySelector(\'.next-btn\');
const productContainer = document.querySelector(\'.product-container-slider\');
const products = document.querySelectorAll(\'.product-card-slider\');
let currentIndex = 0;
const productsPerView = window.innerWidth < 480 ? 1 :
window.innerWidth < 768 ? 2 :
window.innerWidth < 992 ? 3 : 4;
prevBtn.addEventListener(\'click\', () => {
if (currentIndex > 0) {
currentIndex--;
updateSliderPosition();
}
});
nextBtn.addEventListener(\'click\', () => {
if (currentIndex < products.length - productsPerView) {
currentIndex++;
updateSliderPosition();
}
});
function updateSliderPosition() {
const productWidth = products[0].offsetWidth;
productContainer.style.transform = `translateX(-${currentIndex * productWidth}px)`;
}
// Update slider on window resize
window.addEventListener(\'resize\', () => {
// Reset position when screen size changes
currentIndex = 0;
updateSliderPosition();
});
</script>
</html>
';
echo $view;
?>