mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 15:54:13 +01:00
Working on blog post
This commit is contained in:
23
app/components/content/ProseH2.vue
Normal file
23
app/components/content/ProseH2.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<h2
|
||||
:id="id"
|
||||
>
|
||||
<a
|
||||
v-if="id && generate"
|
||||
:href="`#${id}`"
|
||||
class="font-semibold border-transparent border-b-2 hover:border-black dark:hover:border-white duration-300"
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
<slot v-else />
|
||||
</h2>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, useRuntimeConfig } from '#imports'
|
||||
|
||||
const props = defineProps<{ id?: string }>()
|
||||
|
||||
const { headings } = useRuntimeConfig().public.mdc
|
||||
const generate = computed(() => props.id && ((typeof headings?.anchorLinks === 'boolean' && headings?.anchorLinks) || (typeof headings?.anchorLinks === 'object' && headings?.anchorLinks?.h2)))
|
||||
</script>
|
||||
5
app/components/content/ProseH3.vue
Normal file
5
app/components/content/ProseH3.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<h3 class="text-base text-neutral-700 dark:text-neutral-300">
|
||||
<slot />
|
||||
</h3>
|
||||
</template>
|
||||
5
app/components/content/ProseP.vue
Normal file
5
app/components/content/ProseP.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<p class="text-neutral-700 dark:text-neutral-300">
|
||||
<slot />
|
||||
</p>
|
||||
</template>
|
||||
@@ -24,7 +24,7 @@ useHead({
|
||||
<main v-if="post">
|
||||
<div class="flex">
|
||||
<NuxtLink
|
||||
class="flex items-center gap-2 mb-4 group text-sm hover:text-black dark:hover:text-white duration-300"
|
||||
class="flex items-center gap-2 mb-8 group text-sm hover:text-black dark:hover:text-white duration-300"
|
||||
to="/writings"
|
||||
>
|
||||
<UIcon
|
||||
|
||||
Reference in New Issue
Block a user