add and document extra classes and parameters
This commit is contained in:
@@ -41,7 +41,8 @@ Specifying your image files:
|
|||||||
Optional parameters:
|
Optional parameters:
|
||||||
|
|
||||||
- All the [features/parameters](https://gohugo.io/content-management/shortcodes/#figure) of Hugo's built-in `figure` shortcode work as normal, i.e. src, link, rel, title, caption, class, attr (attribution), attrlink, alt. width and height might lead to strange results when used inside `{{< gallery >}}`.
|
- All the [features/parameters](https://gohugo.io/content-management/shortcodes/#figure) of Hugo's built-in `figure` shortcode work as normal, i.e. src, link, rel, title, caption, class, attr (attribution), attrlink, alt. width and height might lead to strange results when used inside `{{< gallery >}}`.
|
||||||
- `class` allows you to set any custom classes you want on the `<figure>` tag.
|
- `class` allows you to set any custom classes you want on the `<figure>` tag. The values `no-border`, `small`, `medium`, `pull-left` and `pull-right` are made available by this project.
|
||||||
|
- `lightbox` allows you to control the lightbox. The value `none` will disable the lightbox completely.
|
||||||
|
|
||||||
Optional parameters work for standalone `{{< figure >}}` shortcodes and inside of `{{< gallery >}}`. However, they cannot be applied to `{{< snap-dir >}}`.
|
Optional parameters work for standalone `{{< figure >}}` shortcodes and inside of `{{< gallery >}}`. However, they cannot be applied to `{{< snap-dir >}}`.
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
{{- with .Get "rel" }} rel="{{ . }}"{{ end -}}
|
{{- with .Get "rel" }} rel="{{ . }}"{{ end -}}
|
||||||
>
|
>
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
<a href="#{{ $id }}">
|
{{ if not (eq (.Get "lightbox") "none") }}<a href="#{{ $id }}">{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<!-- THUMBNAIL -->
|
<!-- THUMBNAIL -->
|
||||||
<img src="{{ $thumb | relURL }}" class="snap-thumb"
|
<img src="{{ $thumb | relURL }}" class="snap-thumb"
|
||||||
@@ -57,6 +57,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</a>
|
</a>
|
||||||
<!-- FULL IMAGE; HIDDEN -->
|
<!-- FULL IMAGE; HIDDEN -->
|
||||||
|
{{- if not (eq (.Get "lightbox") "none") -}}
|
||||||
<div class="snap-lightbox" id="{{ $id }}">
|
<div class="snap-lightbox" id="{{ $id }}">
|
||||||
<a href="#_" class="snap-lightbox-close"></a>
|
<a href="#_" class="snap-lightbox-close"></a>
|
||||||
<div class="snap-lightbox-inner">
|
<div class="snap-lightbox-inner">
|
||||||
@@ -81,5 +82,6 @@
|
|||||||
<a href="#{{ $nextid }}" class="snap-lightbox-next"><i class="snap-lightbox-arrow"></i></a>
|
<a href="#{{ $nextid }}" class="snap-lightbox-next"><i class="snap-lightbox-arrow"></i></a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
</figure>
|
</figure>
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ figure figcaption {
|
|||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Extra classes for figures */
|
||||||
|
figure.no-border .snap-wrapper {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
/** GALLERY MARKUP **/
|
/** GALLERY MARKUP **/
|
||||||
.snap-gallery {
|
.snap-gallery {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user