This commit is contained in:
Torsten 2023-01-10 11:39:21 +02:00
parent 68179949c8
commit 4e2c0c9687
6 changed files with 61 additions and 62 deletions

View File

@ -1,3 +1,7 @@
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
.prose{
color: inherit;
}

View File

@ -1389,19 +1389,19 @@ select {
margin: 1rem; margin: 1rem;
} }
.my-3 {
margin-top: 0.75rem;
margin-bottom: 0.75rem;
}
.mx-20 { .mx-20 {
margin-left: 5rem; margin-left: 5rem;
margin-right: 5rem; margin-right: 5rem;
} }
.my-10 { .my-6 {
margin-top: 2.5rem; margin-top: 1.5rem;
margin-bottom: 2.5rem; margin-bottom: 1.5rem;
}
.my-3 {
margin-top: 0.75rem;
margin-bottom: 0.75rem;
} }
.mx-2 { .mx-2 {
@ -1414,21 +1414,26 @@ select {
margin-right: auto; margin-right: auto;
} }
.my-4 {
margin-top: 1rem;
margin-bottom: 1rem;
}
.mx-4 { .mx-4 {
margin-left: 1rem; margin-left: 1rem;
margin-right: 1rem; margin-right: 1rem;
} }
.my-4 {
margin-top: 1rem;
margin-bottom: 1rem;
}
.mx-40 { .mx-40 {
margin-left: 10rem; margin-left: 10rem;
margin-right: 10rem; margin-right: 10rem;
} }
.my-10 {
margin-top: 2.5rem;
margin-bottom: 2.5rem;
}
.mx-0 { .mx-0 {
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
@ -1464,19 +1469,10 @@ select {
margin-right: 1.5rem; margin-right: 1.5rem;
} }
.my-6 {
margin-top: 1.5rem;
margin-bottom: 1.5rem;
}
.mr-3 { .mr-3 {
margin-right: 0.75rem; margin-right: 0.75rem;
} }
.ml-20 {
margin-left: 5rem;
}
.mt-2 { .mt-2 {
margin-top: 0.5rem; margin-top: 0.5rem;
} }
@ -1485,10 +1481,18 @@ select {
margin-top: 0.25rem; margin-top: 0.25rem;
} }
.mb-2 {
margin-bottom: 0.5rem;
}
.mt-4 { .mt-4 {
margin-top: 1rem; margin-top: 1rem;
} }
.mt-6 {
margin-top: 1.5rem;
}
.mt-3 { .mt-3 {
margin-top: 0.75rem; margin-top: 0.75rem;
} }
@ -1509,6 +1513,10 @@ select {
margin-bottom: 0px; margin-bottom: 0px;
} }
.ml-20 {
margin-left: 5rem;
}
.mr-10 { .mr-10 {
margin-right: 2.5rem; margin-right: 2.5rem;
} }
@ -1533,12 +1541,8 @@ select {
margin-right: 0.5rem; margin-right: 0.5rem;
} }
.mt-6 { .mb-10 {
margin-top: 1.5rem; margin-bottom: 2.5rem;
}
.mb-2 {
margin-bottom: 0.5rem;
} }
.mt-16 { .mt-16 {
@ -1549,10 +1553,6 @@ select {
margin-top: 2.5rem; margin-top: 2.5rem;
} }
.mb-10 {
margin-bottom: 2.5rem;
}
.mb-6 { .mb-6 {
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
@ -1873,6 +1873,10 @@ select {
gap: 1rem; gap: 1rem;
} }
.gap-8 {
gap: 2rem;
}
.gap-10 { .gap-10 {
gap: 2.5rem; gap: 2.5rem;
} }
@ -1885,14 +1889,6 @@ select {
gap: 3rem; gap: 3rem;
} }
.gap-8 {
gap: 2rem;
}
.gap-20 {
gap: 5rem;
}
.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)));
@ -2161,11 +2157,6 @@ select {
background-color: transparent; background-color: transparent;
} }
.bg-orange-200 {
--tw-bg-opacity: 1;
background-color: rgb(254 215 170 / var(--tw-bg-opacity));
}
.bg-blue-200 { .bg-blue-200 {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(191 219 254 / var(--tw-bg-opacity)); background-color: rgb(191 219 254 / var(--tw-bg-opacity));
@ -2271,9 +2262,9 @@ select {
padding-right: 5rem; padding-right: 5rem;
} }
.py-10 { .py-6 {
padding-top: 2.5rem; padding-top: 1.5rem;
padding-bottom: 2.5rem; padding-bottom: 1.5rem;
} }
.px-3 { .px-3 {
@ -2291,16 +2282,16 @@ select {
padding-bottom: 2rem; padding-bottom: 2rem;
} }
.px-2 {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
.px-5 { .px-5 {
padding-left: 1.25rem; padding-left: 1.25rem;
padding-right: 1.25rem; padding-right: 1.25rem;
} }
.px-2 {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
.py-1\.5 { .py-1\.5 {
padding-top: 0.375rem; padding-top: 0.375rem;
padding-bottom: 0.375rem; padding-bottom: 0.375rem;
@ -2336,11 +2327,6 @@ select {
padding-bottom: 1rem; padding-bottom: 1rem;
} }
.py-6 {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
.pr-12 { .pr-12 {
padding-right: 3rem; padding-right: 3rem;
} }
@ -2591,6 +2577,10 @@ select {
transition-timing-function: cubic-bezier(0.4, 0, 1, 1); transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
} }
.prose{
color: inherit;
}
.hover\:scale-105:hover { .hover\:scale-105:hover {
--tw-scale-x: 1.05; --tw-scale-x: 1.05;
--tw-scale-y: 1.05; --tw-scale-y: 1.05;

View File

@ -1,8 +1,12 @@
module Merged module Merged
module PagesHelper module PagesHelper
def last_blog def self.last_blog
blog = Page.where(type: :blog).order(updated_at: :asc).first blog = Page.where(type: :blog).order(updated_at: :asc).first
blog&.sections.last return nil unless blog
blog.sections.last
end
def last_blog
self.class.last_blog
end end
def header_list def header_list

View File

@ -3,7 +3,7 @@
= @page.type.capitalize = @page.type.capitalize
.text-xl.font-bold.text-gray-900 .text-xl.font-bold.text-gray-900
=@page.name =@page.name
%strong.rounded.bg-green-100.px-3.text-xs.font-medium.text-green-700{:class => "py-1.5"} %strong.rounded.bg-green-100.px-4.py-2.text-lg.font-medium.text-green-700{:class => "py-1.5"}
= link_to 'Sections', merged.page_sections_path(@page.id) = link_to 'Sections', merged.page_sections_path(@page.id)
.text-xl= distance_of_time_in_words_to_now(@page.updated_at) .text-xl= distance_of_time_in_words_to_now(@page.updated_at)

View File

@ -8,7 +8,7 @@
-@page.sections.each do |section | -@page.sections.each do |section |
.flex.gap-10.mt-2{class: (section.index%2)==1 ? 'bg-cyan-50' : 'bg-red-50' , id: "section_#{section.id}"} .flex.gap-10.mt-2{class: (section.index%2)==1 ? 'bg-cyan-50' : 'bg-red-50' , id: "section_#{section.id}"}
.basis-72.mx-20 .basis-72.ml-20
%h3.mt-4.text-lg.font-bold Section #{section.index} : #{section.header} %h3.mt-4.text-lg.font-bold Section #{section.index} : #{section.header}
.flex.flex-wrap .flex.flex-wrap
= yellow_button("Edit" , merged.section_path(section.id) ) = yellow_button("Edit" , merged.section_path(section.id) )

View File

@ -1,5 +1,6 @@
.mx-20.flex.h-16.items-center.gap-16 .mx-20.flex.h-16.items-center.gap-16
= render "sections_pagination" , section: @section = render "sections_pagination" , section: @section
= link_to( "New Section" , merged.new_page_section_path(@section.page.id) , class: "p-2 border border-gray-200 bg-cyan-100 font-bold rounded-lg hover:bg-sky-100")
- template = find_template(@section) - template = find_template(@section)
= render( template , section: @section) = render( template , section: @section)