ruby-benchmarks/templates/fortitude.rb

30 lines
621 B
Ruby
Raw Normal View History

2019-04-15 23:48:03 +00:00
# frozen_string_literal: true
class TestView < Fortitude::Widget
doctype :html5
def content
doctype!
html do
head do
title 'Hello from Fortitude'
meta charset: 'utf-8'
meta name: 'viewport', content: 'width=device-width, initial-scale=1'
link rel: 'stylesheet', href: '/test.css'
meta name: 'current_time', content: Time.now.to_s
end
body do
div(id: 'content') do
div(class: 'container') do
100.times do |i|
div("This is div ##{i}")
end
end
end
end
end
end
end