adding swedish i18n file and adding target for social icons (#238)

* Adding target if statements

* adding Tobias Lindberg to CONTRIBUTORS.md

* adding swedish language i18n file
This commit is contained in:
Tobias Lindberg 2019-11-25 14:52:26 +01:00 committed by Luiz F. A. de Prá
parent b00b75064d
commit a980192fa7
3 changed files with 27 additions and 2 deletions

View File

@ -49,3 +49,4 @@
- [Bobby Lindsey](https://bobbywlindsey.com)
- [José Mª Escartín](https://github.com/jme52)
- [John Schroeder](https://blog.schroedernet.software)
- [Tobias Lindberg](https://tobiaslindberg.com)

24
i18n/se.toml Normal file
View File

@ -0,0 +1,24 @@
[category]
other = "Kategori"
[tag]
other = "Tagg"
[series]
other = "Serie"
[reading_time]
one = "Ein minut lästid"
other = "{{ .Count }} minuter lästid"
[page_not_found]
other = "Sida hittades inte"
[page_does_not_exist]
other = "Ursäkta, men denna sida existerar inte."
[head_back]
other = "Här kan du komma tillbaka till <a href=\"{{ . }}\">startsidan</a>."
[powered_by]
other = "Med hjälp av"

View File

@ -10,13 +10,13 @@
{{ range sort .}}
{{ if .icon }}
<li>
<a href="{{ .url }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }}>
<a href="{{ .url }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }} {{ if .target }}target="{{ .target }}"{{ end }}>
<i class="{{ .icon }}" aria-hidden="true"></i>
</a>
</li>
{{ else }}
<li>
<a href="{{ .url }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }}>{{ .name }}</a>
<a href="{{ .url }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }} {{ if .target }}target="{{ .target }}"{{ end }}>{{ .name }}</a>
</li>
{{ end }}
{{ end }}