Skip to content

Commit

Permalink
Merge pull request #540 from jcabak/master
Browse files Browse the repository at this point in the history
Accessibility and SEO improvements
  • Loading branch information
LisaFC authored May 5, 2021
2 parents 84014cd + b858d6c commit 604e27f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions assets/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $gray-200: #eee !default;
$gray-300: #dee2e6 !default;
$gray-400: #ccc !default;
$gray-500: #adb5bd !default;
$gray-600: #888 !default;
$gray-600: #797676 !default;
$gray-700: #495057 !default;
$gray-800: #333 !default;
$gray-900: #222 !default;
Expand Down Expand Up @@ -63,7 +63,7 @@ $link-hover-decoration: none !default;

$google_font_name: "Open Sans" !default;
$google_font_family: "Open+Sans:300,300i,400,400i,700,700i" !default;
$web-font-path: "https://fonts.googleapis.com/css?family=#{$google_font_family}";
$web-font-path: "https://fonts.googleapis.com/css?family=#{$google_font_family}&display=swap";

$td-fonts-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

Expand Down
2 changes: 1 addition & 1 deletion layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h5 class="mt-0 mb-1"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h5>
<p class="mb-2 mb-md-3"><small class="text-muted">{{ .Date.Format ($.Param "time_format_blog") }} {{ T "ui_in"}} {{ .CurrentSection.LinkTitle }}</small></p>
{{ partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-left mr-3 pt-1 d-none d-md-block") }}
<p class="pt-0 mt-0">{{ .Plain | safeHTML | truncate 250 }}</p>
<p class="pt-0"><a href="{{ .RelPermalink }}">{{ T "ui_read_more"}}</a></p>
<p class="pt-0"><a href="{{ .RelPermalink }}" aria-label="{{ T "ui_read_more"}} - {{ .LinkTitle }}">{{ T "ui_read_more"}}</a></p>
</div>
</li>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/community_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Develop and Contribute</h2>
<ul>
{{ range . }}
<li title="{{ .name }}">
<a target="_blank" href="{{ .url }}"><i class="{{ .icon }}"></i> {{ .name }}:</a> {{ .desc }}
<a target="_blank" rel="noopener" href="{{ .url }}"><i class="{{ .icon }}"></i> {{ .name }}:</a> {{ .desc }}
</li>
{{ end }}
</ul>
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
{{ end }}
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
{{ with .Site.Params.copyright }}<small class="text-white">&copy; {{ now.Year}} {{ . }} {{ T "footer_all_rights_reserved" }}</small>{{ end }}
{{ with .Site.Params.privacy_policy }}<small class="ml-1"><a href="{{ . }}" target="_blank">{{ T "footer_privacy_policy" }}</a></small>{{ end }}
{{ with .Site.Params.copyright }}<small class="text-white">&copy; {{ now.Year}} {{ .}} {{ T "footer_all_rights_reserved" }}</small>{{ end }}
{{ with .Site.Params.privacy_policy }}<small class="ml-1"><a href="{{ . }}" target="_blank" rel="noopener">{{ T "footer_privacy_policy" }}</a></small>{{ end }}
{{ if not .Site.Params.ui.footer_about_disable }}
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
{{ end }}
Expand All @@ -30,7 +30,7 @@
<ul class="list-inline mb-0">
{{ range . }}
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="{{ .name }}" aria-label="{{ .name }}">
<a class="text-white" target="_blank" rel="noopener noreferrer" href="{{ .url }}">
<a class="text-white" target="_blank" rel="noopener" href="{{ .url }}" aria-label="{{ .name }}">
<i class="{{ .icon }}"></i>
</a>
</li>
Expand Down
11 changes: 5 additions & 6 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}

{{ if and hugo.IsProduction (ne $outputFormat "print") -}}
{{ if and (eq (getenv "HUGO_ENV") "production") (ne $outputFormat "print") -}}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else -}}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end -}}

{{ partialCached "favicons.html" . }}
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<meta name="description" content="{{ .Site.Params.Description }}">
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if hugo.IsProduction }}
{{ if eq (getenv "HUGO_ENV") "production" }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partialCached "head-css.html" . "asdf" }}
Expand All @@ -29,14 +30,12 @@
crossorigin="anonymous"></script>
{{ if .Site.Params.offlineSearch }}
<script
src="https://unpkg.com/[email protected].9/lunr.min.js"
integrity="sha384-203J0SNzyqHby3iU6hzvzltrWi/M41wOP5Gu+BiJMz5nwKykbkUx8Kp7iti0Lpli"
src="https://unpkg.com/[email protected].8/lunr.min.js"
integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY"
crossorigin="anonymous"></script>
{{end}}
{{ if .Site.Params.prism_syntax_highlighting }}
<!-- stylesheet for Prism -->
<link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/>
{{ end }}
<!-- stylesheet for tabbed pane -->
<link rel="stylesheet" href="{{ "/css/shortcodes.css" | relURL }}"/>
{{ partial "hooks/head-end.html" . }}
6 changes: 3 additions & 3 deletions layouts/partials/pager.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ul class="list-unstyled d-flex justify-content-between align-items-center mb-0 pt-5 d-print-none">
<ul class="list-unstyled d-flex justify-content-between align-items-center mb-0 pt-5">
<li>
<a {{if .PrevInSection}}href="{{.PrevInSection.RelPermalink}}"{{end}} class="btn btn-primary {{if not .PrevInSection}} disabled{{end}}"><span class="mr-1"></span> {{ T "ui_pager_prev" }}</a>
<a {{if .PrevInSection}}href="{{.PrevInSection.RelPermalink}}"aria-label="{{ T "ui_pager_prev" }} - {{.PrevInSection.Title}}"{{end}} class="btn btn-primary {{if not .PrevInSection}} disabled{{end}}"><span class="mr-1"></span> {{ T "ui_pager_prev" }}</a>
</li>
<a {{if .NextInSection}}href="{{.NextInSection.RelPermalink}}"{{end}} class="btn btn-primary {{if not .NextInSection}} disabled{{end}}">{{ T "ui_pager_next" }} <span class="ml-1"></span></a>
<a {{if .NextInSection}}href="{{.NextInSection.RelPermalink}}"aria-label="{{ T "ui_pager_next" }} - {{.NextInSection.Title}}"{{end}} class="btn btn-primary {{if not .NextInSection}} disabled{{end}}">{{ T "ui_pager_next" }} <span class="ml-1"></span></a>
</li>
</ul>
2 changes: 1 addition & 1 deletion layouts/shortcodes/blocks/link-down.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ with .Parent }}
{{ $id := $.Get "id" | default (printf "td-block-%d" ( add .Ordinal 1 )) }}
{{ $color := $.Get "color" | default "blue" }}
<a class="btn btn-link text-{{ $color }}" href="#{{ $id }}"><i class="fa fa-chevron-circle-down" style="font-size: 400%"></i></a>
<a class="btn btn-link text-{{ $color }}" href="#{{ $id }}" aria-label="{{ T "ui_read_more"}}"><i class="fa fa-chevron-circle-down" style="font-size: 400%"></i></a>
{{ else }}
{{ errorf "The link-down shortcode is supposed to be nested inside a shortcode"}}
{{ end }}

0 comments on commit 604e27f

Please sign in to comment.