taglist fix if no tags

This commit is contained in:
Wouter Groeneveld 2017-03-03 15:30:15 +01:00
parent 8e77da509a
commit 70187efe11
7 changed files with 38 additions and 19 deletions

View File

@ -4,8 +4,8 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "nav.html" . }}
{{ partial "breadcrumbs.html" . }}
{{ partial "header_wp.html" . }}
<div class="container" role="main">

View File

@ -8,7 +8,7 @@
{{ partial "nav.html" . }}
<header class="header-section ">
<div class="intro-header no-img">
<div class="intro-header no-img index-img">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">

View File

@ -1,12 +1,14 @@
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ $.Scratch.Add "path" .Site.BaseURL }}
<ol class="breadcrumbs">
<li><a href="/">home</a></li>
{{ range $index, $element := split $url "/" }}
{{ $.Scratch.Add "path" $element }}
{{ if ne $element "" }}
<li><a href='{{ $.Scratch.Get "path" }}'>{{ . }}</a></li>
{{ $.Scratch.Add "path" "/" }}
{{ end }}
{{ end }}
</ol>
<div class="sidebar-offcanvas" id="sidebar" role="navigation" style="margin-top: 100px;">
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ $.Scratch.Add "path" .Site.BaseURL }}
<ol class="breadcrumb">
<li><a href="/">home</a></li>
{{ range $index, $element := split $url "/" }}
{{ $.Scratch.Add "path" $element }}
{{ if ne $element "" }}
<li><a href='{{ $.Scratch.Get "path" }}'>{{ . }}</a></li>
{{ $.Scratch.Add "path" "/" }}
{{ end }}
{{ end }}
</ol>
</div>

View File

@ -3,6 +3,7 @@
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ partial "tagslist.html" . }}
<article role="main" class="blog-post">
{{ .Content }}
</article>

View File

@ -1,6 +1,10 @@
{{ if not (eq (len .Params.tags) 0) }}
<i class="fa fa-tags" style="float: left;" aria-hidden="true"></i>
<ul id="tags">
{{ range .Params.tags }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
</ul>
{{ end }}

View File

@ -8,7 +8,7 @@
{{ partial "nav.html" . }}
<header class="header-section ">
<div class="intro-header no-img">
<div class="intro-header no-img index-img">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">

View File

@ -33,6 +33,11 @@
/* --- General --- */
.breadcrumb {
margin-bottom: 0px;
background-color: #f7fdec;
}
body {
font-family: 'Lora', 'Times New Roman', serif;
font-size: 18px;
@ -498,7 +503,7 @@ footer .theme-by {
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
margin-top: 51px; /* The small navbar is 50px tall + 1px border */
margin-top: 0px; /* The small navbar is 50px tall + 1px border */
margin-bottom: 35px;
}
.intro-header.big-img .big-img-transition {
@ -575,7 +580,7 @@ footer .theme-by {
margin-top: 130px;
}
.intro-header.big-img {
margin-top: 91px; /* Full navbar is small navbar + 20px padding on each side when expanded */
margin-top: 0px; /* Full navbar is small navbar + 20px padding on each side when expanded */
padding-top: 40px;
padding-bottom: 40px;
}
@ -597,8 +602,15 @@ footer .theme-by {
}
}
.header-section.has-img .no-img {
.index-img {
margin-top: 125px !important;
}
.no-img {
margin-top: 0;
}
.header-section.has-img .no-img {
background: #FCFCFC;
margin: 0 0 40px;
padding: 20px 0;