diff --git a/app/helpers/merged/options_helper.rb b/app/helpers/merged/options_helper.rb index 0f9d6e2..bfc3b79 100644 --- a/app/helpers/merged/options_helper.rb +++ b/app/helpers/merged/options_helper.rb @@ -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 diff --git a/lib/merged.rb b/lib/merged.rb index 0da9e72..9932046 100644 --- a/lib/merged.rb +++ b/lib/merged.rb @@ -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