mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Add dynamic page title
This commit is contained in:
parent
fb3c8ab5c3
commit
38565e2e1f
4 changed files with 17 additions and 9 deletions
|
|
@ -2,11 +2,11 @@
|
|||
#import user
|
||||
#import xmltree
|
||||
#
|
||||
#proc renderMain*(body: string): string =
|
||||
#proc renderMain*(body: string; title="Nitter"): string =
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Nitter</title>
|
||||
<title>${xmltree.escape(title)}</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css">
|
||||
</head>
|
||||
|
||||
|
|
@ -46,5 +46,5 @@
|
|||
#end proc
|
||||
#
|
||||
#proc showError*(error: string): string =
|
||||
${renderMain(renderError(error))}
|
||||
${renderMain(renderError(error), title="Error | Nitter")}
|
||||
#end proc
|
||||
|
|
|
|||
Loading…
Reference in a new issue