You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
887 B
Ruby

#! /usr/bin/ruby3.0
require 'sinatra'
require 'erb'
get '/' do
erb :greetpage
end
get '/home' do
erb :homepage
end
get '/media' do
erb :folderpage
end
get '/media/' do
erb :folderpage
end
get '/media/*' do
erb :blogpage
end
get '/technology' do
erb :folderpage
end
get '/technology/' do
erb :folderpage
end
get '/technology/*' do
erb :blogpage
end
get '/news' do
erb :folderpage
end
get '/news/' do
erb :folderpage
end
get '/news/*' do
erb :blogpage
end
get '/archive' do
erb :archivepage, locals: {folder: "all", searchquery: ""}
end
get '/archive/' do
erb :archivepage, locals: {folder: "all", searchquery: ""}
end
get '/archive/:folder' do
erb :archivepage, locals: {folder: params["folder"].downcase, searchquery: params["search"]}
end
get '/about' do
erb :aboutpage
end
get '/contact' do
erb :contactpage
end
not_found do
status 404
erb :oops
end