2017-03-20-photoswipe-gallery-sample.md 1.2 KB


title: Photoswipe Gallery Sample subtitle: Making a Gallery date: 2017-03-20

tags: ["example", "photoswipe"]

Beautiful Hugo adds a few custom shortcodes created by Li-Wen Yip and Gert-Jan van den Berg for making galleries with PhotoSwipe .

{{< gallery caption-effect="fade" >}} {{< figure thumb="-thumb" link="/img/hexagon.jpg" >}} {{< figure thumb="-thumb" link="/img/sphere.jpg" caption="Sphere" >}} {{< figure thumb="-thumb" link="/img/triangle.jpg" caption="Triangle" alt="This is a long comment about a triangle" >}} {{< /gallery >}}

Example

The above gallery was created using the following shortcodes:

{{</* gallery caption-effect="fade" */>}}
  {{</* figure thumb="-thumb" link="/img/hexagon.jpg" */>}}
  {{</* figure thumb="-thumb" link="/img/sphere.jpg" caption="Sphere" */>}}
  {{</* figure thumb="-thumb" link="/img/triangle.jpg" caption="Triangle" alt="This is a long comment about a triangle" */>}}
{{</* /gallery */>}}
from collections import deque

queue = deque()

for x in queue:
    print(x)