File tree Expand file tree Collapse file tree 10 files changed +54
-43
lines changed
Expand file tree Collapse file tree 10 files changed +54
-43
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const props = defineProps({
1313 :to =" props.to"
1414 class =" flex items-center text-sm font-bold text-white hover:text-orange-500"
1515 >
16- <span class =" translate-y-0.5" >More </span >
16+ <span class =" translate-y-0.5" >< slot ></ slot > </span >
1717 <svg
1818 xmlns =" http://www.w3.org/2000/svg"
1919 viewBox =" 0 0 24 24"
Original file line number Diff line number Diff line change @@ -7,32 +7,27 @@ const props = defineProps({
77
88<template >
99 <section class =" container mx-auto space-y-2" >
10- <div class =" grid grid-cols-1 gap-4 lg:grid-cols- 3" >
10+ <div class =" grid grid-cols-1 gap-3" >
1111 <div v-for =" (article, ix) of articles" :key =" ix" >
1212 <NuxtLink :to =" article.path" >
1313 <div
14- class =" h-full space-y-2 bg-orange-500 /50 p-4 text-white drop-shadow-lg hover:ring-1 hover:ring-white"
14+ class =" h-full space-y-2 bg-black /50 p-3 text-white drop-shadow-lg hover:ring-1 hover:ring-white"
1515 >
16- <div >
16+ <div class = " flex " >
1717 <div
1818 class =" line-clamp-1 flex-1 text-lg font-bold md:text-xl"
1919 :title =" article.title"
2020 >
2121 {{ article.title }}
2222 </div >
23- <div class =" space-x-2" >
24- <NuxtTime
25- v-if =" show_dates"
26- :datetime =" article.date"
27- class =" text-sm text-gray-200"
28- year =" numeric"
29- month =" short"
30- day =" 2-digit"
31- />
32- <span v-if =" ix === 0" class =" text-xs font-bold uppercase italic"
33- >latest</span
34- >
35- </div >
23+ <NuxtTime
24+ v-if =" show_dates"
25+ :datetime =" article.date"
26+ class =" text-sm text-gray-200"
27+ year =" numeric"
28+ month =" short"
29+ day =" 2-digit"
30+ />
3631 </div >
3732 <div class =" line-clamp-3 text-sm text-gray-100" >
3833 {{ article.description }}
@@ -41,6 +36,6 @@ const props = defineProps({
4136 </NuxtLink >
4237 </div >
4338 </div >
44- <MoreLink to =" /blog" / >
39+ <MoreLink to =" /blog" >See all posts</ MoreLink >
4540 </section >
4641</template >
Original file line number Diff line number Diff line change @@ -111,9 +111,9 @@ const filtered_links = computed(() => {
111111 class =" to-background-dark bg-gradient-to-b from-transparent text-white"
112112 >
113113 <div class =" container mx-auto py-8 text-white" >
114- <div class =" mb-2 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4 " >
114+ <div class =" mb-2 grid grid-cols-1 gap-3 sm:grid-cols-3 " >
115115 <nuxt-link
116- class =" relative text-orange-500 ring-2 hover:text-white hover:ring-white "
116+ class =" relative text-orange-500 ring-2 ring-white hover:text-white hover:ring-orange-500 "
117117 v-for =" link in filtered_links"
118118 :key =" link.title"
119119 :to =" link.link"
@@ -145,7 +145,9 @@ const filtered_links = computed(() => {
145145 </div >
146146 </nuxt-link >
147147 </div >
148- <MoreLink to =" /playground" v-if =" route.path !== '/playground'" />
148+ <MoreLink to =" /playground" v-if =" route.path !== '/playground'"
149+ >See all experiments</MoreLink
150+ >
149151 </div >
150152 </section >
151153</template >
Original file line number Diff line number Diff line change 11---
2- title : " Render three-dimensional models in NuxtContent with p5js "
2+ title : " Render three-dimensional models in ` NuxtContent` with p5.js "
33date : " 2024-12-31"
44tags : ["nuxt", "p5js", "3d"]
55categories : ["examples"]
Original file line number Diff line number Diff line change 11<script setup>
2- const data = await queryCollection (" content" )
2+ const articles = await queryCollection (" content" )
33 .order (" date" , " DESC" )
4- .limit (6 )
4+ .limit (3 )
55 .all ();
66 </script >
77
88<template >
99 <div class =" min-h-screen bg-emerald-950 bg-[url('/images/noise.svg')]" >
1010 <section class =" bg-gradient-to-b from-background to-transparent py-2" >
11- <div class =" container mx-auto my-12 " >
11+ <div class =" container mx-auto my-7 " >
1212 <div class =" text-orange-500" >
1313 <Logo />
1414 </div >
1515 </div >
1616 </section >
17- <SectionBlogPosts :articles =" data " :show_dates =" true" />
18- <SectionPlayground :limit =" 8 " showImages linkToPlayground />
17+ <SectionBlogPosts :articles =" articles " :show_dates =" true" />
18+ <SectionPlayground :limit =" 6 " showImages linkToPlayground />
1919 </div >
2020</template >
Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ definePageMeta({ layout: "light" });
33 </script >
44
55<template >
6- <main class =" bg-white flex h-[1024px] justify-center border-2 border-gray-500" >
7- <iframe src =" https://cmpadden.github.io/conway/" width =" 100%" height =" 100%" ></iframe >
8- </main >
6+ <main
7+ class =" flex h-[1024px] justify-center border-2 border-gray-500 bg-white"
8+ >
9+ <iframe
10+ src =" https://cmpadden.github.io/conway/"
11+ width =" 100%"
12+ height =" 100%"
13+ ></iframe >
14+ </main >
915</template >
Original file line number Diff line number Diff line change @@ -123,14 +123,11 @@ const wordIndex = ref<number>(0);
123123const search = ref (" " );
124124const suggestions = ref ([]);
125125
126- const { data : conjugations } = await useFetch (
127- " /api/french-conjugations" ,
128- {
129- transform : (value ) => {
130- return value as Conjugation [];
131- },
126+ const { data : conjugations } = await useFetch (" /api/french-conjugations" , {
127+ transform : (value ) => {
128+ return value as Conjugation [];
132129 },
133- );
130+ } );
134131
135132const word = computed (() => {
136133 if (conjugations .value ) {
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ const src = `${fullUrl}?embed=1`;
1717 loading =" lazy"
1818 />
1919 </div >
20- <div class =" text-center text-lg font-mono" >
21- Click inside the sketch to redraw the layered waves. Colors and logic now
22- live in the standalone p5 playground.
20+ <div class =" text-center font-mono text-lg " >
21+ Click inside the sketch to redraw the layered waves. Colors and logic
22+ now live in the standalone p5 playground.
2323 </div >
2424 <a
2525 :href =" fullUrl"
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const src = `${fullUrl}?embed=1`;
1717 loading =" lazy"
1818 />
1919 </div >
20- <div class =" text-center text-lg font-mono" >
20+ <div class =" text-center font-mono text-lg " >
2121 Watch a fixed palette drift with light RGB variance. Reload or tap the
2222 standalone sketch to sample a new grid.
2323 </div >
Original file line number Diff line number Diff line change @@ -18,11 +18,22 @@ const src = `${viewerBase}?${query.toString()}`;
1818 </div >
1919 <div >
2020 Powered by the vanilla
21- <a class =" text-blue-500 underline" href =" https://p5js.org" target =" _blank" rel =" noreferrer" >p5js</a >
21+ <a
22+ class =" text-blue-500 underline"
23+ href =" https://p5js.org"
24+ target =" _blank"
25+ rel =" noreferrer"
26+ >p5js</a
27+ >
2228 WEBGL renderer.
2329 </div >
2430 <div class =" h-[28rem] border-2 border-white" >
25- <iframe :src =" src" title =" STL demo" class =" h-full w-full" loading =" lazy" />
31+ <iframe
32+ :src =" src"
33+ title =" STL demo"
34+ class =" h-full w-full"
35+ loading =" lazy"
36+ />
2637 </div >
2738 <a
2839 :href =" fullUrl"
You can’t perform that action at this time.
0 commit comments