This is an automated email from the ASF dual-hosted git repository. bertty pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-wayang-website.git
commit 21c5da877366be5ae4d132d9c5f53446252ceff9 Author: Bertty Contreras-Rojas <[email protected]> AuthorDate: Sun Feb 14 13:51:55 2021 -0300 Header generated automatically --- _data/navigation.yml | 30 ++++++++++++++++++++++++ _includes/header.html | 65 +++++++++++++++++++++++++++++++++------------------ index.md | 2 -- 3 files changed, 72 insertions(+), 25 deletions(-) diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..f3723b5 --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,30 @@ +- title: Home + url: / + external: false + +- title: About + url: /about + external: false + +- title: Documentation + url: /documentation + external: false + +- title: Publications + url: /publications + external: false + +- title: Apache + sublinks: + - title: Apache Software Foundation + url: http://www.apache.org/foundation/how-it-works.html + external: true + - title: Apache License + url: http://www.apache.org/licenses/ + external: true + - title: Sponsorship + url: http://www.apache.org/foundation/sponsorship.html + external: true + - title: Thanks + url: http://www.apache.org/foundation/thanks.html + external: true \ No newline at end of file diff --git a/_includes/header.html b/_includes/header.html index c238c0f..199861e 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,3 +1,14 @@ +{% comment %} capture the current page {% endcomment %} +{% for entry in site.data.navigation %} + {% capture fullurl %}{{ entry.url | absolute_url }}{% endcapture %} + {% if fullurl == page.url %} + {% assign current_page = fullurl %} + {% break %} + {% elsif page.url contains fullurl %} + {% assign current_page = fullurl %} + {% endif %} +{% endfor %} + <nav class="navbar navbar-expand-lg navbar-light bg-light sticky-top shadow-lg"> <a class="navbar-brand" href="#">Navbar</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> @@ -5,29 +16,37 @@ </button> <div class="collapse navbar-collapse" id="navbarSupportedContent"> - <ul class="navbar-nav mr-auto" style="margin-left: 25%"> - <li class="nav-item active"> - <a class="nav-link" href="index.html">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="about.html">About</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="documentation.html">Documentation</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="publications.html">Publications</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Apache</a> - <div class="dropdown-menu"> - <a class="dropdown-item" href="http://www.apache.org/foundation/how-it-works.html">Apache Software Foundation</a> - <a class="dropdown-item" href="http://www.apache.org/licenses/">Apache License</a> - <a class="dropdown-item" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a> - <a class="dropdown-item" href="http://www.apache.org/foundation/thanks.html">Thanks</a> - </div> - </li> - </li> + <div class="navbar-nav mr-auto" style="margin-left: 25%"> + + {% for entry in site.data.navigation %} + {% if entry.url == current_page %} + {% assign current = 'active' %} + {% else %} + {% assign current = '' %} + {% endif %} + + {% assign sublinks = entry.sublinks %} + {% if sublinks %} + <li class="nav-item dropdown {{current}}"> + <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"> + {{ entry.title }} + </a> + <div class="dropdown-menu"> + {% for sublink in sublinks %} + <a class="dropdown-item" href="{{ sublink.url | absolute_url }}"> + {{ sublink.title }} + </a> + {% endfor %} + </div> + </li> + {% else %} + <li class="nav-item {{current}}"> + <a class="nav-link" href="{{ entry.url | absolute_url }}"> + {{ entry.title }} + </a> + </li> + {% endif %} + {% endfor %} </ul> </div> </nav> \ No newline at end of file diff --git a/index.md b/index.md index 7aeaa32..4cac99d 100644 --- a/index.md +++ b/index.md @@ -3,5 +3,3 @@ layout: home title: "Home" banner-title: "list" --- - -<h2>das</h2> \ No newline at end of file
