Redesign header/navbar

This commit is contained in:
BBaoVanC 2021-09-30 17:56:55 -05:00
parent c81eb34a4a
commit 3cd01fc8c1
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
4 changed files with 15 additions and 23 deletions

View File

@ -1,8 +1,4 @@
/* Layout */ /* Layout */
.header {
padding: 10px;
}
.page { .page {
display: flex; display: flex;
} }
@ -21,6 +17,10 @@
padding: 14px 20px; padding: 14px 20px;
} }
.navbar-items {
float: right;
}
body { body {
margin: 0; margin: 0;
display: flex; display: flex;
@ -48,17 +48,8 @@ body {
/* Styling */ /* Styling */
.header {
text-align: center;
background: #1a406b;
color: lightgray;
}
.header h1 {
font-size: 40px;
}
#navbar { #navbar {
background-color: #222; background-color: #091a2c;
} }
#navbar a { #navbar a {
color: lightgray; color: lightgray;
@ -66,7 +57,7 @@ body {
text-decoration: none; text-decoration: none;
} }
#navbar a:hover { #navbar a:hover {
background-color: #444; background-color: #0e2a46;
color: white; color: white;
} }
.side { .side {

View File

@ -4,7 +4,6 @@
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
<body> <body>
{{- partial "header.html" . -}}
{{ partial "navbar.html" . }} {{ partial "navbar.html" . }}
<div class="page"> <div class="page">

View File

@ -1,3 +0,0 @@
<div class="header">
<h1>{{ .Site.Title | markdownify }}</h1>
</div>

View File

@ -1,6 +1,11 @@
<nav id="navbar"> <nav id="navbar">
<a href="{{ "/" | relURL }}">Home</a> <div class="navbar-title">
<a href="{{ "/" | relURL }}">{{ .Site.Title | markdownify }}</a>
</div>
<div class="navbar-items">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a> <a href="{{ .URL }}">{{ .Name }}</a>
{{ end }} {{ end }}
</div>
</nav> </nav>