Nav menu
This commit is contained in:
parent
dc06f040ec
commit
ac614e6ab5
|
@ -5,10 +5,9 @@ theme = "cupper-hugo-theme"
|
||||||
googleAnalytics = "UA-123456789-1"
|
googleAnalytics = "UA-123456789-1"
|
||||||
|
|
||||||
# Uncomment below to enable syntax highlighting
|
# Uncomment below to enable syntax highlighting
|
||||||
# pygmentsCodefences = true
|
|
||||||
# pygmentsCodefencesGuessSyntax = true
|
|
||||||
# For more styles see https://xyproto.github.io/splash/docs/all.html
|
# For more styles see https://xyproto.github.io/splash/docs/all.html
|
||||||
# pygmentsStyle = "pygments"
|
# pygmentsCodefences = true
|
||||||
|
# pygmentsStyle = "algol"
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
tag = "tags"
|
tag = "tags"
|
||||||
|
@ -17,32 +16,30 @@ googleAnalytics = "UA-123456789-1"
|
||||||
post = "/:filename/"
|
post = "/:filename/"
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
[[menu.main]]
|
[[menu.nav]]
|
||||||
name = "Home"
|
name = "Home"
|
||||||
url = "/"
|
url = "/"
|
||||||
weight = 1
|
weight = 1
|
||||||
[[menu.main]]
|
[[menu.nav]]
|
||||||
name = "Blog"
|
name = "Blog"
|
||||||
url = "/post/"
|
url = "/post/"
|
||||||
weight = 2
|
weight = 2
|
||||||
[[menu.main]]
|
[[menu.nav]]
|
||||||
name = "Tags"
|
name = "Tags"
|
||||||
url = "/tags/"
|
url = "/tags/"
|
||||||
weight = 3
|
weight = 3
|
||||||
[[menu.main]]
|
[[menu.nav]]
|
||||||
name = "About"
|
name = "About"
|
||||||
url = "/about/"
|
url = "/about/"
|
||||||
weight = 4
|
weight = 4
|
||||||
[[menu.main]]
|
[[menu.nav]]
|
||||||
name = "RSS"
|
name = "RSS"
|
||||||
url = "/index.xml"
|
url = "/index.xml"
|
||||||
weight = 5
|
weight = 5
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
description = "Documentation for the **Cupper** documentation builder, built with **Cupper** itself."
|
# description = "An accessibility-friendly Hugo theme, ported from the [original Cupper](https://github.com/ThePacielloGroup/cupper) project."
|
||||||
footerText = "Made with [Hugo](https://gohugo.io/) & TODO"
|
footer = "Made with [Hugo](https://gohugo.io/). Themed by [Cupper](https://github.com/zwbetz-gh/cupper-hugo-theme). Deployed to [Netlify](https://www.netlify.com/)."
|
||||||
hideFooter = false
|
# For more date formats see https://gohugo.io/functions/format/
|
||||||
# Keep?
|
dateFormat = "Jan 2, 2006"
|
||||||
codePenUser = "Heydon"
|
codePenUser = "TODO"
|
||||||
# TODO link to date format docs page
|
|
||||||
dateFormat = "Jan 2, 2006"
|
|
|
@ -1,18 +1,12 @@
|
||||||
+++
|
+++
|
||||||
date = "2017-06-26T18:27:58+01:00"
|
date = "2017-06-26T18:27:58+01:00"
|
||||||
title = "The Cupper Documentation Builder"
|
title = "Home"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
Welcome to **Cupper**: a documentation builder for inclusive designers and those trying to be inclusive designers. These are **Cupper's** docs, but they are also an example of a site built with **Cupper**. Here are some of its features:
|
Welcome to **Cupper**: An accessibility-friendly Hugo theme, ported from the [original Cupper](https://github.com/ThePacielloGroup/cupper) project. Here are some of its features:
|
||||||
|
|
||||||
{{% ticks %}}
|
{{% ticks %}}
|
||||||
* Built with [Hugo](https://gohugo.io/), so easy to structure content and fast to compile it
|
* Responsive
|
||||||
* Available to read offline, as a [Progressive Web App](https://developers.google.com/web/progressive-web-apps/)
|
* Screen reader and keyboard accessible
|
||||||
* Include encapsulated live demos, inline with your markdown, [using Shadow DOM](https://www.smashingmagazine.com/2017/07/pattern-libraries-in-markdown/)
|
* TODO
|
||||||
* Quickly include WCAG and [Inclusive Design Principles](http://inclusivedesignprinciples.org/) references
|
|
||||||
* A responsive, screen reader and keyboard accessible static site as output
|
|
||||||
* Automated Github Pages deployment
|
|
||||||
* Includes a single-page printable version suitable for PDF conversion
|
|
||||||
{{% /ticks %}}
|
{{% /ticks %}}
|
||||||
|
|
||||||
To get started, take a look at {{% pattern "Installation" %}}.
|
|
||||||
|
|
|
@ -38,11 +38,9 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{ if ne .Type "print-version" }}
|
<a href="#main">skip to content</a>
|
||||||
<a href="#main">skip to content</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ partial "svg.html" . }}
|
{{ partial "svg.html" . }}
|
||||||
<div class="wrapper {{ if eq .Type "print-version" }}print-version{{ end }}">
|
<div class="wrapper">
|
||||||
<header class="intro-and-nav" role="banner">
|
<header class="intro-and-nav" role="banner">
|
||||||
<div>
|
<div>
|
||||||
<div class="intro">
|
<div class="intro">
|
||||||
|
@ -51,21 +49,8 @@
|
||||||
</a>
|
</a>
|
||||||
<p class="library-desc">
|
<p class="library-desc">
|
||||||
{{ .Site.Params.Description | markdownify }}
|
{{ .Site.Params.Description | markdownify }}
|
||||||
{{ if ne .Type "print-version" }}
|
|
||||||
<a class="print" href="{{ "print-version" | absURL }}">
|
|
||||||
<svg viewBox="0 0 35 45" aria-hidden="true" focusable="false">
|
|
||||||
<use xlink:href="#doc"></use>
|
|
||||||
</svg>Print version
|
|
||||||
{{ end }}
|
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
{{ if eq .Type "print-version" }}
|
|
||||||
<p class="toc-link">
|
|
||||||
<span aria-hidden="true">↓</span>
|
|
||||||
<a href="#toc">Table of contents</a>
|
|
||||||
<span aria-hidden="true">↓</span>
|
|
||||||
</p>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
{{ block "nav" . }}
|
{{ block "nav" . }}
|
||||||
<nav id="patterns-nav" class="patterns" role="navigation">
|
<nav id="patterns-nav" class="patterns" role="navigation">
|
||||||
|
@ -77,37 +62,20 @@
|
||||||
Menu
|
Menu
|
||||||
</button>
|
</button>
|
||||||
{{ $current := . }}
|
{{ $current := . }}
|
||||||
{{ range $.Site.Home.Sections }}
|
<ul id="patterns-list">
|
||||||
<ul id="patterns-list">
|
{{ range .Site.Menus.nav }}
|
||||||
{{ range .Pages.ByWeight }}
|
<li class="pattern">
|
||||||
<li class="pattern">
|
{{ $active := or ($current.IsMenuCurrent "nav" .) ($current.HasMenuCurrent "nav" .) }}
|
||||||
<a href="{{ .RelPermalink }}" {{ if eq $current.Permalink .Permalink }}aria-current="page"{{ end }}>
|
{{/* TODO highlight Blog nav item when on post pages */}}
|
||||||
<svg class="bookmark-icon" aria-hidden="true" focusable="false" viewBox="0 0 40 50">
|
<a href="{{ .URL }}" {{ if $active }}aria-current="page"{{ end }}>
|
||||||
<use xlink:href="#bookmark"></use>
|
<svg class="bookmark-icon" aria-hidden="true" focusable="false" viewBox="0 0 40 50">
|
||||||
</svg>
|
<use xlink:href="#bookmark"></use>
|
||||||
<span class="text">{{ .Title }}</span>
|
</svg>
|
||||||
</a>
|
<span class="text">{{ .Name }}</span>
|
||||||
</li>
|
</a>
|
||||||
{{ end }}
|
</li>
|
||||||
{{ range .Sections.ByWeight }}
|
|
||||||
<li>
|
|
||||||
<h3>{{ .Title }}</h3>
|
|
||||||
<ul>
|
|
||||||
{{ range .Pages.ByWeight }}
|
|
||||||
<li class="pattern">
|
|
||||||
<a href="{{ .RelPermalink }}" {{ if eq $current.Title .Title }}aria-current="page"{{ end }}>
|
|
||||||
<svg class="bookmark-icon" aria-hidden="true" viewBox="0 0 40 50" focusable="false">
|
|
||||||
<use xlink:href="#bookmark"></use>
|
|
||||||
</svg>
|
|
||||||
<span class="text">{{ .Title }}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -123,8 +91,7 @@
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden="true"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
Powered by <strong>Cupper</strong>, a <strong>The Paciello Group</strong> project.<br>
|
{{ .Site.Params.footer | markdownify }}
|
||||||
For general enquiries, contact us on info@paciellogroup.com.
|
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</h1>
|
</h1>
|
||||||
<ul class="patterns-list">
|
<ul class="patterns-list">
|
||||||
{{ range .Data.Pages }}
|
{{ range .Data.Pages }}
|
||||||
{{ .Render "li"}}
|
{{ .Render "li" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</main>
|
</main>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user