Unverified Commit 810a994e authored by Christopher Guindon's avatar Christopher Guindon Committed by GitHub
Browse files

shortcode for toolbar (#236)


Signed-off-by: Christopher Guindon's avatarChristopher Guindon <chris.guindon@eclipse-foundation.org>
parent 3004c9f6
<!--
<!--
Copyright (c) 2018 Eclipse Foundation, Inc.
This program and the accompanying materials are made available under the
......@@ -13,6 +13,7 @@
{{- partial "google_tag_manager_no_script.html" . }}
<a class="sr-only" href="#content">{{ i18n "navigation-content-skip" }}</a>
<header class="header-wrapper{{- with .Params.header_wrapper_class | default .Site.Params.header_wrapper_class }} {{ . }}{{end}}" id="header-wrapper">
{{ partial "toolbar.html" . }}
{{ partial "navbar.html" . }}
{{ partial "jumbotron.html" . }}
</header>
<!--
<!--
Copyright (c) 2018 Eclipse Foundation, Inc.
This program and the accompanying materials are made available under the
......@@ -10,33 +10,6 @@
SPDX-License-Identifier: EPL-2.0
-->
<div class="clearfix toolbar-container-wrapper">
<div class="container">
<div class="text-right toolbar-row row hidden-print">
<div class="col-md-24 row-toolbar-col">
<ul class="list-inline">
<li><a href="https://accounts.eclipse.org/user/edit" class="" data-tab-destination="tab-profile"><i class="fa fa-edit fa-fw"></i> {{ i18n "navbar-edit-acccount-label" }}</a></li>
<li><a class="toolbar-link toolbar-manage-cookies dropdown-toggle"><i class="fa fa-wrench"></i> {{ i18n "navbar-manage-cookies-label" }}</a></li>
{{ if gt (len .AllTranslations) 1 }}
<li class="language-selector dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<i class="fa fa-globe"></i>
<span> {{ .Language.LanguageName }}</span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
{{ range .AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
</div>
</div>
</div>
</div>
<div class="{{ $.Site.Params.navbar_wrapper_classes | default "navbar-wrapper" }}">
<div class="container">
<div class="row" id="header-row">
......@@ -57,7 +30,7 @@
{{ $currentPageLogoLink = .logo_url }}
{{ end }}
{{ end }}
<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 | relURL }}" alt="{{ $currentPageLogoTitle }}" />
</a>
......@@ -75,7 +48,7 @@
{{ if (eq (len (findRE `(\.[^\/]{3,4}|\/)$` $normalized_cta_url)) 0) }}
{{ $normalized_cta_url = printf "%s/" $normalized_cta_url }}
{{ end }}
{{ $abs_cfa := printf "%s" ($normalized_cta_url | relURL) }}
{{ $is_cfa_page := 0 }}
{{ if or (eq $normalized_cta_url .Permalink) (eq $abs_cfa .Permalink) }}
......
<!--
Copyright (c) 2018 Eclipse Foundation, Inc.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.
Contributors:
Christopher Guindon <chris.guindon@eclipse-foundation.org>
SPDX-License-Identifier: EPL-2.0
-->
<div class="clearfix toolbar-container-wrapper">
<div class="container">
<div class="text-right toolbar-row row hidden-print">
<div class="col-md-24 row-toolbar-col">
<ul class="list-inline">
<li><a href="https://accounts.eclipse.org/user/edit" class="" data-tab-destination="tab-profile"><i class="fa fa-edit fa-fw"></i> {{ i18n "navbar-edit-acccount-label" }}</a></li>
<li><a class="toolbar-link toolbar-manage-cookies dropdown-toggle"><i class="fa fa-wrench"></i> {{ i18n "navbar-manage-cookies-label" }}</a></li>
{{ if gt (len .AllTranslations) 1 }}
<li class="language-selector dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<i class="fa fa-globe"></i>
<span> {{ .Language.LanguageName }}</span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
{{ range .AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
</div>
</div>
</div>
</div>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment