mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Clean up
This commit is contained in:
parent
6a7a65e16b
commit
1464131707
3 changed files with 48 additions and 57 deletions
|
|
@ -17,7 +17,7 @@ proc renderNavbar*(title: string): VNode =
|
|||
icon "info-circled", title="About", href="/about"
|
||||
icon "cog-2", title="Preferences", href="/settings"
|
||||
|
||||
proc renderMain*(body: VNode; prefs: Prefs; title="Nitter"; titleText=""; desc="";
|
||||
proc renderMain*(body: VNode; title="Nitter"; titleText=""; desc="";
|
||||
`type`="article"; video=""; images: seq[string] = @[]): string =
|
||||
let node = buildHtml(html(lang="en")):
|
||||
head:
|
||||
|
|
@ -62,5 +62,5 @@ proc renderError*(error: string): VNode =
|
|||
tdiv(class="error-panel"):
|
||||
span: text error
|
||||
|
||||
proc showError*(error: string; title: string; prefs: Prefs): string =
|
||||
renderMain(renderError(error), prefs, title=title, titleText="Error")
|
||||
proc showError*(error, title: string): string =
|
||||
renderMain(renderError(error), title, "Error")
|
||||
|
|
|
|||
Loading…
Reference in a new issue