Nuxt Content 3 migration #12

Merged
eggy merged 81 commits from js into master 2022-08-10 18:38:39 -04:00
6 changed files with 32 additions and 17 deletions
Showing only changes of commit 3c7d81fd36 - Show all commits

View File

@ -23,10 +23,11 @@ const prettyDate = latestDate.format("DD MMM YYYY");
<HomeStatBox <HomeStatBox
:href="latest._path" :href="latest._path"
color="lightblue" color="lightblue"
darkcolor="#497482"
title="Latest blog post" title="Latest blog post"
> >
<h2 class="m-0 mt-4 mb-1">{{ latest.title }}</h2> <h2 class="m-0 mt-4 mb-1">{{ latest.title }}</h2>
<p class="text-sm text-gray-500 m-0"> <p class="text-sm text-gray-500 dark:text-gray-400 m-0">
{{ prettyDate }} · {{ latest.readingTime.text }} {{ prettyDate }} · {{ latest.readingTime.text }}
</p> </p>
<div class="tag-list mt-1"> <div class="tag-list mt-1">
@ -51,15 +52,9 @@ const prettyDate = latestDate.format("DD MMM YYYY");
</template> </template>
</ContentRenderer> </ContentRenderer>
--> -->
<p class="excerpt text-gray-600 text-base m-0 mt-5"> <p class="excerpt text-gray-600 dark:text-gray-300 text-base m-0 mt-5">
{{ latest.description }} {{ latest.description }}
</p> </p>
</HomeStatBox> </HomeStatBox>
</div> </div>
</template> </template>
<style scoped>
article p {
color: gray;
}
</style>

View File

@ -24,6 +24,7 @@ const [title, description] = latestCommit.message.split("\n\n");
<HomeStatBox <HomeStatBox
:href="href" :href="href"
color="lightgray" color="lightgray"
darkcolor="slategray"
title="Latest commit" title="Latest commit"
:clearstyles="true" :clearstyles="true"
> >

View File

@ -8,12 +8,14 @@ import { unref as _unref } from "vue";
const { const {
href, href,
color = "pink", color = "pink",
darkcolor = "#c88994",
title, title,
clearstyles = false, clearstyles = false,
forceheight, forceheight,
} = defineProps<{ } = defineProps<{
href?: string; href?: string;
color?: Color; color?: Color;
darkcolor?: Color;
title?: string; title?: string;
clearstyles?: boolean; clearstyles?: boolean;
forceheight?: ViewportLength<"rem">; forceheight?: ViewportLength<"rem">;
@ -46,6 +48,10 @@ const height = forceheight ?? "auto";
border-radius: 0.5rem; border-radius: 0.5rem;
} }
html.dark .container {
border: 0.5rem solid v-bind(darkcolor);
}
.main-content { .main-content {
padding: v-bind(padding); padding: v-bind(padding);
padding-top: 0; padding-top: 0;
@ -56,6 +62,10 @@ const height = forceheight ?? "auto";
background: v-bind(color); background: v-bind(color);
} }
html.dark .title {
background: v-bind(darkcolor);
}
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
.container { .container {
width: 90vw; width: 90vw;

View File

@ -20,9 +20,14 @@ const prettyDate = latestDate.format("DD MMM YYYY");
<template> <template>
<div class="prose dark:prose-invert flex"> <div class="prose dark:prose-invert flex">
<HomeStatBox :href="latest._path" color="lightgreen" title="Latest story"> <HomeStatBox
:href="latest._path"
color="lightgreen"
darkcolor="#2c8a2c"
title="Latest story"
>
<h2 class="m-0 mt-4 mb-1">{{ latest.title }}</h2> <h2 class="m-0 mt-4 mb-1">{{ latest.title }}</h2>
<p class="text-sm text-gray-500 m-0"> <p class="text-sm text-gray-500 dark:text-gray-400 m-0">
{{ prettyDate }} · {{ latest.readingTime.words }} words {{ prettyDate }} · {{ latest.readingTime.words }} words
</p> </p>
<div class="tag-list mt-1"> <div class="tag-list mt-1">
@ -47,7 +52,7 @@ const prettyDate = latestDate.format("DD MMM YYYY");
</template> </template>
</ContentRenderer> </ContentRenderer>
--> -->
<p class="excerpt text-gray-600 text-base m-0 mt-5"> <p class="excerpt text-gray-600 dark:text-gray-300 text-base m-0 mt-5">
{{ latest.description }} {{ latest.description }}
</p> </p>
</HomeStatBox> </HomeStatBox>
@ -55,10 +60,6 @@ const prettyDate = latestDate.format("DD MMM YYYY");
</template> </template>
<style scoped> <style scoped>
article p {
color: gray;
}
h2 { h2 {
word-break: break-all; word-break: break-all;
} }

View File

@ -5,7 +5,7 @@ const { dest } = defineProps<{ dest: string }>();
<template> <template>
<a :href="dest"> <a :href="dest">
<div <div
class="inline-block text-xs rounded-full py-1 px-2 mt-1 mr-1 bg-gray-300 dark:bg-gray-500;" class="inline-block text-xs rounded-full py-1 px-2 mt-1 mr-1 bg-gray-300 dark:bg-gray-500"
> >
<slot /> <slot />
</div> </div>

View File

@ -1 +1,9 @@
export default {}; export const projects: Record<string, string> = {
public: "",
primoprod: "",
mandown: "",
noveldown: "",
eifueo: "",
};
export default projects;