From 25344ccd14d24438e67b22b23dd1691a3932494f Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sun, 27 Aug 2023 17:10:39 +1000 Subject: [PATCH] Conditional trip summary --- app/templates/trips/show.html.slim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/templates/trips/show.html.slim b/app/templates/trips/show.html.slim index 4467742..4ac1c87 100644 --- a/app/templates/trips/show.html.slim +++ b/app/templates/trips/show.html.slim @@ -4,8 +4,9 @@ div class="mb-4 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:t h1 class="mb-0" #{trip.name} / p class="mt-2" class="text-gray-600 dark:text-gray-200 text-sm" (#{trip.start_date} - #{trip.end_date}) -div class="mb-4 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200 bg-gray-100 p-2 rounded prose-p:mb-0 prose-ul:mt-0" - == trip.summary +- if trip.summary + div class="mb-4 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200 bg-gray-100 p-2 rounded prose-p:mb-0 prose-ul:mt-0" + == trip.summary div class="h-feed mb-12 max-w-prose mx-auto" - posts.each do |post|