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

View File

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