Skip to content

Commit

Permalink
Merge pull request #5 from BlueHuskyStudios/feature/Sidebar-Tweaks/1
Browse files Browse the repository at this point in the history
Some sidebar tweaks
  • Loading branch information
KyLeggiero authored May 13, 2020
2 parents 26aed29 + 8dfe841 commit f742416
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Sidebar/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@

<nav class="sidebar flex-column flex-vert-space-between">
<section>
{%- unless include.emptyHeader %}
{%- unless include.emptyHeader | default: site.sidebar.emptyHeader %}
<header>
<figure>
{%- if include.headerImage_url -%}
<img src="{{ include.headerImage_url }}" class="{{ include.headerImage_htmlClassNames }}"/>
{%- assign headerImageUrl = include.headerImage_url | default: site.sidebar.headerImage.url %}
{%- if headerImageUrl -%}
<img src="{{ headerImageUrl }}" class="{{ include.headerImage_htmlClassNames | default: site.sidebar.headerImage.htmlClassNames }}"/>
{%- else -%}
No header image supplied; <code>headerImage_url</code> was missing and <code>emptyHeader</code> was not <code>true</code>
No header image supplied; <code>headerImage_url</code> and <code>site.sidebar.headerImage.url</code> were missing and <code>emptyHeader</code> nor <code>site.sidebar.emptyHeader</code> were not <code>true</code>
{%- endif -%}
</figure>
</header>
{%- endunless %}

{%- if site.sidebar.defaultLinks %}
{%- assign links=include.links | concat: site.sidebar.defaultLinks %}
{%- assign links=include.links | concat: site.sidebar.defaultLinks %}
{%- else %}
{%- assign links=include.links %}
{%- assign links=include.links %}
{%- endif %}

{%- assign linksCount=links | size %}

{%- unless linksCount == 0 %}
<ul>
{%- for link in links %}
<li><a href="{{ link.url }}" class="button">
<li><a href="{{ link.url }}" class="button image-button">
{%- if link.materialIcon -%}
<i class="material-icons">{{ link.materialIcon }}</i>
{%- elsif link.fontAwesomeIcon -%}
<i class="{{ link.fontAwesomeIcon }}"></i>
{%- endif -%}
{{ link.text }}</a></li>
<span>{{ link.text }}</span></a></li>
{%- endfor %}
</ul>
{%- endunless %}
Expand Down

0 comments on commit f742416

Please sign in to comment.