nav_loop is seperated into three different loops for general routes, guests, and authenticated users which will be called 'members'.master
@@ -1,4 +1,4 @@ | |||
last_checked: 1710284930 | |||
last_checked: 1710866946 | |||
data: | |||
- | |||
title: 'macOS 14.0 Sonoma Apache Setup: Upgrading Homebrew' | |||
@@ -0,0 +1,52 @@ | |||
last_checked: 1710866213 | |||
data: | |||
- | |||
title: 'macOS 14.0 Sonoma Apache Setup: Upgrading Homebrew' | |||
url: 'https://getgrav.org/blog/macos-ventura-apache-upgrade-homebrew' | |||
date: 1697803200 | |||
nicetime: '5 months ago' | |||
- | |||
title: 'macOS 14.0 Sonoma Apache Setup: LetsEncrypt SSL' | |||
url: 'https://getgrav.org/blog/macos-sonoma-apache-ssl' | |||
date: 1697799780 | |||
nicetime: '5 months ago' | |||
- | |||
title: 'macOS 14.0 Sonoma Apache Setup: MySQL, Xdebug & More...' | |||
url: 'https://getgrav.org/blog/macos-sonoma-apache-mysql-vhost-apc' | |||
date: 1697799600 | |||
nicetime: '5 months ago' | |||
- | |||
title: 'macOS 14.0 Sonoma Apache Setup: Multiple PHP Versions' | |||
url: 'https://getgrav.org/blog/macos-sonoma-apache-multiple-php-versions' | |||
date: 1697796000 | |||
nicetime: '5 months ago' | |||
- | |||
title: 'Big changes for Email plugin' | |||
url: 'https://getgrav.org/blog/new-email-plugin' | |||
date: 1665048600 | |||
nicetime: '1 years ago' | |||
- | |||
title: 'Skeleton Build Automation' | |||
url: 'https://getgrav.org/blog/skeletons-build-automation' | |||
date: 1614347940 | |||
nicetime: '3 years ago' | |||
- | |||
title: 'Using Grav''s new built-in Web Server' | |||
url: 'https://getgrav.org/blog/using-builtin-webserver' | |||
date: 1612186320 | |||
nicetime: '3 years ago' | |||
- | |||
title: 'Grav 1.7 CLI Self-Upgrade Bug' | |||
url: 'https://getgrav.org/blog/grav-170-cli-self-upgrade-bug' | |||
date: 1611222900 | |||
nicetime: '3 years ago' | |||
- | |||
title: 'Grav 1.7 Released!' | |||
url: 'https://getgrav.org/blog/grav-1.7-released' | |||
date: 1611050100 | |||
nicetime: '3 years ago' | |||
- | |||
title: 'Grav Premium Focus: NextGen Editor' | |||
url: 'https://getgrav.org/blog/premium-focus-nextgen-editor' | |||
date: 1610713140 | |||
nicetime: '3 years ago' |
@@ -1 +1 @@ | |||
{"version":"1.5","timestamp":1705023488,"count":14,"index":{"":{"key":"","storage_key":"","template":null,"storage_timestamp":1705010337,"children":{"01.home":1704396086,"02.about":1704398516,"03.typography":1703638467,"04.pricing":1704400398,"05.blog":1703638467,"06.register":1705010214,"07.login":1704398231},"checksum":"eea3a7871f80727e2de9702b8f540707"},"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":1705023488,"markdown":{"":{"registration":1705023488}},"checksum":"55b121c2a83afd5a9b12e85234ca7c9b"},"07.login":{"key":"login","storage_key":"07.login","template":"form","storage_timestamp":1704398231,"markdown":{"":{"form":1704398231}},"checksum":"77a4de225317558af65b6079dcc902fb"}}} | |||
{"version":"1.5","timestamp":1710807003,"count":14,"index":{"":{"key":"","storage_key":"","template":null,"storage_timestamp":1705010337,"children":{"01.home":1704396086,"02.about":1704398516,"03.typography":1703638467,"04.pricing":1704400398,"05.blog":1703638467,"06.register":1705010214,"07.login":1704398231},"checksum":"eea3a7871f80727e2de9702b8f540707"},"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.login":{"key":"login","storage_key":"07.login","template":"form","storage_timestamp":1704398231,"markdown":{"":{"form":1704398231}},"checksum":"77a4de225317558af65b6079dcc902fb"}}} |
@@ -1,4 +1,4 @@ | |||
last_checked: 1710287442 | |||
last_checked: 1710866946 | |||
data: | |||
feed: | |||
- | |||
@@ -0,0 +1,92 @@ | |||
last_checked: 1710866212 | |||
data: | |||
feed: | |||
- | |||
id: 31 | |||
date: '2024-02-13 11:40' | |||
message: '🗜️Optimize your Grav site with Image Optimize' | |||
link: 'https://getgrav.org/premium/image-optimize' | |||
type: info | |||
location: | |||
- feed | |||
- | |||
id: 30 | |||
date: '2024-02-13 11:40' | |||
message: '🗳️ Please <b>Cast your vote</b> for Grav in the 2024 CMS Critic Awards' | |||
link: 'https://cmscritic.com/vote?utm_source=cmscritic&utm_medium=featured_banner&utm_campaign=CMS+Critic' | |||
type: note | |||
location: | |||
- feed | |||
- | |||
id: 26 | |||
date: '2024-02-10 00:01' | |||
message: '🚀 Grav Premium Plugins and Themes available. Turbo-charge your Grav site today.' | |||
link: 'https://getgrav.org/premium' | |||
type: info | |||
location: | |||
- feed | |||
- | |||
id: 12 | |||
date: '2024-01-17 15:15' | |||
message: '☕️ Support Grav for the price of a <span class=''fa fa-coffee''></span> a month!' | |||
link: 'https://opencollective.com/grav' | |||
type: note | |||
location: | |||
- feed | |||
- | |||
id: 23 | |||
date: '2024-01-05 15:50' | |||
message: '🙊 Grav community chat has moved from Slack to <span class=''fa fa-comments''></span> Discord' | |||
link: 'https://chat.getgrav.org' | |||
type: info | |||
location: | |||
- feed | |||
- | |||
id: 24 | |||
date: '2024-01-05 11:27' | |||
message: '🙏 Thanks to our amazing community, Grav was voted <b>Best Flat File CMS</b> in the 2019 CMS Critics'' Awards!' | |||
link: 'https://www.cmscritic.com/awards/' | |||
type: info | |||
location: | |||
- feed | |||
- | |||
id: 2 | |||
date: '2024-01-05 02:23' | |||
message: '🎖 Don''t forget to star Grav on GitHub!' | |||
link: 'https://github.com/getgrav/grav' | |||
type: info | |||
location: | |||
- feed | |||
dashboard: | |||
- | |||
id: 27 | |||
date: '2020-02-21 00:01' | |||
message: "<style>\n.dashboard-notifications-container, .dashboard-notifications-container .alert, .themes-notifications-container, .themes-notifications-container .alert, .plugins-notifications-container, .plugins-notifications-container .alert {\n margin: 0;\n padding: 0; \n}\n.dashboard-notifications-container .alert.position-dashboard:before,\n.themes-notifications-container .alert.position-themes:before,\n.plugins-notifications-container .alert.position-plugins:before,\n.hide-after-load {\n display: none;\n}\n</style>\n\n<span class=\"hide-after-load\">Loading...</span>\n<link href=\"https://getgrav.org/notifications/grav-premium-notification.css\" type=\"text/css\" rel=\"stylesheet\">\n<script src=\"https://getgrav.org/notifications/grav-premium-notification.js\" async></script>\n<div class=\"gp-banner hidden\">\n <div class=\"gp-image\">\n <img src=\"https://getgrav.org/user/themes/planetoid/images/grav-premium-logo-white.svg\" />\n </div>\n <div class=\"gp-sentences\">\n <span>Turbo-charge your Grav site - from the creators of Grav</span>\n <span>Image Optimize - Optimize all the images on your Grav site</span>\n <span>Downloads Pro - Powerful download manager directly integrated with Grav</span>\n <span>Algolia Pro - Class-leading AI-powered search made easy for Grav</span>\n <span>SEO-Magic - Advanced SEO tool for Grav with automatic webshot generator</span>\n <span>Typhoon - The most powerful Grav theme ever built, based on Tailwind 3</span>\n <span>Cloudflare Manager - Configure and manage your domain right within the admin</span>\n <span>Lightbox Gallery - A light, versatile and mobile friendly Lightbox Gallery</span>\n </div>\n <a class=\"gp-learn-more button\" href=\"https://getgrav.org/premium\" target=\"_blank\">Learn more</a>\n</div>\n" | |||
type: notice | |||
link: 'https://getgrav.org/premium' | |||
location: | |||
- dashboard | |||
- plugins | |||
- themes | |||
plugins: | |||
- | |||
id: 27 | |||
date: '2020-02-21 00:01' | |||
message: "<style>\n.dashboard-notifications-container, .dashboard-notifications-container .alert, .themes-notifications-container, .themes-notifications-container .alert, .plugins-notifications-container, .plugins-notifications-container .alert {\n margin: 0;\n padding: 0; \n}\n.dashboard-notifications-container .alert.position-dashboard:before,\n.themes-notifications-container .alert.position-themes:before,\n.plugins-notifications-container .alert.position-plugins:before,\n.hide-after-load {\n display: none;\n}\n</style>\n\n<span class=\"hide-after-load\">Loading...</span>\n<link href=\"https://getgrav.org/notifications/grav-premium-notification.css\" type=\"text/css\" rel=\"stylesheet\">\n<script src=\"https://getgrav.org/notifications/grav-premium-notification.js\" async></script>\n<div class=\"gp-banner hidden\">\n <div class=\"gp-image\">\n <img src=\"https://getgrav.org/user/themes/planetoid/images/grav-premium-logo-white.svg\" />\n </div>\n <div class=\"gp-sentences\">\n <span>Turbo-charge your Grav site - from the creators of Grav</span>\n <span>Image Optimize - Optimize all the images on your Grav site</span>\n <span>Downloads Pro - Powerful download manager directly integrated with Grav</span>\n <span>Algolia Pro - Class-leading AI-powered search made easy for Grav</span>\n <span>SEO-Magic - Advanced SEO tool for Grav with automatic webshot generator</span>\n <span>Typhoon - The most powerful Grav theme ever built, based on Tailwind 3</span>\n <span>Cloudflare Manager - Configure and manage your domain right within the admin</span>\n <span>Lightbox Gallery - A light, versatile and mobile friendly Lightbox Gallery</span>\n </div>\n <a class=\"gp-learn-more button\" href=\"https://getgrav.org/premium\" target=\"_blank\">Learn more</a>\n</div>\n" | |||
type: notice | |||
link: 'https://getgrav.org/premium' | |||
location: | |||
- dashboard | |||
- plugins | |||
- themes | |||
themes: | |||
- | |||
id: 27 | |||
date: '2020-02-21 00:01' | |||
message: "<style>\n.dashboard-notifications-container, .dashboard-notifications-container .alert, .themes-notifications-container, .themes-notifications-container .alert, .plugins-notifications-container, .plugins-notifications-container .alert {\n margin: 0;\n padding: 0; \n}\n.dashboard-notifications-container .alert.position-dashboard:before,\n.themes-notifications-container .alert.position-themes:before,\n.plugins-notifications-container .alert.position-plugins:before,\n.hide-after-load {\n display: none;\n}\n</style>\n\n<span class=\"hide-after-load\">Loading...</span>\n<link href=\"https://getgrav.org/notifications/grav-premium-notification.css\" type=\"text/css\" rel=\"stylesheet\">\n<script src=\"https://getgrav.org/notifications/grav-premium-notification.js\" async></script>\n<div class=\"gp-banner hidden\">\n <div class=\"gp-image\">\n <img src=\"https://getgrav.org/user/themes/planetoid/images/grav-premium-logo-white.svg\" />\n </div>\n <div class=\"gp-sentences\">\n <span>Turbo-charge your Grav site - from the creators of Grav</span>\n <span>Image Optimize - Optimize all the images on your Grav site</span>\n <span>Downloads Pro - Powerful download manager directly integrated with Grav</span>\n <span>Algolia Pro - Class-leading AI-powered search made easy for Grav</span>\n <span>SEO-Magic - Advanced SEO tool for Grav with automatic webshot generator</span>\n <span>Typhoon - The most powerful Grav theme ever built, based on Tailwind 3</span>\n <span>Cloudflare Manager - Configure and manage your domain right within the admin</span>\n <span>Lightbox Gallery - A light, versatile and mobile friendly Lightbox Gallery</span>\n </div>\n <a class=\"gp-learn-more button\" href=\"https://getgrav.org/premium\" target=\"_blank\">Learn more</a>\n</div>\n" | |||
type: notice | |||
link: 'https://getgrav.org/premium' | |||
location: | |||
- dashboard | |||
- plugins | |||
- themes |
@@ -1,4 +1,6 @@ | |||
--- | |||
title: Register | |||
access: | |||
onlyguests: true | |||
--- | |||
@@ -66,17 +66,14 @@ class ProxyLoginPlugin extends Plugin | |||
public function loadUser() { | |||
$this -> debug('Checking for user authentication...'); | |||
print($_COOKIE['skouter']); | |||
if (!array_key_exists("X-REMOTE-USER", $_SERVER)) { | |||
if (!array_key_exists("HTTP_X_REMOTE_USER", $_SERVER)) { | |||
$this -> grav['session'] -> skouter = null; | |||
return; | |||
} | |||
$this -> grav['session'] -> user -> username = | |||
$_SERVER["X-REMOTE-USER"]; | |||
print("hello"); | |||
var_dump($_SERVER["X-REMOTE-USER"] ?? "didnt run"); | |||
$this -> grav['session'] -> skouter = | |||
$_SERVER["HTTP_X_REMOTE_USER"]; | |||
} | |||
public function debug($message) { | |||
@@ -1,6 +1,7 @@ | |||
{% macro nav_loop(page) %} | |||
{% import _self as macros %} | |||
{% for p in page.children.visible %} | |||
{% for p in page.children.visible | |||
if (not p.header.access.onlyguests) and (not p.header.access.onlymembers)%} | |||
{% set active_page = (p.active or p.activeChild) ? 'active' : '' %} | |||
<li> | |||
<a href="{{ p.url }}" class="{{ active_page }}"> | |||
@@ -13,4 +14,34 @@ | |||
{% endif %} | |||
</li> | |||
{% endfor %} | |||
{% endmacro %} | |||
{% for p in page.children.visible | |||
if p.header.access.onlyguests and not 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}} | |||
</a> | |||
{% if p.children.visible.count > 0 %} | |||
<ul> | |||
{{ macros.nav_loop(p) }} | |||
</ul> | |||
{% endif %} | |||
</li> | |||
{% endfor %} | |||
{% for p in page.children.visible | |||
if p.header.access.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}} | |||
</a> | |||
{% if p.children.visible.count > 0 %} | |||
<ul> | |||
{{ macros.nav_loop(p) }} | |||
</ul> | |||
{% endif %} | |||
</li> | |||
{% endfor %} | |||
{% endmacro %} |
@@ -3753,12 +3753,9 @@ func setupProxy(r *httputil.ProxyRequest) { | |||
if claims.Valid() == nil { | |||
r.Out.Header.Set("X-REMOTE-USER", strconv.Itoa(claims.Id)) | |||
log.Println(claims.Id) | |||
} else { | |||
r.Out.Header.Del("X-REMOTE-USER") | |||
} | |||
log.Println(err) | |||
} | |||
func serve() { | |||