From 67699929fb176bfb7f5509a82011b6a041a278fb Mon Sep 17 00:00:00 2001 From: relikd Date: Wed, 14 Apr 2021 22:37:47 +0200 Subject: [PATCH] Hide image carousel on mobile if no image is set --- src/assets/static/style.css | 1 + src/templates/recipe.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/assets/static/style.css b/src/assets/static/style.css index f8101bb..66c0069 100644 --- a/src/assets/static/style.css +++ b/src/assets/static/style.css @@ -147,6 +147,7 @@ a:hover .recipe-tile .hover { display: block; background: #0006 } */ .recipe h2 { font-size: 0.8em; margin: 0 0 1em 0 } .recipe #img-carousel { padding: 0 50px; margin: 0 -30px } +.recipe #img-carousel:empty { display: none; } .recipe #source { margin-left: -1em; margin-bottom: -1.5em } .recipe #metrics { float: right; margin: 0 0 15px 25px; max-width: 180px } .recipe #metrics > * { text-indent: -20px; margin-left: 20px; padding-top: 0.3em } diff --git a/src/templates/recipe.html b/src/templates/recipe.html index b0b2a1b..214206a 100644 --- a/src/templates/recipe.html +++ b/src/templates/recipe.html @@ -6,7 +6,7 @@ {% if this.source -%}