hugo.yaml
themes
hugo-theme-ipng
LICENSE.mdREADME.mdtheme.toml
archetypes
assets
data
notrack
layouts
404.html
_default
home.htmlpartials
blog-entry-summary.htmlblog-taxonomy-info.htmlfooter.htmlhead.htmlheader.htmlpagination.htmlpost-category-link.htmlpost-tag-link.html
shortcodes
asciinema.htmlcontact-box.htmlcontainer.htmlgallery-category.htmlgallery-modal.htmlgallery-photo.htmlgallery-script.htmlimage.htmlrawhtml.htmlsocial.htmlvideo.html
taxonomy
static
css
fonts
FreeMono.woffFreeMonoBold.woffFreeMonoBoldOblique.woffFreeMonoOblique.woffFreeSans-small.woffFreeSans.woffFreeSansBold-small.woffFreeSansBold.woffFreeSansBoldOblique.woffFreeSansOblique.woffFreeSerif-small.woffFreeSerif.woffFreeSerifBold-small.woffFreeSerifBold.woffFreeSerifBoldItalic-small.woffFreeSerifBoldItalic.woffFreeSerifItalic-small.woffFreeSerifItalic.wofffa-brands-400.woff2fa-solid-900.woff2mononoki-Bold.woff2mononoki-BoldItalic.woff2mononoki-Italic.woff2mononoki-Regular.woff2
js
hugo-theme-notrack
27
themes/hugo-theme-ipng/layouts/shortcodes/contact-box.html
Normal file
27
themes/hugo-theme-ipng/layouts/shortcodes/contact-box.html
Normal file
@ -0,0 +1,27 @@
|
||||
{{ with $.Page.Site.Params.social }}
|
||||
{{ $socialMap := $.Page.Site.Data.notrack.social }}
|
||||
{{ $width := default "12em" (.Params.Get "width") }}
|
||||
{{ $height := default "auto" (.Params.Get "height") }}
|
||||
{{ $float := default "right" (.Params.Get "float") }}
|
||||
<div class="contactbox {{ $float }}" style="width: {{ $width }}; height: {{ $height }}">
|
||||
<ul>
|
||||
{{- $socialArray := slice -}}
|
||||
{{ range $website, $user := $.Site.Params.social }}
|
||||
{{- $social := $website | lower | index $socialMap | default dict -}}
|
||||
{{- $social := dict "user" $user | merge $social -}}
|
||||
{{- $socialArray = $socialArray | append $social -}}
|
||||
{{ end }}
|
||||
|
||||
{{ range sort $socialArray "weight" -}}
|
||||
{{- if .prefix -}}
|
||||
<li><a href="{{- .prefix -}}{{ .user }}" rel="me"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
|
||||
{{- else if .template -}}
|
||||
<li><a href="{{- printf .template .user -}}" rel="me"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
|
||||
{{- else if .url -}}
|
||||
<li><a href="{{- .url -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{ printf "<!-- Icons are from Awesome Font, licenced under SIL OFL 1.1 (https://scripts.sil.org/OFL) -->" | safeHTML }}
|
||||
</div>
|
||||
{{ end }}
|
Reference in New Issue
Block a user