From 6fd1525ef348cf3819af2f9e7d4db4aee7bf5dc8 Mon Sep 17 00:00:00 2001 From: Moritz Twente <127845092+mtwente@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:39:13 +0100 Subject: [PATCH] Subpage Navigation via Buttons (#170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add switch-view button * feat: remove dropdowns from navbar * feat: add zenodo link to data page * feat: add switch-view button to list * style: format code * feat: remove single year dropdown * feat: add switch-view button to timeline-edtf * feat: add switch-view button to cloud * feat: improve search box styling * style: format code * feat: implement consistent btn-group layout * feat: improve hyperlinking * Revert "feat: update navbar elements" This reverts commit 9d939e094ef654cc9507a7b098f7488581bd4fd5. * feat: restructure data.html * feat: improve css styling * fix: make btn-group work on small screens * Update reset button event handling Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: update heading and translation * feat: align btn-group-toggle styling * feat: improve btn-group CSS * feat: add view toggle for small screens * feat: update translations * fix: improve localization * style: run prettier * fix: fix typo * fix: improve resize handling * fix: remove duplicate line --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Moritz Mähr --- _data/config-nav.csv | 11 +-- _data/translations.yml | 47 +++++++++++ _includes/js/switch-view-js.html | 38 +++++++++ _includes/js/table-js.html | 23 +++-- _layouts/browse.html | 139 ++++++++++++++++++------------- _layouts/cloud.html | 52 ++++++++++++ _layouts/list.html | 99 +++++++++++++++++----- _layouts/timeline_edtf.html | 105 +++++++++++++++++------ _sass/_custom.scss | 78 ++++++++++++++++- pages/data.md | 18 ++-- pages/eras.md | 2 +- pages/subjects.md | 2 +- pages/timeline.md | 2 +- 13 files changed, 486 insertions(+), 130 deletions(-) create mode 100644 _includes/js/switch-view-js.html diff --git a/_data/config-nav.csv b/_data/config-nav.csv index ba0e1b78..f1475a13 100644 --- a/_data/config-nav.csv +++ b/_data/config-nav.csv @@ -1,13 +1,6 @@ display_name,stub,dropdown_parent,external_link -Sammlung,,, -Durchsuchen,/browse.html,Sammlung, -Themen,/subjects.html,Sammlung, -Zeitachse,/timeline.html,Sammlung, -Epochen,/eras.html,Sammlung, +Sammlung,/browse.html,, Bibliografie,https://www.zotero.org/groups/5004193/stadt.geschichte.basel/library,,true -Daten,,, -Metadaten,/data.html,Daten, -Datenarchiv,https://zenodo.org/communities/stadt-geschichte-basel/,Daten,true -Quellcode,https://github.com/Stadt-Geschichte-Basel/,Daten,true +Daten,/data.html,, Portal,https://stadtgeschichtebasel.ch/,,true Über,/about.html,, diff --git a/_data/translations.yml b/_data/translations.yml index 4b2b83c5..ec8cf81e 100644 --- a/_data/translations.yml +++ b/_data/translations.yml @@ -426,6 +426,22 @@ _includes: de: "Element anzeigen" modal-hash-js.html: table-js.html: + download: + en: "Download" + es: "Descargar" + de: "Herunterladen" + filtered_metadata_excel: + en: "Filtered Metadata (Excel)" + es: "Metadatos Filtrados (Excel)" + de: "Gefilterte Metadaten (Excel)" + filtered_metadata_csv: + en: "Filtered Metadata (CSV)" + es: "Metadatos Filtrados (CSV)" + de: "Gefilterte Metadaten (CSV)" + more_exports: + en: "More Exports" + es: "Más Exportaciones" + de: "Weitere Exporte" timeline-js.html: collection-banner.html: featured-items: @@ -607,6 +623,37 @@ _layouts: en: "Loading" es: "Cargando" de: "Laden" + objects: + en: "Objects" + de: "Objekte" + timeline: + en: "Timeline" + es: "Línea de tiempo" + de: "Zeitachse" + subjects: + en: "Subjects" + es: "Temas" + de: "Themen" + eras: + en: "Eras" + es: "Épocas" + de: "Epochen" + view-objects: + en: "Show object view" + de: "Zeige Objektansicht" + view-timeline: + en: "Show objects on timeline" + de: "Zeige Objekte auf einer Zeitachse" + view-subjects: + en: "Show list of subjects" + de: "Zeige Liste mit Schlagwörtern" + view-eras: + en: "Show list of eras" + de: "Zeige Liste der Epochen" + switch-view: + en: "Switch view" + es: "Cambiar Vista" + de: "Ansicht wechseln" cloud.html: data.html: link: diff --git a/_includes/js/switch-view-js.html b/_includes/js/switch-view-js.html new file mode 100644 index 00000000..f72e7213 --- /dev/null +++ b/_includes/js/switch-view-js.html @@ -0,0 +1,38 @@ + diff --git a/_includes/js/table-js.html b/_includes/js/table-js.html index a7fe43ac..af91cbf2 100644 --- a/_includes/js/table-js.html +++ b/_includes/js/table-js.html @@ -1,5 +1,17 @@ {% assign fcount = site.data['config-table'] | size %} {% assign lang = site.lang %} +{% assign download_dropdown = site.data.translations._includes.js['table-js.html'].download[site.lang] + | default: 'Download' +%} +{% assign excel_export = site.data.translations._includes.js['table-js.html'].filtered_metadata_excel[site.lang] + | default: 'Filtered Metadata (Excel)' +%} +{% assign csv_export = site.data.translations._includes.js['table-js.html'].filtered_metadata_csv[site.lang] + | default: 'Filtered Metadata (CSV)' +%} +{% assign more_exports = site.data.translations._includes.js['table-js.html'].more_exports[site.lang] + | default: 'More Exports' +%} {% include data-download-modal.html show_button=false %}