only move cards within same page

This commit is contained in:
Torsten 2023-01-25 15:16:32 +02:00
parent bafe142a3b
commit 594f2b5dce
5 changed files with 25 additions and 120 deletions

View File

@ -1380,14 +1380,6 @@ select {
order: 9999; order: 9999;
} }
.order-2 {
order: 2;
}
.order-3 {
order: 3;
}
.col-span-2 { .col-span-2 {
grid-column: span 2 / span 2; grid-column: span 2 / span 2;
} }
@ -1432,10 +1424,6 @@ select {
margin: 1.5rem; margin: 1.5rem;
} }
.m-4 {
margin: 1rem;
}
.mx-20 { .mx-20 {
margin-left: 5rem; margin-left: 5rem;
margin-right: 5rem; margin-right: 5rem;
@ -1451,16 +1439,16 @@ select {
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
} }
.mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.mx-auto { .mx-auto {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.mx-4 { .mx-4 {
margin-left: 1rem; margin-left: 1rem;
margin-right: 1rem; margin-right: 1rem;
@ -1516,11 +1504,6 @@ select {
margin-bottom: 5rem; margin-bottom: 5rem;
} }
.mx-6 {
margin-left: 1.5rem;
margin-right: 1.5rem;
}
.mt-2 { .mt-2 {
margin-top: 0.5rem; margin-top: 0.5rem;
} }
@ -1761,8 +1744,8 @@ select {
min-width: 100%; min-width: 100%;
} }
.max-w-screen-2xl { .max-w-\[1920px\] {
max-width: 1536px; max-width: 1920px;
} }
.max-w-xl { .max-w-xl {
@ -1789,10 +1772,6 @@ select {
max-width: 28rem; max-width: 28rem;
} }
.max-w-\[1920px\] {
max-width: 1920px;
}
.flex-1 { .flex-1 {
flex: 1 1 0%; flex: 1 1 0%;
} }
@ -1933,6 +1912,10 @@ select {
justify-content: space-between; justify-content: space-between;
} }
.gap-8 {
gap: 2rem;
}
.gap-16 { .gap-16 {
gap: 4rem; gap: 4rem;
} }
@ -1961,18 +1944,10 @@ select {
gap: 5rem; gap: 5rem;
} }
.gap-8 {
gap: 2rem;
}
.gap-12 { .gap-12 {
gap: 3rem; gap: 3rem;
} }
.gap-5 {
gap: 1.25rem;
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) { .space-y-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0; --tw-space-y-reverse: 0;
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
@ -2349,11 +2324,6 @@ select {
object-fit: cover; object-fit: cover;
} }
.object-fill {
-o-object-fit: fill;
object-fit: fill;
}
.p-4 { .p-4 {
padding: 1rem; padding: 1rem;
} }
@ -2730,6 +2700,7 @@ select {
} }
.prose { .prose {
max-width: 100%;
color: inherit; color: inherit;
--tw-prose-bullets: #6b7280; --tw-prose-bullets: #6b7280;
--tw-prose-headings: inherit; --tw-prose-headings: inherit;
@ -2918,10 +2889,6 @@ select {
margin: 2rem; margin: 2rem;
} }
.md\:m-4 {
margin: 1rem;
}
.md\:my-10 { .md\:my-10 {
margin-top: 2.5rem; margin-top: 2.5rem;
margin-bottom: 2.5rem; margin-bottom: 2.5rem;
@ -2961,16 +2928,12 @@ select {
flex-direction: row; flex-direction: row;
} }
.md\:gap-8 {
gap: 2rem;
}
.md\:gap-12 { .md\:gap-12 {
gap: 3rem; gap: 3rem;
} }
.md\:gap-10 { .md\:gap-8 {
gap: 2.5rem; gap: 2rem;
} }
.md\:p-12 { .md\:p-12 {
@ -3007,35 +2970,11 @@ select {
margin: 3rem; margin: 3rem;
} }
.lg\:m-6 {
margin: 1.5rem;
}
.lg\:mx-20 { .lg\:mx-20 {
margin-left: 5rem; margin-left: 5rem;
margin-right: 5rem; margin-right: 5rem;
} }
.lg\:mx-0 {
margin-left: 0px;
margin-right: 0px;
}
.lg\:mx-1 {
margin-left: 0.25rem;
margin-right: 0.25rem;
}
.lg\:mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.lg\:mx-10 {
margin-left: 2.5rem;
margin-right: 2.5rem;
}
.lg\:mb-8 { .lg\:mb-8 {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
@ -3056,10 +2995,6 @@ select {
margin-left: 2.5rem; margin-left: 2.5rem;
} }
.lg\:mt-6 {
margin-top: 1.5rem;
}
.lg\:h-96 { .lg\:h-96 {
height: 24rem; height: 24rem;
} }
@ -3109,18 +3044,14 @@ select {
align-items: center; align-items: center;
} }
.lg\:gap-12 {
gap: 3rem;
}
.lg\:gap-20 {
gap: 5rem;
}
.lg\:gap-16 { .lg\:gap-16 {
gap: 4rem; gap: 4rem;
} }
.lg\:gap-12 {
gap: 3rem;
}
.lg\:px-8 { .lg\:px-8 {
padding-left: 2rem; padding-left: 2rem;
padding-right: 2rem; padding-right: 2rem;
@ -3148,19 +3079,6 @@ select {
margin-right: auto; margin-right: auto;
} }
.xl\:mx-0 {
margin-left: 0px;
margin-right: 0px;
}
.xl\:w-3\/5 {
width: 60%;
}
.xl\:w-2\/5 {
width: 40%;
}
.xl\:columns-4 { .xl\:columns-4 {
-moz-columns: 4; -moz-columns: 4;
columns: 4; columns: 4;
@ -3169,19 +3087,4 @@ select {
.xl\:grid-cols-6 { .xl\:grid-cols-6 {
grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-columns: repeat(6, minmax(0, 1fr));
} }
.xl\:flex-row {
flex-direction: row;
}
.xl\:gap-16 {
gap: 4rem;
}
}
@media (min-width: 1536px) {
.\32xl\:mx-auto {
margin-left: auto;
margin-right: auto;
}
} }

View File

@ -1,4 +1,5 @@
.prose { .prose {
max-width: 100%;
color: inherit; color: inherit;
--tw-prose-bullets: #6b7280; --tw-prose-bullets: #6b7280;
--tw-prose-headings: inherit; --tw-prose-headings: inherit;

View File

@ -2,8 +2,9 @@ module Merged
module CardsHelper module CardsHelper
include ViewHelper #for previews include ViewHelper #for previews
def card_section_select def card_section_select(card)
Section.where.not(card_template: "").collect{|s| ["#{s.page&.name}: #{s.header}" , s.id]} card_sections = card.section.page.sections.where.not(card_template: "")
card_sections.collect{|s| [s.header , s.id]}
end end
end end
end end

View File

@ -33,8 +33,8 @@
= form_for( card , {method: :delete } ) do = form_for( card , {method: :delete } ) do
%button.button.remove.mt-4{type: :submit} Delete Card %button.button.remove.mt-4{type: :submit} Delete Card
= simple_form_for( card , method: :patch ) do |f| = simple_form_for( card , method: :patch ) do |f|
= f.input :section_id , label: "move to section" , include_blank: false , = f.input :section_id , label: "move to section (on this page)" , include_blank: false ,
collection: card_section_select collection: card_section_select(card)
%button.button.change.mt-4{type: :submit} Move %button.button.change.mt-4{type: :submit} Move
.basis-80 .basis-80

View File

@ -1,4 +1,4 @@
.fex.flex-col.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm.m-10 .fex.flex-col.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm
= image_for( card , class: "h-full w-full object-cover") = image_for( card , class: "h-full w-full object-cover")
%h3.p-5.text-2xl.bg-gray-100.text-black.font-bold{ text_align_option(card)}= card.header %h3.p-5.text-2xl.bg-gray-100.text-black.font-bold{ text_align_option(card)}= card.header
%div.h-full{background_option(card)} %div.h-full{background_option(card)}