Add content class to main, remove all layout__full classes.

This commit is contained in:
Fredrik Jonsson 2017-08-30 09:18:26 +02:00
commit f450d62703
8 changed files with 16 additions and 8 deletions

View file

@ -63,6 +63,7 @@ params:
jquery: true # Add jQuery jquery: true # Add jQuery
languageDir: "" # Set ltr or rtl, defaults to ltr. languageDir: "" # Set ltr or rtl, defaults to ltr.
logo: false # Turn off the logo. logo: false # Turn off the logo.
mobileMenu: true # Turn on a mobile menu on small screens.
piwikSiteId: # Piwik site id piwikSiteId: # Piwik site id
piwikTrackerUrl: "" # Piwik url, schemaless and no slash on end (example.com/piwik). piwikTrackerUrl: "" # Piwik url, schemaless and no slash on end (example.com/piwik).
poweredby: true # Show powered by hugo in footer poweredby: true # Show powered by hugo in footer
@ -73,6 +74,13 @@ params:
``` ```
## Dates
If "lastmod" is set in the frontmatter on a post that value will be used in the "submitted" section. If not "date" is used.
With "lastmod" set a date section will also appear at the bottom of post telling the reader the created and modification dates.
## Shortcodes ## Shortcodes
### Clear ### Clear

View file

@ -11,7 +11,7 @@
<body> <body>
<div class="page layout__page{{ if $.Param "sidebar" | default true }} layout__sidebar-second{{ end }}"> <div class="page layout__page{{ if $.Param "sidebar" | default true }} layout__sidebar-second{{ end }}">
<header class="header layout__header layout__full" role="banner"> <header class="header layout__header" role="banner">
{{ if $.Param "logo" | default true }}<a href="{{ .Site.BaseURL }}" title="Home" rel="home" class="header__logo"><img src="/images/logo.png" alt="Home" class="header__logo-image"></a>{{ end }} {{ if $.Param "logo" | default true }}<a href="{{ .Site.BaseURL }}" title="Home" rel="home" class="header__logo"><img src="/images/logo.png" alt="Home" class="header__logo-image"></a>{{ end }}
<h1 class="header__site-name"> <h1 class="header__site-name">
<a href="{{ .Site.BaseURL }}" title="Home" class="header__site-link" rel="home"><span>{{ .Site.Title }}</span></a> <a href="{{ .Site.BaseURL }}" title="Home" class="header__site-link" rel="home"><span>{{ .Site.Title }}</span></a>
@ -25,7 +25,7 @@
{{ if $.Param "sidebar" | default true }}{{ partial "sidebar.html" . -}}{{ end }} {{ if $.Param "sidebar" | default true }}{{ partial "sidebar.html" . -}}{{ end }}
<footer class="footer layout__footer layout__full" role="contentinfo"> <footer class="footer layout__footer" role="contentinfo">
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}} {{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
<p>{{ with $.Param "copyright" }}{{ . | markdownify }}{{ else }}<span>© {{ .Site.Title }}</span>{{ end }}</p> <p>{{ with $.Param "copyright" }}{{ . | markdownify }}{{ else }}<span>© {{ .Site.Title }}</span>{{ end }}</p>
{{ with $.Param "footer" }}<p>{{ . | markdownify }}</p>{{ end }} {{ with $.Param "footer" }}<p>{{ . | markdownify }}</p>{{ end }}

View file

@ -3,7 +3,7 @@
{{ end }} {{ end }}
{{ define "main" -}} {{ define "main" -}}
<main class="layout__content" role="main"> <main class="content layout__content" role="main">
<h1 class="title">{{ .Title }}</h1> <h1 class="title">{{ .Title }}</h1>
{{ $paginator := .Paginate (.Data.Pages) -}} {{ $paginator := .Paginate (.Data.Pages) -}}
{{ range $paginator.Pages -}} {{ range $paginator.Pages -}}

View file

@ -3,7 +3,7 @@
{{ end }} {{ end }}
{{ define "main" -}} {{ define "main" -}}
<main class="layout__content" role="main"> <main class="content layout__content" role="main">
<h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}">{{ .Title }}</h1> <h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}">{{ .Title }}</h1>
<article class="{{ with .Section }}section-{{ . | urlize }} {{ end }}single-view"> <article class="{{ with .Section }}section-{{ . | urlize }} {{ end }}single-view">
<header> <header>

View file

@ -6,7 +6,7 @@
{{ end }} {{ end }}
{{ define "main" -}} {{ define "main" -}}
<main class="layout__content" role="main"> <main class="content layout__content" role="main">
<article class="{{ with .Section }}section-{{ . | urlize }} {{ end }}single-view"> <article class="{{ with .Section }}section-{{ . | urlize }} {{ end }}single-view">
<div class="content"> <div class="content">
{{ .Content }} {{ .Content }}

View file

@ -1,6 +1,6 @@
{{ $currentSection := .Section }} {{ $currentSection := .Section }}
{{ $currentID := .UniqueID }} {{ $currentID := .UniqueID }}
<nav class="main-menu layout__navigation layout__full" role="navigation"> <nav class="main-menu layout__navigation" role="navigation">
<h2 class="visually-hidden">{{ i18n "menu_title" }}</h2> <h2 class="visually-hidden">{{ i18n "menu_title" }}</h2>
<ul class="navbar"> <ul class="navbar">
<li><a class="{{ if .IsHome }}active{{ end }}" href="/">{{ i18n "menu_home" }}</a></li> <li><a class="{{ if .IsHome }}active{{ end }}" href="/">{{ i18n "menu_home" }}</a></li>

View file

@ -17,7 +17,7 @@
&__page-top, &__page-top,
&__page-bottom { &__page-bottom {
padding: 0 $zen-gutters / 2; padding: 0 $zen-gutters / 2;
min-width: 0; // With display grid defaults to auto making <pre> overflow. min-width: 0; // With display grid defaults to auto, making <pre> overflow.
@include respond-to(s) { @include respond-to(s) {
padding: 0 $zen-gutters; padding: 0 $zen-gutters;

View file

@ -19,7 +19,7 @@
// Populate the mobile nav sheet. // Populate the mobile nav sheet.
$('.header__region').filter(':not(:empty)').removeClass('header__region region hidden').addClass('js-region').appendTo('.mobile-nav-sheet'); $('.header__region').filter(':not(:empty)').removeClass('header__region region hidden').addClass('js-region').appendTo('.mobile-nav-sheet');
$('.main-menu').addClass('hidden').clone().removeClass('main-menu layout__navigation layout__full hidden').addClass('js-main-menu').appendTo('.mobile-nav-sheet').find('.navbar').removeClass('navbar').addClass('js-navbar'); $('.main-menu').addClass('hidden').clone().removeClass('main-menu layout__navigation hidden').addClass('js-main-menu').appendTo('.mobile-nav-sheet').find('.navbar').removeClass('navbar').addClass('js-navbar');
// Toggle the mobile nav sheet. // Toggle the mobile nav sheet.
$('.mobile-nav-cover, .mobile-nav-toggle').on('click toushstart', function (e) { $('.mobile-nav-cover, .mobile-nav-toggle').on('click toushstart', function (e) {