navbar changes

This commit is contained in:
shizuka 2018-10-11 13:40:58 +02:00
parent 6e79627331
commit b88efdbbc7
4 changed files with 67 additions and 39 deletions

View File

@ -7,22 +7,6 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<button type="button" class="btn-default btn-sm navbar-toggle" data-toggle="collapse" data-target="#search">
<span class="sr-only">Toggle navigation</span>
<span class="glyphicon glyphicon-search"></span>
</button>
<a class="navbar-brand" href="/">
{{ .Site.Title }}
</a>
</div>
<div class="collapse navbar-collapse" id="search">
<form class="navbar-form navbar-right" action="https://szukaj.wmi.amu.edu.pl/search/" method="GET">
<div class="input-group">
<input type="text" class="form-control" name="q" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div> </div>
</form> </form>
</div> </div>

View File

@ -1,5 +1,23 @@
{{ $currentPage := . }} {{ $currentPage := . }}
<ul> <ul>
<div class="sidebar-header">
<a class="sidebar-brand" href="/">
{{ .Site.Title }}
</a>
<form class="sidebar-header sidebar-brand" action="https://szukaj.wmi.amu.edu.pl/search/" method="GET">
<div class="input-group">
<input type="text" class="form-control" name="q" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn btn-default">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</form>
</div>
</div>
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if .HasChildren }} {{ if .HasChildren }}
<li class="item {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a> <li class="item {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>

View File

@ -51,13 +51,19 @@ pre {
line-height: 1.7; line-height: 1.7;
} }
.input-group {
padding-right: 30px;
padding-left: 20px;
}
.navbar { .navbar {
padding-left: 0px;
padding-right: 20px;
letter-spacing: +.05rem; letter-spacing: +.05rem;
font-weight: bold; font-weight: bold;
font-size: 1.8rem; font-size: 1.8rem;
background-color: #292929;
} }
a:link { a:link {
@ -89,15 +95,23 @@ a:hover {
/*font-size: 2rem;*/ /*font-size: 2rem;*/
} }
.sidebar-header {
color: #000;
font-size: 3rem;
text-align: center;
letter-spacing: 0.3rem;
font-weight: bold;
padding-bottom: 10px;
background-color: #ba3232;
}
.sidebar-toggle { .sidebar-toggle {
float: left; float: left;
margin-left: 15px; margin-left: 15px;
} }
.sidebar { .sidebar {
/*padding-top: 100px;*/ margin-top: -2px;
margin-top: 5px;
/*display: none;*/
position: fixed; position: fixed;
top: 51px; top: 51px;
bottom: 0; bottom: 0;
@ -122,10 +136,10 @@ a:hover {
@media (min-width: 768px) { @media (min-width: 768px) {
.sidebar { .sidebar {
display: block; display: block;
padding-top: 0px;
} }
.navbar a { .navbar a {
font-size: 2rem; font-size: 2rem;
} }
} }
@ -136,6 +150,16 @@ a:hover {
color: #ccc; color: #ccc;
} }
.sidebar-header a {
color: #fff;
font-size: 3rem;
text-align: center;
}
.sidebar ul { .sidebar ul {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
@ -173,7 +197,6 @@ a:hover {
color: #fff; color: #fff;
/* background-color: #ba3232; /* background-color: #ba3232;
*/ font-weight: bold; */ font-weight: bold;
} }
.main { .main {
@ -184,6 +207,9 @@ a:hover {
padding-right: 80px; padding-right: 80px;
padding-left: 80px; padding-left: 80px;
} }
.navbar {
display: none;
}
} }
.main .page-header { .main .page-header {
margin-top: 0; margin-top: 0;