mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-12 11:06:30 +00:00
Improve Nitter version string on about page
This commit is contained in:
parent
0ef90270b7
commit
9a578b3cbb
1 changed files with 7 additions and 5 deletions
|
@ -1,10 +1,12 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
import karax/[karaxdsl, vdom]
|
import strformat
|
||||||
import markdown
|
import karax/[karaxdsl, vdom], markdown
|
||||||
|
|
||||||
const
|
const
|
||||||
hash = staticExec("git log -1 --format=\"%h\"")
|
date = staticExec("git show -s --format=\"%cd\" --date=format:\"%Y.%m.%d\"")
|
||||||
|
hash = staticExec("git show -s --format=\"%h\"")
|
||||||
link = "https://github.com/zedeus/nitter/commit/" & hash
|
link = "https://github.com/zedeus/nitter/commit/" & hash
|
||||||
|
version = &"{date}-{hash}"
|
||||||
|
|
||||||
let
|
let
|
||||||
about = markdown(readFile("public/md/about.md"))
|
about = markdown(readFile("public/md/about.md"))
|
||||||
|
@ -15,8 +17,8 @@ proc renderAbout*(): VNode =
|
||||||
verbatim about
|
verbatim about
|
||||||
h2: text "Instance info"
|
h2: text "Instance info"
|
||||||
p:
|
p:
|
||||||
text "Commit "
|
text "Version "
|
||||||
a(href=link): text hash
|
a(href=link): text version
|
||||||
|
|
||||||
proc renderFeature*(): VNode =
|
proc renderFeature*(): VNode =
|
||||||
buildHtml(tdiv(class="overlay-panel")):
|
buildHtml(tdiv(class="overlay-panel")):
|
||||||
|
|
Loading…
Reference in a new issue