Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .vitepress/components/MoonPhase.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script setup lang="ts">
const phases = [
{ emoji: '🌑', alt: 'new moon' },
{ emoji: '🌒', alt: 'waxing crescent moon' },
{ emoji: '🌓', alt: 'first quarter moon' },
{ emoji: '🌔', alt: 'waxing gibbous moon' },
{ emoji: '🌕', alt: 'full moon' },
{ emoji: '🌖', alt: 'waning gibbous moon' },
{ emoji: '🌗', alt: 'last quarter moon' },
{ emoji: '🌘', alt: 'waning crescent moon' },
]

const phase = phases[
Math.floor(Math.random() * phases.length)
]
</script>

<template>
<span :aria-label="phase.alt">{{ phase.emoji }}</span>
</template>
Loading
Loading