Compare commits

..

5 commits

Author SHA1 Message Date
59d14d98e4 V1.2.0 2020-04-28 08:41:39 +02:00
b5e4178324 Make the footer multilines view variable 2020-04-28 08:40:17 +02:00
c76fa98be3 Fix the navbar height 2020-04-28 08:10:37 +02:00
2575097323 Fix the theme name 2020-04-28 07:48:45 +02:00
7b8f3b98d7 Set v1.1.0 2020-04-28 07:43:24 +02:00
6 changed files with 54 additions and 27 deletions

View file

@ -5,6 +5,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
## [1.2.0] - 2020-04-28
### Added
* Footer height in multilines view is now dependant of params.contact variable.
### Changed
* Export the CSS variable modification to a new partial *style.css*.
### Fixed
* Fix the navbar height.
## [1.1.0] - 2020-04-28
### Added ### Added
* Option to set color variables in config.toml. Options are: * Option to set color variables in config.toml. Options are:
* **font**, general font color, default to *black*; * **font**, general font color, default to *black*;
@ -12,7 +24,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* **main**, theme color, used for footer among others, default to *grey*; * **main**, theme color, used for footer among others, default to *grey*;
* **font_above**, used for font above *main* color, default to *white*. * **font_above**, used for font above *main* color, default to *white*.
### Changed
* Change the height of the navbar, use vh now.
### Fixed
* Viewport size on mobile.
## [1.0.0] - 2020-04-27 ## [1.0.0] - 2020-04-27
### Added ### Added
* First version of the theme.
* First version of the theme

View file

@ -10,7 +10,7 @@ to your site's theme directory.
```bash ```bash
$ mkdir themes $ mkdir themes
$ cd themes $ cd themes
$ git clone https://git.vulgarisons.info/raghnarok/hugo_idunn.git simple-site $ git clone https://git.vulgarisons.info/raghnarok/hugo_idunn.git idunn
``` ```
Don't forget to change the theme in your config.toml file. Don't forget to change the theme in your config.toml file.

View file

@ -1,15 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr"> <html lang="fr">
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
{{ if .Site.Params.colors }} {{- partial "style.html" . -}}
<style>
:root {
{{ range $key, $val := .Site.Params.colors }}
--{{ $key }}-color: {{ $val }};
{{ end }}
}
</style>
{{ end }}
<body> <body>
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}

View file

@ -0,0 +1,13 @@
<style>
:root {
{{ if .Site.Params.colors }}
{{ range $key, $val := .Site.Params.colors }}
--{{ $key }}-color: {{ $val }};
{{ end }}
{{ end }}
{{ if .Site.Params.contact }}
--footer-height-block: {{ mul (add (len .Site.Params.contact) 2) 2 }}em;
{{ end }}
}
</style>

View file

@ -11,6 +11,7 @@
--footer-height-inline: 4em; --footer-height-inline: 4em;
--footer-height-block: 8em; --footer-height-block: 8em;
--navbar-height: 8vh; --navbar-height: 8vh;
} }
@ -168,28 +169,27 @@ body {
#navigation .menu-button { #navigation .menu-button {
float: right; float: right;
position:relative; position:relative;
display: none;
width: 4em; width: 4em;
height: 4em; height: 4em;
cursor: pointer;
max-height: var(--navbar-height);
} }
#navigation .menu-button-inner { #navigation .menu-button-inner {
width: 3em; width: 100%;
height: 3em; height: 100%;
position:relative; position:relative;
top: 0.5em;
left: 0.5em;
text-align:center text-align:center
} }
#navigation .menu-button .menu-button-image { #navigation .menu-button .menu-button-image {
display: inline-block; display: inline-block;
position: relative; position: absolute;
height: 20px; height: 20px;
width: 24px; width: 24px;
top: 14px; top: 50%;
left: 50%;
background-image: url(../svg/bars.svg); background-image: url(../svg/bars.svg);
background-size: contain; background-size: contain;
margin: auto; transform: translateX(-50%) translateY(-50%);
vertical-align: top;
} }
#menu-toggle:checked + .menu-button .menu-button-image { #menu-toggle:checked + .menu-button .menu-button-image {
opacity: 40%; opacity: 40%;
@ -225,10 +225,6 @@ body {
opacity: 1; opacity: 1;
max-height: max-content; max-height: max-content;
} }
#navigation .menu-button {
display: block;
cursor: pointer;
}
/******************* Front-screen *******************/ /******************* Front-screen *******************/
.front-screen { .front-screen {

View file

@ -1,10 +1,18 @@
/******************* Main layout *******************/ /******************* Main layout *******************/
@media only screen and (max-width: 320px) {
html {
font-size: smaller;
}
}
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.post { .post {
margin-bottom: calc(-1 * var(--footer-height-block)); margin-bottom: calc(-1 * var(--footer-height-block));
} }
.post_body { .post_body,
margin: 0 1em; .post_header {
padding: 0 1em;
width: 100%;
} }
.post:after { .post:after {
height: var(--footer-height-block); height: var(--footer-height-block);
@ -21,6 +29,7 @@
} }
.front-screen { .front-screen {
margin-left: 1em; margin-left: 1em;
margin-right: 1em;
padding-left: 0; padding-left: 0;
} }
.section { .section {