Skip to content

Commit b802052

Browse files
committed
Update banners, hide them for now
1 parent a098f8d commit b802052

File tree

13 files changed

+33
-33
lines changed

13 files changed

+33
-33
lines changed

app.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,12 @@ export default defineConfig({
3333
babel: {
3434
plugins: [babelPluginLabels, babelPluginLazyPlus],
3535
},
36-
// the `solid` field is incorrectly typed
37-
...({} as any),
3836
},
3937

4038
extensions: ["mdx", "md"],
4139

4240
vite(options) {
4341
return {
44-
// css: { postcss: "./postcss.config.js" },
4542
css: { transformer: "lightningcss" },
4643
server: {
4744
port: 3000,

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"prod": "pnpm build && pnpm serve",
88
"build": "vinxi build",
99
"start": "vinxi start",
10-
"serve": "cd .output && npx http-server public -p 3091",
10+
"serve": "cd .output && npx http-server public -p 3000",
1111
"version": "vinxi version"
1212
},
1313
"dependencies": {
@@ -30,9 +30,9 @@
3030
"cssnano": "6.1.2",
3131
"lodash": "npm:lodash-es@4.17.21",
3232
"postcss-preset-env": "10.5.0",
33-
"@style-this/core": "link:../../../.local/share/pnpm/global/5/node_modules/@style-this/core",
34-
"@style-this/solid": "link:../../../.local/share/pnpm/global/5/node_modules/@style-this/solid",
35-
"@style-this/vite": "link:../../../.local/share/pnpm/global/5/node_modules/@style-this/vite",
33+
"@style-this/core": "0.1.4",
34+
"@style-this/solid": "1.0.1",
35+
"@style-this/vite": "1.0.5",
3636
"postcss-pxtorem": "6.1.0",
3737
"rehype-raw": "7.0.0",
3838
"sass": "1.94.2",

src/BlogIndex.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ import { Component } from "solid-js";
33
import { For } from "solid-js/web";
44
import { config } from "~/config";
55
import { 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

2222
const 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/>")}

src/LazyImage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const LazyImage: (meta: LazyImageMeta) => Component<Props> =
4747

4848
return (
4949
<div
50-
class={cn(outer, $class)}
50+
class={cn(_LazyImage_outer, $class)}
5151
style={{
5252
...style,
5353
"--width": `${meta.width}`,
@@ -69,13 +69,13 @@ const LazyImage: (meta: LazyImageMeta) => Component<Props> =
6969
);
7070
};
7171

72-
const outer = css`
72+
const _LazyImage_outer = css`
7373
width: 100%;
7474
container-type: inline-size;
7575
overflow: hidden;
7676
object-fit: contain;
7777
${breakpoint("xs")} {
78-
object-fit: cover !important;
78+
object-fit: cover;
7979
}
8080
`;
8181

@@ -88,11 +88,11 @@ const _LazyImage = css`
8888
--y_sf_px: calc((1 / var(--height)) * var(--h_limit) * 100);
8989
--sf_px: min(var(--x_sf_px), var(--y_sf_px));
9090
width: calc((var(--width) * var(--sf_px) / 100));
91-
/* width: 80vw; */
92-
height: calc((var(--height) * var(--sf_px) / 100));
91+
/* width: inherit; */
92+
height: min(100%, calc((var(--height) * var(--sf_px) / 100)));
9393
/* height: calc(var(--x_sf_px)); */
9494
/* height: 100cqw; */
95-
/* background: red; */
95+
object-fit: inherit;
9696
9797
/* container-type: inline-size; */
9898

src/about/AboutSite.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const AboutSite: Component<Props> = (props) => {
9999
};
100100

101101
const _AboutSite = css`
102+
/* background: blue; */
102103
justify-items: start;
103104
grid-template:
104105
"picture name name emtpy" auto

src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import "~/style/global.style";
22
// the vite graph is generated before the babel plugin adds the imports, so we add it here
3-
import "~/LazyImage";
3+
// import "~/LazyImage";
44

55
import { Meta, MetaProvider, Title } from "@solidjs/meta";
66
import { Router } from "@solidjs/router";
15.4 MB
Loading
14.9 MB
Loading
13.3 MB
Loading
13.9 MB
Loading

0 commit comments

Comments
 (0)