mirror of
https://github.com/neocities/neocities.git
synced 2025-08-20 16:23:51 +02:00
hard cap title at 69 characters max (nice)
This commit is contained in:
parent
585b28017d
commit
352e02deba
1 changed files with 13 additions and 3 deletions
|
@ -59,10 +59,20 @@ end
|
|||
def title
|
||||
out = "Neocities"
|
||||
return out if request.path == '/'
|
||||
return "#{out} - #{@title}" if @title
|
||||
|
||||
full_title = if @title
|
||||
"#{out} - #{@title}"
|
||||
else
|
||||
"#{out} - #{request.path.gsub('/', '').capitalize}"
|
||||
end
|
||||
|
||||
if full_title.length >= 70
|
||||
full_title[0..65] + "..."
|
||||
else
|
||||
full_title
|
||||
end
|
||||
end
|
||||
|
||||
def encoding_fix(file)
|
||||
begin
|
||||
Rack::Utils.escape_html file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue