Skip to content

Commit

Permalink
removing sidebar dropdowns to verify page dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
CherrelleTucker committed Jan 6, 2025
1 parent 1344081 commit b58c7eb
Showing 1 changed file with 7 additions and 88 deletions.
95 changes: 7 additions & 88 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<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 -%}
Expand All @@ -9,36 +8,30 @@
<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>
</a>
</li>

<!-- Dynamic Navigation -->
{% for item in site.data.navigation %}
<li class="nav-item{% if item.children %} has-children{% endif %}">
<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>
{% if item.children %}<i class="fas fa-chevron-down submenu-toggle"></i>{% endif %}
</a>

{% if item.children %}
<ul class="nav submenu">
<ul class="nav">
{% for child in item.children %}
<li class="nav-item">
<a href="{{ child.url | relative_url }}" class="nav-link">
<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>
Expand All @@ -51,7 +44,6 @@
</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">
Expand Down Expand Up @@ -81,100 +73,27 @@
margin-bottom: 1rem;
}

.site-title {
font-size: 1.25rem;
font-weight: bold;
color: #333;
text-decoration: none;
}

.site-subtitle {
font-size: 0.875rem;
color: #666;
}

.nav {
list-style: none;
padding: 0;
margin: 0;
}

.nav-item {
margin-bottom: 0.5rem;
}

.nav-link {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.5rem;
color: #333;
text-decoration: none;
border-radius: 5px;
transition: background 0.3s;
gap: 0.5rem;
}

.nav-link:hover {
background: #e9ecef;
}

.submenu-toggle {
transition: transform 0.3s ease;
margin-left: 0.5rem;
font-size: 0.75rem;
}

.submenu {
display: none;
padding-left: 1.5rem;
list-style: none;
margin: 0.5rem 0;
opacity: 0;
transform: translateY(-10px);
transition: opacity 0.3s ease, transform 0.3s ease;
}

.submenu .nav-item {
margin-bottom: 0.5rem;
padding-left: 0.75rem;
}

.submenu .nav-link {
padding: 0.5rem 0.75rem;
font-size: 0.9rem;
transition: all 0.2s ease;
}

.nav-item.has-children.active .submenu {
display: block;
}

.nav-item.has-children:hover .submenu,
.nav-item.has-children:focus-within .submenu {
display: block;
opacity: 1;
transform: translateY(0);
}

/* Remove duplicate hover selector and consolidate submenu-toggle transformations */
.nav-item.has-children:hover .submenu-toggle,
.nav-item.has-children:focus-within .submenu-toggle,
.nav-item.has-children.active .submenu-toggle {
transform: rotate(180deg);
border-radius: 5px;
}

.sidebar-bottom {
margin-top: auto;
justify-content: center;
gap: 0.5rem;
}

.sidebar-bottom a {
color: #333;
margin: 0 0.5rem;
}

.sidebar-bottom a:hover {
color: #007bff;
}
</style>

</style>

0 comments on commit b58c7eb

Please sign in to comment.