Fix breadcrumb to take full section name

This commit is contained in:
Ryan Watters
2017-03-21 12:41:06 -05:00
parent fdd20af559
commit 73ede1622e
11 changed files with 19 additions and 15 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ watch = true
# Add GA Tracking Code Here. This leverages a built-in (ie, "internal") partial from HUGO: https://gohugo.io/extras/analytics#configuring-google-analytics # Add GA Tracking Code Here. This leverages a built-in (ie, "internal") partial from HUGO: https://gohugo.io/extras/analytics#configuring-google-analytics
googleanalyticstrackingcode = "" googleanalyticstrackingcode = ""
## Critical Render Path. If true, site style will be embedded in a <style> tag in each html <head> as part of Gulp Build. False puts a typical <link> to the stylesheet in <head>> ## Critical Render Path. If true, site style will be embedded in a <style> tag in each html <head> as part of Gulp Build. False puts a typical <link> to the stylesheet in <head>>
usecrp = true usecrp = false
## Twitter handle without the "@" ## Twitter handle without the "@"
twitterhandle = "GoHugoIO" twitterhandle = "GoHugoIO"
## Facebook URL ## Facebook URL
+2 -2
View File
@@ -1,9 +1,9 @@
{{if and (ne .Kind "section") (ne .Section "")}} {{ if .IsPage }}
<nav class="breadcrumb"> <nav class="breadcrumb">
<ul class="breadcrumbs"> <ul class="breadcrumbs">
<li> <li>
<a class="crumb" href="/{{.Section | urlize}}"> <a class="crumb" href="/{{.Section | urlize}}">
<span>{{replace (replace .Section "-" " " | title) "And" "and"}}</span> <span>{{ with .Site.GetPage "section" .Section }}{{ .Title }}{{ else }}{{replace (replace .Section "-" " " | title) "And" "and"}}{{ end }}</span>
</a> </a>
</li> </li>
</ul> </ul>
+1 -1
View File
@@ -3,7 +3,7 @@
<div class="hugo-meta" title="Hugo version {{$version}}"> <div class="hugo-meta" title="Hugo version {{$version}}">
<a href="/" id="home-link"> <a href="/" id="home-link">
<!-- <img src="{{ "images/hugo-icons/hugo-logo-wide.svg" | relURL }}" alt="The official wide logo for Hugo"> --> <!-- <img src="{{ "images/hugo-icons/hugo-logo-wide.svg" | relURL }}" alt="The official wide logo for Hugo"> -->
{{ partial "svg-icons/hugo-logo-wide.svg" . }}v{{$version}}</span> {{ partial "svg-icons/hugo-logo-wide.svg" . }}<span class="hugo-v">v{{$version}}</span>
</a> </a>
<!-- From https://buttons.github.io/. --> <!-- From https://buttons.github.io/. -->
<!-- <a class="github-button" href="https://github.com/spf13/hugo" data-icon="octicon-star" data-style="mega" data-count-href="/spf13/hugo/stargazers" data-count-api="/repos/spf13/hugo#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star spf13/hugo on GitHub">Star</a> --> <!-- <a class="github-button" href="https://github.com/spf13/hugo" data-icon="octicon-star" data-style="mega" data-count-href="/spf13/hugo/stargazers" data-count-api="/repos/spf13/hugo#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star spf13/hugo on GitHub">Star</a> -->
+1 -1
View File
@@ -1,5 +1,5 @@
<a href="#" id="toggle-search"> <a href="#" id="toggle-search">
<i class="icon-search"></i> {{ partial "svg-icons/search.svg" . }}
</a> </a>
<form id="site-search-form" action=""> <form id="site-search-form" action="">
<input type="search" id="search-input" {{if .IsHome}} class="homepage-search"{{end}} placeholder="Search {{.Site.Title}}..."> <input type="search" id="search-input" {{if .IsHome}} class="homepage-search"{{end}} placeholder="Search {{.Site.Title}}...">
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
<svg id="search-icon" xmlns="http://www.w3.org/2000/svg" width="475.084" height="475.084" viewBox="0 0 475.084 475.084"><path d="M464.524 412.846l-97.93-97.925C390.194 280.86 402 242.88 402 201.01c0-27.218-5.282-53.25-15.85-78.087-10.56-24.842-24.84-46.254-42.825-64.24-17.987-17.99-39.396-32.265-64.233-42.827C254.247 5.286 228.218.003 201 .003c-27.217 0-53.248 5.283-78.086 15.848-24.842 10.57-46.254 24.84-64.24 42.83-17.99 17.99-32.265 39.407-42.828 64.24C5.282 147.76 0 173.79 0 201.01c0 27.213 5.282 53.235 15.846 78.08 10.562 24.84 24.838 46.247 42.827 64.234 17.987 17.994 39.403 32.265 64.24 42.833C147.755 396.717 173.783 402 201 402c41.877 0 79.85-11.808 113.92-35.406l97.93 97.64c6.85 7.232 15.405 10.85 25.692 10.85 9.897 0 18.467-3.617 25.694-10.85 7.23-7.23 10.848-15.795 10.848-25.692.003-10.082-3.518-18.65-10.56-25.694zm-173.16-121.488c-25.03 25.033-55.15 37.55-90.365 37.55-35.21 0-65.33-12.52-90.36-37.55-25.04-25.03-37.55-55.144-37.55-90.36 0-35.21 12.52-65.334 37.54-90.36 25.025-25.032 55.15-37.546 90.36-37.546s65.33 12.52 90.363 37.546 37.55 55.15 37.55 90.36c0 35.216-12.52 65.33-37.55 90.36z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+2 -2
View File
@@ -33,8 +33,8 @@ gulp.task('scss', function() {
.pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError)) .pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError))
.pipe(prefix('last 2 versions', '> 1%', 'ie 10', 'Android 2', 'Firefox ESR')) .pipe(prefix('last 2 versions', '> 1%', 'ie 10', 'Android 2', 'Firefox ESR'))
.pipe(plumber()) .pipe(plumber())
.pipe(rename('style-embed.html')) // .pipe(rename('style-embed.html'))
.pipe(gulp.dest('../layouts/partials')) // .pipe(gulp.dest('../layouts/partials'))
.pipe(rename('style.min.css')) .pipe(rename('style.min.css'))
.pipe(gulp.dest('../static/css')); .pipe(gulp.dest('../static/css'));
}); });
+7 -5
View File
@@ -1,20 +1,21 @@
#toggle-search { #toggle-search {
display: block; display: block;
position: fixed; position: fixed;
top: .5em; top: 13px;
right: 3.5em; right: 3.5em;
float: right; float: right;
font-size: 1.2em; @include size(24px);
z-index: 60; z-index: 60;
color: $hugo-pink; color: $hugo-pink;
@include MQ(M) { @include MQ(M) {
right: 2em; right: 2em;
} }
@include MQ(XL) {
top: .3em;
}
} }
#search-icon {
@include size(24px);
fill: $hugo-pink;
}
form#site-search-form { form#site-search-form {
transition: transform .3s ease-in-out; transition: transform .3s ease-in-out;
@@ -28,6 +29,7 @@ form#site-search-form {
transform:translateY(-#{$site-header-height}); transform:translateY(-#{$site-header-height});
background-color: $body-bg-color; background-color: $body-bg-color;
z-index: 19; z-index: 19;
background-color: $site-header-bg-color;
&.search-open { &.search-open {
transition: transform .3s ease-in-out; transition: transform .3s ease-in-out;
transform: translateY(0); transform: translateY(0);
@@ -8,7 +8,7 @@ aside#toc {
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
max-width: 280px; max-width: 280px;
// @include card(1); @include card(1);
header.toc-header { header.toc-header {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
+1
View File
@@ -57,6 +57,7 @@
.hugo-v { .hugo-v {
align-self: flex-end; align-self: flex-end;
font-size: .9em; font-size: .9em;
font-weight:bolder;
} }
@include MQ(L) { @include MQ(L) {
margin-left: 1em; margin-left: 1em;
+1 -1
View File
File diff suppressed because one or more lines are too long