beautifulSA-jekyll/_includes/nav.html
Abel Cheung 9d429fa749 Abs link patch (#506)
* Fix absolute URL generation

url and baseurl config for this theme deviates from jekyll standard,
and that results in double inclusion of project path
if this theme is used as project page.

Switching to Jekyll accepted url usage so that
absolute_url filter works.

* Alternate links need to be aboslute

* mention url and baseurl only need to be modified in local dev

* Update readme on new url/baseurl setting changes
2019-06-21 03:48:52 -04:00

60 lines
2.0 KiB
HTML

<nav class="navbar navbar-default navbar-fixed-top navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% if site.title-img %}
<a class="navbar-brand navbar-brand-logo" href="{{ '' | absolute_url }}"><img src="{{ site.title-img }}"/></a>
{% else %}
<a class="navbar-brand" href="{{ '' | absolute_url }}">{{ site.title }}</a>
{% endif %}
</div>
<div class="collapse navbar-collapse" id="main-navbar">
<ul class="nav navbar-nav navbar-right">
{% for link in site.navbar-links %}
{% if link[1].first %}
<li class="navlinks-container">
<a class="navlinks-parent" href="javascript:void(0)">{{ link[0] }}</a>
<div class="navlinks-children">
{% for childlink in link[1] %}
{% for linkparts in childlink %}
{% include navbarlink.html link=linkparts %}
{% endfor %}
{% endfor %}
</div>
</li>
{% else %}
<li>
{% include navbarlink.html link=link %}
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% if page.image and (layout.show-avatar or page.show-avatar) %}
<div class="avatar-container">
<div class="avatar-img-border">
<a href="{{ '' | absolute_url }}">
<img class="avatar-img" src="{{ page.image | relative_url }}" />
</a>
</div>
</div>
{% elsif site.avatar and (layout.show-avatar or page.show-avatar) %}
<div class="avatar-container">
<div class="avatar-img-border">
<a href="{{ '' | absolute_url }}">
<img class="avatar-img" src="{{ site.avatar | relative_url }}" />
</a>
</div>
</div>
{% endif %}
</div>
</nav>