-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up vc-repository, fixed code issues, fixed names, updated dep…
…endencies, removed unused dependencies
- Loading branch information
Showing
16 changed files
with
209 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<template> | ||
<code | ||
class="bg-gray-900 py-0.9 px-1.8 rounded-md border-inline border-1 border-gray-700 text-sm text-gray-50 font-bold"> | ||
<code class="bg-gray-900 py-0.9 px-1.8 rounded-md border-inline border-1 border-gray-700 text-sm text-gray-50 font-bold"> | ||
<slot /> | ||
</code> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,19 @@ | ||
<template> | ||
<h1 | ||
:id="id" | ||
class="relative font-semibold text-4xl mb-10 text-gray-50 cursor-pointer" | ||
@pointerenter="showHashtag = true" | ||
@pointerleave="showHashtag = false" | ||
@click.prevent="handleClick" | ||
> | ||
<span v-if="showHashtag" class="absolute left-[-32px] text-primary-300" | ||
>#</span | ||
> | ||
<a v-if="generate" :href="`#${id}`"> | ||
<slot /> | ||
</a> | ||
<slot v-else /> | ||
</h1> | ||
<h1 :id="id" class="relative font-semibold text-4xl mb-10 text-gray-50 cursor-pointer group"> | ||
<span class="absolute left-[-32px] text-primary-300 hidden group-hover:block">#</span> | ||
<NuxtLink v-if="id && generate" :to="{ hash: `#${id}` }"> | ||
<slot /> | ||
</NuxtLink> | ||
<slot v-else /> | ||
</h1> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, useRuntimeConfig, ref } from "#imports"; | ||
import { scroll } from "~/lib/navHelper/scroll"; | ||
<script lang="ts" setup> | ||
import { computed, useRuntimeConfig } from "#imports"; | ||
const route = useRoute(); | ||
const showHashtag = ref(false); | ||
const props = defineProps<{ id?: string }>(); | ||
const { headings } = useRuntimeConfig().public.mdc; | ||
const generate = computed(() => props.id && headings?.anchorLinks?.h1); | ||
function handleClick() { | ||
if (props.id) { | ||
scroll(props.id, route.path); | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,19 @@ | ||
<template> | ||
<h2 | ||
:id="id" | ||
class="font-semibold text-3xl mb-2 mt-10 text-gray-50" | ||
@pointerenter="showHashtag = true" | ||
@pointerleave="showHashtag = false" | ||
@click.prevent="handleClick" | ||
> | ||
<span v-if="showHashtag" class="absolute left-[-2%] text-primary-300" | ||
>#</span | ||
> | ||
<a v-if="id && generate" :href="`#${id}`"> | ||
<slot /> | ||
</a> | ||
<slot v-else /> | ||
</h2> | ||
<h2 :id="id" class="font-semibold text-3xl mb-2 mt-10 text-gray-50 group"> | ||
<span class="absolute left-[-2%] text-primary-300 hidden group-hover:block">#</span> | ||
<NuxtLink v-if="id && generate" :to="{ hash: `#${id}` }"> | ||
<slot /> | ||
</NuxtLink> | ||
<slot v-else /> | ||
</h2> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, ref, useRuntimeConfig } from "#imports"; | ||
import { scroll } from "~/lib/navHelper/scroll"; | ||
<script lang="ts" setup> | ||
import { computed, useRuntimeConfig } from "#imports"; | ||
const route = useRoute(); | ||
const showHashtag = ref(false); | ||
const props = defineProps<{ id?: string }>(); | ||
const { headings } = useRuntimeConfig().public.mdc; | ||
const generate = computed(() => props.id && headings?.anchorLinks?.h2); | ||
function handleClick() { | ||
if (props.id) { | ||
scroll(props.id, route.path); | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,19 @@ | ||
<template> | ||
<h3 | ||
:id="id" | ||
class="font-semibold text-2xl mb-2 mt-10 text-gray-50" | ||
@pointerenter="showHashtag = true" | ||
@pointerleave="showHashtag = false" | ||
@click.prevent="handleClick" | ||
> | ||
<span v-if="showHashtag" class="absolute left-[-8px] text-primary-300" | ||
>#</span | ||
> | ||
<a v-if="id && generate" :href="`#${id}`"> | ||
<slot /> | ||
</a> | ||
<slot v-else /> | ||
</h3> | ||
<h3 :id="id" class="font-semibold text-2xl mb-2 mt-10 text-gray-50 group"> | ||
<span class="absolute left-[-8px] text-primary-300 hidden group-hover:block">#</span> | ||
<NuxtLink v-if="id && generate" :to="{ hash: `#${id}` }"> | ||
<slot /> | ||
</NuxtLink> | ||
<slot v-else /> | ||
</h3> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, ref, useRuntimeConfig } from "#imports"; | ||
import { scroll } from "~/lib/navHelper/scroll"; | ||
import { computed, useRuntimeConfig } from "#imports"; | ||
const route = useRoute(); | ||
const showHashtag = ref(false); | ||
const props = defineProps<{ id?: string }>(); | ||
const { headings } = useRuntimeConfig().public.mdc; | ||
const generate = computed(() => props.id && headings?.anchorLinks?.h3); | ||
function handleClick() { | ||
if (props.id) { | ||
scroll(props.id, route.path); | ||
} | ||
} | ||
</script> |
Oops, something went wrong.