diff options
| -rw-r--r-- | _gallery/01-testigalleria.json | 17 | ||||
| -rw-r--r-- | _gallery/02-otsikoton-galleria.json | 22 | ||||
| -rw-r--r-- | src/admin/config.yml | 9 | ||||
| -rw-r--r-- | src/index.html.mustache | 4 |
4 files changed, 6 insertions, 46 deletions
diff --git a/_gallery/01-testigalleria.json b/_gallery/01-testigalleria.json deleted file mode 100644 index 31bf5c0..0000000 --- a/_gallery/01-testigalleria.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "column_count": 2, - "show_title": true, - "images": [ - { - "src_thumbnail": "/media/hassu.png", - "src_hiq": "/media/hassu.png", - "title": "Hassu naama" - }, - { - "src_thumbnail": "/media/halo.png", - "src_hiq": "/media/halo.png", - "title": "Halo hajos" - } - ], - "title": "01 Testigalleria" -}
\ No newline at end of file diff --git a/_gallery/02-otsikoton-galleria.json b/_gallery/02-otsikoton-galleria.json deleted file mode 100644 index a86859e..0000000 --- a/_gallery/02-otsikoton-galleria.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "show_title": false, - "column_count": 3, - "images": [ - { - "title": "placeholder 1", - "src_thumbnail": "https://via.placeholder.com/200x200", - "src_hiq": "https://via.placeholder.com/1000x1000" - }, - { - "title": "placeholder 2", - "src_hiq": "https://via.placeholder.com/1000x1000", - "src_thumbnail": "https://via.placeholder.com/200x200" - }, - { - "title": "placeholder 3", - "src_thumbnail": "/media/hassu.png", - "src_hiq": "/media/hassu.png" - } - ], - "title": "02 Otsikoton galleria" -}
\ No newline at end of file diff --git a/src/admin/config.yml b/src/admin/config.yml index 2747ca7..61ade92 100644 --- a/src/admin/config.yml +++ b/src/admin/config.yml @@ -6,18 +6,17 @@ public_folder: /media collections:
- name: gallery
label: Gallery
- identifier_name: title
+ identifier_name: id
folder: _gallery
extension: json
create: true
fields:
+ - name: id
+ label: Sorting key (alphabetically first is shown first on page)
+ widget: string
- name: title
label: Title
widget: string
- - name: show_title
- label: Show title above gallery?
- widget: boolean
- default: false
- name: column_count
label: Column count
widget: number
diff --git a/src/index.html.mustache b/src/index.html.mustache index d01df1a..698e044 100644 --- a/src/index.html.mustache +++ b/src/index.html.mustache @@ -19,9 +19,9 @@ </header>
{{#galleries}}
- {{#show_title}}
+ {{#title}}
<h3>{{title}}</h3>
- {{/show_title}}
+ {{/title}}
<div class="gallery">
{{#columns}}
<div class="column">
|
