fix button and nil

This commit is contained in:
Hub Feenix Member 2023-01-14 14:45:31 +02:00
parent a8f5229935
commit 6344acec3c
6 changed files with 17 additions and 10 deletions

View File

@ -28,7 +28,7 @@
=page.updated_by
- s = page.sections_update
%td.whitespace-nowrap.px-4.py-2.text-gray-700
=distance_of_time_in_words_to_now(s.updated_at) if s
=distance_of_time_in_words_to_now(s&.updated_at) if s
%td.whitespace-nowrap.px-4.py-2.text-gray-700
=s.updated_by if s
%td.whitespace-nowrap.px-4.py-2

View File

@ -28,13 +28,13 @@
Updated by:
= section.updated_by
- if section.has_cards?
- card = section.cards_update
.basis-full
Cards updated at:
= distance_of_time_in_words_to_now(card.updated_at)
.basis-full.mb-3
Cards updated by:
= card.updated_by
- if card = section.cards_update
.basis-full
Cards updated at:
= distance_of_time_in_words_to_now(card.updated_at)
.basis-full.mb-3
Cards updated by:
= card.updated_by
.basis-full.mb-3
= form_tag( merged.section_path(section.id) , {method: :delete } ) do
=submit_button( "Delete" , true)

View File

@ -11,4 +11,5 @@
%p.mb-2.text-sm.text-gray-900{ prose_classes }
= markdown(card)
- if card.has_option?("button_link")
%a.inline-flex.items-center.text-sm.font-semibold.transition-colors.duration-200.text-deep-purple-accent-400.hover:text-deep-purple-800{"aria-label" => "", :href => "/"} Learn more
%a.inline-flex.items-center.text-sm.font-semibold.transition-colors.duration-200.text-deep-purple-accent-400.hover:text-deep-purple-800{"aria-label" => "", :href => "/"}
=card.option("button_text")

View File

@ -5,4 +5,5 @@
.mb-3.text-sm.text-gray-900{ prose_classes }
= markdown(card)
- if card.has_option?("button_link")
%a.inline-flex.items-center.font-semibold.transition-colors.duration-200.text-deep-purple-accent-400.hover:text-deep-purple-800{"aria-label" => "", :href => "/"} Learn more
%a.inline-flex.items-center.font-semibold.transition-colors.duration-200.text-deep-purple-accent-400.hover:text-deep-purple-800{"aria-label" => "", :href => card.option("button_link") }
=card.option("button_text")

View File

@ -6,3 +6,6 @@
-if card.has_option?("subheader")
%h4.p-4.text-xl= card.option("subheader")
.pose.mt-2.p-4= markdown(card)
- if card.has_option?("button_link")
%a.inline-flex.items-center.font-semibold.transition-colors.duration-200.text-deep-purple-accent-400.hover:text-deep-purple-800{"aria-label" => "", :href => card.option("button_link") }
=card.option("button_text")

View File

@ -37,6 +37,8 @@
- text_align
- subheader
- order
- button_link
- button_text
- template: card_wide_square
header: Sideway card with square image
text: Much like standard square card, just turned sideways.