feat: allow hiding of images and videos
This introduces the option to hide
videos or images on a per-page basis
by configuring the behavior in the
FrontMatter of a page.
Resolves #31
|
{"channels":[null]}
|
2 files added
4 files modified
| | |
| | | position = "center center" |
| | | ``` |
| | | |
| | | You can control displaying of the image on a per-page basis by configuring `visual.image.enable` on each respective page's FrontMatter: |
| | | |
| | | ```markdown |
| | | +++ |
| | | visual.image.enable = false |
| | | +++ |
| | | |
| | | # Privacy statement |
| | | ``` |
| | | |
| | | ### Use a video |
| | | |
| | |
| | | |
| | | You can either use a video that you host or one that is on YouTube. |
| | | |
| | | Just like with [an image](#use-an-image) you can not display a video altogether on particular pages by setting `visual.video.enable = false` in the page's FrontMatter. |
| | | |
| | | ##### Use your own video |
| | | |
| | | Add your video to the `static` folder and change `file` to the location of your video accordingly. Make sure you delete `youtubeId` or comment it out. |
| | |
| | | <div class="fs-split"> |
| | | |
| | | <!-- Image --> |
| | | {{ if .Site.Params.visual.image.enable }} |
| | | {{ if .Params.visual.image.enable | default .Site.Params.visual.image.enable }} |
| | | |
| | | <div class="split-image"> |
| | | |
| | | </div> |
| | | |
| | | <!-- Video --> |
| | | {{ else if .Site.Params.visual.video.enable }} |
| | | {{ else if .Params.visual.video.enable | default .Site.Params.visual.video.enable }} |
| | | |
| | | {{ partial "video" . }} |
| | | |
| New file |
| | |
| | | +++ |
| | | title = "No image" |
| | | visual.image.enable = false |
| | | +++ |
| | | |
| | | Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. |
| | |
| | | http://hugo:1313/index.html |
| | | http://hugo:1313/commonmark.html |
| | | http://hugo:1313/long-text.html |
| | | http://hugo:1313/no-image.html |
| New file |
| | |
| | | +++ |
| | | title = "No video" |
| | | visual.video.enable = false |
| | | +++ |
| | | |
| | | Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. |
| | |
| | | http://hugo:1313/index.html |
| | | http://hugo:1313/commonmark.html |
| | | http://hugo:1313/long-text.html |
| | | http://hugo:1313/no-video.html |