From c78c8e7393c67cd4b363c497466024a5f5cd8ed5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Fri, 6 Apr 2018 20:56:42 +0100 Subject: [PATCH] Allow css transformations of title in config By default the style uppercases the title, which forces a style choice to the user. We can add extra css but that might be overkill for just one change: For example, not capitalizing the title default. This allows the title to be fully lowercase, by simply overriding the theme configuration. --- layouts/partials/css/main.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/layouts/partials/css/main.css b/layouts/partials/css/main.css index a27c991..5d8aa8b 100644 --- a/layouts/partials/css/main.css +++ b/layouts/partials/css/main.css @@ -165,7 +165,15 @@ div.header .name { font-size: 28px; font-family: 'Nexa Bold', 'Helvetica Neue', 'Arial', sans-serif; letter-spacing: -0.005rem; + {{ if isset .Site.Params "title_style" }} + {{ if in "capitalize uppercase lowercase none full-width" .Site.Params.title_style }} + text-transform: {{ .Site.Params.title_style }}; + {{ else }} + {{ errorf "This title_style is not a valid text-transform css parameter: %s" .Site.Params.title_style }} + {{ end }} + {{ else }} text-transform: uppercase; + {{ end }} -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; font-smoothing: antialiased;