Make all shortcodes render in old hugo "style"

This commit is contained in:
Boris Bera 2019-05-06 13:05:39 -04:00
parent 6d1ac48fb5
commit 6b3ae716cf
6 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,4 @@
{{ $_hugo_config := `{ "version": 1 }` }}
<section class="attachments {{ with .Get "style"}}{{.}}{{ end }}"> <section class="attachments {{ with .Get "style"}}{{.}}{{ end }}">
<label> <label>
<i class="fas fa-paperclip" aria-hidden="true"></i> <i class="fas fa-paperclip" aria-hidden="true"></i>

View file

@ -1,3 +1,4 @@
{{ $_hugo_config := `{ "version": 1 }` }}
<a {{ with .Get "href"}} href="{{.}}" target="_blank" {{ end }} class="btn btn-default"> <a {{ with .Get "href"}} href="{{.}}" target="_blank" {{ end }} class="btn btn-default">
{{ $icon := .Get "icon" }} {{ $icon := .Get "icon" }}
{{ $iconposition := .Get "icon-position" }} {{ $iconposition := .Get "icon-position" }}

View file

@ -1,3 +1,4 @@
{{ $_hugo_config := `{ "version": 1 }` }}
{{ $showhidden := .Get "showhidden"}} {{ $showhidden := .Get "showhidden"}}
{{ $style := .Get "style" | default "li" }} {{ $style := .Get "style" | default "li" }}
{{ $depth := .Get "depth" | default 1 }} {{ $depth := .Get "depth" | default 1 }}
@ -16,7 +17,7 @@
{{ .Scratch.Set "pages" (.Page.Pages | union .Page.Sections) }} {{ .Scratch.Set "pages" (.Page.Pages | union .Page.Sections) }}
{{end}} {{end}}
{{end}} {{end}}
{{ $pages := (.Scratch.Get "pages") }} {{ $pages := (.Scratch.Get "pages") }}
{{if eq $sortTerm "Weight"}} {{if eq $sortTerm "Weight"}}
@ -38,7 +39,7 @@
{{ define "childs" }} {{ define "childs" }}
{{ range .menu }} {{ range .menu }}
{{ if and .Params.hidden (not $.showhidden) }} {{ if and .Params.hidden (not $.showhidden) }}
{{else}} {{else}}
{{if not .IsHome}} {{if not .IsHome}}
{{if hasPrefix $.style "h"}} {{if hasPrefix $.style "h"}}
@ -74,7 +75,7 @@
{{else}} {{else}}
{{ .Scratch.Set "pages" .Pages }} {{ .Scratch.Set "pages" .Pages }}
{{end}} {{end}}
{{ $pages := (.Scratch.Get "pages") }} {{ $pages := (.Scratch.Get "pages") }}
{{if eq $.sortTerm "Weight"}} {{if eq $.sortTerm "Weight"}}

View file

@ -1,3 +1,4 @@
{{ $_hugo_config := `{ "version": 1 }` }}
<div class="expand"> <div class="expand">
<div class="expand-label" style="cursor: pointer;" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fas fa-chevron-down' : 'fas fa-chevron-right';});});"> <div class="expand-label" style="cursor: pointer;" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fas fa-chevron-down' : 'fas fa-chevron-right';});});">
<i style="font-size:x-small;" class="fas fa-chevron-right"></i> <i style="font-size:x-small;" class="fas fa-chevron-right"></i>

View file

@ -1 +1,2 @@
{{ $_hugo_config := `{ "version": 1 }` }}
<div class="mermaid" align="{{ if .Get "align" }}{{ .Get "align" }}{{ else }}center{{ end }}">{{ safeHTML .Inner }}</div> <div class="mermaid" align="{{ if .Get "align" }}{{ .Get "align" }}{{ else }}center{{ end }}">{{ safeHTML .Inner }}</div>

View file

@ -1 +1,2 @@
{{ $_hugo_config := `{ "version": 1 }` }}
<div class="notices {{ .Get 0 }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}>{{ .Inner }}</div> <div class="notices {{ .Get 0 }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}>{{ .Inner }}</div>