Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
add static images
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org>
  • Loading branch information
Yi Liu committed Jan 11, 2021
1 parent 695c333 commit 4f5d139
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .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
Expand Down
4 changes: 2 additions & 2 deletions 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'
8 changes: 4 additions & 4 deletions layouts/partials/navbar.html
Expand Up @@ -44,9 +44,9 @@
<div class="wrapper-logo-default">

{{ $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) }}
Expand All @@ -58,7 +58,7 @@
{{ end }}
{{ end }}

{{ if eq ($flag) (true) }}
{{ if and (eq $flag true) (ne $currentPageLogo '0') }}
<a title="{{ $currentPageLogoTitle }}" href="{{ $currentPageLogoLink | absLangURL }}">
<img width="{{ $.Page.Params.logo_width | default $.Site.Params.logo_width | default "140"}}" class="logo-eclipse-default img-responsive hidden-xs" src="{{ $currentPageLogo | absURL }}" alt="{{ $currentPageLogoTitle }}" />
</a>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4f5d139

Please sign in to comment.