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