Improve accessibility

This commit is contained in:
Joshua Goins 2023-04-13 18:38:37 -04:00
parent dac612d55d
commit 079fe81cb6
9 changed files with 21 additions and 11 deletions

View file

@ -1,12 +1,12 @@
--- ---
title: Stats title: Stats
layout: art-stats layout: art-stats
total: 186 total: 185
years: years:
- year: 2019 - year: 2019
num: 60 num: 60
- year: 2022 - year: 2022
num: 46 num: 45
- year: 2020 - year: 2020
num: 30 num: 30
- year: 2021 - year: 2021

View file

@ -123,6 +123,9 @@ for filename in os.listdir(art_data_directory):
if os.path.isfile(f): if os.path.isfile(f):
filename_without_ext = os.path.splitext(filename)[0] filename_without_ext = os.path.splitext(filename)[0]
if filename_without_ext == ".DS_Store":
continue
with open(f, "r") as file: with open(f, "r") as file:
year, characters, tags = parse_art_json(art_output_directory, filename_without_ext, file) year, characters, tags = parse_art_json(art_output_directory, filename_without_ext, file)

View file

@ -101,18 +101,18 @@ body {
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--primary-accent: #ce4545; --primary-accent: #a3c3ff;
--secondary-accent: #c99192; --secondary-accent: #c99192;
--background-primary: #34313a; --background-primary: #34313a;
--background-secondary: #3c3a44; --background-secondary: #3c3a44;
--background-tertiary: #2e2c34; --background-tertiary: #2e2c34;
--border-color: #515860; --border-color: #515860;
--text-color: #fbeded; --text-color: #fbeded;
--link-visited: #ad1616; --link-visited: #75A6FF;
--extra-color: #504e5a; --extra-color: #504e5a;
} }
.ext-link { .external-link {
filter: invert(100%); filter: invert(100%);
} }
} }

View file

@ -16,7 +16,7 @@
</video> </video>
</div> </div>
{{ else }} {{ else }}
<img class="article-img" style="display: block; max-height: 1000px; margin-left: auto; margin-right: auto;" alt="{{ $.Params.alt_text }}" title="{{ $.Params.alt_text }}" src="{{ .RelPermalink }}"/> <img style="display: block; max-height: 1000px; margin-left: auto; margin-right: auto; width: auto" alt="{{ $.Params.alt_text }}" title="{{ $.Params.alt_text }}" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" />
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}

View file

@ -8,10 +8,10 @@
{{ if eq $paginator.PageNumber 1}} {{ if eq $paginator.PageNumber 1}}
{{ $alertimg := resources.Get "alert.png" }} {{ $alertimg := resources.Get "alert.png" }}
{{ with $.Params.new_banner }} {{ with $.Params.new_banner }}
<div class="new-banner"><img width="16" height="16" id="banner-alert-icon" src="{{ $alertimg.RelPermalink }}"/><b>{{ . }}</b><img width="16" height="16" id="banner-alert-icon" src="{{ $alertimg.RelPermalink }}"/></div> <div class="new-banner"><img alt="Alert Icon" width="16" height="16" id="banner-alert-icon" src="{{ $alertimg.RelPermalink }}"/><b>{{ . }}</b><img alt="Alert Icon" width="16" height="16" id="banner-alert-icon" src="{{ $alertimg.RelPermalink }}"/></div>
{{ end }} {{ end }}
<div class="new-banner"><img width="16" height="16" id="banner-alert-icon" src="{{ $alertimg.RelPermalink }}"/><b>Contains risque art, so you should probably not view this on a work computer.</b><img width="16" height="16" id="banner-alert-icon" src="{{ $alertimg.RelPermalink }}"/></div> <div class="new-banner"><img alt="Alert Icon" width="16" height="16" id="banner-alert-icon" src="{{ $alertimg.RelPermalink }}"/><b>Contains risque art, so you should probably not view this on a work computer.</b><img alt="Alert Icon" width="16" height="16" id="banner-alert-icon" src="{{ $alertimg.RelPermalink }}"/></div>
<p>Welcome to my art gallery! I have saved my art since 2016, and this site contains the most complete archive of my work.</p> <p>Welcome to my art gallery! I have saved my art since 2016, and this site contains the most complete archive of my work.</p>

View file

@ -10,7 +10,12 @@
<title>{{.Site.Title}}</title> <title>{{.Site.Title}}</title>
{{ else }} {{ else }}
<title>{{.Site.Title}} / {{ .Title }}</title> <title>{{.Site.Title}} / {{ .Title }}</title>
{{ if .Summary }}
<meta name="description" content="{{ .Summary }}"> <meta name="description" content="{{ .Summary }}">
{{ else }}
<meta name="description" content="{{ .Title }}">
{{ end }}
{{ end }} {{ end }}
<link href="/blog/index.xml" rel="alternate" type="application/rss+xml" title="{{ $.Site.Author.name }}'s blog"> <link href="/blog/index.xml" rel="alternate" type="application/rss+xml" title="{{ $.Site.Author.name }}'s blog">

View file

@ -1,4 +1,4 @@
{{ with resources.Get .Site.Params.profile_picture }} {{ with resources.Get .Site.Params.profile_picture }}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"/> <img alt="Profile Picture" title="Profile Picture" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"/>
{{ end }} {{ end }}
<h1>{{ .Site.Title }}</h1> <h1>{{ .Site.Title }}</h1>

View file

@ -21,7 +21,7 @@
{{ $year = index $split 3 }} {{ $year = index $split 3 }}
{{ end }} {{ end }}
<a class="no-decoration grid-item" href="{{ .Permalink }}"> <a aria-label="Gallery Item" class="no-decoration grid-item" href="{{ .Permalink }}">
{{ $path := printf "/%s/%d/%.2d/%s" $base (int $year) (int $month) $filename_without_ext}} {{ $path := printf "/%s/%d/%.2d/%s" $base (int $year) (int $month) $filename_without_ext}}
{{ $title := .Params.title }} {{ $title := .Params.title }}

View file

@ -1,10 +1,12 @@
<h3>Recent Blog Posts</h3> <h3>Recent Blog Posts</h3>
<div class="generic-con"> <div class="generic-con">
<ul style="padding: 0">
{{ range first 3 (where .Site.Pages "Type" "blog").ByDate.Reverse }} {{ range first 3 (where .Site.Pages "Type" "blog").ByDate.Reverse }}
<li style="margin-left: 10px; list-style-type: square;"> <li style="margin-left: 10px; list-style-type: square;">
<a href="{{ .Permalink }}">{{ .Title }}</a> <a href="{{ .Permalink }}">{{ .Title }}</a>
<p><i>{{ .Summary }}</i></p> <p><i>{{ .Summary }}</i></p>
</li> </li>
{{ end }} {{ end }}
</ul>
</div> </div>