Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
feature: footer for the sidebar with avatar and dropdown (hovering up…
Browse files Browse the repository at this point in the history
…wards)
  • Loading branch information
RitaOak committed Dec 9, 2020
1 parent 67c14c7 commit 294bb17
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/components/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,37 @@ class Sidebar extends LitElement {
</a>
</li>
</ul>
<footer class="footer sidebar-footer">
<nav class="level sidebar-avatar-logout">
<!-- Left side -->
<div class="level-left">
<div class="level-item">
<figure class="image is-48x48">
<img class="is-rounded" src="/images/user.jpg" />
</figure>
</div>
<div class="level-item">
<div class="dropdown is-hoverable dropdown is-up">
<div class="dropdown-trigger">
<button class="button dropdown-sidebar" aria-haspopup="true" aria-controls="dropdown-menu4">
<span>Sarah Jones</span>
<span class="icon is-small">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span>
</button>
</div>
<div class="dropdown-menu" id="dropdown-menu4" role="menu">
<div class="dropdown-content">
<div class="dropdown-item">
<button>Logout</button>
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
</footer>
</aside>
`;

Expand Down
14 changes: 14 additions & 0 deletions style/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ body {
//position: fixed;
//top: 8.5em;
margin-top: 1em;
min-height: 90vh;
}

.menu-list {
Expand Down Expand Up @@ -239,6 +240,19 @@ button.button.dropdown-sidebar {
border: none;
}

// Footer
.footer.sidebar-footer {
position: absolute;
bottom: 0;
padding: 0;
background-color: transparent;
}

// Sidebar Avatar
.sidebar-avatar-logout {
padding-left: 2%;
}

// Top Bar
.top-nav {
margin: 0.5em 2.5em 0.5em 2.5em;
Expand Down
6 changes: 6 additions & 0 deletions style/testing-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ button.button.dropdown-sidebar {
margin-bottom: 0;
}

// Sidebar Avatar
.sidebar-avatar-logout {
padding-left: 2%;
}

// Main content
.main-content {
height: 100%;
Expand All @@ -130,3 +135,4 @@ button.button.dropdown-sidebar {
height: 50px;
border-radius: 50%;
}

0 comments on commit 294bb17

Please sign in to comment.