Skip to content

Commit

Permalink
stripped down sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
CherrelleTucker committed Jan 6, 2025
1 parent d731f19 commit fba251b
Showing 1 changed file with 46 additions and 61 deletions.
107 changes: 46 additions & 61 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,71 +1,56 @@
<aside aria-label="Sidebar" id="sidebar" class="d-flex flex-column align-items-end">
<!-- Profile Section -->
<header class="profile-wrapper">
<a href="{{ '/' | relative_url }}" id="avatar" class="rounded-circle">
{%- if site.avatar != empty and site.avatar -%}
{%- capture avatar_url -%}
{% include media-url.html src=site.avatar %}
{%- endcapture -%}
<img src="{{- avatar_url -}}" width="112" height="112" alt="avatar" onerror="this.style.display='none'">
{%- endif -%}
</a>

<a class="site-title d-block" href="{{ '/' | relative_url }}">{{ site.title }}</a>
<p class="site-subtitle fst-italic mb-0">{{ site.tagline }}</p>
<a href="{{ '/' | relative_url }}" id="avatar" class="rounded-circle">
{%- if site.avatar != empty and site.avatar -%}
{%- capture avatar_url -%}{% include media-url.html src=site.avatar %}{%- endcapture -%}
<img src="{{- avatar_url -}}" width="112" height="112" alt="avatar" onerror="this.style.display='none'">
{%- endif -%}
</a>
<a class="site-title d-block" href="{{ '/' | relative_url }}">{{ site.title }}</a>
<p class="site-subtitle fst-italic mb-0">{{ site.tagline }}</p>
</header>

<!-- Navigation Section -->
<nav class="flex-column flex-grow-1 w-100 ps-0">
<ul class="nav">
<!-- Home Menu Item -->
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
<a href="{{ '/' | relative_url }}" class="nav-link">
<i class="fa-fw fas fa-home"></i>
<span>Home</span>
<ul class="nav">
<li class="nav-item{% if page.layout == 'home' %}{{' active'}}{% endif %}">
<a href="{{ '/' | relative_url }}" class="nav-link">
<i class="fa-fw fas fa-home"></i><span>Home</span>
</a>
</li>
{% for item in site.data.navigation %}
<li class="nav-item">
<a href="{{ item.url | relative_url }}" class="nav-link">
{% if item.icon %}<i class="fa-fw {{ item.icon }}"></i>{% endif %}
<span>{{ item.title }}</span>
</a>
{% if item.children %}
<ul class="nav">
{% for child in item.children %}
<li class="nav-item">
<a href="{{ child.url | relative_url }}" class="nav-link ps-4">
{% if child.icon %}<i class="fa-fw {{ child.icon }}"></i>{% endif %}
<span>{{ child.title }}</span>
</a>
</li>

<!-- Dynamic Navigation -->
{% for item in site.data.navigation %}
<li class="nav-item{% if item.children %} has-children{% endif %}">
<a href="{{ item.url | relative_url }}" class="nav-link">
{% if item.icon %}<i class="fa-fw {{ item.icon }}"></i>{% endif %}
<span>{{ item.title }}</span>
{% if item.children %}<i class="fas fa-chevron-down submenu-toggle"></i>{% endif %}
</a>

{% if item.children %}
<ul class="nav submenu">
{% for child in item.children %}
<li class="nav-item">
<a href="{{ child.url | relative_url }}" class="nav-link">
{% if child.icon %}<i class="fa-fw {{ child.icon }}"></i>{% endif %}
<span>{{ child.title }}</span>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>

<!-- Bottom Section -->
<div class="sidebar-bottom d-flex flex-wrap align-items-center w-100">
{% unless site.theme_mode %}
<button type="button" class="btn btn-link nav-link" aria-label="Switch Mode" id="mode-toggle">
<i class="fas fa-adjust"></i>
</button>
{% endunless %}

{% for entry in site.data.contact %}
{% assign url = entry.url %}
<a href="{{ url }}" aria-label="{{ entry.type }}" target="_blank" rel="noopener noreferrer">
<i class="{{ entry.icon }}"></i>
</a>
{% endfor %}
</div>
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
<div class="sidebar-bottom d-flex flex-wrap align-items-center w-100">
{% unless site.theme_mode %}
<button type="button" class="btn btn-link nav-link" aria-label="Switch Mode" id="mode-toggle">
<i class="fas fa-adjust"></i>
</button>
{% endunless %}
{% for entry in site.data.contact %}
{% assign url = entry.url %}
<a href="{{ url }}" aria-label="{{ entry.type }}" target="_blank" rel="noopener noreferrer">
<i class="{{ entry.icon }}"></i>
</a>
{% endfor %}
</div>
</aside>

<!--style>
Expand Down

0 comments on commit fba251b

Please sign in to comment.