amoro-docs/themes/amoro-theme/layouts/partials/header.html (40 lines of code) (raw):
<!-- - Licensed to the Apache Software Foundation (ASF) under one or more-->
<!-- - contributor license agreements. See the NOTICE file distributed with-->
<!-- - this work for additional information regarding copyright ownership.-->
<!-- - The ASF licenses this file to You under the Apache License, Version 2.0-->
<!-- - (the "License"); you may not use this file except in compliance with-->
<!-- - the License. You may obtain a copy of the License at-->
<!-- - -->
<!-- - http://www.apache.org/licenses/LICENSE-2.0-->
<!-- - -->
<!-- - Unless required by applicable law or agreed to in writing, software-->
<!-- - distributed under the License is distributed on an "AS IS" BASIS,-->
<!-- - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-->
<!-- - See the License for the specific language governing permissions and-->
<!-- - limitations under the License.-->
<!-- Top Navigation Bar -->
<nav class="navbar navbar-default" role="navigation">
<topsection>
<div class="navbar-fixed-top">
<div>
<a class="page-scroll navbar-brand" href="https://amoro.apache.org/"><img class="top-navbar-logo" src="{{ .Site.BaseURL }}/img/amoro-logo-icon.png"/></a>
</div>
</div>
<div class="navbar-menu-fixed-top navbar-pages-group">
{{ $currentPage := . }}
<!-- Loop through the topnav menu defined in config.toml -->
{{ range .Site.Menus.topnav }}
{{ $menuContainsCurrentPage := eq .Name $currentPage.Page.Title}}
{{ if .HasChildren }}
<!-- Top nav element that has a dropdown -->
<div class="versions-dropdown">
<div class="topnav-page-selection">
<a {{ if $menuContainsCurrentPage }}id="active"{{ end }} {{ if hasPrefix .Identifier "_" }}target="_blank"{{ end }} href="{{ if eq .Pre "relative" }}{{ $.Site.BaseURL }}{{ .URL }}{{ else }}{{ .URL }}{{ end }}">{{ .Name }}{{ .Post }}</a> <i class="fa fa-caret-down"></i>
</div class="topnav-page-selection">
<div class="versions-dropdown-content">
<ul>
{{ range .Children }}
<li class="topnav-page-selection">
<a {{ if eq .Name $currentPage.Page.Title }}id="active"{{ end }} {{ if hasPrefix .Identifier "_" }}target="_blank"{{ end }} href="{{ if eq .Pre "relative" }}{{ $.Site.BaseURL }}{{ .URL }}{{ else }}{{ .URL }}{{ end }}">{{ .Name }}{{ .Post }}</a>
</li class="topnav-page-selection">
{{ end }}
</ul>
</div>
</div>
{{ else }}
<div class="topnav-page-selection">
<a {{ if $menuContainsCurrentPage }}id="active"{{ end }} {{ if hasPrefix .Identifier "_" }}target="_blank"{{ end }} href="{{ if eq .Pre "relative" }}{{ $.Site.BaseURL }}{{ .URL }}{{ else }}{{ .URL }}{{ end }}">{{ .Name }}{{ .Post }}</a>
</div class="topnav-page-selection">
{{ end }}
{{ end }}
<div class="topnav-page-selection">
<a href="https://github.com/apache/incubator-amoro" target="_blank">
<img src="{{ $.Site.BaseURL }}/img/GitHub-Mark.png" target="_blank" class="top-navbar-logo"/>
</a>
</div>
</div>
</topsection>
</nav>