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
|
@ -58,9 +58,19 @@ end
|
||||||
|
|
||||||
def title
|
def title
|
||||||
out = "Neocities"
|
out = "Neocities"
|
||||||
return out if request.path == '/'
|
return out if request.path == '/'
|
||||||
return "#{out} - #{@title}" if @title
|
|
||||||
"#{out} - #{request.path.gsub('/', '').capitalize}"
|
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
|
end
|
||||||
|
|
||||||
def encoding_fix(file)
|
def encoding_fix(file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue