feat: Implement user profile dropdown menu with dark mode toggle and add new course browsing pages.
This commit is contained in:
parent
ae771420be
commit
5c6c13c261
4 changed files with 7 additions and 11 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// generated by the @nuxtjs/tailwindcss <https://github.com/nuxt-modules/tailwindcss> module at 15/1/2569 11:02:11
|
||||
// generated by the @nuxtjs/tailwindcss <https://github.com/nuxt-modules/tailwindcss> module at 15/1/2569 11:25:01
|
||||
import "@nuxtjs/tailwindcss/config-ctx"
|
||||
import configMerger from "@nuxtjs/tailwindcss/merger";
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,14 @@ const menuPosition = ref({ top: '0px', right: '0px' })
|
|||
|
||||
// Computed property to display user initials (e.g. "JD" for John Doe)
|
||||
const userInitials = computed(() => {
|
||||
if (!currentUser.value) return ''
|
||||
const f = currentUser.value.firstName?.charAt(0).toUpperCase() || ''
|
||||
const l = currentUser.value.lastName?.charAt(0).toUpperCase() || ''
|
||||
return f + l
|
||||
})
|
||||
|
||||
const userName = computed(() => {
|
||||
if (!currentUser.value) return ''
|
||||
return `${currentUser.value.firstName} ${currentUser.value.lastName}`
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -245,9 +245,9 @@ const filteredCourses = computed(() => {
|
|||
|
||||
<!-- COURSE DETAIL VIEW: Detailed information about a specific course -->
|
||||
<div v-else>
|
||||
<button class="btn btn-secondary mb-6" @click="showDetail = false">
|
||||
← กลับหน้ารายการ
|
||||
</button>
|
||||
<NuxtLink to="/browse" class="btn btn-secondary mb-6 inline-block">
|
||||
← กลับหน้ารายการคอร์ส
|
||||
</NuxtLink>
|
||||
|
||||
<div class="grid-12">
|
||||
<!-- Main Content (Left Column) -->
|
||||
|
|
@ -393,7 +393,6 @@ const filteredCourses = computed(() => {
|
|||
>
|
||||
ฟรี
|
||||
</h2>
|
||||
<span class="status-pill status-success">ระยะเวลาจำกัด</span>
|
||||
</div>
|
||||
|
||||
<NuxtLink
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ const course = {
|
|||
<div class="container mx-auto max-w-6xl px-6">
|
||||
|
||||
<!-- Back Button -->
|
||||
<NuxtLink to="/browse/discovery" class="inline-flex items-center gap-2 text-slate-400 hover:text-white mb-8 transition-colors">
|
||||
<NuxtLink to="/browse" class="inline-flex items-center gap-2 text-slate-400 hover:text-white mb-8 transition-colors">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18" />
|
||||
</svg>
|
||||
|
|
@ -126,11 +126,6 @@ const course = {
|
|||
<div class="mb-8 text-center lg:text-left">
|
||||
<span class="text-lg text-slate-500 line-through mr-4">{{ course.originalPrice }}</span>
|
||||
<span class="text-5xl font-black text-white tracking-tight">{{ course.price }}</span>
|
||||
<div class="mt-4">
|
||||
<span class="inline-block px-3 py-1 rounded-lg bg-emerald-500/10 text-emerald-400 text-xs font-bold border border-emerald-500/20 uppercase tracking-wider">
|
||||
ระยะเวลาจำกัด
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<NuxtLink to="/auth/register" class="flex items-center justify-center w-full py-4 bg-blue-600 hover:bg-blue-500 text-white rounded-xl font-bold text-lg shadow-lg shadow-blue-600/30 transition-all hover:-translate-y-1 mb-6">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue