diff --git a/CHANGELOG.md b/CHANGELOG.md index d440cd5..9d7d0b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,2 @@ -- BREAKING - - remove `geekblogAnchorLeft`; - for a better spacing left-side anchors were removed -- INTERNAL - - upgrade CI pipeline to use Hugo v0.74.3 +- ENHANCEMENT + - improve and normalize microblog formatting diff --git a/layouts/posts/list.html b/layouts/posts/list.html index 33ff7ab..cdbe39d 100644 --- a/layouts/posts/list.html +++ b/layouts/posts/list.html @@ -1,21 +1,26 @@ {{ define "main" }} - {{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }} - {{ range sort .Paginator.Pages }} + {{ range .Paginator.Pages }}
-
-

- {{ .Title }} -

- +
+

{{ .Title }}

+
-
+
{{ .Summary }} - {{ if .Truncated }} - - Read full post - - {{ end }} +
+ {{ if .Truncated }} +
+ Read full post
+ {{ end }}
{{ end }} {{ end }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 2ecc822..2bf1f42 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -1,9 +1,16 @@ {{ define "main" }} - {{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }}
-
+

{{ .Title }}

- +
{{ partial "content" . }} diff --git a/src/sass/_base.scss b/src/sass/_base.scss index 3ceda54..b18eb05 100644 --- a/src/sass/_base.scss +++ b/src/sass/_base.scss @@ -35,19 +35,12 @@ h6 { font-weight: $body-font-weight; display: flex; align-items: center; - - > code { - border-top: 3px solid $gray-300; - font-size: 0.75em !important; - } } h4, h5, h6 { - > code { - font-size: 0.8rem !important; - } + font-size: 1rem !important; } a { @@ -67,6 +60,14 @@ img { vertical-align: middle; } +.fake-link:hover { + background-image: linear-gradient($color-link, $color-link); + background-position: 0 100%; + background-size: 100% 1px; + background-repeat: no-repeat; + text-decoration: none; +} + .wrapper { display: flex; flex-direction: column; @@ -273,19 +274,37 @@ img { .gdoc-post { word-wrap: break-word; border-top: 1px dashed $gray-600; - padding-bottom: 1em; + padding: $padding-32 0; line-height: 1.5; - &__title { + &:first-of-type { + padding-top: 0; + } + + &__header { + h1 { + margin-top: 0; + } + a, a:visited { color: $body-font-color; + text-decoration: none; + } + + a:hover { + background: none; + text-decoration: underline; + color: $body-font-color; } } &__date { - font-weight: bold; margin: 1em 0; + + .icon { + font-size: 1.2em; + } } &:first-child { @@ -297,16 +316,18 @@ img { } &__readmore { - margin-top: 1em; - color: $color-link; - display: block; + margin: 1.5rem 0 2rem 0; - &:visited { - color: $color-link; + a:after { + font-family: GeekdocIcons; + content: "\ea02"; } - &:after { - content: "\1f82a"; + a, + a:hover, + a:visited { + color: $color-link; + text-decoration: none !important; } } } diff --git a/src/sass/_markdown.scss b/src/sass/_markdown.scss index 8b56468..73fd18f 100644 --- a/src/sass/_markdown.scss +++ b/src/sass/_markdown.scss @@ -20,24 +20,20 @@ h4, h5, h6 { - font-weight: normal; - line-height: 1em; - margin-top: 1.5em; - margin-bottom: $padding-16; + font-weight: 600; + + > code { + border-top: 3px solid $gray-300; + font-size: 0.75em !important; + } } h4, h5, h6 { - font-weight: bolder; - } - - h5 { - font-size: 0.875em; - } - - h6 { - font-size: 0.75em; + > code { + font-size: 0.8rem !important; + } } b, diff --git a/src/sass/_utils.scss b/src/sass/_utils.scss index d7e123a..8d97508 100644 --- a/src/sass/_utils.scss +++ b/src/sass/_utils.scss @@ -6,6 +6,10 @@ flex: 1 1 auto; } +.flex-inline { + display: inline-flex; +} + .flex-even { flex: 1 1; }