chore: switch away from reactivity transform
also use a released version of nuxt
This commit is contained in:
parent
a7f38e77ae
commit
577e00a870
@ -1,19 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Color, ViewportLength } from "csstype";
|
import type { Color, ViewportLength } from "csstype";
|
||||||
|
|
||||||
// fix ReferenceError: _unref is not defined
|
const props = withDefaults(
|
||||||
// https://github.com/nuxt/framework/issues/5546
|
defineProps<{
|
||||||
import { unref as _unref } from "vue";
|
|
||||||
|
|
||||||
const {
|
|
||||||
href,
|
|
||||||
id,
|
|
||||||
color = "pink",
|
|
||||||
darkcolor = "#c88994",
|
|
||||||
title,
|
|
||||||
clearstyles = false,
|
|
||||||
forceheight,
|
|
||||||
} = defineProps<{
|
|
||||||
href?: string;
|
href?: string;
|
||||||
id?: string;
|
id?: string;
|
||||||
color?: Color;
|
color?: Color;
|
||||||
@ -21,10 +10,12 @@ const {
|
|||||||
title?: string;
|
title?: string;
|
||||||
clearstyles?: boolean;
|
clearstyles?: boolean;
|
||||||
forceheight?: ViewportLength<"rem">;
|
forceheight?: ViewportLength<"rem">;
|
||||||
}>();
|
}>(),
|
||||||
|
{ color: "pink", darkcolor: "#c88994", clearstyles: false }
|
||||||
|
);
|
||||||
|
|
||||||
const padding = clearstyles ? "0" : "1rem";
|
const padding = props.clearstyles ? "0" : "1rem";
|
||||||
const height = forceheight ?? "100%";
|
const height = props.forceheight ?? "100%";
|
||||||
|
|
||||||
// v-bind DOES NOT WORK on initial render
|
// v-bind DOES NOT WORK on initial render
|
||||||
// so unfortunately we have to use the old way
|
// so unfortunately we have to use the old way
|
||||||
@ -32,8 +23,8 @@ const height = forceheight ?? "100%";
|
|||||||
const cssVars = {
|
const cssVars = {
|
||||||
"--padding": padding,
|
"--padding": padding,
|
||||||
"--height": height,
|
"--height": height,
|
||||||
"--color": color,
|
"--color": props.color,
|
||||||
"--darkcolor": darkcolor,
|
"--darkcolor": props.darkcolor,
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
import type { StoryParsedContent, BlogParsedContent } from "@/shared/types";
|
import type { StoryParsedContent, BlogParsedContent } from "@/shared/types";
|
||||||
import { calcReadingTime } from "@/shared/metadata";
|
import { calcReadingTime } from "@/shared/metadata";
|
||||||
|
|
||||||
const { post, type, highlighttags } = defineProps<{
|
const props = defineProps<{
|
||||||
post: StoryParsedContent | BlogParsedContent;
|
post: StoryParsedContent | BlogParsedContent;
|
||||||
type: "stories" | "blog";
|
type: "stories" | "blog";
|
||||||
highlighttags?: string[];
|
highlighttags?: string[];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const readingTime = calcReadingTime(post);
|
const readingTime = calcReadingTime(props.post);
|
||||||
const descText =
|
const descText =
|
||||||
type === "stories"
|
props.type === "stories"
|
||||||
? `${readingTime.words.total} words`
|
? `${readingTime.words.total} words`
|
||||||
: `${readingTime.minutes} min read`;
|
: `${readingTime.minutes} min read`;
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Project } from "@/data/projects";
|
import type { Project } from "@/data/projects";
|
||||||
import { unref as _unref } from "vue";
|
import { unref as _unref } from "vue";
|
||||||
const { project, reverse = false } = defineProps<{
|
const props = defineProps<{
|
||||||
project: Project;
|
project: Project;
|
||||||
reverse?: boolean;
|
reverse?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const imgUrl = project.img ? `url(/images/projects/${project.img})` : "none";
|
const imgUrl = props.project.img
|
||||||
|
? `url(/images/projects/${props.project.img})`
|
||||||
|
: "none";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const { dest, highlight = false } = defineProps<{
|
const props = defineProps<{
|
||||||
dest: string;
|
dest: string;
|
||||||
highlight?: boolean;
|
highlight?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const { src } = defineProps<{ src: string }>();
|
const props = defineProps<{ src: string }>();
|
||||||
|
|
||||||
|
const src = props.src;
|
||||||
const imgSrc =
|
const imgSrc =
|
||||||
src.startsWith("http://") || src.startsWith("https://")
|
src.startsWith("http://") || src.startsWith("https://")
|
||||||
? src
|
? src
|
||||||
|
@ -7,7 +7,6 @@ export default defineNuxtConfig({
|
|||||||
"@nuxtjs/tailwindcss",
|
"@nuxtjs/tailwindcss",
|
||||||
"@nuxtjs/color-mode",
|
"@nuxtjs/color-mode",
|
||||||
"@funken-studio/sitemap-nuxt-3",
|
"@funken-studio/sitemap-nuxt-3",
|
||||||
"nuxt-full-static",
|
|
||||||
],
|
],
|
||||||
nitro: {
|
nitro: {
|
||||||
prerender: {
|
prerender: {
|
||||||
@ -89,7 +88,6 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
experimental: {
|
experimental: {
|
||||||
reactivityTransform: true,
|
|
||||||
noScripts: true,
|
noScripts: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
"@funken-studio/sitemap-nuxt-3": "^4.0.4",
|
"@funken-studio/sitemap-nuxt-3": "^4.0.4",
|
||||||
"@nuxtjs/tailwindcss": "^6.2.0",
|
"@nuxtjs/tailwindcss": "^6.2.0",
|
||||||
"@tailwindcss/typography": "^0.5.2",
|
"@tailwindcss/typography": "^0.5.2",
|
||||||
"nuxt": "^3.0.0",
|
"nuxt": "^3.1.1",
|
||||||
"nuxt-full-static": "^0.2.1",
|
|
||||||
"reading-time": "^2.0.0-1",
|
"reading-time": "^2.0.0-1",
|
||||||
"rehype-katex": "^6.0.2",
|
"rehype-katex": "^6.0.2",
|
||||||
"remark-math": "^5.1.1",
|
"remark-math": "^5.1.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user