forked from MyArtverse-Project/MyArtverse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b923dc
commit b4bc827
Showing
9 changed files
with
103 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
|
||
|
||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,63 @@ | ||
<script lang="ts" setup> | ||
import { ref } from "vue" | ||
const root = ref<HTMLDivElement | null>(null); | ||
const root = ref<HTMLDivElement | null>(null) | ||
const inputVal = ref("") | ||
const focusInput = () => { | ||
root.value?.classList.toggle("toggled") | ||
root.value?.classList.toggle("toggled") | ||
} | ||
const clearInput = () => { | ||
// console.log(root.value) | ||
inputVal.value = "" | ||
} | ||
</script> | ||
|
||
<template> | ||
<div ref="root" class="search-box-container"> | ||
<input type="text" @focus="focusInput" @focusout="focusInput" class="px-5 py-3 w-full focus:outline-none" | ||
placeholder="Search fursonas" /> | ||
<div class="flex items-center gap-x-3 pr-4 absolute top-0 right-0 bottom-0"> | ||
<button class="clear-btn"> | ||
<i class="fa-solid fa-times fa-lg fa-fw"></i> | ||
</button> | ||
<button class="search-btn"> | ||
<i class="fa-solid fa-magnifying-glass fa-fw"></i> | ||
</button> | ||
</div> | ||
</div> | ||
<div ref="root" class="search-box-container"> | ||
<input | ||
type="text" | ||
:value="inputVal" | ||
@focus="focusInput" | ||
placeholder="Search" | ||
/> | ||
<div class="absolute top-0 bottom-0 right-0 flex items-center pr-4 gap-x-3"> | ||
<button class="clear-btn" @click="clearInput"> | ||
<i class="fa-solid fa-times fa-lg fa-fw"></i> | ||
</button> | ||
<button class="search-btn"> | ||
<i class="fa-solid fa-magnifying-glass fa-fw"></i> | ||
</button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss"> | ||
.search-box-container { | ||
@apply relative flex items-center gap-x-3 border-2 rounded-md transition-all duration-300 w-[20%]; | ||
@apply relative flex items-center gap-x-3 overflow-hidden rounded-md transition-all duration-300 w-[18rem]; | ||
input { | ||
@apply cursor-pointer; | ||
} | ||
input[type="text"] { | ||
@apply cursor-pointer bg-slate-200 w-full px-4 py-2 focus:outline-none; | ||
.clear-btn { | ||
@apply pointer-events-none opacity-0; | ||
} | ||
&::placeholder { | ||
@apply text-slate-800; | ||
} | ||
&.toggled { | ||
.clear-btn { | ||
@apply pointer-events-auto opacity-100; | ||
} | ||
&:focus-within { | ||
@apply cursor-text; | ||
input { | ||
@apply cursor-text; | ||
} | ||
} | ||
} | ||
.clear-btn { | ||
@apply pointer-events-auto opacity-100; | ||
} | ||
input { | ||
@apply cursor-text; | ||
} | ||
} | ||
} | ||
.toggled { | ||
@apply w-[25%] border-red-200 cursor-text; | ||
.clear-btn { | ||
@apply pointer-events-none opacity-0; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
<script setup> | ||
</script> | ||
<script setup></script> | ||
|
||
<template> | ||
<div class="flex gap-x-3 items-center"> | ||
<NavbarButton class="aspect-square rounded-full"> | ||
<span class="sr-only">Options</span> | ||
<i class="fas fa-ellipsis-vertical fa-fw fa-lg"></i> | ||
</NavbarButton> | ||
<NavbarButton class="aspect-square rounded-full"> | ||
<span class="sr-only">Notifications</span> | ||
<i class="far fa-bell fa-fw fa-lg"></i> | ||
</NavbarButton> | ||
<button aria-label="Profile" | ||
class="aspect-square rounded-full border w-14 h-14 overflow-hidden grid place-items-center"> | ||
<span class="sr-only">Profile</span> | ||
<img src="https://res.cloudinary.com/skepfusky-dookie/image/upload/q_75/projects/ozzychill/ozzyuwu.png" | ||
alt="Profile"> | ||
</button> | ||
</div> | ||
</template> | ||
<div class="flex items-center gap-x-3"> | ||
<NavbarButton class="aspect-square"> | ||
<span class="sr-only">Options</span> | ||
<i class="fas fa-ellipsis-vertical fa-fw fa-lg"></i> | ||
</NavbarButton> | ||
<NavbarButton class="aspect-square"> | ||
<span class="sr-only">Notifications</span> | ||
<i class="far fa-bell fa-fw fa-lg"></i> | ||
</NavbarButton> | ||
<button | ||
aria-label="Profile" | ||
class="grid w-12 h-12 overflow-hidden border rounded-full aspect-square place-items-center" | ||
> | ||
<span class="sr-only">Profile</span> | ||
<img | ||
src="https://res.cloudinary.com/skepfusky-dookie/image/upload/q_75/projects/misc/ozzy-fp-banner.png" | ||
alt="Profile" | ||
/> | ||
</button> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
<script setup></script> | ||
|
||
<template> | ||
<header> | ||
<div class="flex items-center justify-between px-12 py-6"> | ||
<NuxtLink to="/" class="logo-wordmark">MyFursona</NuxtLink> | ||
<NavbarSearchBox /> | ||
<UserLoggedIn /> | ||
</div> | ||
</header> | ||
<header> | ||
<div class="flex items-center justify-between px-12 py-6"> | ||
<div class="flex items-center gap-x-6"> | ||
<NuxtLink to="/" class="logo-wordmark">MyFursona</NuxtLink> | ||
<NavbarSearchBox /> | ||
</div> | ||
<NavbarUserLoggedIn /> | ||
</div> | ||
</header> | ||
</template> | ||
|
||
<style lang="scss"> | ||
.logo-wordmark { | ||
@apply text-3xl font-bold font-inter select-none | ||
@apply text-3xl font-bold font-inter select-none | ||
bg-gradient-to-br from-orange-400 via-purple-500 to-pink-400 bg-clip-text text-transparent; | ||
} | ||
</style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
import { defineStore } from "pinia" | ||
|
||
interface UserSettingsStore { | ||
theme: "light" | "dark" | "system" | ||
colorProfile: string | ||
nsfwEnabled: boolean | ||
theme: "light" | "dark" | "system" | ||
colorProfile: string | ||
nsfwEnabled: boolean | ||
status: string | ||
} | ||
|
||
export const useUserSettingsStore = defineStore("settings", () => { | ||
state: (): UserSettingsStore => { | ||
return { | ||
theme: "system", | ||
colorProfile: "#fff", | ||
nsfwEnabled: true, | ||
nsfwEnabled: false, | ||
status: "", | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters