-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create tag collections and improve search menu style
- Loading branch information
1 parent
44e55f2
commit 0d41668
Showing
10 changed files
with
171 additions
and
17 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
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
55 changes: 55 additions & 0 deletions
55
components/posts/navigation/search/TagCollectionsWrapper.vue
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<script lang="ts" setup> | ||
import { Dialog, DialogPanel, TransitionChild, TransitionRoot } from '@headlessui/vue' | ||
const props = defineProps({ | ||
modelValue: Boolean | ||
}) | ||
const emit = defineEmits(['update:modelValue']) | ||
</script> | ||
|
||
<template> | ||
<TransitionRoot | ||
:show="modelValue" | ||
as="template" | ||
> | ||
<Dialog | ||
as="div" | ||
class="relative z-40" | ||
@close="emit('update:modelValue', false)" | ||
> | ||
<TransitionChild | ||
as="template" | ||
enter="ease-out duration-300" | ||
enter-from="opacity-0" | ||
enter-to="opacity-100" | ||
leave="ease-in duration-200" | ||
leave-from="opacity-100" | ||
leave-to="opacity-0" | ||
> | ||
<div class="fixed inset-0 bg-base-1000/60 backdrop-blur transition-opacity" /> | ||
</TransitionChild> | ||
|
||
<div class="fixed inset-0 overflow-y-auto"> | ||
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"> | ||
<TransitionChild | ||
as="template" | ||
enter="ease-out duration-300" | ||
enter-from="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" | ||
enter-to="opacity-100 translate-y-0 sm:scale-100" | ||
leave="ease-in duration-200" | ||
leave-from="opacity-100 translate-y-0 sm:scale-100" | ||
leave-to="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" | ||
> | ||
<DialogPanel | ||
class="relative transform overflow-hidden rounded-lg bg-base-1000 px-4 pb-4 pt-5 text-left ring-1 ring-base-0/20 transition-all sm:my-8 sm:w-full sm:max-w-sm sm:p-6" | ||
> | ||
<!-- TODO: Fix animation --> | ||
<slot v-if="modelValue" /> | ||
</DialogPanel> | ||
</TransitionChild> | ||
</div> | ||
</div> | ||
</Dialog> | ||
</TransitionRoot> | ||
</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
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { useStorage, useToggle } from '@vueuse/core' | ||
|
||
const defaultTagCollections = [ | ||
{ | ||
name: 'Gay Blocklist', | ||
tags: [ | ||
'-gay', | ||
'-gay_sex', | ||
'-solo_male', | ||
'-male_only', | ||
'-male_focus', | ||
'-male/male', | ||
'-male_penetrated', | ||
'-male_penetrating_male' | ||
] | ||
}, | ||
{ | ||
name: 'Furry Blocklist', | ||
tags: [ | ||
'-furry', | ||
'-furry_only', | ||
'-fur', | ||
'-canid', | ||
'-canine', | ||
'-dragon', | ||
'-anthro', | ||
'-anthrofied', | ||
'-anthro_on_anthro', | ||
'-scaly', | ||
'-scales', | ||
'-accipitrid', | ||
'-accipitriform', | ||
'-animal_genitalia', | ||
'-ferrettre', | ||
'-rodent', | ||
'-equine' | ||
] | ||
}, | ||
{ | ||
name: 'Indecencies Blocklist', | ||
tags: ['-scat', '-shitting', '-diaper', '-pee', '-peeing', '-peeing_self', '-fart', '-shitpost', '-gore', '-vore'] | ||
}, | ||
{ | ||
name: 'AI Blocklist', | ||
tags: ['-ai_generated', '-ai-generated', '-stable_diffusion'] | ||
} | ||
] | ||
|
||
const tagCollections = useStorage('user-tagCollections', defaultTagCollections, localStorage, { | ||
writeDefaults: false | ||
}) | ||
|
||
export function useTagCollections() { | ||
const [value, toggle] = useToggle(false) | ||
|
||
return { | ||
isActive: value, | ||
toggleIsActive: toggle, | ||
|
||
tagCollections | ||
} | ||
} |
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