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{ .prose{
color: inherit; color: inherit;
--tw-prose-bullets: #6b7280;
} }

View File

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

View File

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

View File

@ -12,8 +12,15 @@
.basis-60 .basis-60
%h3.mt-4.text-lg.font-bold Card #{index + 1}:#{card.header} %h3.mt-4.text-lg.font-bold Card #{index + 1}:#{card.header}
.flex.flex-wrap .flex.flex-wrap
= blue_button( "Up" , merged.card_move_path(card.id , dir: :up) ) .p-2
= blue_button( "Down" , merged.card_move_path(card.id , dir: :down) ) =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 .mt-6
.basis-full.mt-3 .basis-full.mt-3
Updated at: 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.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")} .flex.justify-center.h-60.w-full.overflow-hidden{order_option(section, "lg:w-1/3")}
= image_for(section ,"object-cover") = 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"} .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")}
.flex-1{text_color_option(section)} %h2.text-4xl.font-bold.text-left.mb-4.lg:mb-8{text_align_option(section)}= section.header
%h2.text-4xl.font-bold.text-center.mb-4.lg:mb-8= section.header -if section.has_option?("subheader")
-if section.has_option?("subheader") %h4.text-xl.mt-4.lg:mt-8.md:text-2xl{text_align_option(card)}
%h4.text-xl.mt-4.lg:mt-8.md:text-2xl = section.option("subheader")
= section.option("subheader") .mt-3{ prose_classes }
.mt-3{ prose_classes } = markdown(section)
= markdown(section) =view_button(section , "my-2")
=view_button(section , "my-2")

View File

@ -4,5 +4,5 @@
%h3.px-4.mt-2.text-2xl.font-bold= card.header %h3.px-4.mt-2.text-2xl.font-bold= card.header
-if card.has_option?("subheader") -if card.has_option?("subheader")
%h4.p-4.text-xl= card.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_button(card , "mb-2")

View File

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

View File

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