From b0f29e2d85cef3f3e81a51b13ae8ceab7e35388c Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Mon, 11 Jan 2021 15:56:06 -0500 Subject: [PATCH 1/7] initial trial to custom header for sub-sites Signed-off-by: Yi Liu --- exampleSite/data/subsites_custom_logo.yml | 11 +++++++++ layouts/partials/navbar.html | 28 ++++++++++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 exampleSite/data/subsites_custom_logo.yml diff --git a/exampleSite/data/subsites_custom_logo.yml b/exampleSite/data/subsites_custom_logo.yml new file mode 100644 index 00000000..374c1a10 --- /dev/null +++ b/exampleSite/data/subsites_custom_logo.yml @@ -0,0 +1,11 @@ +items: + - + page_url: '/components' + logo: '/images/jakarta_ee_logo_schooner_color_horizontal_default.png' + logo_url: '/components' + logo_title: 'Components' + - + page_url: '/third-parent' + logo: '/images/jakartaone_livestream_test_white_logo.svg' + logo_url: '/third-parent' + logo_title: 'Third Parent' \ No newline at end of file diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 7842b4fe..6f32adc8 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -42,10 +42,32 @@
- {{- with .Page.Params.logo | default .Site.Params.logo | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg" }} - - + + {{ $flag := false }} + {{ $currentPageLogo := '1' }} + {{ $currentPageLogoTitle := '2' }} + {{ $currentPageLogoLink := '3' }} + {{ range $.Site.Data.subsites_custom_logo.items }} + + {{ $section := $.Site.GetPage (.page_url) }} + {{ if or (eq ($.Section) ($section)) ( $.Page.IsDescendant $section ) }} + {{ $flag = true }} + {{ $currentPageLogo = .logo }} + {{ $currentPageLogoTitle = .logo_title }} + {{ $currentPageLogoLink = .logo_url }} + {{ end }} + {{ end }} + + {{ if eq ($flag) (true) }} + + + {{ else }} + {{- with .Page.Params.logo | default .Site.Params.logo | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg" }} + + + + {{ end }} {{ end }}
From 94fef188aa456804b058367ead185d961ca4bfb6 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Mon, 11 Jan 2021 16:49:03 -0500 Subject: [PATCH 2/7] add static images Signed-off-by: Yi Liu --- .gitignore | 3 +++ exampleSite/data/subsites_custom_logo.yml | 4 ++-- layouts/partials/navbar.html | 8 ++++---- ...ee_logo_schooner_color_horizontal_default.png | Bin 0 -> 6154 bytes .../jakartaone_livestream_test_white_logo.svg | 1 + 5 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 static/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png create mode 100644 static/images/fake_logo/jakartaone_livestream_test_white_logo.svg diff --git a/.gitignore b/.gitignore index 243fa2a8..1c025835 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ /node_modules/ /static/* !/static/js/ +!/static/images/ +/static/images/vendor/ +!/static/images/fake_logo/ /static/js/solstice.js /exampleSite/public /exampleSite/layouts/robots.txt diff --git a/exampleSite/data/subsites_custom_logo.yml b/exampleSite/data/subsites_custom_logo.yml index 374c1a10..e3de765f 100644 --- a/exampleSite/data/subsites_custom_logo.yml +++ b/exampleSite/data/subsites_custom_logo.yml @@ -1,11 +1,11 @@ items: - page_url: '/components' - logo: '/images/jakarta_ee_logo_schooner_color_horizontal_default.png' + logo: '/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png' logo_url: '/components' logo_title: 'Components' - page_url: '/third-parent' - logo: '/images/jakartaone_livestream_test_white_logo.svg' + logo: '/images/fake_logo/jakartaone_livestream_test_white_logo.svg' logo_url: '/third-parent' logo_title: 'Third Parent' \ No newline at end of file diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 6f32adc8..f1a5da07 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -44,9 +44,9 @@
{{ $flag := false }} - {{ $currentPageLogo := '1' }} - {{ $currentPageLogoTitle := '2' }} - {{ $currentPageLogoLink := '3' }} + {{ $currentPageLogo := '0' }} + {{ $currentPageLogoTitle := '0' }} + {{ $currentPageLogoLink := '0' }} {{ range $.Site.Data.subsites_custom_logo.items }} {{ $section := $.Site.GetPage (.page_url) }} @@ -58,7 +58,7 @@ {{ end }} {{ end }} - {{ if eq ($flag) (true) }} + {{ if and (eq $flag true) (ne $currentPageLogo '0') }} diff --git a/static/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png b/static/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png new file mode 100644 index 0000000000000000000000000000000000000000..a45c0aa72e233e087d2bd104d8f3d31f56b01c33 GIT binary patch literal 6154 zcmb7IXFOYt+m1(T)ox2wYpYEgwN;9sgtm6=4y(0C5F<)yZM7RpY_*HpBWR!6o2JC9 z5d=Yu3etbl=j;3BJs-}=Ip-eNecj{acSk>dsKdl?odEyUBg$(Z^&$3HQhtJtg(K+^Jk=Xu%d2!(qpKq`6nwy}{(ml%y06?B5 z9GD??L}*3{XwU-gufNY5lsPPyJ4Q>LA78Ab2D~2SXF)XT+t0Tw^$2~ZqG*HH*by=@ z-`JD^0F8J0_U|fp>!5C^B-46OpK($op3!a_(5veF z1yAKdfflmuz*DOhR8EDUCOflp3Fm;RuTf0k5{I?cvgv?Mo7@zt;(_?$8`~5a+Sb9= zJO_8Z7C&bjitEEZRbO56%{t1v5$mV!|GU4c#Qt7ua0jpDnhfdq(sfP>>UbcF)%fApN0nsF?ZYcszu4L- zX~BvU{G1W7y>@3yKBqE8V&sauzi!cQ4V)g)9I!5)ABsBxc z9j-B=yXK|WqIS}Y&u9#I%S>*L16E*0ZyTLBfnC@}VcZ5(@|lq$r?=Ks-kB!8k@;y< zVS(4^30XPMNj){WicE+|%iD*(%w#6&q9|Dz1y-9}beHXu^Ue1m7k^IVU@QLuVLByI zBExsCDck<0e@s8cQK7@U>7C8G&=b@8&^CnYTa~|6{K#_c8Kgzp0vWO#Z-1OyM+WtJ z6s@^tGz^`7S1Dv|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ClK6Z+``(=0ex}%p?C?rJv1_3; z^>kh37RDky&qL_p!5qNx3MxdZ?87K|pSn8TyTn&?Eta7XE-!CrvT&uIygBR5snk!X zD@k9#ND6>b?d2b;khf`h3YU7-?XAT6s%wTPHmBDR< zLh{MGN!C0Oj#9h82R1;XL<>P$z-#C;iLWox4}B4VsFwrZM!~D#70S9XM?F=V3y(#U zEWz+Wv5RCmd)b~hr04ssf12iqX+nMH8a7wWf9pv3yrQKBbk5YK?bVFDion;Hk(YM= ek0b0Pl!^w>$~|Civ1pn@QPkCX2(Hq28vZ{RF8qrC literal 0 HcmV?d00001 diff --git a/static/images/fake_logo/jakartaone_livestream_test_white_logo.svg b/static/images/fake_logo/jakartaone_livestream_test_white_logo.svg new file mode 100644 index 00000000..3308e3ae --- /dev/null +++ b/static/images/fake_logo/jakartaone_livestream_test_white_logo.svg @@ -0,0 +1 @@ +jakartaone_livestream_wht_full \ No newline at end of file From 1f45528381eb2a8881834b1833dedb36f29ff5a0 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Tue, 12 Jan 2021 13:41:22 -0500 Subject: [PATCH 3/7] add custom header logo in nav-toggle Signed-off-by: Yi Liu --- exampleSite/content/subsite-1/_index.md | 9 ++++++ .../subsite-1/subsite-child-1/_index.md | 8 +++++ exampleSite/data/subsites_custom_logo.yml | 6 ++-- layouts/partials/nav_toggle.html | 29 +++++++++++++++++-- 4 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 exampleSite/content/subsite-1/_index.md create mode 100644 exampleSite/content/subsite-1/subsite-child-1/_index.md diff --git a/exampleSite/content/subsite-1/_index.md b/exampleSite/content/subsite-1/_index.md new file mode 100644 index 00000000..169f0d48 --- /dev/null +++ b/exampleSite/content/subsite-1/_index.md @@ -0,0 +1,9 @@ +--- +title: "SubSite" +headline: "SubSite" +date: 2018-04-05T16:09:45-04:00 +description: "SubSite" +hide_sidebar: false +--- + +SubSite \ No newline at end of file diff --git a/exampleSite/content/subsite-1/subsite-child-1/_index.md b/exampleSite/content/subsite-1/subsite-child-1/_index.md new file mode 100644 index 00000000..91ebbf96 --- /dev/null +++ b/exampleSite/content/subsite-1/subsite-child-1/_index.md @@ -0,0 +1,8 @@ +--- +title: "SubSite-Child 1" +date: 2018-04-05T16:09:45-04:00 +description: "SubSite-Child 1" +hide_sidebar: false +--- + +SubSite-Child 1 \ No newline at end of file diff --git a/exampleSite/data/subsites_custom_logo.yml b/exampleSite/data/subsites_custom_logo.yml index e3de765f..66f3830b 100644 --- a/exampleSite/data/subsites_custom_logo.yml +++ b/exampleSite/data/subsites_custom_logo.yml @@ -1,9 +1,9 @@ items: - - page_url: '/components' + page_url: '/subsite-1' logo: '/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png' - logo_url: '/components' - logo_title: 'Components' + logo_url: '/subsite-1' + logo_title: 'subsite-1' - page_url: '/third-parent' logo: '/images/fake_logo/jakartaone_livestream_test_white_logo.svg' diff --git a/layouts/partials/nav_toggle.html b/layouts/partials/nav_toggle.html index 3ed2c79f..96d41457 100644 --- a/layouts/partials/nav_toggle.html +++ b/layouts/partials/nav_toggle.html @@ -21,10 +21,33 @@ {{ end }}
- {{- with .Page.Params.logo | default .Site.Params.logo | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg" }} - - {{ $.Site.Title }} + + {{ $flag := false }} + {{ $currentPageLogo := '0' }} + {{ $currentPageLogoTitle := '0' }} + {{ $currentPageLogoLink := '0' }} + {{ range $.Site.Data.subsites_custom_logo.items }} + + {{ $section := $.Site.GetPage (.page_url) }} + {{ if or (eq ($.Section) ($section)) ( $.Page.IsDescendant $section ) }} + {{ $flag = true }} + {{ $currentPageLogo = .logo }} + {{ $currentPageLogoTitle = .logo_title }} + {{ $currentPageLogoLink = .logo_url }} + {{ end }} + {{ end }} + + {{ if and (eq $flag true) (ne $currentPageLogo '0') }} + + {{ $currentPageLogoTitle }} + + {{ else }} + {{- with .Page.Params.logo | default .Site.Params.logo | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg" }} + + {{ $.Site.Title }} + + {{ end }} {{ end }}
From f4077eff62e47f38a265b3d5f2513c9683efe96f Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Tue, 19 Jan 2021 14:13:32 -0500 Subject: [PATCH 4/7] remove unnecessary in gitignore Signed-off-by: Yi Liu --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1c025835..4423638b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /node_modules/ /static/* !/static/js/ -!/static/images/ /static/images/vendor/ !/static/images/fake_logo/ /static/js/solstice.js From d50ba3141c48a5c2e65c689cd7543d3c2e0976f0 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Wed, 20 Jan 2021 17:29:13 -0500 Subject: [PATCH 5/7] Simplify the code, less vars and less duplications Signed-off-by: Yi Liu --- layouts/partials/nav_toggle.html | 34 +++++++++++--------------------- layouts/partials/navbar.html | 34 +++++++++++++------------------- 2 files changed, 26 insertions(+), 42 deletions(-) diff --git a/layouts/partials/nav_toggle.html b/layouts/partials/nav_toggle.html index 96d41457..524134af 100644 --- a/layouts/partials/nav_toggle.html +++ b/layouts/partials/nav_toggle.html @@ -21,33 +21,23 @@ {{ end }}
+ {{- with .Page.Params.logo | default .Site.Params.logo | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg" }} + {{ $currentPageLogo := . }} + {{ $currentPageLogoTitle := $.Site.Title }} + {{ $currentPageLogoLink := "" | absLangURL }} - {{ $flag := false }} - {{ $currentPageLogo := '0' }} - {{ $currentPageLogoTitle := '0' }} - {{ $currentPageLogoLink := '0' }} - {{ range $.Site.Data.subsites_custom_logo.items }} + {{ range $.Site.Data.subsites_custom_logo.items }} + {{ $section := $.Site.GetPage (.page_url) }} + {{ if or (eq ($.Section) ($section)) ( $.Page.IsDescendant $section ) }} + {{ $currentPageLogo = .logo }} + {{ $currentPageLogoTitle = .logo_title }} + {{ $currentPageLogoLink = .logo_url }} + {{ end }} + {{ end }} - {{ $section := $.Site.GetPage (.page_url) }} - {{ if or (eq ($.Section) ($section)) ( $.Page.IsDescendant $section ) }} - {{ $flag = true }} - {{ $currentPageLogo = .logo }} - {{ $currentPageLogoTitle = .logo_title }} - {{ $currentPageLogoLink = .logo_url }} - {{ end }} - {{ end }} - - {{ if and (eq $flag true) (ne $currentPageLogo '0') }} {{ $currentPageLogoTitle }} - - {{ else }} - {{- with .Page.Params.logo | default .Site.Params.logo | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg" }} - - {{ $.Site.Title }} - - {{ end }} {{ end }}
diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index f1a5da07..585673b0 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -43,32 +43,26 @@
- {{ $flag := false }} - {{ $currentPageLogo := '0' }} - {{ $currentPageLogoTitle := '0' }} - {{ $currentPageLogoLink := '0' }} - {{ range $.Site.Data.subsites_custom_logo.items }} + {{ with .Page.Params.logo | default .Site.Params.logo | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg" }} - {{ $section := $.Site.GetPage (.page_url) }} - {{ if or (eq ($.Section) ($section)) ( $.Page.IsDescendant $section ) }} - {{ $flag = true }} - {{ $currentPageLogo = .logo }} - {{ $currentPageLogoTitle = .logo_title }} - {{ $currentPageLogoLink = .logo_url }} - {{ end }} - {{ end }} + {{ $currentPageLogo := . }} + {{ $currentPageLogoTitle := $.Site.Title }} + {{ $currentPageLogoLink := "" | absLangURL }} - {{ if and (eq $flag true) (ne $currentPageLogo '0') }} + {{ range $.Site.Data.subsites_custom_logo.items }} + {{ $section := $.Site.GetPage (.page_url) }} + {{ if or (eq ($.Section) ($section)) ( $.Page.IsDescendant $section ) }} + {{ $currentPageLogo = .logo }} + {{ $currentPageLogoTitle = .logo_title }} + {{ $currentPageLogoLink = .logo_url }} + {{ end }} + {{ end }} + - {{ else }} - {{- with .Page.Params.logo | default .Site.Params.logo | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg" }} - - - {{ end }} - {{ end }} +
{{ $has_cfa := 0 }} From 9ad6dd4fca432e05b85eac00725ddedfb39d5339 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Thu, 21 Jan 2021 13:59:48 -0500 Subject: [PATCH 6/7] remove unnecessary absURL Signed-off-by: Yi Liu --- layouts/partials/nav_toggle.html | 2 +- layouts/partials/navbar.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/nav_toggle.html b/layouts/partials/nav_toggle.html index 524134af..d5f4e0a8 100644 --- a/layouts/partials/nav_toggle.html +++ b/layouts/partials/nav_toggle.html @@ -24,7 +24,7 @@ {{- with .Page.Params.logo | default .Site.Params.logo | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg" }} {{ $currentPageLogo := . }} {{ $currentPageLogoTitle := $.Site.Title }} - {{ $currentPageLogoLink := "" | absLangURL }} + {{ $currentPageLogoLink := "" }} {{ range $.Site.Data.subsites_custom_logo.items }} {{ $section := $.Site.GetPage (.page_url) }} diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 585673b0..baa4d183 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -47,7 +47,7 @@ {{ $currentPageLogo := . }} {{ $currentPageLogoTitle := $.Site.Title }} - {{ $currentPageLogoLink := "" | absLangURL }} + {{ $currentPageLogoLink := "" }} {{ range $.Site.Data.subsites_custom_logo.items }} {{ $section := $.Site.GetPage (.page_url) }} From c7009008afc63f40cefb41bd2960b0d9f52a4be9 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Mon, 8 Mar 2021 16:12:20 -0500 Subject: [PATCH 7/7] move fake logo from static to inside exampleSite Signed-off-by: Yi Liu --- exampleSite/config/_default/menus.en.toml | 6 ++++++ ...ta_ee_logo_schooner_color_horizontal_default.png | Bin .../jakartaone_livestream_test_white_logo.svg | 0 exampleSite/data/subsites_custom_logo.yml | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) rename {static => exampleSite/content/third-parent}/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png (100%) rename {static => exampleSite/content/third-parent}/images/fake_logo/jakartaone_livestream_test_white_logo.svg (100%) diff --git a/exampleSite/config/_default/menus.en.toml b/exampleSite/config/_default/menus.en.toml index 04424b89..c12b76ee 100644 --- a/exampleSite/config/_default/menus.en.toml +++ b/exampleSite/config/_default/menus.en.toml @@ -53,6 +53,12 @@ weight = 7 parent = "examples" +[[main]] + name = "Subsite Custom Logo" + url = "/subsite-1/" + weight = 8 + parent = "examples" + [[main]] name = "Exemples de FAQ" url = "/faq/" diff --git a/static/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png b/exampleSite/content/third-parent/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png similarity index 100% rename from static/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png rename to exampleSite/content/third-parent/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png diff --git a/static/images/fake_logo/jakartaone_livestream_test_white_logo.svg b/exampleSite/content/third-parent/images/fake_logo/jakartaone_livestream_test_white_logo.svg similarity index 100% rename from static/images/fake_logo/jakartaone_livestream_test_white_logo.svg rename to exampleSite/content/third-parent/images/fake_logo/jakartaone_livestream_test_white_logo.svg diff --git a/exampleSite/data/subsites_custom_logo.yml b/exampleSite/data/subsites_custom_logo.yml index 66f3830b..168f0829 100644 --- a/exampleSite/data/subsites_custom_logo.yml +++ b/exampleSite/data/subsites_custom_logo.yml @@ -1,11 +1,11 @@ items: - page_url: '/subsite-1' - logo: '/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png' + logo: '/third-parent/images/fake_logo/jakarta_ee_logo_schooner_color_horizontal_default.png' logo_url: '/subsite-1' logo_title: 'subsite-1' - page_url: '/third-parent' - logo: '/images/fake_logo/jakartaone_livestream_test_white_logo.svg' + logo: '/third-parent/images/fake_logo/jakartaone_livestream_test_white_logo.svg' logo_url: '/third-parent' logo_title: 'Third Parent' \ No newline at end of file