-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gallery): add support for the Instagram album with multiple images
Signed-off-by: Pablo Iranzo Gómez <Pablo.Iranzo@gmail.com>
- Loading branch information
Showing
4 changed files
with
84 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,8 @@ | |
"gulpjs", | ||
"Gómez", | ||
"https", | ||
"instagram", | ||
"Instagram", | ||
"iOS", | ||
"iranzo", | ||
"Jinja", | ||
|
45 changes: 45 additions & 0 deletions
45
documentation/content/Components/photoswipe-instagram-gallery.md
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,45 @@ | ||
--- | ||
Title: Gallery -- Use Instagram | ||
authors: Talha Mansoor, Pablo Iranzo Gómez | ||
Tags: nuances, images, gallery, instagram | ||
Date: 2020-02-06 | ||
Slug: photoswipe-gallery-using-instagram | ||
Category: Components | ||
--- | ||
|
||
Similar to the use case defined in [Photogallery]({filename}photoswipe-raw-gallery.md), Pelican-Elegant has code in place for showing Instagram galleries. | ||
|
||
## Article contents | ||
|
||
To embed Instagram gallery, just define a div in this manner, | ||
|
||
```yaml | ||
## Multiple image | ||
<div class="elegant-instagram" data-instagram-id="BwWo35fAcR3"></div> | ||
|
||
## Single image | ||
|
||
<div class="elegant-instagram" data-instagram-id="B7yh4IdItNd"></div> | ||
``` | ||
|
||
For reference, the `data-instagram-id` is taken from Instagram picture URL, for example: | ||
|
||
`https://www.instagram.com/p/OzF8OwS43q/` will mean adding to the div the parameter `data-instagram-id=OzF8OwS43q`. | ||
|
||
!!! hint "`data-instagram-id` defines either picture or set of pictures" | ||
|
||
Note that `data-instagram-id` is the part in the url of a post, that can be a single or multiple pictures 'post' and in both case the library will show them. | ||
|
||
!!! danger "`class=elegant-instagram` class" | ||
|
||
Note that `<div>`class must be `elegant-instagram` for the code to work properly, do not change it. | ||
|
||
The above `article` code will then render as this: | ||
|
||
## Multiple images | ||
|
||
<div class="elegant-instagram" data-instagram-id="BwWo35fAcR3"></div> | ||
|
||
## Single image | ||
|
||
<div class="elegant-instagram" data-instagram-id="B7yh4IdItNd"></div> |
16 changes: 0 additions & 16 deletions
16
documentation/content/Components/photoswipe-instagramp-gallery.md
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