From c2a12194d6daabf84facf85ae3953c34507dd8ca Mon Sep 17 00:00:00 2001 From: Edd Baldry Date: Wed, 22 Feb 2017 22:36:58 +0000 Subject: [PATCH] Equal height cards. Correcting image width. --- bakerydemo/static/css/main.css | 54 +++++++++++++++++++ .../templates/blog/blog_index_page.html | 13 ++--- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/bakerydemo/static/css/main.css b/bakerydemo/static/css/main.css index 4985495..3af7e3b 100644 --- a/bakerydemo/static/css/main.css +++ b/bakerydemo/static/css/main.css @@ -617,14 +617,59 @@ time.location-time { width: 48%; } +.blog-list-item { + display: flex; + flex-direction: column; +} + +.blog-list-item a { + display: flex; + flex-direction: column; +} + +.blog-list-item:hover img { + opacity: 0.3; +} + .blog-list-item .image { overflow: hidden; + background-color: #eb7400; } .blog-list-item .image img { width: auto; } +.blog-list-item .text { + background: linear-gradient(to bottom, rgba(100,100,100,0) 0%,rgba(100,100,100,0.9) 23%); + flex: 1 0 auto; + margin-top: -150px; + padding: 20px; + position: relative; + z-index: 1; +} + +.blog-list-item .text h2 { + color: #fff; + font-weight: 200; + margin-top: 0; +} + +.blog-list-item .text p { + color: #e3e3e3; + font-size: 0.8em; + margin-bottom: 0; +} + +.blog-list-item .footer { + background-color: #333; + color: #fff; + margin-top: 0; + padding: 20px; + position: relative; + z-index: 1; +} + /* No gutters */ .row.no-gutters { margin-right: 0; @@ -635,3 +680,12 @@ time.location-time { padding-right: 0; padding-left: 0; } + +/* Bootstrap Equal height rows */ +.row-eq-height { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + flex-wrap: wrap; +} diff --git a/bakerydemo/templates/blog/blog_index_page.html b/bakerydemo/templates/blog/blog_index_page.html index 3f432a1..d5d275e 100644 --- a/bakerydemo/templates/blog/blog_index_page.html +++ b/bakerydemo/templates/blog/blog_index_page.html @@ -15,19 +15,20 @@ {% endif %} -
+