-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from LittleFoxCompany/feature/website-cleanups
Feature/website cleanups
- Loading branch information
Showing
5 changed files
with
67 additions
and
4,960 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
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,29 +1,40 @@ | ||
<template> | ||
<div @mouseover="show = true" @mouseleave="show = false" @click="show = false" class="group relative isolate z-50 flex cursor-pointer"> | ||
<!-- Title --> | ||
<div class="flex items-center gap-1"> | ||
<span class="text-lg font-semibold"> | ||
{{ label }} | ||
</span> | ||
<Icon name="heroicons:chevron-down-16-solid" class="h-4 w-4 text-indigo-400 transition-all group-hover:rotate-180" /> | ||
</div> | ||
<!-- @mouseover="show = true" @mouseleave="show = false" --> | ||
<div ref="dropdown" @click="show = !show" class="group isolate z-50 flex cursor-pointer"> | ||
<!-- Title --> | ||
<div class="flex items-center gap-1"> | ||
<span class="text-lg font-semibold"> | ||
{{ label }} | ||
</span> | ||
<Icon name="heroicons:chevron-down-16-solid" class="h-4 w-4 text-indigo-400 transition-all" | ||
:class="show ? 'rotate-180' : 'rotate-0'" | ||
/> | ||
</div> | ||
|
||
<!-- Links --> | ||
<div | ||
class="absolute bottom-0 left-0 z-50 flex rounded-lg border border-black/5 bg-white/80 p-1 shadow-2xl backdrop-blur transition-all duration-300 md:left-1/2 md:-translate-x-1/2 dark:border-white/5 dark:bg-zinc-900/95" | ||
:class="show ? 'pointer-events-auto translate-y-full opacity-100' : 'pointer-events-none translate-y-full opacity-0'"> | ||
<slot /> | ||
</div> | ||
<!-- Links --> | ||
<Teleport to="body"> | ||
<div | ||
v-if="show" | ||
class="absolute top-16 left-1/2 -translate-x-1/2 max-md:w-[90vw] z-50 flex rounded-lg border border-black/5 bg-white/80 p-1 shadow-2xl backdrop-blur transition-all duration-300 dark:border-white/5 dark:bg-zinc-900/95" | ||
:class="show ? 'pointer-events-auto opacity-100' : 'pointer-events-none opacity-0'"> | ||
<slot /> | ||
</div> | ||
</Teleport> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const props = defineProps({ | ||
label: { | ||
type: String, | ||
required: true | ||
} | ||
}) | ||
const props = defineProps({ | ||
label: { | ||
type: String, | ||
required: true | ||
} | ||
}) | ||
const show = ref(false) | ||
const dropdown = ref(null) | ||
const show = ref(false) | ||
onClickOutside(dropdown, () => { | ||
show.value = false | ||
}) | ||
</script> |
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
Binary file not shown.
Oops, something went wrong.