Toggle Starred
This commit is contained in:
13
.vitepress/theme/components/ToggleStarred.vue
Normal file
13
.vitepress/theme/components/ToggleStarred.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
const toggleStarred = () => document.documentElement.classList.toggle("starred-only");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button class="p-[4px 8px] text-xl i-carbon:star" @click="toggleStarred()" />
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.starred-only li:not(.starred) {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user