-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1df7811
commit 7192221
Showing
9 changed files
with
168 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
## The Gallery | ||
|
||
This page holds an example Photoswipe gallery. | ||
|
||
```pswp | ||
{ | ||
slides: [ | ||
{ src: 'content/uploads/g1.jpg', w: 2592, h:1944, | ||
title: 'Frost on a gate, Laurieston' }, | ||
{ src: 'content/uploads/g2.jpg', w: 2560, h:1920, | ||
title: 'Feathered crystals on snow surface, Taliesin' }, | ||
{ src: 'content/uploads/g3.jpg', w: 2560, h:1920, | ||
title: 'Feathered snow on log, Taliesin' }, | ||
{ src: 'content/uploads/g4.jpg', w: 2560, h:1920, | ||
title: 'Crystaline growth on seed head, Taliesin' }], | ||
options: { | ||
timeToIdle: 100 | ||
}, | ||
openImmediately: true | ||
} | ||
``` | ||
|
||
## How this works | ||
|
||
The specification for this gallery is as follows: | ||
|
||
``` | ||
{ | ||
slides: [ | ||
{ src: 'content/uploads/g1.jpg', w: 2592, h:1944, | ||
title: 'Frost on a gate, Laurieston' }, | ||
{ src: 'content/uploads/g2.jpg', w: 2560, h:1920, | ||
title: 'Feathered crystals on snow surface, Taliesin' }, | ||
{ src: 'content/uploads/g3.jpg', w: 2560, h:1920, | ||
title: 'Feathered snow on log, Taliesin' }, | ||
{ src: 'content/uploads/g4.jpg', w: 2560, h:1920, | ||
title: 'Crystaline growth on seed head, Taliesin' }], | ||
options: { | ||
timeToIdle: 100 | ||
}, | ||
openImmediately: true | ||
} | ||
``` | ||
|
||
The format of the specification is [JSON](https://www.json.org/json-en.html); there are (at present) three keys, as follows | ||
|
||
### slides | ||
|
||
Most be present. The value of `slides` is a list delimited by square brackets of slide objects. For more information, see the [authoritative documentation](https://photoswipe.com/documentation/getting-started.html) under the sub heading **'Creating an Array of Slide Objects'**. | ||
|
||
### options | ||
|
||
Optional. The value of `options` is a JSON object [as documented here](https://photoswipe.com/documentation/options.html). | ||
|
||
### openImmediately | ||
|
||
Optional. If the value of `openImmediately` is `true`, the gallery will open immediately, covering the whole page. If false, only a button with the label 'Open the gallery' will be shown. Selecting this button will cause the gallery to open. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
resources/public/html-includes/photoswipe-boilerplate.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!-- this is the whole of the photoswipe boilerplate as documented | ||
[here](https://photoswipe.com/documentation/getting-started.html) with the | ||
outermost div removed; it is supplied by the function | ||
`smeagol.extensions.photoswipe/photoswipe-processor`, q.v. --> | ||
<!-- Background of PhotoSwipe. | ||
It's a separate element as animating opacity is faster than rgba(). --> | ||
<div class="pswp__bg"></div> | ||
|
||
<!-- Slides wrapper with overflow:hidden. --> | ||
<div class="pswp__scroll-wrap"> | ||
|
||
<!-- Container that holds slides. | ||
PhotoSwipe keeps only 3 of them in the DOM to save memory. | ||
Don't modify these 3 pswp__item elements, data is added later on. --> | ||
<div class="pswp__container"> | ||
<div class="pswp__item"></div> | ||
<div class="pswp__item"></div> | ||
<div class="pswp__item"></div> | ||
</div> | ||
|
||
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. --> | ||
<div class="pswp__ui pswp__ui--hidden"> | ||
|
||
<div class="pswp__top-bar"> | ||
|
||
<!-- Controls are self-explanatory. Order can be changed. --> | ||
|
||
<div class="pswp__counter"></div> | ||
|
||
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button> | ||
|
||
<button class="pswp__button pswp__button--share" title="Share"></button> | ||
|
||
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> | ||
|
||
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button> | ||
|
||
<!-- Preloader demo https://codepen.io/dimsemenov/pen/yyBWoR --> | ||
<!-- element will get class pswp__preloader--active when preloader is running --> | ||
<div class="pswp__preloader"> | ||
<div class="pswp__preloader__icn"> | ||
<div class="pswp__preloader__cut"> | ||
<div class="pswp__preloader__donut"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"> | ||
<div class="pswp__share-tooltip"></div> | ||
</div> | ||
|
||
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> | ||
</button> | ||
|
||
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"> | ||
</button> | ||
|
||
<div class="pswp__caption"> | ||
<div class="pswp__caption__center"></div> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters