Update next and prev buttons

This commit is contained in:
Ryan Watters committed 2017-02-14 23:30:57 -08:00
1 parent ed50c7dbd0
commit c896343512
10 files changed
+88 -14

No files matched your search

+2 -2
View File
@@ -16,7 +16,7 @@ notes:
## What is Hugo? ## What is Hugo?
Hugo is a general-purpose website framework. Technically speaking, Hugo is Hugo is a general-purpose website framework. Technically speaking, Hugo is
a static site generator. Unlike systems that dynamically build a page a [static site generator][]. Unlike systems that dynamically build a page
with each visitor request, Hugo builds pages when you create with each visitor request, Hugo builds pages when you create
your content. Since websites are viewed far more often than they are your content. Since websites are viewed far more often than they are
edited, Hugo is optimized for website viewing for the end users of your site and an ideal writing experience for authors. edited, Hugo is optimized for website viewing for the end users of your site and an ideal writing experience for authors.
@@ -59,7 +59,6 @@ pages.
* [Hugo Performance Benchmark(@bep)] * [Hugo Performance Benchmark(@bep)]
[Aerobatic]: https://www.aerobatic.com/ [Aerobatic]: https://www.aerobatic.com/
[Amazon S3]: http://aws.amazon.com/s3/ [Amazon S3]: http://aws.amazon.com/s3/
[CloudFront]: http://aws.amazon.com/cloudfront/ "Amazon CloudFront" [CloudFront]: http://aws.amazon.com/cloudfront/ "Amazon CloudFront"
@@ -75,4 +74,5 @@ pages.
[Jekyll]: http://jekyllrb.com/ [Jekyll]: http://jekyllrb.com/
[Middleman]: https://middlemanapp.com/ [Middleman]: https://middlemanapp.com/
[Nanoc]: http://nanoc.ws/ [Nanoc]: http://nanoc.ws/
[static site generator]: /about-hugo/benefits-of-static/
[Surge]: https://surge.sh [Surge]: https://surge.sh
+5 -3
View File
@@ -24,14 +24,16 @@ In no particular order, here is what is currently being worked on for the Hugo p
* Native support for additional content formats (AsciiDoc [#1435][], reST [#1436][]) * Native support for additional content formats (AsciiDoc [#1435][], reST [#1436][])
* And, last but not least, *your* best ideas! * And, last but not least, *your* best ideas!
{{% note "Contributions Welcome" %}} ## Contributions Welcome
Feel free to [contribute](/contribute-to-hugo/) or open a new issue if you have an idea for a new feature.
{{% /note %}} Feel free to [contribute][] or open a new issue if you have an idea for a new feature.
[#98]: https://github.com/spf13/hugo/issues/98 [#98]: https://github.com/spf13/hugo/issues/98
[#1014]: https://github.com/spf13/hugo/issues/1014 [#1014]: https://github.com/spf13/hugo/issues/1014
[#1435]: https://github.com/spf13/hugo/issues/1435 [#1435]: https://github.com/spf13/hugo/issues/1435
[#1436]: https://github.com/spf13/hugo/issues/1436 [#1436]: https://github.com/spf13/hugo/issues/1436
[contribute]: /contribute-to-hugo/
[hosting and deployment]: /hosting-and-deployment/ [hosting and deployment]: /hosting-and-deployment/
[existing migration tools]: /developer-tool/migrations/ [existing migration tools]: /developer-tool/migrations/
[related Discuss thread]: https://discuss.gohugo.io/t/web-based-editor/155 [related Discuss thread]: https://discuss.gohugo.io/t/web-based-editor/155
+14
View File
@@ -0,0 +1,14 @@
---
title: Overview of Tutorials
linktitle: Overview of Tutorials
description:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
tags: [tutorials,learning]
weight:
draft: false
slug:
aliases:
notes:
---
@@ -19,5 +19,6 @@
<div class="body-copy"> <div class="body-copy">
{{.Content}} {{.Content}}
</div> </div>
{{partial "previous-and-next-links.html" . }}
</main> </main>
{{ end }} {{ end }}
+2 -7
View File
@@ -2,14 +2,8 @@
{{$title := .Title}} {{$title := .Title}}
<span id="page-top"></span> <span id="page-top"></span>
<main class="main"> <main class="main">
{{with .Params.testing }}
{{range $ind,$value := . }}
<p>Index: {{$ind}}</p>
<p>Value: {{$value}}</p>
{{end}}
{{end}}
<header class="content-header"> <header class="content-header">
<h1 class="page-title">{{with .LinkTitle}}{{ . | markdownify}}{{else}}{{ .Title | markdownify }}{{end}}</h1> <h1 class="page-title {{.Section}}">{{ .Title | markdownify }}</h1>
<div class="content-header-links"> <div class="content-header-links">
<a target="_blank" class="edit-link" href="{{.Site.Params.ghdocsrepo}}edit/master/content/{{.File.Path}}"><span class="edit">Edit Page</span><i class="icon-pencil" aria-hidden="true"></i></a> <a target="_blank" class="edit-link" href="{{.Site.Params.ghdocsrepo}}edit/master/content/{{.File.Path}}"><span class="edit">Edit Page</span><i class="icon-pencil" aria-hidden="true"></i></a>
{{- if .Params.godocref -}} {{- if .Params.godocref -}}
@@ -31,6 +25,7 @@
<div class="body-copy"> <div class="body-copy">
{{.Content}} {{.Content}}
</div> </div>
{{partial "previous-and-next-links.html" . }}
{{partial "table-of-contents.html" . }} {{partial "table-of-contents.html" . }}
</main> </main>
{{ end }} {{ end }}
@@ -0,0 +1,35 @@
{{ if .NextInSection }}
<a role="button" href="{{.NextInSection.Permalink}}" class="prev-and-next-link prev-page">
<div>
<span>Prev</span>
<h4 class="{{.Section}}">{{.NextInSection.Title}}</h4>
</div>
</a>
{{ else if eq .Kind "page" }}
{{ with .Site.GetPage "section" .Section }}
<a role="button" href="{{.Permalink}}" class="prev-and-next-link prev-page">
<div>
<span>Prev</span>
<h4>{{ .Title }}</h4>
</div>
</a>
{{ end }}
{{ end }}
{{ with .PrevInSection }}
<a role="button" href="{{.Permalink}}" class="prev-and-next-link next-page">
<div>
<span>Next</span>
<h4 class="{{.Section}}">{{.Title}}</h4>
</div>
</a>
{{ end }}
{{if eq .Kind "section"}}
{{ range first 1 .Data.Pages }}
<a role="button" href="{{.Permalink}}" class="prev-and-next-link next-page">
<div>
<span>Next</span>
<h4 class="{{.Section}}">{{.Title}}</h4>
</div>
</a>
{{end}}
{{end}}
@@ -0,0 +1,25 @@
.prev-and-next-link {
color: $hugo-white;
width: 100%;
display: inline-block;
text-align: center;
margin-bottom:1em;
// background-color: $hugo-blue-light;
span {
display: block;
font-size: .8em;
}
h4 {
margin: 0px;
padding: 0px;
text-transform: none;
color:$hugo-white;
}
@include MQ(M) {
max-width: 48%;
margin-bottom:1.5em;
&.next-page {
float:right;
}
}
}
@@ -45,12 +45,13 @@ header.content-header {
margin-top: 2em; margin-top: 2em;
} }
.last-modified { .last-modified {
color: $hugo-gray-light; color: $hugo-gray;
display: block; display: block;
margin-top: -10px; margin-top: -10px;
width: 100%; width: 100%;
font-size: .8em; font-size: .8em;
margin-bottom: 20px; margin-bottom: 20px;
font-weight:normal;
} }
} }
+1
View File
@@ -26,6 +26,7 @@
@import 'components/keyboard'; @import 'components/keyboard';
@import 'components/table-of-contents'; @import 'components/table-of-contents';
@import 'components/taxonomy-lists'; @import 'components/taxonomy-lists';
@import 'components/prev-and-next-links.scss';
//major layout parts/chrome //major layout parts/chrome
@import 'layout/site-header'; @import 'layout/site-header';
+1 -1
View File
@@ -1 +1 @@
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box;border-radius:0px;outline:none}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html,body{margin:0px;padding:0px;outline:none;border:none;font-size:18px;font-family:"muli","Helvetica Neue","Helvetica","Roboto","Arial",sans-serif;color:#222;line-height:1.6;font-weight:300;overflow-x:hidden}body{font-size:90%;overflow-x:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media only screen and (min-width: 760px){body{font-size:95%}}@media only screen and (min-width: 960px){body{font-size:100%}}p{margin-top:0px;margin-bottom:1.5em;line-height:1.6}@font-face{font-family:'fontello';src:url("/fonts/fontello/fontello.eot");src:url("/fonts/fontello/fontello.woff2") format("woff2"),url("/fonts/fontello/fontello.woff") format("woff"),url("/fonts/fontello/fontello.ttf") format("truetype"),url("/fonts/fontello/fontello.svg?78165468#fontello") format("svg");font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-alert:before{content:'\e810'}.icon-angle-double-right:before{content:'\f101'}.icon-attach:before{content:'\e820'}.icon-attention:before{content:'\e80f'}.icon-bell:before{content:'\e80d'}.icon-cancel:before{content:'\e81e'}.icon-caution:before{content:'\e80f'}.icon-chrome:before{content:'\e841'}.icon-clipboard:before{content:'\e817'}.icon-code:before{content:'\f121'}.icon-cog-alt:before{content:'\e814'}.icon-css3:before{content:'\f13c'}.icon-docs:before{content:'\f15c'}.icon-download:before{content:'\e815'}.icon-facebook-official:before{content:'\f230'}.icon-firefox:before{content:'\e840'}.icon-flag:before{content:'\e813'}.icon-forum:before{content:'\f03d';margin-right:.3em}.icon-github:before{content:'\f09b'}.icon-gitter:before{content:'\e819'}.icon-go:before{content:'\e801'}.icon-golang:before{content:'\e801'}.icon-heart:before{content:'\e81d'}.icon-help:before{content:'\e81b'}.icon-home:before{content:'\e812'}.icon-html.input:before{content:'\e81f'}.icon-html5:before{content:'\e800'}.icon-html:before{content:'\e800'}.icon-hugo:before{content:'\e81f'}.icon-ie:before{content:'\e843'}.icon-info:before{content:'\e811'}.icon-instagram:before{content:'\f32d'}.icon-javascript:before{content:'\e802'}.icon-js:before{content:'\e802'}.icon-json:before{content:'\e81c'}.icon-link:before{content:'\e816'}.icon-linkedin:before{content:'\f30c'}.icon-love:before{content:'\e81d'}.icon-mail:before{content:'\e821'}.icon-markdown:before{content:'\e80e'}.icon-md:before{content:'\e80e'}.icon-note:before{content:'\e80d'}.icon-opera:before{content:'\e842'}.icon-pdf:before{content:'\f1c1'}.icon-pencil:before{content:'\e80c'}.icon-picture:before{content:'\e808'}.icon-quote-left:before{content:'\e809'}.icon-quote-right:before{content:'\e80a'}.icon-sasLine truncated /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box;border-radius:0px;outline:none}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html,body{margin:0px;padding:0px;outline:none;border:none;font-size:18px;font-family:"muli","Helvetica Neue","Helvetica","Roboto","Arial",sans-serif;color:#222;line-height:1.6;font-weight:300;overflow-x:hidden}body{font-size:90%;overflow-x:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media only screen and (min-width: 760px){body{font-size:95%}}@media only screen and (min-width: 960px){body{font-size:100%}}p{margin-top:0px;margin-bottom:1.5em;line-height:1.6}@font-face{font-family:'fontello';src:url("/fonts/fontello/fontello.eot");src:url("/fonts/fontello/fontello.woff2") format("woff2"),url("/fonts/fontello/fontello.woff") format("woff"),url("/fonts/fontello/fontello.ttf") format("truetype"),url("/fonts/fontello/fontello.svg?78165468#fontello") format("svg");font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-alert:before{content:'\e810'}.icon-angle-double-right:before{content:'\f101'}.icon-attach:before{content:'\e820'}.icon-attention:before{content:'\e80f'}.icon-bell:before{content:'\e80d'}.icon-cancel:before{content:'\e81e'}.icon-caution:before{content:'\e80f'}.icon-chrome:before{content:'\e841'}.icon-clipboard:before{content:'\e817'}.icon-code:before{content:'\f121'}.icon-cog-alt:before{content:'\e814'}.icon-css3:before{content:'\f13c'}.icon-docs:before{content:'\f15c'}.icon-download:before{content:'\e815'}.icon-facebook-official:before{content:'\f230'}.icon-firefox:before{content:'\e840'}.icon-flag:before{content:'\e813'}.icon-forum:before{content:'\f03d';margin-right:.3em}.icon-github:before{content:'\f09b'}.icon-gitter:before{content:'\e819'}.icon-go:before{content:'\e801'}.icon-golang:before{content:'\e801'}.icon-heart:before{content:'\e81d'}.icon-help:before{content:'\e81b'}.icon-home:before{content:'\e812'}.icon-html.input:before{content:'\e81f'}.icon-html5:before{content:'\e800'}.icon-html:before{content:'\e800'}.icon-hugo:before{content:'\e81f'}.icon-ie:before{content:'\e843'}.icon-info:before{content:'\e811'}.icon-instagram:before{content:'\f32d'}.icon-javascript:before{content:'\e802'}.icon-js:before{content:'\e802'}.icon-json:before{content:'\e81c'}.icon-link:before{content:'\e816'}.icon-linkedin:before{content:'\f30c'}.icon-love:before{content:'\e81d'}.icon-mail:before{content:'\e821'}.icon-markdown:before{content:'\e80e'}.icon-md:before{content:'\e80e'}.icon-note:before{content:'\e80d'}.icon-opera:before{content:'\e842'}.icon-pdf:before{content:'\f1c1'}.icon-pencil:before{content:'\e80c'}.icon-picture:before{content:'\e808'}.icon-quote-left:before{content:'\e809'}.icon-quote-right:before{content:'\e80a'}.icon-sasLine truncated