refactor navbar
This commit is contained in:
parent
ecdc63857f
commit
c014001c83
|
@ -1,10 +0,0 @@
|
|||
- url: "/recipes"
|
||||
name: Recipes
|
||||
- url: "/data-analysis"
|
||||
name: Data Analysis
|
||||
- url: "https://semitamaps.com"
|
||||
name: Map Printing
|
||||
- url: "/blog"
|
||||
name: Blog
|
||||
- url: "https://git.bitlab21.com"
|
||||
name: Git
|
|
@ -3,5 +3,6 @@
|
|||
<link rel="icon" type="image/png" sizes="48x48" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="/css/style.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="/css/navbar.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="/css/syntax.css" />
|
||||
</html>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</div>
|
||||
<div class="navbar__right">
|
||||
<div class="navbar-links">{{ partial "navbarlinks.html" . }}</div>
|
||||
<div class="navbar-dropdown">
|
||||
<!-- <div class="navbar-dropdown">
|
||||
<button class="hamburger-dropbtn">
|
||||
<img
|
||||
class="hamburger"
|
||||
|
@ -16,7 +16,7 @@
|
|||
<div class="navbar-dropdown-content">
|
||||
{{ partial "navbarlinks.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
{{ range $.Site.Data.navbarlinks }}
|
||||
<ul><a href="{{ .url }}">{{ .name }}</a></ul>
|
||||
{{ end }}
|
||||
<ul>
|
||||
<li><a href="/blog">Blog</a></li>
|
||||
<li class="navbar_link_dropdown">
|
||||
<a href="#" class="dropbtn">Projects</a>
|
||||
<div class="navbar-link-dropdown-content">
|
||||
<a href="/data-analysis">Data Analysis</a>
|
||||
<a href="https://semitamaps.com">Map Printing</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
/* Navbar */
|
||||
.navbar {
|
||||
background-color: var(--navbar-background-color);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.navbar a {
|
||||
color: var(--navbar-text-color);
|
||||
padding: 10px;
|
||||
margin: 5px;
|
||||
text-decoration: none;
|
||||
transition: background-color 0.3s ease;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.navbar a:hover {
|
||||
padding: 10px;
|
||||
background-color: var(--navbar-hover);
|
||||
border-radius: var(--radius);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.navbar__left a {
|
||||
text-decoration: none !important;
|
||||
color: var(--text-color) !important;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.navbar__left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.navbar-links ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.navbar-links ul li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.navbar-links ul li a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.navbar-link-dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
flex-direction: column;
|
||||
right: 20px;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
background-color: var(--navbar-background-color);
|
||||
}
|
||||
|
||||
.navbar_link_dropdown:hover .navbar-link-dropdown-content {
|
||||
display: flex;
|
||||
}
|
|
@ -245,8 +245,7 @@ time {
|
|||
background-color: var(--summary-container-hover-bg);
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
.navbar {
|
||||
/* .navbar {
|
||||
background-color: var(--navbar-background-color);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -348,7 +347,6 @@ time {
|
|||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
/* Links inside the dropdown */
|
||||
.navbar-dropdown-content a {
|
||||
float: none;
|
||||
color: var(--text-color);
|
||||
|
@ -358,17 +356,15 @@ time {
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
/* Add a grey background color to dropdown links on hover */
|
||||
.navbar-dropdown-content a:hover {
|
||||
padding: 12px 16px;
|
||||
background-color: var(--navbar-hover);
|
||||
}
|
||||
|
||||
/* Show the dropdown menu on hover */
|
||||
.navbar-dropdown:hover .navbar-dropdown-content {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
/* Charts */
|
||||
.chart-flex-container {
|
||||
|
|
Loading…
Reference in New Issue