fix typos

This commit is contained in:
Torsten 2023-01-29 16:35:45 +02:00
parent ad578d9c3d
commit ee94e687f9
2 changed files with 16 additions and 15 deletions

View File

@ -38,7 +38,7 @@ module Merged
def order_option(section , clazz = "")
if section.has_option?("order")
clazz += " " + " order-last" if section.option('order') == "right"
clazz += " order-last" if section.option('order') == "right"
end
{class: clazz}
end
@ -46,7 +46,7 @@ module Merged
def text_align_option(section , clazz = "")
if section.has_option?("text_align")
# text-center , text-left , text-right , leave comment for tailwind
clazz += " " + " text-#{section.option('text_align')}"
clazz += " text-#{section.option('text_align')}"
end
{class: clazz}
end
@ -68,7 +68,7 @@ module Merged
def background_option(section , clazz = "")
if section.has_option?("background")
option = section.option('background')
clazz += " " + Merged.background[section.option('background')] || ""
clazz += " " + (Merged.background[section.option('background')] || "")
end
{class: clazz}
end
@ -81,28 +81,28 @@ module Merged
def text_color_option(section , clazz = "")
if section.has_option?("text_color")
clazz += " " + Merged.text_color[section.option("text_color")] || ""
clazz += " " + (Merged.text_color[section.option("text_color")] || "")
end
{class: clazz }
end
def shade_option(section , clazz = "")
if section.has_option?("shade_color")
clazz += " " + Merged.shade_color[section.option("shade_color")] || ""
clazz += " " + (Merged.shade_color[section.option("shade_color")] || "")
end
{class: clazz }
end
def text_column_option( section )
def text_column_option( section , clazz = "")
if section.has_option?("text_columns")
clazz += " " + Merged.text_columns[section.option("text_columns")] || ""
clazz += " " + (Merged.text_columns[section.option("text_columns")] || "")
end
{class: clazz }
end
def column_option(section)
def column_option( section , clazz = "" )
if section.has_option?("columns")
clazz += " " + Merged.text_columns[section.option("columns")] || ""
clazz += " " + (Merged.columns[section.option("columns")] || "")
end
{class: clazz }
end

View File

@ -67,11 +67,12 @@ module Merged
# amount of text columns
mattr_accessor :columns
@@columns = { "1" => "grid-cols-1",
"2" => "grid-cols-1 md:grid-cols-2"
"3" => "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
"4" => "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
"5" => "grid-cols-1 md:grid-cols-3 lg:grid-cols-5",
"6" => "grid-cols-2 md:grid-cols-4 lg:grid-cols-6", }
@@columns = {
"1" => "grid-cols-1 gap-8 md:gap-12 lg:gap-16",
"2" => "grid-cols-1 md:grid-cols-2 gap-8 md:gap-12 lg:gap-16" ,
"3" => "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 md:gap-12 lg:gap-16",
"4" => "grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 md:gap-12 lg:gap-16",
"5" => "grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-8 md:gap-12 lg:gap-16",
"6" => "grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-8 md:gap-12 lg:gap-16", }
end