Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions EssentialCSharp.Web/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@
<header class="header-background">
<div class="banner d-flex justify-content-between">
<div class="d-flex align-items-center menu-position">
<button class="menu-btn" v-on:click="sidebarShown = !sidebarShown">
<button class="menu-btn sidebar-tooltip" v-on:click="sidebarShown = !sidebarShown">
<i class="fa fa-bars fa-lg icon-light"></i>
<span class="sidebar-tooltip-text">
<b>Navigation</b>
<br />
Or Ctrl + M
</span>
</button>
<div class="d-none d-lg-block">
<ul class="nav align-items-center">
Expand Down Expand Up @@ -302,7 +307,7 @@
<details :open="expandedTocs.has(item.key)"
v-on:toggle="!$event.target.open ? expandedTocs.delete(item.key) : expandedTocs.add(item.key)">
<summary :class="{
'toc-content' : item.level==0,
'toc-content' : item.level= =0,
'nested' : item.level>
0,
'current-section': currentPage.some(p => p.key == item.key),
Expand Down
25 changes: 25 additions & 0 deletions EssentialCSharp.Web/wwwroot/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,31 @@ a:hover {
border-color: transparent transparent var(--grey-lighten-1) transparent;
}

.sidebar-tooltip {
position: relative;
display: inline-block;
}

.sidebar-tooltip:hover .sidebar-tooltip-text {
transition-delay: 1s;
transition-property: visibility;
visibility: visible;
}

.sidebar-tooltip .sidebar-tooltip-text {
visibility: hidden;
position: absolute;
width: 150px;
color: var(--primary-color);
font-size: 1rem;
background-color: var(--grey-lighten-1);
border-radius: 10px;
padding: 10px;
white-space: normal;
left: 2rem;
bottom: -35px;
}

.nav-link {
color: white;
}
Expand Down
4 changes: 4 additions & 0 deletions EssentialCSharp.Web/wwwroot/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ const app = createApp({
goToPrevious();
}
}

if (e.code == "KeyM" && e.ctrlKey) {
sidebarShown.value = !sidebarShown.value;
}
});

const sidebarShown = ref(false);
Expand Down
Loading