Accessibility and SEO improvements (#296)

Co-authored-by: JCabak <kubaczento@gmail.com>
This commit is contained in:
Jakub Cabak 2021-04-25 13:15:22 +02:00 committed by GitHub
parent 6996894ec1
commit 19c2edb08d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 29 additions and 28 deletions

View file

@ -17,7 +17,7 @@
<h5 class="p-1">
{{ .designation }}
{{ if .company }}
{{ i18n "at"}} <a href="{{ .company.url }}" target="_blank">{{ .company.name }}</a>
{{ i18n "at"}} <a href="{{ .company.url }}" title="{{ .company.name }}" target="_blank" rel="noopener">{{ .company.name }}</a>
{{ end }}
</h5>
{{ end }}
@ -29,18 +29,18 @@
{{ range .socialLinks }}
<li>
{{ if eq .name "Email" }}
<a href="mailto:{{ .url }}" target="_blank"><i class="{{ .icon }}"></i></a>
<a href="mailto:{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
{{ else if eq .name "Phone" }}
<a href="tel:{{ .url }}" target="_blank"><i class="{{ .icon }}"></i></a>
<a href="tel:{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
{{ else }}
<a href="{{ .url }}" target="_blank"><i class="{{ .icon }}"></i></a>
<a href="{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
{{ end }}
</li>
{{ end }}
</ul>
</div>
{{ if .resume }}
<a href="{{ .resume | relURL }}" target="#"
<a href="{{ .resume | relURL }}" title="{{ i18n "resume"}}" target="#"
><button class="btn btn-dark">{{ i18n "resume"}}</button></a
>
{{ end }}

View file

@ -27,7 +27,7 @@
<div class="row">
<div class="col-lg-10 col-md-8">
{{ if .institution.url }}
<h5><a href="{{ .institution.url }}" target="_blank">{{ .institution.name }}</a></h5>
<h5><a href="{{ .institution.url }}" title="{{ .institution.name }}" target="_blank" rel="noopener">{{ .institution.name }}</a></h5>
{{ else }}
<h5>{{ .institution.name }}</h5>
{{ end }}
@ -44,7 +44,7 @@
<ul>
{{ range .publications }}
{{ if .url }}
<li><a href="{{ .url }}" target="_blank">{{ .title }}</a></li>
<li><a href="{{ .url }}" title="{{ .title }}" target="_blank" rel="noopener">{{ .title }}</a></li>
{{ else }}
<li>{{ .title }}</li>
{{ end }}
@ -82,9 +82,9 @@
{{ end }}
{{ if gt (len .takenCourses.courses) 2 }}
<button type="button" class="btn btn-link show-more-btn pt-0 {{ if .takenCourses.showGrades }}ml-1{{ else }}ml-2{{ end }}"
onclick="toggleCourseVisibility(this);" id="show-more-btn">{{ i18n "show_more"}}</button>
onclick="toggleCourseVisibility(this);" id="show-more-btn" aria-label="{{ i18n "show_more"}}">{{ i18n "show_more"}}</button>
<button type="button" class="btn btn-link show-more-btn hidden pt-0 {{ if .takenCourses.showGrades }}ml-1{{ else }}ml-2{{ end }}"
onclick="toggleCourseVisibility(this);" id="show-less-btn">{{ i18n "show_less"}}</button>
onclick="toggleCourseVisibility(this);" id="show-less-btn" aria-label="{{ i18n "show_less"}}">{{ i18n "show_less"}}</button>
{{ end }}
</div>
{{ end }}

View file

@ -27,7 +27,7 @@
<div class="row">
<div class="col-lg-10 col-md-8">
{{ if .institution.url }}
<h5><a href="{{ .institution.url }}" target="_blank">{{ .institution.name }}</a></h5>
<h5><a href="{{ .institution.url }}" title="{{ .institution.name }}" target="_blank" rel="noopener">{{ .institution.name }}</a></h5>
{{ else }}
<h5>{{ .institution.name }}</h5>
{{ end }}
@ -44,7 +44,7 @@
<ul>
{{ range .publications }}
{{ if .url }}
<li><a href="{{ .url }}" target="_blank">{{ .title }}</a></li>
<li><a href="{{ .url }}" title="{{ .title }}" target="_blank" rel="noopener">{{ .title }}</a></li>
{{ else }}
<li>{{ .title }}</li>
{{ end }}

View file

@ -1,7 +1,7 @@
<div class="col-10 col-lg-8">
<div class="experience-entry-heading">
<!-- For multiple positions, give emphasis on the company name-->
<h5>{{ if .company.url }}<a href={{.company.url}} target="_blank">{{ .company.name }}</a>{{ else }}{{ .company.name }}{{ end }}</h5>
<h5>{{ if .company.url }}<a href={{.company.url}} title="{{ .company.name }}" target="_blank" rel="noopener">{{ .company.name }}</a>{{ else }}{{ .company.name }}{{ end }}</h5>
<!-- Total experience duration on a company is time between the starting date of the oldest position and ending date of most recent position -->
{{ $oldestPosition := index (last 1 .positions) 0}}

View file

@ -3,7 +3,7 @@
{{ $position:= index .positions 0 }}
<!-- For single position, give emphasis on the designation-->
<h5>{{ $position.designation }}</h5>
<h6>{{ if .company.url }}<a href={{.company.url}} target="_blank">{{ .company.name }}</a>{{ else }}{{ .company.name }}{{ end }}</h6>
<h6>{{ if .company.url }}<a href={{.company.url}} title="{{ .company.name }}" target="_blank" rel="noopener">{{ .company.name }}</a>{{ else }}{{ .company.name }}{{ end }}</h6>
<!-- Add experience duration info -->
<p class="text-muted">{{ $position.start }} - {{ if $position.end }}{{ $position.end }}{{ else }}{{ i18n "present" }}{{ end }},
{{ .company.location }}

View file

@ -127,7 +127,7 @@
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ end }}
<a href="#{{ $sectionID }}"><i class="arrow bounce fa fa-chevron-down"></i></a>
<a href="#{{ $sectionID }}" aria-label="{{ i18n "read" }} {{ i18n "more" }} - {{ $name }}"><i class="arrow bounce fa fa-chevron-down"></i></a>
{{ end }}
{{ end }}
</div>