️ Improve contrast and other accessibility issues

This commit is contained in:
James Panther
2021-12-21 13:22:45 +11:00
parent ccfd369c67
commit 90f36f8221
16 changed files with 88 additions and 71 deletions
+2 -2
View File
@@ -4,10 +4,10 @@
{{ if .Site.Params.article.showBreadcrumbs | default false }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
<h1 class="mt-0 text-4xl font-extrabold text-neutral-800 dark:text-neutral">
<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-400 dark:text-neutral-500">
<div class="mt-8 mb-12 text-base text-neutral-500 dark:text-neutral-400">
{{ partial "article-meta.html" (dict "context" . "scope" "single") }}
</div>
</header>
+1 -1
View File
@@ -30,7 +30,7 @@
{{ partial "extend-article-link.html" . }}
{{ end }}
</h3>
<div class="text-sm text-neutral-400 dark:text-neutral-500">
<div class="text-sm text-neutral-500 dark:text-neutral-400">
{{ partial "article-meta.html" . }}
</div>
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
+2 -2
View File
@@ -11,7 +11,7 @@
<span class="article-pagination-title mt-[0.1rem] leading-6"
>{{ .NextInSection.Title | emojify }}</span
>
<span class="mt-[0.1rem] text-xs text-neutral-400 dark:text-neutral-500">
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
{{ partial "meta/date.html" .NextInSection }}
{{ end }}
@@ -27,7 +27,7 @@
<span class="article-pagination-title mt-[0.1rem] leading-6"
>{{ .PrevInSection.Title | emojify }}</span
>
<span class="mt-[0.1rem] text-xs text-neutral-400 dark:text-neutral-500">
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
{{ partial "meta/date.html" .PrevInSection }}
{{ end }}
+1 -1
View File
@@ -6,7 +6,7 @@
class="px-1 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ $url }}"
target="_blank"
alt="{{ $name | title }}"
aria-label="{{ $name | title }}"
rel="me noopener noreferrer"
>{{ partial "icon.html" $name }}</a
>
+9 -3
View File
@@ -1,11 +1,17 @@
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
<div class="flex">
{{ with .Site.Author.image }}
<img class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full" src="{{ . | relURL }}" />
<img
class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full"
width="96"
height="96"
alt="Author"
src="{{ . | relURL }}"
/>
{{ end }}
<div class="place-self-center">
{{ with .Site.Author.name | markdownify | emojify }}
<div class="text-[0.6rem] leading-3 text-neutral-400 dark:text-neutral-500 uppercase">
<div class="text-[0.6rem] leading-3 text-neutral-500 dark:text-neutral-400 uppercase">
{{ i18n "author.byline_title" | markdownify | emojify }}
</div>
<div class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
@@ -15,7 +21,7 @@
{{ with .Site.Author.bio | markdownify | emojify }}
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
{{ end }}
{{ partialCached "author-links.html" . }}
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
</div>
</div>
{{ end }}
+1 -1
View File
@@ -1,4 +1,4 @@
<ol class="text-sm text-neutral-400 dark:text-neutral-500">
<ol class="text-sm text-neutral-500 dark:text-neutral-400">
{{ template "crumb" (dict "p1" . "p2" .) }}
</ol>
{{ define "crumb" }}
+5 -5
View File
@@ -1,7 +1,7 @@
<footer class="py-10">
{{/* Footer menu */}}
{{ if .Site.Menus.footer }}
<nav class="pb-4 text-base font-medium text-neutral-400 dark:text-neutral-500">
<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">
{{ range .Site.Menus.footer }}
<li class="mb-1 sm:mb-0 sm:mr-7 sm:last:mr-0">
@@ -19,7 +19,7 @@
<div class="flex justify-between">
<div>
{{/* Copyright */}}
<p class="text-sm text-neutral-400 dark:text-neutral-500">
<p class="text-sm text-neutral-500 dark:text-neutral-400">
{{- with .Site.Copyright }}
{{ . | emojify | markdownify }}
{{- else }}
@@ -30,11 +30,11 @@
</p>
{{/* Theme attribution */}}
{{ if .Site.Params.attribution | default true }}
<p class="text-xs text-neutral-300 dark:text-neutral-600">
{{ $hugo := printf `<a class="hover:underline hover:underline-primary-300 hover:text-primary-400"
<p class="text-xs text-neutral-400 dark:text-neutral-600">
{{ $hugo := printf `<a class="hover:underline hover:underline-primary-400 hover:text-primary-500"
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
}}
{{ $congo := printf `<a class="hover:underline hover:underline-primary-300 hover:text-primary-400" href="https://git.io/hugo-congo" target="_blank" rel="noopener noreferrer">Congo</a>` }}
{{ $congo := printf `<a class="hover:underline hover:underline-primary-400 hover:text-primary-500" href="https://git.io/hugo-congo" target="_blank" rel="noopener noreferrer">Congo</a>` }}
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Congo" $congo) | safeHTML }}
</p>
{{ end }}
+1 -1
View File
@@ -1,5 +1,5 @@
<header
class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-800 dark:text-neutral"
class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-900 dark:text-neutral"
>
{{/* Site logo/title */}}
<div>
+1 -1
View File
@@ -5,7 +5,7 @@
>
<header class="flex flex-col items-center mb-3">
{{ with .Site.Author.image }}
<img class="mb-2 rounded-full w-36 h-36" src="{{ . | relURL }}" />
<img class="mb-2 rounded-full w-36 h-36" alt="Author" src="{{ . | relURL }}" />
{{ end }}
<h1 class="text-4xl font-extrabold">
{{ .Site.Author.name | default .Site.Title }}
+1
View File
@@ -7,6 +7,7 @@
class="bg-neutral-300 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800 m-1 hover:bg-primary-500 hover:text-neutral rounded min-w-[2.4rem] inline-block text-center p-1"
href="{{ printf .url $.Permalink $.Title }}"
title="{{ i18n .title }}"
aria-label="{{ i18n .title }}"
>{{ partial "icon.html" .icon }}</a
>
{{ end }}
+1 -1
View File
@@ -1,3 +1,3 @@
<p class="!mb-9 text-xl text-neutral-400 dark:text-neutral-500">
<p class="!mb-9 text-xl text-neutral-500 dark:text-neutral-400">
{{ .Inner }}
</p>