mirror of
https://github.com/neocities/neocities.git
synced 2025-06-04 03:27:23 +02:00
work on converting slim to erb
This commit is contained in:
parent
cff94803a9
commit
a96f16fded
35 changed files with 322 additions and 333 deletions
13
app.rb
13
app.rb
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue