From 031c9953101b076097a1efde38eb6b0a74e542d9 Mon Sep 17 00:00:00 2001 From: vimux Date: Sat, 10 Mar 2018 07:40:22 +0300 Subject: [PATCH] Add card layout for list pages --- layouts/_default/list.html | 2 +- layouts/_default/summary.html | 2 +- static/css/main.css | 41 +++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ec21e3f..eb81b25 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -8,7 +8,7 @@ {{ end }}
{{ range .Paginator.Pages }} -
+
{{ .Render "summary" }}
{{ end }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index c066a06..48c6f7b 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -1,4 +1,4 @@ -
+

{{ .Title }}

{{- .Summary }}
diff --git a/static/css/main.css b/static/css/main.css index 1e85e3b..da9adc7 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -411,6 +411,47 @@ mark { text-decoration: none; } +/* Cards UI*/ +.cards { + display: flex; + flex-wrap: wrap; +} + +.card { + display: flex; + width: 100%; + padding: 3px 0; +} + +@media screen and (min-width: 480px) { + .card { + padding: 5px; + } +} + +@media screen and (min-width: 720px) { + .card--2col { + width: 50%; + } + + .card--3col { + width: 50%; + } +} + +@media screen and (min-width: 860px) { + .card--3col { + width: 33.333%; + } +} + +.card__box { + display: flex; + flex-direction: column; + width: 100%; + margin: 0; +} + /* Taxonomies */ .page__title { margin-bottom: 0;