From cb3fbfc08d72e0ed052dbcbbae15e8a5557553da Mon Sep 17 00:00:00 2001 From: Badri Sunderarajan Date: Sat, 11 Feb 2023 18:35:18 +0530 Subject: [PATCH] Separate secondary navigation from social links We can now set social links using custom properties, leaving the secondary navigation free for other things (like complying with payment gateway standards)! --- default.hbs | 53 +++++++++++++++++++++-------------------- package.json | 10 ++++++++ partials/navigation.hbs | 30 +++++++++++------------ 3 files changed, 51 insertions(+), 42 deletions(-) diff --git a/default.hbs b/default.hbs index 680fef1..f6df530 100644 --- a/default.hbs +++ b/default.hbs @@ -48,18 +48,28 @@ {{navigation}}
- {{#if @site.secondary_navigation}} - {{navigation type="secondary"}} - {{else}} -
- {{#if @site.facebook}} - - {{/if}} - {{#if @site.twitter}} - - {{/if}} -
- {{/if}} +
+ {{#if @site.facebook}} + + {{/if}} + {{#if @site.twitter}} + + {{/if}} + {{#if @custom.mastodon_url}} + + + + + + {{/if}} + {{#if @custom.instagram_url}} + + + + + + {{/if}} +
{{#unless @member}} Newsletter @@ -79,20 +89,11 @@ diff --git a/package.json b/package.json index 398ba28..ee3698f 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,16 @@ "xl": { "width": 2000 } + }, + "custom": { + "mastodon_url": { + "type": "text", + "default": "" + }, + "instagram_url": { + "type": "text", + "default": "" + } } }, "renovate": { diff --git a/partials/navigation.hbs b/partials/navigation.hbs index 792de38..2c29947 100644 --- a/partials/navigation.hbs +++ b/partials/navigation.hbs @@ -1,19 +1,17 @@ {{#if isSecondary}} -
- {{#foreach navigation}} - - - - - - {{/foreach}} -
+ {{else}} - + {{/if}}