wittling indexes

This commit is contained in:
2022-12-14 13:41:26 +02:00
parent d7045946da
commit 523c5c97a0
3 changed files with 28 additions and 19 deletions

View File

@ -34,20 +34,20 @@ module Merged
name
end
def blue_button( text, url)
button( text , url , "bg-blue-500" )
button( text , url , "bg-cyan-200" )
end
def yellow_button( text, url)
button( text , url , "bg-yellow-500" )
button( text , url , "bg-yellow-200" )
end
def red_button( text, url)
button( text , url , "bg-red-500" )
button( text , url , "bg-red-200" )
end
def green_button( text, url)
button( text , url , "bg-green-500" )
button( text , url , "bg-green-200" )
end
def submit_button(text , danger = false )
clazz = "bg-blue-500 " #full names, no tricks for tailwind
clazz = "bg-red-500 " if danger
clazz = "bg-cyan-200 " #full names, no tricks for tailwind
clazz = "bg-red-300 " if danger
clazz += button_classes
content_tag(:button , class: clazz , type: :submit) do
text
@ -61,7 +61,7 @@ module Merged
end
end
def button_classes
"mr-3 inline-block rounded-lg px-4 py-3 text-md font-medium text-white"
"mr-3 inline-block rounded-lg px-4 py-3 text-md font-medium border border-gray-400"
end
# section should be hash with at least 'template' key
def find_template(section)