rename color to text_color

This commit is contained in:
Torsten 2023-01-19 00:07:52 +02:00
parent 2141941f8d
commit 6a8dc3f8c6
23 changed files with 54 additions and 54 deletions

View File

@ -81,8 +81,8 @@ module Merged
{class: clazz}
end
def color_option(section , clazz = "")
if section.has_option?("color")
def text_color_option(section , clazz = "")
if section.has_option?("text_color")
clazz += color_for(section)
end
{class: clazz }
@ -163,7 +163,7 @@ module Merged
"solid_petrol" => " text-teal-700" ,
"solid_indigo" => " text-indigo-800" ,
"solid_black" => " text-slate-800" ,
}[section.option("color")] || ""
}[section.option("text_color")] || ""
end
# need full color names for tailwind to pick it up

View File

@ -2,7 +2,7 @@
.flex.items-center.h-40.md:h-60.lg:h-96.w-full.overflow-hidden{order_option(section, "lg:w-1/3")}
= image_for(section ,"")
.flex.items-center.w-full.max-w.px-6.mt-6.mx-auto{:class => "lg:w-2/3"}
.flex-1{color_option(section)}
.flex-1{text_color_option(section)}
.text-center
%h2.text-4xl.font-bold.text-center.mb-2
= section.header

View File

@ -1,4 +1,4 @@
.flex.flex-col.m-5.md:m-12.lg:m-20{ options(section , :background , :color)}
.flex.flex-col.m-5.md:m-12.lg:m-20{ options(section , :background , :text_color)}
.flex.items-center.justify-center.flex-1
.max-w-prose.px-4.mt-16.mx-auto.text-center
%h1.text-4xl.font-medium= section.header

View File

@ -1,4 +1,4 @@
%section.m-5.md:m-12.lg:m-20{ options(section , :background , :color)}
%section.m-5.md:m-12.lg:m-20{ options(section , :background , :text_color)}
.flex.justify-center
- unless section.header.blank? and section.text.blank?
.max-w-prose.px-4.py-16{ options(section , :text_align)}

View File

@ -1,4 +1,4 @@
%section.m-5.md:m-12.lg:m-20{ options(section , :background , :color)}
%section.m-5.md:m-12.lg:m-20{ options(section , :background , :text_color)}
.grid.grid-cols-1.md:grid-cols-2
.flex.flex-col.lg:flex-row
.max-w-xl.pr-16.mx-auto.mb-10

View File

@ -2,7 +2,7 @@
.px-4.py-24.sm:px-6.lg:px-8
.flex{ item_align_option( section)}
.p-8.md:p-12.lg:px-16.lg:py-24{options(section , :shade )}
.mx-auto.max-w-xl{ options(section , :color, :text_align)}
.mx-auto.max-w-xl{ options(section , :text_color, :text_align)}
%h2.text-2xl.font-bold.md:text-5xl
= section.header
.sm:mt-4.text-2xl{ prose_classes }

View File

@ -1,6 +1,6 @@
%section{ options(section , :background , :margin)}
.flex{ options(section , :item_align )}
.px-4.py-4.md:py-10.lg:py-16.mx-5.md:mx-12.lg:mx-20{options(section , :text_align , :color)}
.px-4.py-4.md:py-10.lg:py-16.mx-5.md:mx-12.lg:mx-20{options(section , :text_align , :text_color)}
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
= section.header
-if section.has_option?("subheader")

View File

@ -2,7 +2,7 @@
%div{ order_option(section)}
= image_for( section , "h-56 w-full object-cover sm:h-full")
.p-8.md:p-12.lg:px-16.lg:py-24{ background_option(section)}
.mx-auto.max-w-xl{options(section , :text_align , :color)}
.mx-auto.max-w-xl{options(section , :text_align , :text_color)}
%h2.text-2xl.font-bold.md:text-4xl
= section.header
-if section.has_option?("subheader")

View File

@ -2,7 +2,7 @@
.flex.items-center.h-40.md:h-60.lg:h-96.w-full.overflow-hidden{order_option(section, "lg:w-2/3")}
= image_for(section ,"object-cover")
.flex.items-center.w-full.max-w.px-6.mt-6.mx-auto{:class => "lg:w-1/3"}
.flex-1{color_option(section)}
.flex-1{text_color_option(section)}
.text-center
%h2.text-4xl.font-bold.text-center.mb-4.lg:mb-8= section.header
-if section.has_option?("subheader")

View File

@ -2,7 +2,7 @@
.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{color_option(section)}
.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

View File

@ -1,4 +1,4 @@
%section.p-20.my-20{ options(section , :background , :color , :margin)}
%section.p-20.my-20{ options(section , :background , :text_color , :margin)}
.flex.justify-center
.max-w-prose{ options(section , :text_align)}
- if !section.header.blank?

View File

@ -7,7 +7,7 @@
.flex.flex-col.mb-2.lg:items-center.lg:flex-row
.flex.items-center.justify-center.w-16.h-16.mb-4.mr-2.rounded-full.lg:mb-0{options(card,:background )}
= image_for( card , "h-8 w-8")
%h6.font-semibold.leading-5{options(card, :color)}= card.header
%h6.font-semibold.leading-5{options(card, :text_color)}= card.header
.mb-2.text-sm.text-gray-900{ prose_classes }
= markdown(card)
.text-center=view_button(card , "mb-2")

View File

@ -1,7 +1,7 @@
.max-w-md.sm:mx-auto.sm:text-center
.mt-4.flex.items-center.justify-center.mb-4.rounded-full.mx-auto.w-40.h-40{options(card,:background )}
= image_for( card , "h-20 w-20")
%h4.mb-3.text-xl.font-bold.leading-5{options(card, :color)}= card.header
%h4.mb-3.text-xl.font-bold.leading-5{options(card, :text_color)}= card.header
.mb-3.text-sm.text-gray-900{ prose_classes }
= markdown(card)
=view_button(card , "mb-2")

View File

@ -1,7 +1,7 @@
.group.m-8.overflow-hidden.relative.flex.h-96.items-end
= image_for( card , "absolute inset-0 h-full w-full object-cover hover:scale-110 ease-in duration-700")
.relative.w-full.m-2.p-4.tracking-widest{text_align_option(card ,"sm:w-1/2")}
%div.transition-colors.group-hover:bg-black.group-hover:text-white{options(card , :text_align , :color , :background)}
%div.transition-colors.group-hover:bg-black.group-hover:text-white{options(card , :text_align , :text_color , :background)}
.relative.w-full.m-2.p-4
%h3.text-lg
= card.header

View File

@ -1,11 +1,11 @@
.grid.grid-cols-1.gap-12.m-12.md:gap-8.md:m-8.lg:gap-12.lg:m-12
%div{ order_option(card)}
= image_for( card , "h-full w-full object-cover")
.grid.h-70{options(card , :text_align , :color , :background )}
.grid.h-70{options(card , :text_align , :text_color , :background )}
%h3.p-4.mt-10.text-3xl.font-bold= card.header
-if card.has_option?("subheader")
%h4.p-4.text-xl= card.option("subheader")
.m-6{options(card , :background , :color ) }
.m-6{options(card , :background , :text_color ) }
%div{ prose_classes }
= markdown(card)
=view_button(card , "my-2")

View File

@ -2,7 +2,7 @@
= 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
%div.h-full{background_option(card)}
.p-5{options(card , :text_align , :color)}
.p-5{options(card , :text_align , :text_color)}
.m-2.text-sm.leading-relaxed.line-clamp-3{ prose_classes }
= markdown(card)
=view_button(card , "my-2")

View File

@ -1,7 +1,7 @@
.m-4.md:m-8.lg:m-12{background_option(card)}
%div{ order_option(card)}
= image_for( card , "h-full w-full object-cover")
.m-6{options(card , :text_align , :color , :order)}
.m-6{options(card , :text_align , :text_color , :order)}
%h3.p-4.text-2xl.font-bold= card.header
-if card.has_option?("subheader")
%h4.p-4.text-xl= card.option("subheader")

View File

@ -1,6 +1,6 @@
.flex.m-2.flex-col.lg:flex-row.md:m-4.lg:m-6{background_option(card)}
= image_for( card , "object-cover lg:w-3/5")
.mx-6{options(card , :text_align , :color , :order , "lg:w-2/5")}
.mx-6{options(card , :text_align , :text_color , :order , "lg: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")

View File

@ -8,7 +8,7 @@
- text
options:
- background
- color
- text_color
- text_align
- template: card_gap_square
header: Narrow card with up down section
@ -19,7 +19,7 @@
- text
options:
- background
- color
- text_color
- order
- text_align
- subheader
@ -33,7 +33,7 @@
- text
options:
- background
- color
- text_color
- text_align
- subheader
- order
@ -47,7 +47,7 @@
- text
options:
- background
- color
- text_color
- text_align
- subheader
- order
@ -63,7 +63,7 @@
- text
options:
- background
- color
- text_color
- text_align
- button_link
- button_text
@ -77,7 +77,7 @@
- text
options:
- background
- color
- text_color
- text_align
- button_link
- button_text
@ -89,7 +89,7 @@
- text
options:
- background
- color
- text_color
- text_align
- button_link
- button_text

View File

@ -15,7 +15,7 @@
:values: white none light_blue light_gray light_orange solid_blue solid_red solid_indigo
:default: none
:id: 3
- :name: color
- :name: text_color
:description: Text colors. Don't use with solid background colors. Same colors as
background available. Default none, meas as parent.
:values: none white black light_blue light_gray solid_black solid_blue solid_red

View File

@ -11,7 +11,7 @@
- background
- columns
- subheader
- color
- text_color
- text_align
- template: section_feature
header: Feature section with 2 column,
@ -26,7 +26,7 @@
- background
- columns
- subheader
- color
- text_color
- text_align
- template: section_full_up
header: Centered Header with text
@ -36,7 +36,7 @@
- text
options:
- background
- color
- text_color
- margin
- subheader
- text_align
@ -51,7 +51,7 @@
- text
options:
- background
- color
- text_color
- text_align
- item_align
- template: section_text
@ -66,7 +66,7 @@
options:
- columns
- background
- color
- text_color
- margin
- subheader
- text_align
@ -82,7 +82,7 @@
options:
- order
- background
- color
- text_color
- subheader
- text_align
- button_link
@ -98,7 +98,7 @@
- text
options:
- fixed
- color
- text_color
- text_align
- item_align
- image_align
@ -118,7 +118,7 @@
- subheader
- margin
- order
- color
- text_color
- text_align
- background
- button_link
@ -136,7 +136,7 @@
- subheader
- margin
- order
- color
- text_color
- background
- button_link
- button_text
@ -156,7 +156,7 @@
- ok_message
- handler
- background
- color
- text_color
- template: blog_header
header: Start of blog, with image left or right
text: Image on one side, header and text on the other.
@ -169,4 +169,4 @@
- order
- columns
- background
- color
- text_color

View File

@ -7,7 +7,7 @@
:id: 6
:options:
background: solid_blue
color: white
text_color: white
align: left
:updated_at: 2023-01-05 21:33:46.577677395 +02:00
:section_id: 11
@ -22,7 +22,7 @@
:id: 7
:options:
background: solid_blue
color: white
text_color: white
align: left
:updated_at: &1 2022-12-09 17:50:02.733622073 +02:00
:section_id: 11
@ -36,7 +36,7 @@
:image_name: non_standard_room
:options:
background: solid_blue
color: white
text_color: white
align: left
:updated_at: *1
:section_id: 11
@ -49,7 +49,7 @@
There are about 2-3 per floor, in different sizes, from 12 to 25m2.
:options:
background: solid_blue
color: white
text_color: white
align: left
:image_name: wet_space_room
:updated_at: *1
@ -147,7 +147,7 @@
:image_name: service_cafe
:options:
background: light_gray
color: solid_blue
text_color: solid_blue
align: center
subheader: ''
:updated_at: &2 2022-12-10 20:28:17.967357225 +02:00
@ -161,7 +161,7 @@
:image_name: service_treatments
:options:
background: light_gray
color: solid_blue
text_color: solid_blue
align: center
subheader: ''
:updated_at: *2
@ -175,7 +175,7 @@
:image_name: service_boutique
:options:
background: light_gray
color: solid_blue
text_color: solid_blue
align: center
subheader: ''
:updated_at: *2

View File

@ -57,7 +57,7 @@
ok_message: Ok
handler: FormHandler
background: light_orange
color: none
text_color: none
:header: The deal
:text: "Hub Feenix is not just renting space, we are looking to build a community
of active, participating creatives.\r\n\r\nCheck out the MakerSpace facilities
@ -75,7 +75,7 @@
:options:
fixed: 'on'
shade_color: black_25
color: solid_blue
text_color: solid_blue
align: left
:updated_at: 2023-01-16 22:59:32.016250599 +02:00
:page_id: 6
@ -147,7 +147,7 @@
:options:
order: right
background: solid_blue
color: none
text_color: none
subheader: ''
text: ''
align: left
@ -167,7 +167,7 @@
:options:
order: left
background: solid_blue
color: none
text_color: none
subheader: ''
text: ''
align: left
@ -188,7 +188,7 @@
:options:
order: right
background: solid_blue
color: none
text_color: none
subheader: ''
text: ''
align: left
@ -206,7 +206,7 @@
:options:
background: solid_blue
columns: '3'
color: none
text_color: none
:updated_at: *2
:page_id: 6
:index: 9
@ -218,7 +218,7 @@
:text: "Högbenintie 30, 10350 Meltola, Raasepori\r\n\r\ninfo@hubfeenix.fi\r\n\r\n0505337881\r\n"
:options:
background: white
color: solid_blue
text_color: solid_blue
ok_message: We'll get back to you
:updated_at: *2
:page_id: 6