From 298d031ef2685af79dd4c70b63f6a40f6043f0c6 Mon Sep 17 00:00:00 2001 From: Immanuel Onyeka Date: Tue, 19 Mar 2024 16:08:46 -0400 Subject: [PATCH] Resolve usage conflict for 'access' attribute 'access' is already used by grav to set permissions for admin routes and internal accounts. 'skouter' should be used instead. --- grav-admin/user/data/flex/indexes/pages.json | 2 +- .../notifications/21232f297a57a5a743894a0e4a801fc3.yaml | 2 +- grav-admin/user/pages/06.register/registration.md | 2 +- grav-admin/user/pages/07.app/app.md | 1 - grav-admin/user/themes/quark/templates/app.html.twig | 2 +- .../user/themes/quark/templates/macros/macros.html.twig | 8 ++++---- skouter.go | 9 --------- 7 files changed, 8 insertions(+), 18 deletions(-) diff --git a/grav-admin/user/data/flex/indexes/pages.json b/grav-admin/user/data/flex/indexes/pages.json index 10ae24a..1b81a82 100644 --- a/grav-admin/user/data/flex/indexes/pages.json +++ b/grav-admin/user/data/flex/indexes/pages.json @@ -1 +1 @@ -{"version":"1.5","timestamp":1710872704,"count":14,"index":{"":{"key":"","storage_key":"","template":null,"storage_timestamp":1710870821,"children":{"01.home":1704396086,"02.about":1704398516,"03.typography":1703638467,"04.pricing":1704400398,"05.blog":1703638467,"06.register":1710807003,"07.app":1710870821},"checksum":"af9cfb7f72d2c560dc5493b5034ba005"},"01.home":{"key":"home","storage_key":"01.home","template":"modular","storage_timestamp":1704396086,"markdown":{"":{"modular":1703631506}},"children":{"01._hero":1703718436,"02._features":1703720151,"03._example":1703716188,"04._comparison-pdf":1703719134,"05._info":1703720014,"06._any_device":1704396086},"checksum":"dbbcfea030db5994b105e013be94b15c"},"01.home\/01._hero":{"key":"home\/_hero","storage_key":"01.home\/01._hero","template":"hero","storage_timestamp":1703718436,"markdown":{"":{"hero":1703718436}},"checksum":"45dc2f4a454b5f0609cbe09cfda09790"},"01.home\/02._features":{"key":"home\/_features","storage_key":"01.home\/02._features","template":"features","storage_timestamp":1703720151,"markdown":{"":{"features":1703720151}},"checksum":"ed7be750188fc4ed50ebcdc060f6fb53"},"01.home\/03._example":{"key":"home\/_example","storage_key":"01.home\/03._example","template":"text","storage_timestamp":1703716188,"markdown":{"":{"text":1703713545}},"checksum":"48b2ea373eba19040584a991b21c083c"},"01.home\/04._comparison-pdf":{"key":"home\/_comparison-pdf","storage_key":"01.home\/04._comparison-pdf","template":"text","storage_timestamp":1703719134,"markdown":{"":{"text":1703719134}},"checksum":"f323d6050403b0102c73c174d74b2f0a"},"01.home\/05._info":{"key":"home\/_info","storage_key":"01.home\/05._info","template":"features","storage_timestamp":1703720014,"markdown":{"":{"features":1703720014}},"checksum":"35c9bee0f74fe81449a491e31bf81bcb"},"01.home\/06._any_device":{"key":"home\/_any_device","storage_key":"01.home\/06._any_device","template":"text","storage_timestamp":1704397975,"markdown":{"":{"text":1704397975}},"checksum":"aabfe01503028954e8557c5bff37048d"},"02.about":{"key":"about","storage_key":"02.about","template":"default","storage_timestamp":1704398516,"markdown":{"":{"default":1704398516}},"checksum":"3d12d8cc95786aef7316b6c379752aa0"},"03.typography":{"key":"typography","storage_key":"03.typography","template":"default","storage_timestamp":1703638467,"markdown":{"":{"default":1696264967}},"checksum":"e18e25aa1028384a58d66d7b5c74b799"},"04.pricing":{"key":"pricing","storage_key":"04.pricing","template":"default","storage_timestamp":1704400398,"markdown":{"":{"default":1704400398}},"checksum":"76ddfc1dafa27268dca3f24db2ffa05a"},"05.blog":{"key":"blog","storage_key":"05.blog","template":"blog","storage_timestamp":1703638467,"markdown":{"":{"blog":1703636303}},"checksum":"88a8e8a7109dc2957e9dc3e1fd81fa85"},"06.register":{"key":"register","storage_key":"06.register","template":"registration","storage_timestamp":1710807003,"markdown":{"":{"registration":1710807003}},"checksum":"af484cd05f9e8645375ff24f629962b1"},"07.app":{"key":"app","storage_key":"07.app","template":"app","storage_timestamp":1710872704,"markdown":{"":{"app":1710871467}},"checksum":"63be85bdb5a595cc43cf9137122fc997"}}} \ No newline at end of file +{"version":"1.5","timestamp":1710878689,"count":14,"index":{"":{"key":"","storage_key":"","template":null,"storage_timestamp":1710878689,"children":{"01.home":1704396086,"02.about":1704398516,"03.typography":1703638467,"04.pricing":1704400398,"05.blog":1703638467,"06.register":1710878689,"07.app":1710874534},"checksum":"85f91b3e4639cca03cc9350e26546637"},"01.home":{"key":"home","storage_key":"01.home","template":"modular","storage_timestamp":1704396086,"markdown":{"":{"modular":1703631506}},"children":{"01._hero":1703718436,"02._features":1703720151,"03._example":1703716188,"04._comparison-pdf":1703719134,"05._info":1703720014,"06._any_device":1704396086},"checksum":"dbbcfea030db5994b105e013be94b15c"},"01.home\/01._hero":{"key":"home\/_hero","storage_key":"01.home\/01._hero","template":"hero","storage_timestamp":1703718436,"markdown":{"":{"hero":1703718436}},"checksum":"45dc2f4a454b5f0609cbe09cfda09790"},"01.home\/02._features":{"key":"home\/_features","storage_key":"01.home\/02._features","template":"features","storage_timestamp":1703720151,"markdown":{"":{"features":1703720151}},"checksum":"ed7be750188fc4ed50ebcdc060f6fb53"},"01.home\/03._example":{"key":"home\/_example","storage_key":"01.home\/03._example","template":"text","storage_timestamp":1703716188,"markdown":{"":{"text":1703713545}},"checksum":"48b2ea373eba19040584a991b21c083c"},"01.home\/04._comparison-pdf":{"key":"home\/_comparison-pdf","storage_key":"01.home\/04._comparison-pdf","template":"text","storage_timestamp":1703719134,"markdown":{"":{"text":1703719134}},"checksum":"f323d6050403b0102c73c174d74b2f0a"},"01.home\/05._info":{"key":"home\/_info","storage_key":"01.home\/05._info","template":"features","storage_timestamp":1703720014,"markdown":{"":{"features":1703720014}},"checksum":"35c9bee0f74fe81449a491e31bf81bcb"},"01.home\/06._any_device":{"key":"home\/_any_device","storage_key":"01.home\/06._any_device","template":"text","storage_timestamp":1704397975,"markdown":{"":{"text":1704397975}},"checksum":"aabfe01503028954e8557c5bff37048d"},"02.about":{"key":"about","storage_key":"02.about","template":"default","storage_timestamp":1704398516,"markdown":{"":{"default":1704398516}},"checksum":"3d12d8cc95786aef7316b6c379752aa0"},"03.typography":{"key":"typography","storage_key":"03.typography","template":"default","storage_timestamp":1703638467,"markdown":{"":{"default":1696264967}},"checksum":"e18e25aa1028384a58d66d7b5c74b799"},"04.pricing":{"key":"pricing","storage_key":"04.pricing","template":"default","storage_timestamp":1704400398,"markdown":{"":{"default":1704400398}},"checksum":"76ddfc1dafa27268dca3f24db2ffa05a"},"05.blog":{"key":"blog","storage_key":"05.blog","template":"blog","storage_timestamp":1703638467,"markdown":{"":{"blog":1703636303}},"checksum":"88a8e8a7109dc2957e9dc3e1fd81fa85"},"06.register":{"key":"register","storage_key":"06.register","template":"registration","storage_timestamp":1710878689,"markdown":{"":{"registration":1710878540}},"checksum":"983a354c44dd4836c96f7a5a0a7b74f1"},"07.app":{"key":"app","storage_key":"07.app","template":"app","storage_timestamp":1710874534,"markdown":{"":{"app":1710874534}},"checksum":"f0e4e99804d225d38720b9454d7b342b"}}} \ No newline at end of file diff --git a/grav-admin/user/data/notifications/21232f297a57a5a743894a0e4a801fc3.yaml b/grav-admin/user/data/notifications/21232f297a57a5a743894a0e4a801fc3.yaml index 0f39b3c..15315b4 100644 --- a/grav-admin/user/data/notifications/21232f297a57a5a743894a0e4a801fc3.yaml +++ b/grav-admin/user/data/notifications/21232f297a57a5a743894a0e4a801fc3.yaml @@ -1,4 +1,4 @@ -last_checked: 1710872256 +last_checked: 1710877622 data: feed: - diff --git a/grav-admin/user/pages/06.register/registration.md b/grav-admin/user/pages/06.register/registration.md index 7cd294e..c3d4ed8 100644 --- a/grav-admin/user/pages/06.register/registration.md +++ b/grav-admin/user/pages/06.register/registration.md @@ -1,6 +1,6 @@ --- title: Register -access: +skouter: onlyguests: true --- diff --git a/grav-admin/user/pages/07.app/app.md b/grav-admin/user/pages/07.app/app.md index 2ad0caa..abb07fc 100644 --- a/grav-admin/user/pages/07.app/app.md +++ b/grav-admin/user/pages/07.app/app.md @@ -2,4 +2,3 @@ title: App --- -## Welcome \ No newline at end of file diff --git a/grav-admin/user/themes/quark/templates/app.html.twig b/grav-admin/user/themes/quark/templates/app.html.twig index 2a890a0..fb33f59 100644 --- a/grav-admin/user/themes/quark/templates/app.html.twig +++ b/grav-admin/user/themes/quark/templates/app.html.twig @@ -3,7 +3,7 @@ {% block javascripts %} {{ parent() }} {% do assets.add('theme://js/bricklayer.min.js') %} - {% do assets.add('theme://assets/app.js', {group:'bottom'}) %} + {% do assets.add('/assets/app.js', {group:'bottom'}) %} {% endblock %} {% block content %} diff --git a/grav-admin/user/themes/quark/templates/macros/macros.html.twig b/grav-admin/user/themes/quark/templates/macros/macros.html.twig index 9d83057..1d68d8c 100644 --- a/grav-admin/user/themes/quark/templates/macros/macros.html.twig +++ b/grav-admin/user/themes/quark/templates/macros/macros.html.twig @@ -1,7 +1,7 @@ {% macro nav_loop(page) %} {% import _self as macros %} {% for p in page.children.visible - if (not p.header.access.onlyguests) and (not p.header.access.onlymembers)%} + if (not p.header.skouter.onlyguests) and (not p.header.skouter.onlymembers)%} {% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
  • @@ -16,7 +16,7 @@ {% endfor %} {% for p in page.children.visible - if p.header.access.onlyguests and not grav.session.skouter %} + if p.header.skouter.onlyguests and not grav.session.skouter %} {% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
  • @@ -31,11 +31,11 @@ {% endfor %} {% for p in page.children.visible - if p.header.access.onlymembers and grav.session.skouter %} + if p.header.skouter.onlymembers and grav.session.skouter %} {% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
  • - {{ p.menu }} {{p.header.access.onlyguests}} + {{ p.menu }} {{p.header.skouter.onlyguests}} {% if p.children.visible.count > 0 %}