mirror of https://github.com/jpanther/congo.git
🎨 Tailwind classes cleanup
parent
6415614513
commit
68ce84075e
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"plugins": ["prettier-plugin-go-template"],
|
||||
"plugins": ["prettier-plugin-go-template", "prettier-plugin-tailwindcss"],
|
||||
"goTemplateBracketSpacing": true,
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"printWidth": 100,
|
||||
|
|
|
@ -1192,8 +1192,8 @@ body:has(#menu-controller:checked) {
|
|||
.copy-button {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
z-index: 10;
|
||||
width: 5rem;
|
||||
cursor: pointer;
|
||||
|
|
|
@ -67,7 +67,7 @@ body:has(#menu-controller:checked) {
|
|||
|
||||
.toc ul,
|
||||
.toc li {
|
||||
@apply px-0 leading-snug list-none;
|
||||
@apply list-none px-0 leading-snug;
|
||||
}
|
||||
.toc ul ul {
|
||||
@apply ps-4;
|
||||
|
@ -90,7 +90,7 @@ body:has(#menu-controller:checked) {
|
|||
@apply visible;
|
||||
}
|
||||
.copy-button {
|
||||
@apply absolute top-0 right-0 z-10 invisible w-20 py-1 font-mono text-sm cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200;
|
||||
@apply invisible absolute right-0 top-0 z-10 w-20 cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 py-1 font-mono text-sm text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200;
|
||||
}
|
||||
.copy-button:hover,
|
||||
.copy-button:focus,
|
||||
|
@ -122,20 +122,20 @@ code {
|
|||
/* -- Chroma Highlight -- */
|
||||
/* Background */
|
||||
.chroma {
|
||||
@apply py-3 rounded-md bg-neutral-50 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200;
|
||||
@apply rounded-md bg-neutral-50 py-3 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200;
|
||||
}
|
||||
.chroma pre {
|
||||
@apply p-0 m-0;
|
||||
@apply m-0 p-0;
|
||||
}
|
||||
/* LineTable */
|
||||
.chroma .lntable {
|
||||
@apply block w-auto m-0 overflow-auto text-base;
|
||||
@apply m-0 block w-auto overflow-auto text-base;
|
||||
}
|
||||
/* LineNumbersTable */
|
||||
/* LineNumbers */
|
||||
.chroma .lnt,
|
||||
.chroma .ln {
|
||||
@apply px-2 mr-2 text-neutral-600 dark:text-neutral-300;
|
||||
@apply mr-2 px-2 text-neutral-600 dark:text-neutral-300;
|
||||
}
|
||||
.chroma .lntd {
|
||||
@apply p-0 align-top;
|
||||
|
@ -297,7 +297,7 @@ code {
|
|||
}
|
||||
/* CommentHashbang */
|
||||
.chroma .ch {
|
||||
@apply italic font-semibold text-neutral-500 dark:text-neutral-400;
|
||||
@apply font-semibold italic text-neutral-500 dark:text-neutral-400;
|
||||
}
|
||||
/* GenericEmph */
|
||||
.chroma .ge {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{ define "main" }}
|
||||
<h1 class="mb-3 text-4xl font-extrabold">{{ i18n "error.404_title" | emojify }}</h1>
|
||||
<p class="mt-8 mb-12 text-neutral-400 dark:text-neutral-500">
|
||||
<p class="mb-12 mt-8 text-neutral-400 dark:text-neutral-500">
|
||||
{{ i18n "error.404_error" | emojify }}
|
||||
</p>
|
||||
<div class="prose dark:prose-invert">
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
>
|
||||
{{- partial "head.html" . -}}
|
||||
<body
|
||||
class="flex flex-col h-screen px-6 m-auto text-lg leading-7 max-w-7xl bg-neutral text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32"
|
||||
class="m-auto flex h-screen max-w-7xl flex-col bg-neutral px-6 text-lg leading-7 text-neutral-900 sm:px-14 md:px-24 lg:px-32 dark:bg-neutral-800 dark:text-neutral"
|
||||
>
|
||||
<div id="the-top" class="absolute flex self-center">
|
||||
<a
|
||||
class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 focus:translate-y-0 dark:bg-neutral-600"
|
||||
class="-translate-y-8 rounded-b-lg bg-primary-200 px-3 py-1 text-sm focus:translate-y-0 dark:bg-neutral-600"
|
||||
href="#main-content"
|
||||
><span class="font-bold pe-2 text-primary-600 dark:text-primary-400">↓</span
|
||||
><span class="pe-2 font-bold text-primary-600 dark:text-primary-400">↓</span
|
||||
>{{ i18n "nav.skip_to_main" }}</a
|
||||
>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@
|
|||
{{ else }}
|
||||
{{ partial "partials/header/basic.html" . }}
|
||||
{{ end }}
|
||||
<div class="relative flex flex-col grow">
|
||||
<div class="relative flex grow flex-col">
|
||||
<main id="main-content" class="grow">
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 200) }}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="min-w-0 min-h-0 max-w-prose grow">
|
||||
<div class="min-h-0 min-w-0 max-w-prose grow">
|
||||
{{ .Content | emojify }}
|
||||
</div>
|
||||
</section>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<hr class="border-dotted w-36 border-neutral-400" />
|
||||
<hr class="w-36 border-dotted border-neutral-400" />
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link.html" . }}
|
||||
{{ end }}
|
||||
|
@ -44,8 +44,8 @@
|
|||
</section>
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ else }}
|
||||
<section class="mt-10 prose dark:prose-invert">
|
||||
<p class="py-8 border-t">
|
||||
<section class="prose mt-10 dark:prose-invert">
|
||||
<p class="border-t py-8">
|
||||
<em>{{ i18n "list.no_articles" | emojify }}</em>
|
||||
</p>
|
||||
</section>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{{ .Title | emojify }}
|
||||
</h1>
|
||||
</header>
|
||||
<section class="max-w-full mt-6 prose dark:prose-invert">
|
||||
<section class="prose mt-6 max-w-full dark:prose-invert">
|
||||
{{ .Content | emojify }}
|
||||
</section>
|
||||
<footer class="pt-8">
|
||||
|
|
|
@ -10,21 +10,22 @@
|
|||
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
|
||||
{{ .Title | emojify }}
|
||||
</h1>
|
||||
<div class="mt-8 mb-12 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
<div class="mb-12 mt-8 text-base text-neutral-500 print:hidden dark:text-neutral-400">
|
||||
{{ partial "article-meta.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
ß
|
||||
{{ with $feature }}
|
||||
<div class="prose">
|
||||
{{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }}
|
||||
{{ $class := "mb-6 -mt-4 rounded-md" }}
|
||||
{{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "lazy" false) }}
|
||||
{{ with $.Params.coverCaption }}
|
||||
<figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>
|
||||
<figcaption class="-mt-3 mb-6 text-center">{{ . | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
<section class="prose mt-0 flex max-w-full flex-col dark:prose-invert lg:flex-row">
|
||||
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in .TableOfContents "<ul") }}
|
||||
<div class="order-first px-0 lg:order-last lg:max-w-xs lg:ps-8">
|
||||
<div class="toc pe-5 print:hidden lg:sticky lg:top-10">
|
||||
|
@ -32,11 +33,11 @@
|
|||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="min-w-0 min-h-0 max-w-prose grow">
|
||||
<div class="min-h-0 min-w-0 max-w-prose grow">
|
||||
{{ .Content | emojify }}
|
||||
</div>
|
||||
</section>
|
||||
<footer class="pt-8 max-w-prose print:hidden">
|
||||
<footer class="max-w-prose pt-8 print:hidden">
|
||||
{{ partial "author.html" . }}
|
||||
{{ partial "sharing-links.html" . }}
|
||||
{{ partial "article-pagination.html" . }}
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
</header>
|
||||
{{ if .Content }}
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
<div class="min-w-0 min-h-0 max-w-prose grow">
|
||||
<section class="prose mt-0 flex max-w-full flex-col dark:prose-invert lg:flex-row">
|
||||
<div class="min-h-0 min-w-0 max-w-prose grow">
|
||||
{{ .Content | emojify }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
<section class="flex flex-wrap -mx-2 overflow-hidden">
|
||||
<section class="-mx-2 flex flex-wrap overflow-hidden">
|
||||
{{ range .Data.Terms }}
|
||||
<article class="w-full px-2 my-3 overflow-hidden sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5">
|
||||
<article class="my-3 w-full overflow-hidden px-2 sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5">
|
||||
<h2 class="flex items-center">
|
||||
<a
|
||||
class="text-xl font-medium decoration-primary-500 hover:underline hover:underline-offset-2"
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
</header>
|
||||
{{ if .Content }}
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
<div class="min-w-0 min-h-0 max-w-prose grow">
|
||||
<section class="prose mt-0 flex max-w-full flex-col dark:prose-invert lg:flex-row">
|
||||
<div class="min-h-0 min-w-0 max-w-prose grow">
|
||||
{{ .Content | emojify }}
|
||||
</div>
|
||||
</section>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<hr class="border-dotted w-36 border-neutral-400" />
|
||||
<hr class="w-36 border-dotted border-neutral-400" />
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link.html" . }}
|
||||
{{ end }}
|
||||
|
@ -33,8 +33,8 @@
|
|||
</section>
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ else }}
|
||||
<section class="mt-10 prose dark:prose-invert">
|
||||
<p class="py-8 border-t">
|
||||
<section class="prose mt-10 dark:prose-invert">
|
||||
<p class="border-t py-8">
|
||||
<em>{{ i18n "list.no_articles" | emojify }}</em>
|
||||
</p>
|
||||
</section>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<article class="flex flex-row mt-6 max-w-prose">
|
||||
<article class="mt-6 flex max-w-prose flex-row">
|
||||
{{- $images := $.Resources.ByType "image" }}
|
||||
{{- $thumbnail := $images.GetMatch (.Params.thumbnail | default "*thumb*") }}
|
||||
{{- $feature := $images.GetMatch (.Params.feature | default "*feature*") | default $thumbnail }}
|
||||
|
@ -42,7 +42,7 @@
|
|||
>{{ $.Title | emojify }}</a
|
||||
>
|
||||
<span
|
||||
class="text-xs align-top cursor-default text-neutral-400 dark:text-neutral-500"
|
||||
class="cursor-default align-top text-xs text-neutral-400 dark:text-neutral-500"
|
||||
title="{{ i18n "list.externalurl_title" }}"
|
||||
>
|
||||
<span class="rtl:hidden">↗</span>
|
||||
|
@ -69,7 +69,7 @@
|
|||
{{ partial "article-meta.html" . }}
|
||||
</div>
|
||||
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
|
||||
<div class="py-1 prose dark:prose-invert">
|
||||
<div class="prose py-1 dark:prose-invert">
|
||||
{{ .Summary | emojify }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
(and (ne $scope "single") (.Params.showTaxonomies | default (.Site.Params.list.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false))))
|
||||
(and (eq $scope "single") (.Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false)))
|
||||
}}
|
||||
<div class="flex flex-wrap my-1 text-xs leading-relaxed text-neutral-500 dark:text-neutral-400">
|
||||
<div class="my-1 flex flex-wrap text-xs leading-relaxed text-neutral-500 dark:text-neutral-400">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $context.GetTerms $taxonomy }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<ol class="text-sm text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
<ol class="text-sm text-neutral-500 print:hidden dark:text-neutral-400">
|
||||
{{ template "crumb" (dict "p1" . "p2" .) }}
|
||||
</ol>
|
||||
{{ define "crumb" }}
|
||||
|
@ -7,9 +7,9 @@
|
|||
{{ else if not .p1.IsHome }}
|
||||
{{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||
{{ end }}
|
||||
<li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
|
||||
<li class="{{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }} inline">
|
||||
<a
|
||||
class="hover:underline decoration-neutral-300 dark:underline-neutral-600"
|
||||
class="dark:underline-neutral-600 decoration-neutral-300 hover:underline"
|
||||
href="{{ .p1.RelPermalink }}"
|
||||
>{{ if .p1.Title }}
|
||||
{{- .p1.Title -}}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
{{/* Footer menu */}}
|
||||
{{ if .Site.Menus.footer }}
|
||||
<nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
|
||||
<ul class="flex flex-col list-none sm:flex-row">
|
||||
<ul class="flex list-none flex-col sm:flex-row">
|
||||
{{ range .Site.Menus.footer }}
|
||||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="mb-1 group text-end sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
<li class="group mb-1 text-end sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
|
@ -17,7 +17,7 @@
|
|||
>
|
||||
{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -37,13 +37,13 @@
|
|||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ partial "icon.html" "moon" }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ partial "icon.html" "sun" }}
|
||||
|
@ -59,7 +59,7 @@
|
|||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -117,13 +117,13 @@
|
|||
>
|
||||
<button id="appearance-switcher-0" type="button" aria-label="appearance switcher">
|
||||
<div
|
||||
class="flex items-center justify-center w-12 h-12 dark:hidden"
|
||||
class="flex h-12 w-12 items-center justify-center dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ partial "icon.html" "moon" }}
|
||||
</div>
|
||||
<div
|
||||
class="items-center justify-center hidden w-12 h-12 dark:flex"
|
||||
class="hidden h-12 w-12 items-center justify-center dark:flex"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ partial "icon.html" "sun" }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<header class="py-6 font-semibold text-neutral-900 dark:text-neutral print:hidden sm:py-10">
|
||||
<header class="py-6 font-semibold text-neutral-900 print:hidden sm:py-10 dark:text-neutral">
|
||||
<nav class="flex items-start justify-between sm:items-center">
|
||||
{{/* Site logo/title */}}
|
||||
<div class="flex flex-row items-center">
|
||||
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
{{/* Main menu */}}
|
||||
{{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }}
|
||||
<ul class="flex flex-col list-none text-end sm:flex-row">
|
||||
<ul class="flex list-none flex-col text-end sm:flex-row">
|
||||
{{ if .Site.Menus.main }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
|
@ -22,7 +22,7 @@
|
|||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -42,7 +42,7 @@
|
|||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
|
@ -56,7 +56,7 @@
|
|||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
|
@ -80,7 +80,7 @@
|
|||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -95,10 +95,10 @@
|
|||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<header class="py-6 font-semibold text-neutral-900 dark:text-neutral print:hidden sm:py-10">
|
||||
<header class="py-6 font-semibold text-neutral-900 print:hidden sm:py-10 dark:text-neutral">
|
||||
<nav class="flex items-start justify-between sm:items-center">
|
||||
{{/* Site logo/title */}}
|
||||
<div class="z-40 flex flex-row items-center">
|
||||
|
@ -13,10 +13,10 @@
|
|||
</div>
|
||||
<div
|
||||
id="menu-wrapper"
|
||||
class="fixed inset-0 z-30 invisible w-full h-full m-auto overflow-auto transition-opacity opacity-0 cursor-default bg-neutral-100/50 backdrop-blur-sm dark:bg-neutral-900/50"
|
||||
class="invisible fixed inset-0 z-30 m-auto h-full w-full cursor-default overflow-auto bg-neutral-100/50 opacity-0 backdrop-blur-sm transition-opacity dark:bg-neutral-900/50"
|
||||
>
|
||||
<ul
|
||||
class="flex flex-col w-full px-6 py-6 mx-auto overflow-visible list-none max-w-7xl text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
|
||||
class="mx-auto flex w-full max-w-7xl list-none flex-col overflow-visible px-6 py-6 text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
|
||||
>
|
||||
<li class="mb-1">
|
||||
<span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400"
|
||||
|
@ -28,7 +28,7 @@
|
|||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="mb-1 group">
|
||||
<li class="group mb-1">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
|
@ -38,7 +38,7 @@
|
|||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -58,7 +58,7 @@
|
|||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
|
@ -72,7 +72,7 @@
|
|||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
|
@ -97,7 +97,7 @@
|
|||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -112,10 +112,10 @@
|
|||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group">
|
||||
<li class="group mb-1">
|
||||
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<header class="py-6 font-semibold text-neutral-900 dark:text-neutral print:hidden sm:py-10">
|
||||
<header class="py-6 font-semibold text-neutral-900 print:hidden sm:py-10 dark:text-neutral">
|
||||
<nav class="flex items-start justify-between sm:items-center">
|
||||
{{/* Site logo/title */}}
|
||||
<div class="z-40 flex flex-row items-center">
|
||||
|
@ -13,10 +13,10 @@
|
|||
</div>
|
||||
<div
|
||||
id="menu-wrapper"
|
||||
class="fixed inset-0 z-30 invisible w-full h-full m-auto overflow-auto transition-opacity opacity-0 cursor-default bg-neutral-100/50 backdrop-blur-sm dark:bg-neutral-900/50"
|
||||
class="invisible fixed inset-0 z-30 m-auto h-full w-full cursor-default overflow-auto bg-neutral-100/50 opacity-0 backdrop-blur-sm transition-opacity dark:bg-neutral-900/50"
|
||||
>
|
||||
<ul
|
||||
class="flex flex-col w-full px-6 py-6 mx-auto overflow-visible list-none max-w-7xl text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
|
||||
class="mx-auto flex w-full max-w-7xl list-none flex-col overflow-visible px-6 py-6 text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
|
||||
>
|
||||
<li class="mb-1">
|
||||
<span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400"
|
||||
|
@ -28,7 +28,7 @@
|
|||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="mb-1 group">
|
||||
<li class="group mb-1">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
|
@ -38,7 +38,7 @@
|
|||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -58,7 +58,7 @@
|
|||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
|
@ -72,7 +72,7 @@
|
|||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
|
@ -97,7 +97,7 @@
|
|||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -112,10 +112,10 @@
|
|||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group">
|
||||
<li class="group mb-1">
|
||||
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
|
@ -127,13 +127,13 @@
|
|||
</div>
|
||||
</label>
|
||||
{{/* Basic menu */}}
|
||||
<ul class="flex-row hidden list-none text-end sm:flex">
|
||||
<ul class="hidden list-none flex-row text-end sm:flex">
|
||||
{{ if .Site.Menus.main }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
|
@ -143,7 +143,7 @@
|
|||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -163,7 +163,7 @@
|
|||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
|
@ -177,7 +177,7 @@
|
|||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
|
@ -201,7 +201,7 @@
|
|||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
|
@ -216,10 +216,10 @@
|
|||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
<button id="search-button-m1" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<article class="max-w-full prose dark:prose-invert">
|
||||
<article class="prose max-w-full dark:prose-invert">
|
||||
{{ with .Title }}
|
||||
<header>
|
||||
<h1>{{ . | emojify }}</h1>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{- $icon := resources.Get (print "icons/" . ".svg") -}}
|
||||
{{- if $icon -}}
|
||||
<span class="relative inline-block align-text-bottom px-1 icon">
|
||||
<span class="icon relative inline-block px-1 align-text-bottom">
|
||||
{{- $icon.Content | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
{{- $logo_dark := resources.Get .Site.Params.header.logoDark }}
|
||||
{{- if $logo }}
|
||||
<a href="{{ "" | relLangURL }}" class="mr-2">
|
||||
<!-- prettier-ignore-attribute -->
|
||||
<img
|
||||
src="{{ $logo.RelPermalink }}"
|
||||
width="{{ div $logo.Width 2 }}"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{{- if gt .TotalPages 1 }}
|
||||
{{- $start := math.Max 1 (sub .PageNumber $width) }}
|
||||
{{- $end := math.Min .TotalPages (add $start (mul $width 2)) }}
|
||||
<ul class="flex flex-row mt-8">
|
||||
<ul class="mt-8 flex flex-row">
|
||||
{{- with .Prev }}
|
||||
<li>
|
||||
<a
|
||||
|
@ -39,7 +39,7 @@
|
|||
<span
|
||||
aria-current="page"
|
||||
aria-label="Page {{ $i }}"
|
||||
class="block font-semibold rounded bg-primary-200 text-primary-700 dark:bg-primary-400 dark:text-neutral-800"
|
||||
class="block rounded bg-primary-200 font-semibold text-primary-700 dark:bg-primary-400 dark:text-neutral-800"
|
||||
>
|
||||
{{ $i }}
|
||||
</span>
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
<div
|
||||
id="search-wrapper"
|
||||
class="invisible fixed inset-0 z-50 flex h-screen w-screen cursor-default flex-col bg-neutral-500/50 p-4 backdrop-blur-sm dark:bg-neutral-900/50 sm:p-6 md:p-[10vh] lg:p-[12vh]"
|
||||
class="invisible fixed inset-0 z-50 flex h-screen w-screen cursor-default flex-col bg-neutral-500/50 p-4 backdrop-blur-sm sm:p-6 md:p-[10vh] lg:p-[12vh] dark:bg-neutral-900/50"
|
||||
data-url="{{ "" | absLangURL }}"
|
||||
>
|
||||
<div
|
||||
id="search-modal"
|
||||
class="flex flex-col w-full max-w-3xl min-h-0 mx-auto border rounded-md shadow-lg top-20 border-neutral-200 bg-neutral dark:border-neutral-700 dark:bg-neutral-800"
|
||||
class="top-20 mx-auto flex min-h-0 w-full max-w-3xl flex-col rounded-md border border-neutral-200 bg-neutral shadow-lg dark:border-neutral-700 dark:bg-neutral-800"
|
||||
>
|
||||
<header class="relative z-10 flex items-center justify-between flex-none px-2">
|
||||
<form class="flex items-center flex-auto min-w-0">
|
||||
<div class="flex items-center justify-center w-8 h-8 text-neutral-400">
|
||||
<header class="relative z-10 flex flex-none items-center justify-between px-2">
|
||||
<form class="flex min-w-0 flex-auto items-center">
|
||||
<div class="flex h-8 w-8 items-center justify-center text-neutral-400">
|
||||
{{ partial "icon.html" "search" }}
|
||||
</div>
|
||||
<input
|
||||
type="search"
|
||||
id="search-query"
|
||||
class="flex flex-auto h-12 mx-1 bg-transparent appearance-none focus:outline-dotted focus:outline-2 focus:outline-transparent"
|
||||
class="mx-1 flex h-12 flex-auto appearance-none bg-transparent focus:outline-dotted focus:outline-2 focus:outline-transparent"
|
||||
placeholder="{{ i18n "search.input_placeholder" }}"
|
||||
tabindex="0"
|
||||
/>
|
||||
</form>
|
||||
<button
|
||||
id="close-search-button"
|
||||
class="flex items-center justify-center w-8 h-8 text-neutral-700 hover:text-primary-600 dark:text-neutral dark:hover:text-primary-400"
|
||||
class="flex h-8 w-8 items-center justify-center text-neutral-700 hover:text-primary-600 dark:text-neutral dark:hover:text-primary-400"
|
||||
title="{{ i18n "search.close_button_title" }}"
|
||||
>
|
||||
{{ partial "icon.html" "xmark" }}
|
||||
</button>
|
||||
</header>
|
||||
<section class="flex-auto px-2 overflow-auto">
|
||||
<section class="flex-auto overflow-auto px-2">
|
||||
<ul id="search-results">
|
||||
<!-- <li class="mb-2">
|
||||
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<details open class="-ms-5 mt-0 overflow-hidden rounded-lg ps-5">
|
||||
<summary
|
||||
class="-ms-5 block cursor-pointer bg-neutral-100 py-1 ps-5 text-lg font-semibold text-neutral-800 dark:bg-neutral-700 dark:text-neutral-100 lg:hidden"
|
||||
class="-ms-5 block cursor-pointer bg-neutral-100 py-1 ps-5 text-lg font-semibold text-neutral-800 lg:hidden dark:bg-neutral-700 dark:text-neutral-100"
|
||||
>
|
||||
{{ i18n "article.table_of_contents" }}
|
||||
</summary>
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
{{ if .IsTranslated }}
|
||||
{{ $currentLang := .Page.Lang }}
|
||||
{{ if site.IsMultiLingual }}
|
||||
<div class="relative group">
|
||||
<div class="group relative">
|
||||
<button
|
||||
class="flex items-center justify-end w-full transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
class="group-dark:hover:text-primary-400 flex w-full items-center justify-end transition-colors group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "translate" }}<span class="text-sm">{{ .Lang | upper }}</span
|
||||
><span class="text-[0.6rem]"
|
||||
|
@ -20,10 +20,10 @@
|
|||
>
|
||||
</button>
|
||||
{{ if eq $dir "down" }}
|
||||
<div class="invisible w-full h-2 bg-transparent group-hover:visible"></div>
|
||||
<div class="invisible h-2 w-full bg-transparent group-hover:visible"></div>
|
||||
{{ end }}
|
||||
<div
|
||||
class="{{ cond (eq $dir "down") "top-8" "bottom-7" }} invisible absolute ltr:right-0 rtl:left-0 z-50 flex flex-col whitespace-nowrap rounded border border-neutral-300 bg-neutral text-start text-base shadow group-hover:visible dark:border-neutral-600 dark:bg-neutral-800"
|
||||
class="{{ cond (eq $dir "down") "top-8" "bottom-7" }} invisible absolute z-50 flex flex-col whitespace-nowrap rounded border border-neutral-300 bg-neutral text-start text-base shadow group-hover:visible ltr:right-0 rtl:left-0 dark:border-neutral-600 dark:bg-neutral-800"
|
||||
>
|
||||
{{ $siteLanguages := site.Languages }}
|
||||
{{ $pageLang := .Page.Lang }}
|
||||
|
@ -36,9 +36,9 @@
|
|||
{{ if eq $pageLang .Lang }}
|
||||
<a
|
||||
href="{{ $translation.RelPermalink }}"
|
||||
class="flex items-center justify-between w-full px-2 py-1 bg-primary-100 dark:bg-primary-900"
|
||||
class="flex w-full items-center justify-between bg-primary-100 px-2 py-1 dark:bg-primary-900"
|
||||
>{{ .LanguageName }}<span
|
||||
class="w-6 ms-2 text-primary-600 dark:text-primary-400"
|
||||
class="ms-2 w-6 text-primary-600 dark:text-primary-400"
|
||||
>{{ partial "icon.html" "check" }}</span
|
||||
></a
|
||||
>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<div class="flex rounded-md bg-primary-100 px-4 py-3 dark:bg-primary-900">
|
||||
<span class="pe-3 text-primary-400">
|
||||
{{ partial "icon.html" (.Get 0 | default "triangle-exclamation") }}
|
||||
</span>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }}
|
||||
{{ if $icon }}
|
||||
<span class="relative inline-block align-text-bottom icon">
|
||||
<span class="icon relative inline-block align-text-bottom">
|
||||
{{ $icon.Content | safeHTML }}
|
||||
</span>
|
||||
{{ else }}
|
||||
|
|
Loading…
Reference in New Issue