From 9e4461dd5a7233248794db38fb19a0e7a0aa1096 Mon Sep 17 00:00:00 2001 From: Jiena McLellan Date: Thu, 15 Jul 2021 23:41:10 -0400 Subject: [PATCH 1/2] forest theme with hover effect --- .../layouts/shortcodes/blogdown/postref.html | 1 + static/css/custom.css | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 exampleSite/layouts/shortcodes/blogdown/postref.html diff --git a/exampleSite/layouts/shortcodes/blogdown/postref.html b/exampleSite/layouts/shortcodes/blogdown/postref.html new file mode 100644 index 0000000..1b33d19 --- /dev/null +++ b/exampleSite/layouts/shortcodes/blogdown/postref.html @@ -0,0 +1 @@ +{{ if eq (getenv "BLOGDOWN_POST_RELREF") "true" }}{{ .Page.RelPermalink }}{{ else }}{{ .Page.Permalink }}{{ end }} \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index e69de29..951054c 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -0,0 +1,20 @@ +.article-list:hover{ + transform: translateY(5px); + transform: translateX(5px); + opacity: 90%; + box-shadow: 0 0 8px #9A9A9A; +} + +.menu { background: #284241; } + +.menu a, .pagination a, .article-meta a { + color: white; +} + +body{ + background: #E8F1F1; +} + +.container{ + background: #E8F1F1; +} \ No newline at end of file From d40e7d494177c869e2927cc41736f1e630535673 Mon Sep 17 00:00:00 2001 From: Jiena McLellan Date: Fri, 16 Jul 2021 23:44:54 -0400 Subject: [PATCH 2/2] add hover over summmary in card block --- layouts/_default/list.html | 13 +++++++++- static/css/custom.css | 51 +++++++++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d0ce76b..371cb96 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -49,6 +49,8 @@

{{ .Title }}

{{ with .Params.categories }} {{ range first 1 . }} +
+
@@ -59,7 +61,13 @@

{{ .Title }}

{{ if .Date }}{{ .Date.Format "2006-01-02" }}{{ end }} {{ with .Params.author }}{{ . }}{{ end }}
+ +
+

Aeroplane, generosity, sneak. Boat, nervous, find.

+
+
+
{{ $summary := .Description }} {{ if $summary }} {{ $summary = (markdownify $summary) }} @@ -67,8 +75,11 @@

{{ .Title }}

{{ $summary = ((delimit (findRE "((.|\n)*?

\\s*)+" .Content) "[…] ") | plainify | truncate (default 200 .Site.Params.summaryLength) (default " …" .Site.Params.textTruncated ) | replaceRE "&" "&") }} {{ end }} {{ $summary | replaceRE "^([A-Za-z])" "&$1 opf;" | replaceRE "^(&[A-Za-z]) (opf;)" "$1$2" | safeHTML }} - {{ i18n "readMore" }} →
+ {{ i18n "readMore" }} +
+
+ {{ if $.IsHome }} diff --git a/static/css/custom.css b/static/css/custom.css index 951054c..6720ec8 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -17,4 +17,53 @@ body{ .container{ background: #E8F1F1; -} \ No newline at end of file +} + + + +.postCardFront{ + display: block; + width: 100%; + height: auto; +} + +.summary { + position: absolute; + bottom: 0; + left: 0; + right: 0; + overflow: hidden; + background-color: #284241; + color: white; + width: 100%; + height: 0; + transition: .5s ease; + } + + .postShort:hover .summary { + height: 100%; + } + + .summaryText{ + padding-left: 10px; + padding-right:60px; + padding-top:20px + } + + .more{ + padding: 0.25rem; + outline: none; + border: none; + border-radius: 3px; + background: white; + color: black; + font-weight: bold; + cursor: pointer; + transition: 0.4s ease; + margin-left: 10px; + } + + .more:hover{ + background: dodgerblue; + color: white + }