mirror of
https://github.com/neocities/neocities.git
synced 2025-08-22 00:50:56 +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
|
@ -58,9 +58,19 @@ end
|
|||
|
||||
def title
|
||||
out = "Neocities"
|
||||
return out if request.path == '/'
|
||||
return "#{out} - #{@title}" if @title
|
||||
"#{out} - #{request.path.gsub('/', '').capitalize}"
|
||||
return out if request.path == '/'
|
||||
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue