small step on features

This commit is contained in:
Torsten 2023-01-05 17:04:05 +02:00
parent e68188b1a8
commit fd302f5901
7 changed files with 26 additions and 3 deletions

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,8 @@
.max-w-md.sm:mx-auto.sm:text-center
.flex.items-center.justify-center.mb-4.rounded-full.mx-auto.w-40.h-40{options(card,:background )}
= image_for( card , "h-20 w-20")
%h6.mb-3.text-xl.font-bold.leading-5{options(card, :color)}= card.header
.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

View File

@ -63,6 +63,20 @@
- text_align - text_align
- button_link - button_link
- button_text - button_text
- template: card_feature_small
header: Card looking feature, smaller version
text: For things where no image is available or apropriate.
Making lists a little more interesting to look at.
May use svg as image.
fields:
- header
- text
options:
- background
- color
- text_align
- button_link
- button_text
- template: card_normal_round - template: card_normal_round
header: Standard card with rounded look header: Standard card with rounded look
text: Otherwise quite similar to standard. But there is gap under the image. text: Otherwise quite similar to standard. But there is gap under the image.

View File

@ -6,7 +6,7 @@
:id: 1 :id: 1
- :name: columns - :name: columns
:description: Number of columns in a layout that supports cards :description: Number of columns in a layout that supports cards
:values: 2 3 4 :values: 2 3 4 5 6
:default: 3 :default: 3
:id: 2 :id: 2
- :name: background - :name: background

View File

@ -37,7 +37,8 @@ class CardsTest < ActionDispatch::IntegrationTest
end end
def test_remove_image_force def test_remove_image_force
visit "merged/cards/6/set_image?image=''" first = Merged::Card.first.id
visit "merged/cards/#{first}/set_image?image=''"
assert_text page , "No image" assert_text page , "No image"
end end
end end

View File

@ -7,7 +7,7 @@ module Merged
end end
def test_has_all def test_has_all
assert_equal CardStyle.all.length , 6 assert CardStyle.all.length > 5
end end
def test_has_fields def test_has_fields