test harness is back, and pages fixed after refactor

This commit is contained in:
2022-12-08 17:16:29 +02:00
parent a8aa16170a
commit 308b9e1d2e
22 changed files with 257 additions and 23 deletions

View File

@ -20,8 +20,20 @@ module Merged
text
end
end
def button(text , url , color)
link_to(url) do
content_tag(:button , class: color + " " + button_classes ) do
text
end
end
end
def button_classes
"mr-3 inline-block rounded-lg px-4 py-3 text-md font-medium text-white"
end
# section should be hash with at least 'template' key
def find_template(section)
"merged/view/" + section.template
end
end
end

View File

@ -2,10 +2,6 @@ module Merged
module ViewHelper
include OptionsHelper
include MergedHelper
# section should be hash with at least 'template' key
def find_template(section)
"merged/view/" + section.template
end
# background image as inline style
def bg(section , clazz = "")
@ -27,13 +23,5 @@ module Merged
image_tag("#{Image.image_root}/#{element.image}" , class: classes)
end
def button(text , url , color)
link_to(url) do
content_tag(:button , class: color + " " + button_classes ) do
text
end
end
end
end
end