💄 Style updates to enhance design consistency

This commit is contained in:
James Panther
2021-08-18 12:54:18 +10:00
parent 7f59d04d39
commit 7030022620
20 changed files with 126 additions and 72 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{{ define "main" }}
{{ partial "section-heading.html" . }}
{{ partial "section-header.html" . }}
{{ if gt .Pages 0 }}
<section>
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
+1 -5
View File
@@ -8,11 +8,7 @@
<div class="mt-8 mb-12 text-base text-gray-400 dark:text-gray-500">
{{ partial "article-meta.html" . }}
{{ if and .Draft .Site.Params.article.showDraftLabel }}
<span
class="ml-2 px-1 py-[2px] text-xs font-normal border rounded-md text-primary-700 dark:text-primary-400 border-primary-400 dark:border-primary-600 inline-block align-middle mb-1"
>
{{ i18n "article.draft" | emojify }}
</span>
<span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
{{ end }}
</div>
</header>
+5 -3
View File
@@ -1,15 +1,17 @@
{{ define "main" }}
{{ partial "section-heading.html" . }}
{{ partial "section-header.html" . }}
<section class="flex flex-wrap -mx-2 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">
<h2>
<a class="text-xl font-medium hover:underline" href="{{ .Page.Permalink }}"
<a
class="text-xl font-medium hover:underline underline-primary-500"
href="{{ .Page.Permalink }}"
>{{ .Page.Title }}</a
>
{{ if $.Site.Params.taxonomy.showTermCount | default true }}
<span class="text-base text-gray-400">
<span class="px-1">&middot;</span>
<span class="px-1 text-primary-500">&middot;</span>
{{ .Count }}
</span>
{{ end }}
+1 -1
View File
@@ -1,5 +1,5 @@
{{ define "main" }}
{{ partial "section-heading.html" . }}
{{ partial "section-header.html" . }}
<section>
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
<h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2>
+1 -1
View File
@@ -11,7 +11,7 @@
>&#8599;</span
>
{{ else }}
<a class="hover:underline" href="{{ .Permalink }}">{{ .Title }}</a>
<a class="hover:underline underline-primary-500" href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
{{ if and .Draft .Site.Params.article.showDraftLabel }}
{{ partial "badge.html" "Draft" }}
+1 -1
View File
@@ -8,7 +8,7 @@
(.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true))
(ne .ReadingTime 0)
}}
<span class="px-1">&middot;</span>
<span class="px-1 text-primary-500">&middot;</span>
{{ end }}
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0) }}
<span title="{{ i18n "article.reading_time_title" }}">
+5 -5
View File
@@ -1,14 +1,14 @@
{{ if .Params.showPagination | default (.Site.Params.article.showPagination | default true) }}
{{ if or .NextInSection .PrevInSection }}
<div class="pt-8">
<div class="pt-8 article-pagination">
<hr class="border-gray-300 border-dotted dark:border-gray-600" />
<div class="flex justify-between pt-3">
<span>
{{ if .NextInSection }}
<a class="flex" href="{{ .NextInSection.Permalink }}">
<span class="mr-3">&larr;</span>
<span class="mr-3 article-pagination-direction">&larr;</span>
<span class="flex flex-col">
<span class="button__text">{{ .NextInSection.Title }}</span>
<span class="article-pagination-title">{{ .NextInSection.Title }}</span>
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
<time
class="-mt-1 text-xs text-gray-400 dark:text-gray-500"
@@ -25,7 +25,7 @@
{{ if .PrevInSection }}
<a class="flex text-right" href="{{ .PrevInSection.Permalink }}">
<span class="flex flex-col">
<span>{{ .PrevInSection.Title }}</span>
<span class="article-pagination-title">{{ .PrevInSection.Title }}</span>
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
<time
class="-mt-1 text-xs text-gray-400 dark:text-gray-500"
@@ -35,7 +35,7 @@
</time>
{{ end }}
</span>
<span class="ml-3">&rarr;</span>
<span class="ml-3 article-pagination-direction">&rarr;</span>
</a>
{{ end }}
</span>
+1 -1
View File
@@ -1,5 +1,5 @@
<span
class="ml-1 px-1 py-[2px] text-xs font-normal border rounded-md text-primary-700 dark:text-primary-400 border-primary-400 dark:border-primary-600 inline-block align-middle mb-1"
class="ml-1 px-1 py-[1px] text-xs font-normal border rounded-md text-primary-700 dark:text-primary-400 border-primary-400 dark:border-primary-600 inline-block align-middle mb-1"
>
{{ . }}
</span>
+4 -2
View File
@@ -1,4 +1,4 @@
<ol class="text-sm text-gray-400 dark:text-gray-600">
<ol class="text-sm text-gray-400 dark:text-gray-500">
{{ template "crumb" (dict "p1" . "p2" .) }}
</ol>
{{ define "crumb" }}
@@ -8,6 +8,8 @@
{{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
{{ end }}
<li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
<a href="{{ .p1.Permalink }}">{{ .p1.Title }}</a><span class="px-1 text-primary-500">/</span>
<a class="hover:underline underline-gray-300 dark:underline-gray-600" href="{{ .p1.Permalink }}"
>{{ .p1.Title }}</a
><span class="px-1 text-primary-500">/</span>
</li>
{{ end }}
+12 -2
View File
@@ -13,9 +13,19 @@
{{ if .Site.Params.attribution | default true }}
<p class="text-xs text-gray-300 dark:text-gray-600">
{{ i18n "footer.powered_by" }}
<a class="hover:underline" href="https://gohugo.io/" target="_blank">Hugo</a>
<a
class="hover:underline underline-primary-300 hover:text-primary-400"
href="https://gohugo.io/"
target="_blank"
>Hugo</a
>
&amp;
<a class="hover:underline" href="https://git.io/hugo-congo" target="_blank">Congo</a>
<a
class="hover:underline underline-primary-300 hover:text-primary-400"
href="https://git.io/hugo-congo"
target="_blank"
>Congo</a
>
</p>
{{ end }}
{{/* Extend footer - eg. for extra scripts, etc. */}}
+12 -2
View File
@@ -1,12 +1,22 @@
<header class="flex justify-between py-6 font-semibold sm:py-10">
<div>
<a class="hover:underline" rel="me" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<a
class="hover:underline underline-primary-500 underline-thickness-bold underline-offset-small"
rel="me"
href="{{ .Site.BaseURL }}"
>{{ .Site.Title }}</a
>
</div>
<nav>
<ul class="flex flex-col list-none sm:flex-row">
{{ range .Site.Menus.main }}
<li class="text-right sm:mr-7 sm:last:mr-0">
<a class="hover:underline" href="{{ .URL | absURL }}" title="{{ .Title }}">{{ .Name }}</a>
<a
class="hover:underline underline-primary-500 underline-thickness-bold underline-offset-small"
href="{{ .URL | absURL }}"
title="{{ .Title }}"
>{{ .Name }}</a
>
</li>
{{ end }}
</ul>
+9
View File
@@ -0,0 +1,9 @@
<header>
{{ if .Site.Params.list.showBreadcrumbs | default false }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
<section class="prose dark:prose-light">
<h1 class="mb-3 text-4xl font-extrabold">{{ .Title }}</h1>
<section>{{ .Content }}</section>
</section>
</header>
-7
View File
@@ -1,7 +0,0 @@
{{ if .Site.Params.list.showBreadcrumbs | default false }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
<section class="prose dark:prose-light">
<h1 class="mb-3 text-4xl font-extrabold">{{ .Title }}</h1>
<section>{{ .Content }}</section>
</section>
+5 -4
View File
@@ -1,7 +1,8 @@
<a
class="px-4 py-2 !text-white !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
<button
class="px-4 py-1 !text-white !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
{{ with .Get "href" }}href="{{ . }}"{{ end }}
{{ with .Get "target" }}target="{{ . }}"{{ end }}
role="button"
>{{ .Inner }}
</a>
>
{{ .Inner }}
</button>