Browse Source

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.
master
Immanuel Onyeka 10 months ago
parent
commit
298d031ef2
7 changed files with 8 additions and 18 deletions
  1. +1
    -1
      grav-admin/user/data/flex/indexes/pages.json
  2. +1
    -1
      grav-admin/user/data/notifications/21232f297a57a5a743894a0e4a801fc3.yaml
  3. +1
    -1
      grav-admin/user/pages/06.register/registration.md
  4. +0
    -1
      grav-admin/user/pages/07.app/app.md
  5. +1
    -1
      grav-admin/user/themes/quark/templates/app.html.twig
  6. +4
    -4
      grav-admin/user/themes/quark/templates/macros/macros.html.twig
  7. +0
    -9
      skouter.go

+ 1
- 1
grav-admin/user/data/flex/indexes/pages.json View File

@@ -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"}}}
{"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"}}}

+ 1
- 1
grav-admin/user/data/notifications/21232f297a57a5a743894a0e4a801fc3.yaml View File

@@ -1,4 +1,4 @@
last_checked: 1710872256
last_checked: 1710877622
data:
feed:
-


+ 1
- 1
grav-admin/user/pages/06.register/registration.md View File

@@ -1,6 +1,6 @@
---
title: Register
access:
skouter:
onlyguests: true
---


+ 0
- 1
grav-admin/user/pages/07.app/app.md View File

@@ -2,4 +2,3 @@
title: App
---

## Welcome

+ 1
- 1
grav-admin/user/themes/quark/templates/app.html.twig View File

@@ -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 %}


+ 4
- 4
grav-admin/user/themes/quark/templates/macros/macros.html.twig View File

@@ -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' : '' %}
<li>
<a href="{{ p.url }}" class="{{ active_page }}">
@@ -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' : '' %}
<li>
<a href="{{ p.url }}" class="{{ active_page }}">
@@ -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' : '' %}
<li>
<a href="{{ p.url }}" class="{{ active_page }}">
{{ p.menu }} {{p.header.access.onlyguests}}
{{ p.menu }} {{p.header.skouter.onlyguests}}
</a>
{% if p.children.visible.count > 0 %}
<ul>


+ 0
- 9
skouter.go View File

@@ -263,10 +263,7 @@ var paths = map[string]string{
}

var pages = map[string]Page{
"home": cache("home", "Home"),
"terms": cache("terms", "Terms and Conditions"),
"report": cachePdf("comparison"),
"app": cache("app", "App"),
}

var roles = map[string]int{
@@ -339,12 +336,6 @@ func (c VerificationClaims) Valid() error {
return err
}

func cache(name string, title string) Page {
var p = []string{"views/master.tpl", paths[name]}
tpl := template.Must(template.ParseFiles(p...))
return Page{tpl: tpl, Title: title, Name: name}
}

func cachePdf(name string) Page {
// Money is stored in cents, so it must be converted to dollars in reports
dollars := func(cents int) string {


Loading…
Cancel
Save