Browse Source

Remove inner shortcodes for util repo

pull/2/head
Jake Howard 3 years ago
parent
commit
b65d0a8507
Signed by: theorangeone GPG Key ID: 57AFB45680EDD477
  1. 3
      .circleci/config.yml
  2. 3
      .gitmodules
  3. 9
      config.yml
  4. 14
      layouts/shortcodes/figure.html
  5. 10
      layouts/shortcodes/iframe.html
  6. 8
      layouts/shortcodes/mermaid.html
  7. 1
      layouts/shortcodes/pageparam.html
  8. 31
      layouts/shortcodes/resource.html
  9. 1
      layouts/shortcodes/siteparam.html
  10. 1
      themes/utils

3
.circleci/config.yml

@ -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

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

9
config.yml

@ -47,8 +47,11 @@ pygmentsCodefences: true
pygmentsUseClasses: true
imaging:
resampleFilter: Lanczos
quality: 100
resampleFilter: Lanczos
quality: 100
blackfriday:
smartypants: false
smartypants: false
theme:
- utils

14
layouts/shortcodes/figure.html

@ -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 }}

10
layouts/shortcodes/iframe.html

@ -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 }}

8
layouts/shortcodes/mermaid.html

@ -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>

1
layouts/shortcodes/pageparam.html

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

31
layouts/shortcodes/resource.html

@ -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 }}

1
layouts/shortcodes/siteparam.html

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

1
themes/utils

@ -0,0 +1 @@
Subproject commit 535441207acb5213291c5e989a9e28989d590eec
Loading…
Cancel
Save