From fe57713d280a249b56d35324e93b249b9c37fc46 Mon Sep 17 00:00:00 2001 From: Leonardo Faria Date: Tue, 27 Oct 2020 19:45:53 -0700 Subject: Improve typography --- assets/css/site.css | 7 ++++++- assets/css/tailwind.config.js | 39 +++++++++++++++++++++++++++++++++++++-- layouts/_default/single.html | 2 +- layouts/partials/head.html | 3 +++ layouts/partials/header.html | 4 ++-- 5 files changed, 49 insertions(+), 6 deletions(-) diff --git a/assets/css/site.css b/assets/css/site.css index 084fe8f..d5c0c53 100644 --- a/assets/css/site.css +++ b/assets/css/site.css @@ -52,7 +52,7 @@ html { .article { @apply px-5; @apply pb-5; - @apply text-gray-500; + @apply text-gray-600; } .article__header { @@ -65,6 +65,10 @@ html { @apply mb-4; } +.article__content > p:first-of-type { + @apply text-2xl; +} + .article a { @apply underline; @apply text-gray-700; @@ -85,6 +89,7 @@ html { .article h1 { @apply text-5xl; @apply font-semibold; + @apply tracking-tighter; @apply text-gray-700; } diff --git a/assets/css/tailwind.config.js b/assets/css/tailwind.config.js index 6e75cf0..ac6d7f2 100644 --- a/assets/css/tailwind.config.js +++ b/assets/css/tailwind.config.js @@ -1,9 +1,44 @@ module.exports = { theme: { - extend: {} + fontFamily: { + sans: [ + 'Inter', + 'system-ui', + '-apple-system', + 'BlinkMacSystemFont', + 'Segoe UI', + 'Roboto', + 'Helvetica Neue', + 'Arial', + 'Noto Sans', + 'sans-serif', + 'Apple Color Emoji', + 'Segoe UI Emoji', + 'Segoe UI Symbol', + 'Noto Color Emoji', + ], + serif: [ + 'Georgia', + 'Cambria', + 'Times New Roman', + 'Times', + 'serif', + ], + mono: [ + 'Menlo', + 'Monaco', + 'Consolas', + 'Liberation Mono', + 'Courier New', + 'monospace' + ] + }, }, variants: {}, plugins: [ require('@tailwindcss/ui'), - ] + ], + future: { + removeDeprecatedGapUtilities: true, + }, } diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 60bc230..0409b26 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -16,7 +16,7 @@ {{ end }} -
+
{{ .Content }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 79a4489..0eada8b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -83,6 +83,9 @@ {{ hugo.Generator }} + + + {{ if .Site.IsServer }} {{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/dev/postcss.config.js") }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 9a913f4..472daa8 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -23,7 +23,7 @@ {{ .Site.Title }} {{ end }} {{ end }} - + {{ .Site.Title }} @@ -36,7 +36,7 @@ {{else}}