Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/the2ne/hugo-frais.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fredon <the2ne@gmail.com>2016-10-16 14:10:22 +0300
committerOlivier Fredon <the2ne@gmail.com>2016-10-16 14:10:22 +0300
commitfad6821207035cba36d45d6ba4e6ec49d5bef4c8 (patch)
treeb3decf65a2d3f89f02b685dc5ff99a35c9d5a2c6
parentd6987746892f99eb4d37a602c3a5698566feffcc (diff)
Font stack and vertical rhythm
-rw-r--r--archetypes/default.md1
-rw-r--r--layouts/_default/list.html9
-rw-r--r--layouts/_default/single.html8
-rw-r--r--layouts/index.html6
-rw-r--r--layouts/partials/footer.html1
-rw-r--r--layouts/partials/header.html11
-rw-r--r--layouts/partials/post-list.html2
-rw-r--r--layouts/partials/post-meta.html14
-rw-r--r--static/css/style.css50
-rw-r--r--static/sass/_settings.scss4
-rw-r--r--static/sass/custom/layout.scss9
-rw-r--r--static/sass/custom/typography.scss22
12 files changed, 96 insertions, 41 deletions
diff --git a/archetypes/default.md b/archetypes/default.md
index cb848c4..e111a46 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -1,6 +1,5 @@
+++
title = ""
description = ""
-date = "02-01-2006"
tags = ["x", "y"]
+++
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 4972bf9..b746f4e 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -2,9 +2,12 @@
<body class="list-template">
<div class="page">
- {{ partial "header" . }}
- {{ partial "navigation" . }}
- <main class="content" role="main" id="contenu-principal">
+ <section class="header-wrapper">
+ {{ partial "header" . }}
+ {{ partial "navigation" . }}
+ </section>
+ <main class="content" role="main" id="main-content">
+ <h1>{{ .Title }}</h1>
{{ partial "post-list" . }}
{{ partial "pagination" . }}
</main>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 38ba5fa..3406891 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -2,12 +2,14 @@
<body class="post-template">
<div class="page">
- {{ partial "header" . }}
- {{ partial "navigation" . }}
+ <section class="header-wrapper">
+ {{ partial "header" . }}
+ {{ partial "navigation" . }}
+ </section>
<main class="content" role="main" id="main-content" itemscope itemtype="http://schema.org/Article">
<article class="post">
<header>
- <h1 class="post-title" itemprop="name" role="heading" arial-level="1">{{ .Title }}</h1>
+ <h1 class="post-title" itemprop="name">{{ .Title }}</h1>
</header>
<section class="post-content" itemprop="articleBody">
{{ .Content }}
diff --git a/layouts/index.html b/layouts/index.html
index ac7229f..0b0f582 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -2,8 +2,10 @@
<body class="home-template">
<div class="page">
- {{ partial "header" . }}
- {{ partial "navigation" . }}
+ <section class="header-wrapper">
+ {{ partial "header" . }}
+ {{ partial "navigation" . }}
+ </section>
<main class="content" role="main" id="main-content">
{{ partial "post-list" . }}
{{ partial "pagination" . }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 332d433..d11df24 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,5 +1,4 @@
<footer class="legal" role="contentinfo" itemscope itemtype="http://schema.org/Person">
- {{ partial "social" . }}
<ul>
<li itemprop="name">
<span itemprop="givenName">{{ .Site.Params.firstName }}</span>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index a6b633d..4120d70 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,8 +1,7 @@
<header class="headlines" role="banner">
- <h1 class="headlines__title">
- {{ if .IsPage }}<a href="{{ .Site.BaseURL }}">{{ end }}
- {{ .Site.Params.headline }}
- {{ if .IsPage }}</a>{{ end }}
- </h1>
- <h2 class="headlines__baseline">{{ .Site.Params.baseline }}</h2>
+ {{ if .IsHome }}
+ <h1 class="headlines__title">{{ .Site.Params.headline }}</h1>
+ {{ else }}
+ <a class="headlines__title" href="{{ .Site.BaseURL }}">{{ .Site.Params.headline }}</a>
+ {{ end }}
</header>
diff --git a/layouts/partials/post-list.html b/layouts/partials/post-list.html
index 650d00f..43695a2 100644
--- a/layouts/partials/post-list.html
+++ b/layouts/partials/post-list.html
@@ -2,7 +2,7 @@
{{ range $paginator.Pages }}
<article class="post post--preview">
<header>
- <h1 class="post__title"><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
+ <h2 class="post__title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="post__meta"><time datetime="{{ .Date.Format "02 January 2006" }}">{{ .Date.Format "02 January 2006" }}</time></div>
</header>
<section class="post__excerpt">
diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html
index 2a15b6c..69b7ae2 100644
--- a/layouts/partials/post-meta.html
+++ b/layouts/partials/post-meta.html
@@ -1,13 +1,13 @@
{{ $baseurl := .Site.BaseURL }}
-<section class="post-meta__date">
- <time datetime="{{ .Date.Format "2006-01-02" }}" itemprop="datePublished">{{ .Date.Format "02 January 2006" }}</time>
-</section>
-<section class="post-meta__tags">
+<ul class="post-meta__date">
+ <li><time datetime="{{ .Date.Format "2006-01-02" }}" itemprop="datePublished">{{ .Date.Format "02 January 2006" }}</time></li>
+ <li itemprop="author">{{ .Site.Params.author }}</li>
+</ul>
+<ul class="post-meta__tags">
{{ range .Params.tags }}
- <a href="{{ $baseurl }}tags/{{ . }}">{{ . }} </a>
+ <li><a href="{{ $baseurl }}tags/{{ . }}">{{ . }} </a></li>
{{ end }}
-</section>
+</ul>
<meta itemprop="url" content="{{ .Permalink }}">
-<meta itemprop="author" content="{{ .Site.Params.author }}">
<meta itemprop="wordCount" content="{{ .WordCount }}" />
<meta itemprop="timeRequired" content="{{ .ReadingTime }} Min" />
diff --git a/static/css/style.css b/static/css/style.css
index a563a7d..67f25e9 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -5,7 +5,7 @@
* 3. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-family: Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans-serif;
/* 1 */
line-height: 1.5;
/* 2 */
@@ -458,11 +458,8 @@ html {
}
.page {
- margin: 0 4em;
-}
-
-.headlines {
- font-size: 1.5em;
+ max-width: 700px;
+ margin: 0 auto;
}
html {
@@ -470,16 +467,53 @@ html {
font-size: 1em;
}
+.page {
+ font-size: 1.25em;
+}
+
.headlines__title {
+ font-family: Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans-serif;
font-size: 1.5em;
+ font-weight: bold;
+ margin: 0;
}
.headlines__baseline {
font-size: 1em;
}
-h1, h2, h3, h4, h5, h6 {
- font-family: Georgia, Times, Times New Roman, serif;
+h1, h3, h5 {
+ font-family: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
+ line-height: 1;
+}
+
+h2, h4, h6 {
+ font-family: Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans-serif;
+ line-height: 1;
+}
+
+h1 {
+ font-size: 4.5em;
+}
+
+h2 {
+ font-size: 3em;
+}
+
+h3 {
+ font-size: 2.5em;
+}
+
+h4 {
+ font-size: 2em;
+}
+
+h5 {
+ font-size: 1.5em;
+}
+
+h6 {
+ font-size: 1em;
}
/*# sourceMappingURL=style.css.map */ \ No newline at end of file
diff --git a/static/sass/_settings.scss b/static/sass/_settings.scss
index 6c0e585..3785365 100644
--- a/static/sass/_settings.scss
+++ b/static/sass/_settings.scss
@@ -5,8 +5,8 @@
// Typography
-$fontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
-$fontFamilyAlternative: Georgia,Times,Times New Roman,serif;
+$fontFamily: Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans-serif;
+$fontFamilyAlternative: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
$fontSize: 1em;
$baseline: 1.5;
diff --git a/static/sass/custom/layout.scss b/static/sass/custom/layout.scss
index b74ca52..04957b7 100644
--- a/static/sass/custom/layout.scss
+++ b/static/sass/custom/layout.scss
@@ -7,9 +7,6 @@ html {
}
.page {
- margin: 0 4em;
-}
-
-.headlines {
- font-size: 1.5em;
-}
+ max-width: 700px;
+ margin: 0 auto;
+} \ No newline at end of file
diff --git a/static/sass/custom/typography.scss b/static/sass/custom/typography.scss
index 019695d..f892c58 100644
--- a/static/sass/custom/typography.scss
+++ b/static/sass/custom/typography.scss
@@ -7,14 +7,34 @@ html {
font-size: $fontSize;
}
+.page {
+ font-size: $fontSize * 1.25;
+}
+
.headlines__title {
+ font-family: $fontFamily;
font-size: $fontSize * 1.5;
+ font-weight: bold;
+ margin: 0;
}
.headlines__baseline {
font-size: $fontSize;
}
-h1, h2, h3, h4, h5, h6 {
+h1, h3, h5 {
font-family: $fontFamilyAlternative;
+ line-height: $baseline / 1.5;
}
+
+h2, h4, h6 {
+ font-family: $fontFamily;
+ line-height: $baseline / 1.5;
+}
+
+h1 { font-size: $fontSize * 4.5; }
+h2 { font-size: $fontSize * 3; }
+h3 { font-size: $fontSize * 2.5; }
+h4 { font-size: $fontSize * 2; }
+h5 { font-size: $fontSize * 1.5; }
+h6 { font-size: $fontSize * 1; }