docs/.vitepress/theme/components/SidebarCard.vue

3da2b7137fec2feaa6140e57f30ae8e04c455c96
wotaku/docs/.vitepress/theme/components/SidebarCard.vue history · blame · raw

35 lines · 1207 bytes

 1<!--
 2  All Rights Reserved
 3
 4  Copyright (c) 2025 taskylizard
 5
 6  All rights reserved. This code and its associated files may not be copied, modified, distributed, sublicensed, or used in any form, in whole or in part, without prior written permission from the copyright holder.
 7-->
 8<script setup lang="ts">
 9import { ref } from "vue";
10
11import LegendModal from "./LegendModal.vue";
12
13const isModalOpen = ref(false);
14
15const focusLegendModal = () => {
16  isModalOpen.value = true;
17};
18</script>
19
20<template>
21  <div
22    class="bg-$vp-c-bg hover:bg-$vp-c-bg/40 border-$vp-c-default-soft hover:border-primary transition-border relative z-0 rounded-lg border-2 border-solid p-5 duration-500 mt-2">
23    <button class="w-full text-left" @click="isModalOpen = true">
24      <div class="align-center flex items-center gap-2">
25        <div class="i-material-symbols-info-outline-rounded text-$vp-c-text-2" />
26        <div class="text-$vp-c-text-1 lh-relaxed text-sm font-bold">Legend</div>
27      </div>
28      <div class="text-$vp-c-text-2 text-xs mt-1">
29        Click to view all icons and their meanings
30      </div>
31    </button>
32
33    <LegendModal :is-open="isModalOpen" @close="isModalOpen = false" />
34  </div>
35</template>