@@ -3,21 +3,21 @@ import { Component } from "solid-js";
33import { For } from "solid-js/web" ;
44import { config } from "~/config" ;
55import { getArticles } from "~/ssg/getArticles" ;
6- import DefaultBanner from "~/articles/9999-01-01-test/banner.jpg?lazy" ;
7- import { LazyImageComponent } from "~/LazyImage" ;
6+ // import DefaultBanner from "~/articles/9999-01-01-test/banner.jpg?lazy";
7+ // import { LazyImageComponent } from "~/LazyImage";
88
9- const banners = Object . fromEntries (
10- Object . entries (
11- import . meta. glob ( "~/articles/*/banner.jpg " , {
12- query : "?lazy" ,
13- import : "default" ,
14- eager : true ,
15- } )
16- ) . map ( ( [ k , v ] ) => [
17- k . substring ( "/src/articles/" . length , k . lastIndexOf ( "/" ) ) ,
18- v ,
19- ] )
20- ) ;
9+ // const banners = Object.fromEntries(
10+ // Object.entries(
11+ // import.meta.glob("~/articles/*/banner.* ", {
12+ // query: "?lazy",
13+ // import: "default",
14+ // eager: true,
15+ // })
16+ // ).map(([k, v]) => [
17+ // k.substring("/src/articles/".length, k.lastIndexOf("/")),
18+ // v,
19+ // ])
20+ // );
2121
2222const articles = getArticles ( ) ;
2323
@@ -30,8 +30,8 @@ const BlogIndex: Component = () => {
3030 < ul class = "flex flex-col gap-4" >
3131 < For each = { articles } >
3232 { ( item , idx ) => {
33- const Banner = ( banners [ item . slug ] ??
34- DefaultBanner ) as LazyImageComponent ;
33+ // const Banner = (banners[item.slug] ??
34+ // DefaultBanner) as LazyImageComponent;
3535 return (
3636 < >
3737 < li class = "hover:bg-colors-primary-100 flex flex-col" >
@@ -44,7 +44,7 @@ const BlogIndex: Component = () => {
4444 < span class = "textbody text-colors-text-300a mt-1 !no-underline" >
4545 { item . date } by Matic Utsumi Gačar
4646 </ span >
47- < Banner class = "mt-4 mb-4 h-60" />
47+ { /* <Banner class="mt-4 mb-4 h-60 object-cover! " /> */ }
4848 < span
4949 class = "text-colors-text-600a"
5050 innerHTML = { item . description ?. replaceAll ( "\n\n" , "<br/>" ) }
0 commit comments