From 3d83f6e14f3524531dbc5afadb42f2946161a2f6 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Mon, 29 Sep 2025 22:05:18 +0200 Subject: Update global styles --- README.md | 7 ++----- assets/css/tailwind.css | 17 ++++++----------- content/posts/postgres-aggregation-speed/index.md | 6 +++--- layouts/_default/baseof.html | 5 +---- layouts/_default/single.html | 8 ++++---- layouts/index.html | 9 --------- layouts/partials/head/meta.html | 3 ++- layouts/partials/header.html | 7 ------- layouts/partials/header/index.html | 7 ++++--- layouts/partials/header/nav.html | 6 +++--- layouts/partials/header/theme-button.html | 4 ++-- layouts/partials/list/default.html | 4 ++-- 12 files changed, 29 insertions(+), 54 deletions(-) delete mode 100644 layouts/index.html delete mode 100644 layouts/partials/header.html diff --git a/README.md b/README.md index bd49130..37b063a 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,8 @@ - Cleanup articles - Move to drafts -- Revisiter le thème - SEO - Page speed insights -- Tables may overflow body width on mobile -- Margins are too wide on mobile? -- Migrate out of Hugo cuz too complex? - - https://quartz.jzhao.xyz: Obsidian - Remove: postcss, tailwind +- Table of content: `tableOfContents: true` +- Fix svg not rendered anymore diff --git a/assets/css/tailwind.css b/assets/css/tailwind.css index 6181ea6..1c0722b 100644 --- a/assets/css/tailwind.css +++ b/assets/css/tailwind.css @@ -103,7 +103,7 @@ } body { - @apply bg-white dark:bg-gray-900 text-gray-700 dark:text-gray-300 text-lg text-justify; + @apply bg-white dark:bg-gray-900 text-gray-700 dark:text-gray-300 text-lg; } h1, h2, h3, h4, h5, h6 { @@ -139,7 +139,7 @@ } p, hr, pre, dl { - @apply mb-5 text-justify; + @apply mb-5; } article > h1 { @@ -191,15 +191,15 @@ } table { - @apply w-full border rounded-md border-separate border-spacing-0 mb-5; + @apply w-full border rounded-md border-separate border-spacing-0 mb-5 block overflow-x-auto md:table md:overflow-x-visible; } thead th { - @apply border-b-2 border-r last:border-r-0 py-2 px-3; + @apply border-b-2 border-r last:border-r-0 py-2 px-3 whitespace-nowrap md:whitespace-normal; } tbody td { - @apply py-2 px-3 border-b text-base border-r last:border-r-0; + @apply py-2 px-3 border-b text-base border-r last:border-r-0 whitespace-nowrap md:whitespace-normal; } tbody tr:last-child td { @@ -354,13 +354,8 @@ @apply text-center sm:text-left text-4xl font-extrabold text-gray-800 dark:text-gray-100; } - .header { - @apply flex flex-row items-center justify-between; - } - .header .toggle-theme { - @apply w-6 h-6; - } + .title-large { @apply text-4xl leading-snug font-bold text-gray-900 dark:text-gray-300; diff --git a/content/posts/postgres-aggregation-speed/index.md b/content/posts/postgres-aggregation-speed/index.md index 29756e8..007959f 100644 --- a/content/posts/postgres-aggregation-speed/index.md +++ b/content/posts/postgres-aggregation-speed/index.md @@ -155,7 +155,7 @@ I run these five queries with `EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS)`, and - `HashAggregate` are different because of the choice of data processing - `composite` is the fastest - `json` is faster than `jsonb` -- `array` is faster than `object` +- `array` is faster than `object` I thought that JSONB was faster than JSON, but I now understand it is faster for things like filtering data. But in this case, I pay for encoding in the first place, and there is no gain to expect. Only when the source column is JSONB encoded, there is no cost for encoding: it is paid on write. @@ -246,5 +246,5 @@ I don't really know why `composite text` is that slow in both benchmarks. ## TODO -- [ ] Rename folder -- [ ] Resources: postgres json, postgres aggregation, psycopg \ No newline at end of file +- [ ] Resources: postgres json, postgres aggregation, psycopg +- [ ] Charts > tables diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index aa39a42..4e673db 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,10 +5,7 @@ -
- {{ partial "header/index" . }} - {{ partial "header/theme-button" . }} -
+ {{ partial "header/index" . }}
{{- block "main" . -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 80c3bee..271ddd8 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,16 +7,16 @@
{{/* Publish date */}} - {{/* Categories */}} - {{ with (.GetTerms "categories") }} — + {{/* Categories */}} + {{ with (.GetTerms "categories") }} — {{ range . }} {{ .LinkTitle }} - {{ end }} + {{ end }} {{ end }}
diff --git a/layouts/index.html b/layouts/index.html deleted file mode 100644 index 7cf7b9d..0000000 --- a/layouts/index.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ define "main" }} - -
-

{{ .Title }}

-
- -
{{ .Content }}
- -{{ end }} \ No newline at end of file diff --git a/layouts/partials/head/meta.html b/layouts/partials/head/meta.html index 329d9bf..93f8594 100644 --- a/layouts/partials/head/meta.html +++ b/layouts/partials/head/meta.html @@ -1,4 +1,5 @@ {{ $favicon := resources.GetMatch .Site.Params.favicon }} +{{ $tiny := ($favicon.Fill "80x80 q90") }} @@ -11,7 +12,7 @@ - + {{ if .Site.Config.Services.GoogleAnalytics.ID }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html deleted file mode 100644 index cdfb463..0000000 --- a/layouts/partials/header.html +++ /dev/null @@ -1,7 +0,0 @@ -
- {{ partial "header/avatar.html" . }} -
- {{ partial "header/title.html" . }} - {{ partial "header/nav.html" . }} -
-
\ No newline at end of file diff --git a/layouts/partials/header/index.html b/layouts/partials/header/index.html index 43debba..fdbce83 100644 --- a/layouts/partials/header/index.html +++ b/layouts/partials/header/index.html @@ -1,8 +1,9 @@ -
+
{{ partial "header/avatar" . }} - + {{ partial "header/theme-button" . }} +
- {{ partial "header/title" . }} + {{ partial "header/title" . }} {{ partial "header/nav" . }}
diff --git a/layouts/partials/header/nav.html b/layouts/partials/header/nav.html index 94b073d..95c0e59 100644 --- a/layouts/partials/header/nav.html +++ b/layouts/partials/header/nav.html @@ -1,8 +1,8 @@