mirror of
https://github.com/yuzu-emu/shared-bulma-theme.git
synced 2024-11-22 12:45:42 +01:00
Added imgs shortcode. Added gallery to entry/single page.
This commit is contained in:
parent
a5730798f1
commit
2b4825668a
@ -35,3 +35,17 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "css" }}
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.10.0/baguetteBox.min.css" type="text/css" />
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "scripts" }}
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.10.0/baguetteBox.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.addEventListener("DOMContentLoaded", function() {
|
||||||
|
baguetteBox.run('.is-img-preview');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
16
layouts/shortcodes/imgs.html
Normal file
16
layouts/shortcodes/imgs.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<div class="columns is-img-preview">
|
||||||
|
{{ range $param := .Params }}
|
||||||
|
<!-- image -->
|
||||||
|
{{ $items := split $param "|" }}
|
||||||
|
{{ $src := (index $items 0) }}
|
||||||
|
{{ $title := (index $items 1) }}
|
||||||
|
<div class="column">
|
||||||
|
<a href="{{ $src }}" title="{{ $title }}">
|
||||||
|
<img src="{{ $src }}" alt="{{ $title }}">
|
||||||
|
</a>
|
||||||
|
{{ if $title }}
|
||||||
|
<p class="has-text-centered is-italic has-text-grey-light">{{ $title }}</p>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user