new card style
This commit is contained in:
BIN
app/assets/images/merged/card_preview/card_wide_square.png
Normal file
BIN
app/assets/images/merged/card_preview/card_wide_square.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 361 KiB |
@ -4,10 +4,13 @@ module Merged
|
||||
# use options with as many option names as neccessary
|
||||
def options(section, *args )
|
||||
all = {}
|
||||
extra_class = ""
|
||||
extra_class = args.pop if args.last.is_a?(String)
|
||||
args.each do |option_name|
|
||||
hash = send "#{option_name}_option".to_sym , section
|
||||
all.merge!(hash) { |key, one, two| one.to_s + " " + two.to_s }
|
||||
end
|
||||
all[:class] = all[:class] + " #{extra_class}"
|
||||
all
|
||||
end
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
.m-4.md:m-8.lg:m-12{background_option(card)}
|
||||
= image_for( card , "h-96 w-full object-cover")
|
||||
.m-6{options(card , :text_align , :color)}
|
||||
%div{ order_option(card)}
|
||||
= image_for( card , "h-96 w-full object-cover")
|
||||
.m-6{options(card , :text_align , :color , :order)}
|
||||
%h3.p-4.text-2xl.font-bold= card.header
|
||||
-if card.has_option?("subheader")
|
||||
%h4.p-4.text-xl= card.option("subheader")
|
||||
%p.pose.mt-2.p-4= markdown(card)
|
||||
.pose.mt-2.p-4= markdown(card)
|
||||
|
7
app/views/merged/view/cards/_card_wide_square.haml
Normal file
7
app/views/merged/view/cards/_card_wide_square.haml
Normal file
@ -0,0 +1,7 @@
|
||||
.flex.m-2.md:flex-row.md:m-4.lg:m-6{background_option(card)}
|
||||
= image_for( card , "object-cover w-3/5")
|
||||
.mx-6{options(card , :text_align , :color , :order , "w-2/5")}
|
||||
%h3.px-4.mt-2.text-2xl.font-bold= card.header
|
||||
-if card.has_option?("subheader")
|
||||
%h4.p-4.text-xl= card.option("subheader")
|
||||
.pose.mt-2.p-4= markdown(card)
|
Reference in New Issue
Block a user