work on converting slim to erb

This commit is contained in:
Kyle Drake 2014-04-17 14:12:12 -07:00
parent cff94803a9
commit a96f16fded
35 changed files with 322 additions and 333 deletions

13
app.rb
View file

@ -396,11 +396,11 @@ post '/site_files/save/:filename' do |filename|
end
get '/terms' do
slim :'terms'
erb :'terms'
end
get '/privacy' do
slim :'privacy'
erb :'privacy'
end
get '/admin' do
@ -557,7 +557,7 @@ post '/custom_domain' do
end
get '/contact' do
slim :'contact'
erb :'contact'
end
post '/contact' do
@ -720,6 +720,13 @@ def current_site
@site ||= Site[id: session[:id]]
end
def title
out = "NeoCities"
return out if request.path == '/'
return "#{out} - #{@title}" if @title
"#{out} - #{request.path.gsub('/', '').capitalize}"
end
def encoding_fix(file)
begin
Rack::Utils.escape_html file