diff options
| -rw-r--r-- | README.md | 7 | ||||
| -rw-r--r-- | assets/css/tailwind.css | 17 | ||||
| -rw-r--r-- | content/posts/postgres-aggregation-speed/index.md | 6 | ||||
| -rw-r--r-- | layouts/_default/baseof.html | 5 | ||||
| -rw-r--r-- | layouts/_default/single.html | 8 | ||||
| -rw-r--r-- | layouts/index.html | 9 | ||||
| -rw-r--r-- | layouts/partials/head/meta.html | 3 | ||||
| -rw-r--r-- | layouts/partials/header.html | 7 | ||||
| -rw-r--r-- | layouts/partials/header/index.html | 7 | ||||
| -rw-r--r-- | layouts/partials/header/nav.html | 6 | ||||
| -rw-r--r-- | layouts/partials/header/theme-button.html | 4 | ||||
| -rw-r--r-- | layouts/partials/list/default.html | 4 |
12 files changed, 29 insertions, 54 deletions
@@ -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 @@ </head> <body class="max-w-screen-md mx-auto px-2.5"> - <div class="header"> - {{ partial "header/index" . }} - {{ partial "header/theme-button" . }} - </div> + {{ partial "header/index" . }} <main id="content"> {{- 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 @@ <div class="meta"> {{/* Publish date */}} <time datetime="{{ .PublishDate }}" title='{{ .PublishDate.Format "Mon, Jan 2, 2006, 3:04 PM MST" }}'> - {{ .PublishDate.Format "02/01/2006" }} - {{ printf (i18n "estimatedReadingTime") .ReadingTime }} + {{ .PublishDate.Format "02/01/2006" }} - Estimated reading time: {{ .ReadingTime }} minutes </time> - {{/* Categories */}} - {{ with (.GetTerms "categories") }} — + {{/* Categories */}} + {{ with (.GetTerms "categories") }} — {{ range . }} <a class="categories" href="{{ .RelPermalink }}" alt="{{ .LinkTitle }}"> {{ .LinkTitle }} </a> - {{ end }} + {{ end }} {{ end }} </div> </header> 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" }} - -<div class="py-2 flex flex-col gap-1"> - <h3 class="title-small">{{ .Title }}</h3> -</div> - - <section>{{ .Content }} </section> - -{{ 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") }} <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> @@ -11,7 +12,7 @@ <link rel="canonical" href="{{ .Permalink }}" /> <link rel="robots" href="/robot.txt" /> -<link rel="icon" type="image/x-icon" href="{{ $favicon.RelPermalink }}" /> +<link rel="icon" type="image/x-icon" href="{{ $tiny.RelPermalink }}" /> {{ if .Site.Config.Services.GoogleAnalytics.ID }} <!-- Google Analytics --> 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 @@ -<header class="flex flex-col sm:flex-row items-center gap-5 sm:gap-10 pt-16 py-12"> - {{ partial "header/avatar.html" . }} - <div class="flex flex-col gap-5"> - {{ partial "header/title.html" . }} - {{ partial "header/nav.html" . }} - </div> -</header>
\ 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 @@ -<header class="flex flex-col sm:flex-row items-center gap-5 sm:gap-10 pt-16 py-12"> +<header class="flex flex-col sm:flex-row items-center gap-2 sm:gap-10 py-4"> {{ partial "header/avatar" . }} - + {{ partial "header/theme-button" . }} + <div class="flex flex-col gap-5"> - {{ partial "header/title" . }} + {{ partial "header/title" . }} {{ partial "header/nav" . }} </div> </header> 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 @@ <nav> <ul> - {{ $currentPage := . }} - {{ range site.Menus.main }} - {{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }} + {{ $currentPage := . }} + {{ range site.Menus.main }} + {{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }} {{- $page_url := $currentPage.Permalink | absLangURL }} <li> <a href="{{ .URL }}" class="{{ if eq $menu_item_url $page_url }} active {{ end }}"> diff --git a/layouts/partials/header/theme-button.html b/layouts/partials/header/theme-button.html index 0a8313b..31ac8c4 100644 --- a/layouts/partials/header/theme-button.html +++ b/layouts/partials/header/theme-button.html @@ -1,4 +1,4 @@ -<button class="toggle-theme" aria-label="Toggle Theme" title="Toggle Theme" onclick="toggleTheme()"> +<button class="w-8 h-8" aria-label="Toggle Theme" title="Toggle Theme" onclick="toggleTheme()"> <span class="theme-icon light"> {{ partial "utils/icon" "sun" }} </span> <span class="theme-icon dark"> {{ partial "utils/icon" "moon" }} </span> </button> @@ -44,4 +44,4 @@ setTheme('light'); } } -</script>
\ No newline at end of file +</script> diff --git a/layouts/partials/list/default.html b/layouts/partials/list/default.html index f3fd20e..e088f1c 100644 --- a/layouts/partials/list/default.html +++ b/layouts/partials/list/default.html @@ -2,7 +2,7 @@ <h1> <a href="{{ .Permalink }}">{{ .Title }}</a> </h1> - + <span class="date"> <time datetime="{{ .PublishDate }}" title='{{ .PublishDate.Format "Mon, Jan 2, 2006, 3:04 PM MST" }}'> {{ .PublishDate.Format "02/01/2006" }} @@ -19,7 +19,7 @@ <div class="mt-2"> <a class="read-more" href="{{ .Permalink }}"> - {{ i18n "readMore" }} + Read more <span class="w-4 h-4 stroke-2"> {{ partial "utils/icon" "arrow-right" }} </span> |
