Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(site): 馃帶 Extracted explicit styles
- Loading branch information
1 parent
bb5d038
commit ec82852
Showing
22 changed files
with
782 additions
and
352 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<template> | ||
<NuxtLink | ||
class="font-bold underline underline-offset-4" | ||
:href="href" | ||
:target="target" | ||
> | ||
<slot /> | ||
</NuxtLink> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
defineProps({ | ||
href: { | ||
type: String, | ||
default: "", | ||
}, | ||
target: { | ||
type: String, | ||
default: undefined, | ||
required: false, | ||
}, | ||
}); | ||
</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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<code class="rounded-lg bg-primary-300 px-3 py-1 text-sm text-primary-900"> | ||
<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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<h1 class="font-serif text-4xl lg:text-6xl" :id="id"> | ||
<a v-if="generate" :href="`#${id}`"> | ||
<slot /> | ||
</a> | ||
<slot v-else /> | ||
</h1> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, useRuntimeConfig } from "#imports"; | ||
const props = defineProps<{ id?: string }>(); | ||
const { headings } = useRuntimeConfig().public.mdc; | ||
const generate = computed(() => props.id && headings?.anchorLinks?.h1); | ||
</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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<h2 class="font-serif text-3xl lg:text-4xl" :id="id"> | ||
<a v-if="id && generate" :href="`#${id}`"> | ||
<slot /> | ||
</a> | ||
<slot v-else /> | ||
</h2> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, useRuntimeConfig } from "#imports"; | ||
const props = defineProps<{ id?: string }>(); | ||
const { headings } = useRuntimeConfig().public.mdc; | ||
const generate = computed(() => props.id && headings?.anchorLinks?.h2); | ||
</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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<h3 class="font-serif text-2xl lg:text-3xl" :id="id"> | ||
<a v-if="id && generate" :href="`#${id}`"> | ||
<slot /> | ||
</a> | ||
<slot v-else /> | ||
</h3> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, useRuntimeConfig } from "#imports"; | ||
const props = defineProps<{ id?: string }>(); | ||
const { headings } = useRuntimeConfig().public.mdc; | ||
const generate = computed(() => props.id && headings?.anchorLinks?.h3); | ||
</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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<h4 class="font-serif text-xl font-bold lg:text-2xl" :id="id"> | ||
<a v-if="id && generate" :href="`#${id}`"> | ||
<slot /> | ||
</a> | ||
<slot v-else /> | ||
</h4> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, useRuntimeConfig } from "#imports"; | ||
const props = defineProps<{ id?: string }>(); | ||
const { headings } = useRuntimeConfig().public.mdc; | ||
const generate = computed(() => props.id && headings?.anchorLinks?.h4); | ||
</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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<li class="space-y-4"><slot /></li> | ||
</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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<ol class="list-inside list-decimal space-y-8 text-lg"> | ||
<slot /> | ||
</ol> | ||
</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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<p class="text-pretty text-lg leading-loose tracking-wide"><slot /></p> | ||
</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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<pre | ||
class="overflow-x-auto rounded-lg border border-primary-900 bg-primary-200/50 p-5 text-sm backdrop-blur-2xl dark:border-primary-100 dark:bg-primary-800/50 lg:p-7" | ||
:class="$props.class" | ||
><slot /></pre> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
defineProps({ | ||
code: { | ||
type: String, | ||
default: "", | ||
}, | ||
language: { | ||
type: String, | ||
default: null, | ||
}, | ||
filename: { | ||
type: String, | ||
default: null, | ||
}, | ||
highlights: { | ||
type: Array as () => number[], | ||
default: () => [], | ||
}, | ||
meta: { | ||
type: String, | ||
default: null, | ||
}, | ||
class: { | ||
type: String, | ||
default: null, | ||
}, | ||
}); | ||
</script> | ||
|
||
<style lang="scss"> | ||
pre code { | ||
.line { | ||
@apply block; | ||
} | ||
} | ||
</style> |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<template> | ||
<ul | ||
class="list-inside list-disc text-lg" | ||
:class="{ | ||
'space-y-8': $route.name === 'index', | ||
'space-y-4': $route.name === 'release-notes', | ||
}" | ||
> | ||
<slot /> | ||
</ul> | ||
</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
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,17 +1,24 @@ | ||
<script lang="ts" setup> | ||
const shades = getColorShades("primary"); | ||
const { width: browserWidth } = useWindowSize(); | ||
const enableCursorFx = ref(true); | ||
const showCursorFx = computed(() => | ||
browserWidth.value > 1024 && enableCursorFx.value ? true : false, | ||
); | ||
</script> | ||
|
||
<template> | ||
<NuxtLoadingIndicator :color="shades[500]" /> | ||
|
||
<div class="relative overflow-hidden"> | ||
<CursorFx /> | ||
<CursorFx v-if="showCursorFx" /> | ||
|
||
<main class="mx-auto w-[90%]"> | ||
<slot /> | ||
</main> | ||
|
||
<Footer /> | ||
<Footer @toggle-cursor-fx="enableCursorFx = !enableCursorFx" /> | ||
</div> | ||
</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
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
Oops, something went wrong.