feat: introduce LandingHeader component with scroll-adaptive styling and mobile navigation, and a new LandingFooter component.
All checks were successful
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 41s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 3s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 1s

This commit is contained in:
supalerk-ar66 2026-02-19 13:49:44 +07:00
parent 0f88aeb06f
commit 743d3b8c2f
2 changed files with 58 additions and 46 deletions

View file

@ -8,70 +8,76 @@
<template> <template>
<footer class="bg-slate-50 pt-16 pb-8 border-t border-slate-200"> <footer class="bg-slate-50 pt-16 pb-8 border-t border-slate-200">
<div class="container mx-auto px-6 md:px-12"> <div class="container mx-auto px-6 md:px-12">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 mb-12 text-center md:text-left"> <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8 mb-12 text-left">
<!-- Brand --> <!-- Brand -->
<div> <div class="space-y-6">
<div class="flex items-center justify-center md:justify-start gap-3 mb-6"> <div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-xl bg-blue-600 flex items-center justify-center text-white font-black shadow-lg shadow-blue-600/30"> <div class="w-12 h-12 rounded-xl bg-blue-600 flex items-center justify-center text-white font-black shadow-lg shadow-blue-600/30 shrink-0">
E E
</div> </div>
<div class="flex flex-col text-left"> <div class="flex flex-col">
<span class="font-black text-lg leading-none tracking-tight text-slate-900">E-Learning</span> <span class="font-black text-lg leading-none tracking-tight text-slate-900">E-Learning</span>
<span class="text-[10px] font-bold uppercase tracking-[0.2em] leading-none mt-1 text-slate-500">Platform</span> <span class="text-[10px] font-bold uppercase tracking-[0.2em] leading-none mt-1 text-slate-500">Platform</span>
</div> </div>
</div> </div>
<p class="text-slate-500 text-sm leading-relaxed mb-6"> <p class="text-slate-500 text-sm leading-relaxed max-w-xs">
แพลตฟอรมการเรยนรออนไลนงเนนการพฒนาทกษะดลสำหรบคนรนใหม เรยนรไดกท กเวลา บผเชยวชาญตวจร แพลตฟอรมการเรยนรออนไลนงเนนการพฒนาทกษะดลสำหรบคนรนใหม เรยนรไดกท กเวลา บผเชยวชาญตวจร
</p> </p>
<div class="flex gap-4 justify-center md:justify-start"> <div class="flex gap-3">
<a href="#" class="w-10 h-10 rounded-full bg-white border border-slate-200 flex items-center justify-center text-slate-500 hover:bg-blue-600 hover:text-white hover:border-blue-600 transition-all"> <a href="#" class="w-9 h-9 rounded-full bg-white border border-slate-200 flex items-center justify-center text-slate-400 hover:bg-blue-600 hover:text-white hover:border-blue-600 transition-all">
<q-icon name="facebook" size="20px" /> <q-icon name="facebook" size="18px" />
</a> </a>
<a href="#" class="w-10 h-10 rounded-full bg-white border border-slate-200 flex items-center justify-center text-slate-500 hover:bg-blue-400 hover:text-white hover:border-blue-400 transition-all"> <a href="#" class="w-9 h-9 rounded-full bg-white border border-slate-200 flex items-center justify-center text-slate-400 hover:bg-sky-400 hover:text-white hover:border-sky-400 transition-all">
<q-icon name="flutter_dash" size="20px" /> <!-- Twitter equivalent --> <q-icon name="flutter_dash" size="18px" />
</a> </a>
<a href="#" class="w-10 h-10 rounded-full bg-white border border-slate-200 flex items-center justify-center text-slate-500 hover:bg-pink-600 hover:text-white hover:border-pink-600 transition-all"> <a href="#" class="w-9 h-9 rounded-full bg-white border border-slate-200 flex items-center justify-center text-slate-400 hover:bg-pink-600 hover:text-white hover:border-pink-600 transition-all">
<q-icon name="camera_alt" size="20px" /> <!-- Instagram equivalent --> <q-icon name="camera_alt" size="18px" />
</a> </a>
</div> </div>
</div> </div>
<!-- Links --> <!-- Links -->
<div> <div class="lg:pl-8">
<h4 class="font-bold text-slate-900 mb-6">คอรสเรยน</h4> <h4 class="font-bold text-slate-900 mb-6 text-base">คอรสเรยน</h4>
<ul class="space-y-4 text-sm text-slate-500 flex flex-col items-center md:items-start"> <ul class="space-y-3 text-sm text-slate-500">
<li><NuxtLink to="/browse" class="hover:text-blue-600 transition-colors">คอรสทงหมด</NuxtLink></li> <li><NuxtLink to="/browse" class="hover:text-blue-600 transition-colors inline-block">คอรสทงหมด</NuxtLink></li>
<li><NuxtLink to="/browse/recommended" class="hover:text-blue-600 transition-colors">คอรสแนะนำ</NuxtLink></li> <li><NuxtLink to="/browse/recommended" class="hover:text-blue-600 transition-colors inline-block">คอรสแนะนำ</NuxtLink></li>
<li><a href="#" class="hover:text-blue-600 transition-colors">โปรโมช</a></li> <li><a href="#" class="hover:text-blue-600 transition-colors inline-block">โปรโมช</a></li>
<li><a href="#" class="hover:text-blue-600 transition-colors">สำหรบองคกร</a></li> <li><a href="#" class="hover:text-blue-600 transition-colors inline-block">สำหรบองคกร</a></li>
</ul> </ul>
</div> </div>
<!-- Support --> <!-- Support -->
<div> <div>
<h4 class="font-bold text-slate-900 mb-6">วยเหล</h4> <h4 class="font-bold text-slate-900 mb-6 text-base">วยเหล</h4>
<ul class="space-y-4 text-sm text-slate-500 flex flex-col items-center md:items-start"> <ul class="space-y-3 text-sm text-slate-500">
<li><a href="#" class="hover:text-blue-600 transition-colors">คำถามทพบบอย (FAQ)</a></li> <li><a href="#" class="hover:text-blue-600 transition-colors inline-block">คำถามทพบบอย (FAQ)</a></li>
<li><a href="#" class="hover:text-blue-600 transition-colors">การใชงาน</a></li> <li><a href="#" class="hover:text-blue-600 transition-colors inline-block">การใชงาน</a></li>
<li><a href="#" class="hover:text-blue-600 transition-colors">เงอนไขการใชงาน</a></li> <li><a href="#" class="hover:text-blue-600 transition-colors inline-block">เงอนไขการใชงาน</a></li>
<li><a href="#" class="hover:text-blue-600 transition-colors">นโยบายความเปนสวนต</a></li> <li><a href="#" class="hover:text-blue-600 transition-colors inline-block">นโยบายความเปนสวนต</a></li>
</ul> </ul>
</div> </div>
<!-- Contact --> <!-- Contact -->
<div> <div>
<h4 class="font-bold text-slate-900 mb-6">ดตอเรา</h4> <h4 class="font-bold text-slate-900 mb-6 text-base">ดตอเรา</h4>
<ul class="space-y-4 text-sm text-slate-500 flex flex-col items-center md:items-start"> <ul class="space-y-4 text-sm text-slate-500">
<li class="flex items-start justify-center md:justify-start gap-3"> <li class="flex items-start gap-3">
<q-icon name="location_on" size="20px" class="flex-shrink-0 mt-0.5 text-blue-600" /> <div class="w-8 h-8 rounded-lg bg-blue-50 flex items-center justify-center shrink-0 text-blue-600 mt-[-2px]">
<span>123 อาคารสยามทาวเวอร 15 ถนนพระราม 1 เขตปทมว กรงเทพฯ 10330</span> <q-icon name="location_on" size="18px" />
</div>
<span class="leading-relaxed">123 อาคารสยามทาวเวอร 15 เขตปทมว กรงเทพฯ 10330</span>
</li> </li>
<li class="flex items-center justify-center md:justify-start gap-3"> <li class="flex items-center gap-3">
<q-icon name="phone" size="20px" class="flex-shrink-0 text-blue-600" /> <div class="w-8 h-8 rounded-lg bg-blue-50 flex items-center justify-center shrink-0 text-blue-600">
<q-icon name="phone" size="18px" />
</div>
<span>02-123-4567</span> <span>02-123-4567</span>
</li> </li>
<li class="flex items-center justify-center md:justify-start gap-3"> <li class="flex items-center gap-3">
<q-icon name="email" size="20px" class="flex-shrink-0 text-blue-600" /> <div class="w-8 h-8 rounded-lg bg-blue-50 flex items-center justify-center shrink-0 text-blue-600">
<q-icon name="email" size="18px" />
</div>
<span>support@elearning.com</span> <span>support@elearning.com</span>
</li> </li>
</ul> </ul>
@ -79,10 +85,12 @@
</div> </div>
<div class="pt-8 border-t border-slate-200 flex flex-col md:flex-row justify-between items-center gap-4"> <div class="pt-8 border-t border-slate-200 flex flex-col md:flex-row justify-between items-center gap-4">
<p class="text-sm text-slate-400">© 2024 E-Learning Platform. All rights reserved.</p> <p class="text-sm text-slate-500 text-center md:text-left">
<div class="flex gap-6 text-sm text-slate-400"> © {{ new Date().getFullYear() }} E-Learning Platform. All rights reserved.
<a href="#" class="hover:text-slate-600">Privacy Policy</a> </p>
<a href="#" class="hover:text-slate-600">Terms of Service</a> <div class="flex gap-6 text-sm font-medium text-slate-500">
<a href="#" class="hover:text-blue-600 transition-colors">Privacy Policy</a>
<a href="#" class="hover:text-blue-600 transition-colors">Terms of Service</a>
</div> </div>
</div> </div>
</div> </div>

View file

@ -119,22 +119,27 @@ onUnmounted(() => {
<!-- Mobile Menu Button (Visible on Mobile) --> <!-- Mobile Menu Button (Visible on Mobile) -->
<button <button
class="md:hidden mobile-toggle relative z-50 w-10 h-10 flex items-center justify-center rounded-full transition-colors" class="md:hidden mobile-toggle ml-auto relative z-[120] w-10 h-10 flex items-center justify-center rounded-full transition-colors"
:class="[isScrolled || mobileMenuOpen ? 'text-white hover:bg-white/10' : 'text-slate-900 hover:bg-slate-100']" :class="[isScrolled ? 'text-white hover:bg-white/10' : 'text-slate-900 hover:bg-slate-100', mobileMenuOpen ? 'text-slate-900 z-[120]' : '']"
@click="mobileMenuOpen = !mobileMenuOpen" @click="mobileMenuOpen = !mobileMenuOpen"
> >
<q-icon :name="mobileMenuOpen ? 'close' : 'menu'" size="24px" /> <q-icon :name="mobileMenuOpen ? 'close' : 'menu'" size="24px" />
</button> </button>
<!-- Mobile Navigation Drawer --> </div>
</header>
<!-- Mobile Navigation Drawer (Teleported to body to avoid z-index/clipping issues with Header) -->
<Teleport to="body">
<div v-if="mobileMenuOpen">
<div <div
class="fixed inset-0 bg-slate-900/50 backdrop-blur-sm z-40 transition-opacity duration-300 md:hidden" class="fixed inset-0 bg-slate-900/50 backdrop-blur-sm z-[2000] transition-opacity duration-300 md:hidden"
:class="[mobileMenuOpen ? 'opacity-100 pointer-events-auto' : 'opacity-0 pointer-events-none']" :class="[mobileMenuOpen ? 'opacity-100 pointer-events-auto' : 'opacity-0 pointer-events-none']"
@click="mobileMenuOpen = false" @click="mobileMenuOpen = false"
/> />
<div <div
class="fixed top-0 right-0 h-full w-4/5 max-w-sm bg-white shadow-2xl z-50 transform transition-transform duration-300 ease-out md:hidden flex flex-col" class="fixed top-0 right-0 h-full w-4/5 max-w-sm bg-white shadow-2xl z-[2001] transform transition-transform duration-300 ease-out md:hidden flex flex-col"
:class="[mobileMenuOpen ? 'translate-x-0' : 'translate-x-full']" :class="[mobileMenuOpen ? 'translate-x-0' : 'translate-x-full']"
> >
<div class="p-6 pt-8 flex flex-col gap-6 h-full overflow-y-auto relative"> <div class="p-6 pt-8 flex flex-col gap-6 h-full overflow-y-auto relative">
@ -205,9 +210,8 @@ onUnmounted(() => {
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</header> </Teleport>
</template> </template>
<style scoped> <style scoped>