Style and Chapa Sigmóide

This commit is contained in:
Mateus Cezário Barreto 2025-11-13 23:28:04 -03:00
commit 718f412829
10 changed files with 611 additions and 90 deletions

16
app.rb
View file

@ -9,10 +9,22 @@ class TonTonWeb::App < Sinatra::Base
set :sessions, true
get '/' do
redirect "/readme.md"
redirect "/home"
end
get '/home' do
markdown File.read("readme.md"), layout_engine: :erb, layout: true
end
get '/:name' do
markdown File.read(params['name']), layout_engine: :erb, layout: true
markdown request.path_info.to_sym, layout_engine: :erb, layout: true
end
get '/chapa-sigmoide/readme' do
erb request.path_info.to_sym, layout_engine: :erb, layout: :chapa_sigmoide
end
get '/chapa-sigmoide/:name' do
markdown request.path_info.to_sym, layout_engine: :erb, layout: :chapa_sigmoide
end
end