try some photo gallery stuff
6
content/gallery/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
paginate_by = 4
|
||||||
|
sort_by = "date"
|
||||||
|
template = "index.html"
|
||||||
|
title = "Photo gallery"
|
||||||
|
+++
|
BIN
content/gallery/test-2/2022-07-17-4815.jpg
Normal file
After Width: | Height: | Size: 6.7 MiB |
BIN
content/gallery/test-2/2022-07-28-4867.jpg
Normal file
After Width: | Height: | Size: 4 MiB |
BIN
content/gallery/test-2/2022-07-28-4868.jpg
Normal file
After Width: | Height: | Size: 3.5 MiB |
BIN
content/gallery/test-2/22-10-29 16-22-41 5295.jpg
Normal file
After Width: | Height: | Size: 4.6 MiB |
BIN
content/gallery/test-2/23-04-25 16-11-02 5888.jpg
Normal file
After Width: | Height: | Size: 3.5 MiB |
BIN
content/gallery/test-2/23-04-25 18-14-07 5889.jpg
Normal file
After Width: | Height: | Size: 8 MiB |
BIN
content/gallery/test-2/23-04-25 18-16-13 5890.jpg
Normal file
After Width: | Height: | Size: 5.9 MiB |
10
content/gallery/test-2/index.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
+++
|
||||||
|
title = "Photo gallery Test photos number two"
|
||||||
|
template = "gallery.html"
|
||||||
|
date = 2024-06-07
|
||||||
|
+++
|
||||||
|
|
||||||
|
Another few photos for testing my new gallery layout
|
||||||
|
|
||||||
|
{{ gallery() }}
|
||||||
|
|
BIN
content/gallery/test/22-12-16 14-51-56 5729.jpg
Normal file
After Width: | Height: | Size: 5.7 MiB |
BIN
content/gallery/test/23-09-06 07-42-31 6209.jpg
Normal file
After Width: | Height: | Size: 2.4 MiB |
BIN
content/gallery/test/IMG_20231001_120627.jpg
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
content/gallery/test/IMG_20231031_112952.jpg
Normal file
After Width: | Height: | Size: 4.7 MiB |
BIN
content/gallery/test/IMG_20240320_153100.jpg
Normal file
After Width: | Height: | Size: 6.5 MiB |
BIN
content/gallery/test/IMG_20240521_154934.jpg
Normal file
After Width: | Height: | Size: 5.7 MiB |
BIN
content/gallery/test/IMG_20240602_181327.jpg
Normal file
After Width: | Height: | Size: 5.4 MiB |
BIN
content/gallery/test/IMG_20240602_181446.jpg
Normal file
After Width: | Height: | Size: 5.4 MiB |
10
content/gallery/test/index.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
+++
|
||||||
|
title = "Photo gallery Test photos"
|
||||||
|
template = "gallery.html"
|
||||||
|
date = 2024-06-06
|
||||||
|
+++
|
||||||
|
|
||||||
|
All photos shot on a phone camera over the last years.
|
||||||
|
|
||||||
|
{{ gallery() }}
|
||||||
|
|
14
sass/gallery.scss
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
|
.gallery {
|
||||||
|
display: grid;
|
||||||
|
grid-auto-flow: row dense;
|
||||||
|
grid-auto-rows: 1fr;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
|
grid-template-rows: 1fr 1fr 1fr;
|
||||||
|
gap: 2em 2em;
|
||||||
|
grid-template-areas:
|
||||||
|
". . ."
|
||||||
|
". . ."
|
||||||
|
". . .";
|
||||||
|
}
|
|
@ -4,5 +4,6 @@
|
||||||
@import 'logo';
|
@import 'logo';
|
||||||
@import 'main';
|
@import 'main';
|
||||||
@import 'post';
|
@import 'post';
|
||||||
|
@import 'gallery';
|
||||||
@import 'pagination';
|
@import 'pagination';
|
||||||
@import 'footer';
|
@import 'footer';
|
||||||
|
|
BIN
static/processed_images/2022-07-17-4815.4e690c6f5e1eec6e.jpg
Normal file
After Width: | Height: | Size: 293 KiB |
BIN
static/processed_images/2022-07-28-4867.8ad890a69bc69907.jpg
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
static/processed_images/2022-07-28-4868.3b78fa725881b47e.jpg
Normal file
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 252 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 168 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 193 KiB |
BIN
static/processed_images/IMG_20231001_120627.fa88c9a63ec203b3.jpg
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
static/processed_images/IMG_20231031_112952.8c576a92bcdd8f7e.jpg
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
static/processed_images/IMG_20240320_153100.af1d98f752e29648.jpg
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
static/processed_images/IMG_20240521_154934.e784a18572e1050e.jpg
Normal file
After Width: | Height: | Size: 144 KiB |
BIN
static/processed_images/IMG_20240602_181327.53ce4a138aec6622.jpg
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
static/processed_images/IMG_20240602_181446.58fcfef84d45c6a1.jpg
Normal file
After Width: | Height: | Size: 53 KiB |
13
templates/gallery.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{% extends "index.html" %}
|
||||||
|
|
||||||
|
{%- block title -%}
|
||||||
|
{{ title_macros::title(page_title=page.title, main_title=config.title) }}
|
||||||
|
{%- endblock -%}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="post">
|
||||||
|
{{ post_macros::header(page=page) }}
|
||||||
|
{{ post_macros::content(page=page, summary=false) }}
|
||||||
|
{{ post_macros::earlier_later(page=page) }}
|
||||||
|
</div>
|
||||||
|
{% endblock content %}
|
10
templates/shortcodes/gallery.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<div class="gallery">
|
||||||
|
{% for asset in page.assets -%}
|
||||||
|
{%- if asset is matching("[.](jpg|png)$") -%}
|
||||||
|
{% set image = resize_image(path=asset, width=960, height=720, op="fit") %}
|
||||||
|
<a href="{{ get_url(path=asset) }}" target="_blank">
|
||||||
|
<img src="{{ image.url }}" />
|
||||||
|
</a>
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
</div>
|