This commit is contained in:
2
themes/hugo-theme-ipng/layouts/shortcodes/asciinema.html
Normal file
2
themes/hugo-theme-ipng/layouts/shortcodes/asciinema.html
Normal file
@ -0,0 +1,2 @@
|
||||
<div id='{{ .Get "src" | replaceRE "[[:^alnum:]]" "" }}'></div>
|
||||
<script>AsciinemaPlayer.create("{{ .Get "src" }}", document.getElementById('{{ .Get "src" | replaceRE "[[:^alnum:]]" "" }}'));</script>
|
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 }}
|
3
themes/hugo-theme-ipng/layouts/shortcodes/container.html
Normal file
3
themes/hugo-theme-ipng/layouts/shortcodes/container.html
Normal file
@ -0,0 +1,3 @@
|
||||
<div class="{{ default "resume-content" (.Get "class") }}">
|
||||
{{ .Inner }}
|
||||
</div>
|
@ -0,0 +1,4 @@
|
||||
<ul class="gallery-category">
|
||||
{{ .Inner }}
|
||||
<li class="gallery-photo"></li>
|
||||
</ul>
|
@ -0,0 +1,8 @@
|
||||
<!-- Modal for gallery images -->
|
||||
<div id="myModal" class="modal">
|
||||
<span class="close">×</span>
|
||||
<img class="modal-content" id="modal-img">
|
||||
<div id="caption"></div>
|
||||
<div id="loader"></div>
|
||||
</div>
|
||||
|
@ -0,0 +1,4 @@
|
||||
<li class="gallery-photo">
|
||||
<img src="{{ ( printf "img/thumbnails/%s" (.Get "fn")) | relURL }}" }}
|
||||
alt="{{ .Get "caption" }}">
|
||||
</li>
|
@ -0,0 +1 @@
|
||||
<script src="/js/gallery.js"></script>
|
30
themes/hugo-theme-ipng/layouts/shortcodes/image.html
Normal file
30
themes/hugo-theme-ipng/layouts/shortcodes/image.html
Normal file
@ -0,0 +1,30 @@
|
||||
<figure class="image-shortcode{{ with .Get "class" }} {{ . }}{{ end }}
|
||||
{{- with .Get "wide" }}{{- if eq . "true" }} wide{{ end -}}{{ end -}}
|
||||
{{- with .Get "frame" }}{{- if eq . "true" }} frame{{ end -}}{{ end -}}
|
||||
{{- with .Get "float" }} {{ . }}{{ end -}}" style="
|
||||
{{- with .Get "width" }}width: {{ . }};{{ end -}}
|
||||
{{- with .Get "height" }}height: {{ . }};{{ end -}}">
|
||||
{{- if .Get "link" -}}
|
||||
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
||||
{{- end }}
|
||||
<img src="{{ .Get "src" | relURL }}"
|
||||
{{- if or (.Get "alt") (.Get "caption") }} alt="{{ with .Get "alt" }}{{ replace . "'" "'" }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
|
||||
{{- end -}}
|
||||
> <!-- Closing img tag -->
|
||||
{{- if .Get "link" }}</a>{{ end -}}
|
||||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") }}
|
||||
<figcaption>
|
||||
{{ with (.Get "title") -}}
|
||||
<h4>{{ . }}</h4>
|
||||
{{- end -}}
|
||||
{{- if or (.Get "caption") (.Get "attr") -}}<p>
|
||||
{{- .Get "caption" | markdownify -}}
|
||||
{{- with .Get "attrlink" }}
|
||||
<a href="{{ . }}">
|
||||
{{- end -}}
|
||||
{{- .Get "attr" | markdownify -}}
|
||||
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
||||
{{- end }}
|
||||
</figcaption>
|
||||
{{- end }}
|
||||
</figure>
|
1
themes/hugo-theme-ipng/layouts/shortcodes/rawhtml.html
Normal file
1
themes/hugo-theme-ipng/layouts/shortcodes/rawhtml.html
Normal file
@ -0,0 +1 @@
|
||||
{{ .Inner }}
|
28
themes/hugo-theme-ipng/layouts/shortcodes/social.html
Normal file
28
themes/hugo-theme-ipng/layouts/shortcodes/social.html
Normal file
@ -0,0 +1,28 @@
|
||||
{{ $socialMap := .Site.Data.notrack.social }}
|
||||
|
||||
{{ with $.Site.Params.social }}
|
||||
<div class="social">
|
||||
<ul>
|
||||
{{- $socialArray := slice -}}
|
||||
{{ range $website, $user := $.Site.Params.social }}
|
||||
{{- $social := $website | lower | index $socialMap | default dict -}}
|
||||
{{- $social := dict "user" $user | merge $social -}}
|
||||
|
||||
{{- $data := index $socialMap $website -}}
|
||||
|
||||
{{- $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>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ printf "<!-- Icons are from Awesome Font, licensed under SIL OFL 1.1 (https://scripts.sil.org/OFL) -->" | safeHTML }}
|
5
themes/hugo-theme-ipng/layouts/shortcodes/video.html
Normal file
5
themes/hugo-theme-ipng/layouts/shortcodes/video.html
Normal file
@ -0,0 +1,5 @@
|
||||
<video class="video-shortcode" preload="{{ .Get "preload" | default "auto" }}" controls>
|
||||
<source src="{{ .Get "src" }}" type="{{ .Get "type" | default "video/mp4" }}">
|
||||
There should have been a video here but your browser does not seem
|
||||
to support it.
|
||||
</video>
|
Reference in New Issue
Block a user