some preose work, card up/down

This commit is contained in:
Torsten 2023-01-19 22:32:56 +02:00
parent 863e074f50
commit e7c6ea90f7
8 changed files with 39 additions and 14 deletions

View File

@ -4,4 +4,5 @@
.prose{
color: inherit;
--tw-prose-bullets: #6b7280;
}

View File

@ -1570,6 +1570,10 @@ select {
margin-top: 5rem;
}
.mt-0 {
margin-top: 0px;
}
.block {
display: block;
}
@ -2639,6 +2643,7 @@ select {
.prose{
color: inherit;
--tw-prose-bullets: #6b7280;
}
.hover\:scale-105:hover {
@ -2855,6 +2860,14 @@ select {
margin-right: 3rem;
}
.md\:mt-0 {
margin-top: 0px;
}
.md\:mt-6 {
margin-top: 1.5rem;
}
.md\:grid {
display: grid;
}
@ -2943,6 +2956,10 @@ select {
margin-bottom: 0px;
}
.lg\:mt-0 {
margin-top: 0px;
}
.lg\:h-96 {
height: 24rem;
}

View File

@ -34,7 +34,7 @@ module Merged
end
def has_cards?
! card_template.blank?
template_style.has_cards?
end
def move_up

View File

@ -12,8 +12,15 @@
.basis-60
%h3.mt-4.text-lg.font-bold Card #{index + 1}:#{card.header}
.flex.flex-wrap
= blue_button( "Up" , merged.card_move_path(card.id , dir: :up) )
= blue_button( "Down" , merged.card_move_path(card.id , dir: :down) )
.p-2
=link_to(merged.card_move_path(card.id , dir: :down)) do
%svg.w-6.h-6{:fill => "none", :stroke => "currentColor", "stroke-width" => "1.5", :viewbox => "0 0 24 24", :xmlns => "http://www.w3.org/2000/svg"}
%path{:d => "M8.25 6.75L12 3m0 0l3.75 3.75M12 3v18", "stroke-linecap" => "round", "stroke-linejoin" => "round"}
.p-2
=link_to(merged.card_move_path(card.id , dir: :up)) do
%svg.w-6.h-6{:fill => "none", :stroke => "currentColor", "stroke-width" => "1.5", :viewbox => "0 0 24 24", :xmlns => "http://www.w3.org/2000/svg"}
%path{:d => "M15.75 17.25L12 21m0 0l-3.75-3.75M12 21V3", "stroke-linecap" => "round", "stroke-linejoin" => "round"}
.mt-6
.basis-full.mt-3
Updated at:

View File

@ -1,12 +1,11 @@
.flex.justify-center.p-8.flex-col.lg:flex-row{options(section , :margin , :background )}
.flex.justify-center.h-60.w-full.overflow-hidden{order_option(section, "lg:w-1/3")}
= image_for(section ,"object-cover")
.columns-1.md:columns-2.max-w-full.items-center.w-full.max-w.px-6.mt-6.mx-auto{:class => "lg:w-2/3"}
.flex-1{text_color_option(section)}
%h2.text-4xl.font-bold.text-center.mb-4.lg:mb-8= section.header
-if section.has_option?("subheader")
%h4.text-xl.mt-4.lg:mt-8.md:text-2xl
= section.option("subheader")
.mt-3{ prose_classes }
= markdown(section)
=view_button(section , "my-2")
.columns-1.md:columns-2.max-w-full.items-center.w-full.max-w.px-6.mx-auto.mt-6.lg:mt-0{text_color_option(section, "lg:w-2/3")}
%h2.text-4xl.font-bold.text-left.mb-4.lg:mb-8{text_align_option(section)}= section.header
-if section.has_option?("subheader")
%h4.text-xl.mt-4.lg:mt-8.md:text-2xl{text_align_option(card)}
= section.option("subheader")
.mt-3{ prose_classes }
= markdown(section)
=view_button(section , "my-2")

View File

@ -4,5 +4,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)
.mt-2.p-4{prose_classes}= markdown(card)
=view_button(card , "mb-2")

View File

@ -137,6 +137,7 @@
- margin
- order
- text_color
- text_align
- background
- button_link
- button_text

View File

@ -12,7 +12,7 @@ module Merged
end
def prose_classes
classes = "prose lg:prose-lg "
classes = "prose md:prose-lg lg:prose-xl max-w-none "
classes += "prose-headings:text-inherit "
{ class: classes }
end