1
Fork 0

Remove inner shortcodes for util repo

This commit is contained in:
Jake Howard 2018-06-19 20:12:38 +01:00
parent d309391ce7
commit b65d0a8507
Signed by: jake
GPG key ID: 57AFB45680EDD477
10 changed files with 13 additions and 68 deletions

View file

@ -8,6 +8,9 @@ jobs:
- npm_config_loglevel: notice
steps:
- checkout
- run:
name: Checkout submodules
command: git submodule sync && git submodule update --init
- run:
name: Install Hugo
command: wget https://github.com/gohugoio/hugo/releases/download/v0.41.2/hugo_0.42.1_Linux-64bit.deb -O /tmp/hugo.deb && sudo dpkg -i /tmp/hugo.deb

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "themes/utils"]
path = themes/utils
url = https://github.com/RealOrangeOne/hugo-theme-utils

View file

@ -52,3 +52,6 @@ imaging:
blackfriday:
smartypants: false
theme:
- utils

View file

@ -1,14 +0,0 @@
{{ define "img" }}
<img src='{{ .Get "src" }}' class='{{ .Get "class" }}' alt="{{ .Inner | plainify }}" />
{{ end }}
{{ if .Inner }}
<figure>
{{ template "img" . }}
<figcaption>
<small>{{ .Inner }}</small>
</figcaption>
</figure>
{{ else }}
{{ template "img" . }}
{{ end }}

View file

@ -1,10 +0,0 @@
{{ if .Inner }}
<figure>
<iframe src='{{ .Get "src" }}' class='{{ .Get "class" }}'></iframe>
<figcaption>
<small>{{ .Inner }} <a href='{{ .Get "src" }}' class="d-inline-block">View Full</a></small>
</figcaption>
</figure>
{{ else }}
<iframe src='{{ .Get "src" }}' class='{{ .Get "class" }}'></iframe>
{{ end }}

View file

@ -1,8 +0,0 @@
<figure class="my-3">
<div class="mermaid" align="center">
{{ safeHTML .Inner }}
</div>
<figcaption class="text-center">
<small>{{ .Get "caption" }}</small>
</figcaption>
</figure>

View file

@ -1 +0,0 @@
{{ .Page.Param (.Get 0) -}}

View file

@ -1,31 +0,0 @@
{{ $original := .Page.Resources.GetMatch (.Get "src") }}
{{ $options := default "1000x" (.Get "options") }}
{{ .Scratch.Set "image" $original }}
{{ $command := (default "Resize" (.Get "command")) }}
{{ if eq $command "Fit"}}
{{ .Scratch.Set "image" ($original.Fit $options) }}
{{ else if eq $command "Resize"}}
{{ .Scratch.Set "image" ($original.Resize $options) }}
{{ else if eq $command "Fill"}}
{{ .Scratch.Set "image" ($original.Fill $options) }}
{{ end }}
{{ define "img" }}
{{ $image := .Scratch.Get "image" }}
<img src='{{ $image.RelPermalink }}' class='{{ .Get "class" }}' alt="{{ .Inner | plainify }}" />
{{ end }}
{{ if .Inner }}
<figure>
{{ template "img" . }}
<figcaption>
<small>{{ .Inner }}</small>
</figcaption>
</figure>
{{ else }}
{{ template "img" . }}
{{ end }}

View file

@ -1 +0,0 @@
{{ .Page.Site.Param (.Get 0) -}}

1
themes/utils Submodule

@ -0,0 +1 @@
Subproject commit 535441207acb5213291c5e989a9e28989d590eec