This commit is contained in:
rawhide kobayashi 2025-01-08 15:49:14 -06:00
parent 56c233a5f4
commit 09070060cd
Signed by: rawhide_k
GPG Key ID: E71F77DDBC513FD7
4 changed files with 103 additions and 21 deletions

View File

@ -92,7 +92,7 @@
--tw-prose-th-borders:rgba(var(--color-neutral-500), 1);
--tw-prose-td-borders:rgba(var(--color-neutral-300), 1);
--tw-prose-invert-body:rgba(var(--color-neutral-300), 1);
--tw-prose-invert-headings:rgba(var(--color-neutral-50), 1);
--tw-prose-invert-headings:rgba(var(--color-secondary-600), 1);
--tw-prose-invert-lead:rgba(var(--color-neutral-500), 1);
--tw-prose-invert-links:rgba(var(--color-secondary-600), 1);
--tw-prose-invert-bold:rgba(var(--color-neutral), 1);
@ -113,11 +113,6 @@
line-height:1.75
}
.prose :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-top:1.25em;
margin-bottom:1.25em;
}
/*
p {
background-color:rgba(var(--color-primary-900), 0.5);
@ -177,5 +172,48 @@ p {
}
.dark\:prose-invert:is(.dark *) :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
background-color:rgba(var(--color-primary-900), 0.8);
}
background-color:transparent;
}
.prose :where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
color:var(--tw-prose-headings);
font-weight:700;
font-size:1.5em;
margin-top:0.5em;
margin-bottom:0.2em;
line-height:1.3333333
}
.prose :where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
color:var(--tw-prose-headings);
font-weight:600;
font-size:1.25em;
margin-top:0.5em;
margin-bottom:0.2em;
line-height:1.6
}
.prose :where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
color:var(--tw-prose-headings);
font-weight:600;
margin-top:0.5em;
margin-bottom:0.2em;
line-height:1.5
}
.cool-title {
color:rgba(var(--color-primary-700), 1);
background-color:rgba(var(--color-secondary-600), 1);
padding:4px;
}
.prose :where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
border-color:var(--tw-prose-hr);
border-top-width:1px;
margin-top:0.5em;
margin-bottom:0.5em
}
.min-w-content {
min-width:fit-content;
}

View File

@ -33,12 +33,9 @@
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
<h1 class="mt-0 text-4xl font-extrabold cool-title">
{{ .Title | emojify }}
</h1>
<div class="mt-1 mb-6 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
{{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }}
</div>
{{ $authorsData := .Site.Data.authors }}
{{ $taxonomies := .Site.Taxonomies.authors }}
@ -52,10 +49,18 @@
{{ if not (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
{{ $showAuthor = 1 }}
{{ partial "author.html" . }}
{{ end }}
<div class="flex flex-row">
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
{{ $showAuthor = 1 }}
{{ partial "author.html" . }}
{{ end }}
<div style="padding-left:8px;" class="mt-1 mb-6 text-base text-neutral-500 dark:text-neutral-400 print:hidden max-w-fit">
{{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }}
</div>
</div>
<hr>
{{ range $author := .Page.Params.authors }}
{{ $authorData := index $authorsData $author }}
@ -68,11 +73,6 @@
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }}
{{- end -}}
{{ end }}
{{ if or $taxonomyLink $showAuthor }}
<div class="mb-5"></div>
{{ end }}
{{ end }}
</header>

View File

@ -0,0 +1,39 @@
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
<div class="flex author min-w-content">
{{ with .Site.Params.Author.image }}
{{ $authorImage := "" }}
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
{{ $authorImage = resources.GetRemote . }}
{{ else }}
{{ $authorImage = resources.Get . }}
{{ end }}
{{ if $authorImage }}
{{ if not $disableImageOptimization }}
{{ $authorImage = $authorImage.Fill "192x192" }}
{{ end }}
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
{{ else }}
{{ $authorImage := resources.GetRemote . }}
{{ if not $disableImageOptimization }}
{{ $authorImage = $authorImage.Fill "192x192" }}
{{ end }}
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
{{ end }}
{{ end }}
<div class="place-self-center">
{{ with .Site.Params.Author.name | markdownify }}
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
{{ i18n "author.byline_title" | markdownify }}
</div>
<div class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
{{ . }}
</div>
{{ end }}
{{ with .Site.Params.Author.bio | markdownify }}
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
{{ end }}
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
</div>
</div>

View File

@ -0,0 +1,5 @@
<span class="flex" style="cursor: pointer;">
<span class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal">
{{ . }}
</span>
</span>