light mode and a few improvements

This commit is contained in:
Zoe
2024-04-08 22:52:47 -05:00
parent 66ad112d8c
commit ca1283d5a8
42 changed files with 14514 additions and 9654 deletions

27
components/content/ProseCode.vue Normal file → Executable file
View File

@@ -1,31 +1,26 @@
<template>
<div
class="container my-2 bg-neutral-900">
<span v-if="filename"
class="filename-text text-xs leading-none tracking-tight text-gray-400 font-jetbrains">
<div class="container my-2 dark:bg-[#1d1b1d] bg-[hsl(270,26.89%,94.47%)]">
<span v-if="filename" class="filename-text text-xs leading-none tracking-tight text-gray-400 font-jetbrains">
{{ filename }}
</span>
<slot />
<slot />
<div class="bottom-container">
<div class="copy-container">
<button class="rounded hover:bg-zinc-800/60 transition-colors duration-200 flex p-1"
<button
class="rounded hover:bg-zinc-300/70 dark:hover:bg-zinc-800/60 transition-colors duration-200 flex p-1"
@click="copy(code)" @keypress.space="copy(code)">
<div class="h-6"
v-if="copied">
<Icon size="24"
name="tabler:check" />
<div class="h-6" v-if="copied">
<Icon size="24" name="tabler:check" />
</div>
<div class="h-6"
v-else>
<Icon size="24"
name="tabler:copy" />
<div class="h-6" v-else>
<Icon size="24" name="tabler:copy" />
</div>
</button>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { useClipboard } from '@vueuse/core';
const { copy, copied } = useClipboard();
@@ -39,7 +34,7 @@ const props = withDefaults(
{ code: '', language: null, filename: null, highlights: undefined }
);
</script>
<style scoped>
.icon {
display: block;

3
components/content/ProseCodeInline.vue Normal file → Executable file
View File

@@ -1,12 +1,11 @@
<template>
<code>
<code class="dark:bg-[#1d1b1d] bg-[hsl(270,26.89%,94.47%)]">
<slot />
</code>
</template>
<style scoped>
code {
background-color: #252425;
border-radius: 0.375rem;
font-size: 0.875rem;
font-weight: 400;

0
components/content/ProseH2.vue Normal file → Executable file
View File