update theme
This commit is contained in:
parent
2a0ecfc3ec
commit
f9aaff71c0
10 changed files with 1302 additions and 49 deletions
32
layouts/shortcodes/abbr.html
Normal file
32
layouts/shortcodes/abbr.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{ with where ( $.Site.Data.abbreviations .Params.abbr ) }}
|
||||
{{ if ( or ( eq .Params.mode "shortTitle" ) ( eq .Params.mode "shortTitlePl" ) ) }}
|
||||
<abbr class="abbr" title="
|
||||
{{- if ( eq .Params.mode "shortTitle" ) }}
|
||||
{{ .shortTitle }}
|
||||
{{ else if ( eq .Params.mode "shortTitlePl" ) }}
|
||||
{{ if .shortTitlePl }}{{ .shortTitlePl }}{{ else }}{{ .shortTitle }}s{{ end }}
|
||||
{{ end -}}
|
||||
">
|
||||
{{- if ( eq .Params.mode "shortTitle" ) }}
|
||||
{{ .shortTitle }}
|
||||
{{ else if ( eq .Params.mode "shortTitlePl" ) }}
|
||||
{{ if .shortTitlePl }}{{ .shortTitlePl }}{{ else }}{{ .shortTitle }}s{{ end }}
|
||||
{{ end -}}
|
||||
</abbr>
|
||||
{{ else if ( or ( eq .Params.mode "longtitle" ) ( eq .Params.mode "longTitlePl" ) ) }}
|
||||
{{- if ( eq .Params.mode "longTitle" ) }}
|
||||
{{ .longTitle }}
|
||||
{{ else if ( eq .Params.mode "longTitlePl" ) }}
|
||||
{{ if .longTitlePl }}{{ .longTitlePl }}{{ else }}{{ .longTitle }}s{{ end }}
|
||||
{{ end -}}
|
||||
{{ else if ( or ( eq .Params.mode "fullTitle" ) ( eq .Params.mode "fullTitlePl" ) ) }}
|
||||
{{ if ( eq .Params.mode "fullTitle" ) }}
|
||||
{{ .longTitle }} (<abbr>{{ .short }}</abbr>)
|
||||
{{ else if ( eq .Params.mode "fullTitlePl" ) }}
|
||||
{{- if .longTitlePl }}{{ .longTitlePl }}{{ else }}{{ .longTitle }}s{{ end -}}
|
||||
(<abbr>{{ if .shortPl }}{{ .shortPl }}{{ else }}{{ .short }}s{{ end }}</abbr>)
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "No definition found for abbreviation '%q'" .Params.abbr }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue