From cf0669ebd4563144c1ba50f62fe71fe6139e7037 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Mon, 11 Jul 2022 23:15:22 +0300 Subject: Improve gallery sorting behaviour --- src/admin/config.yml | 9 ++++----- src/index.html.mustache | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src') 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 @@ {{#galleries}} - {{#show_title}} + {{#title}}

{{title}}

- {{/show_title}} + {{/title}}