2021-12-27 10:37:38 +09:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
2022-01-03 16:54:22 +09:00
|
|
|
import strformat
|
2022-01-10 07:14:01 +09:00
|
|
|
import karax/[karaxdsl, vdom]
|
2019-09-23 08:42:00 +09:00
|
|
|
|
2019-10-08 00:15:56 +09:00
|
|
|
const
|
2022-01-03 16:54:22 +09:00
|
|
|
date = staticExec("git show -s --format=\"%cd\" --date=format:\"%Y.%m.%d\"")
|
|
|
|
hash = staticExec("git show -s --format=\"%h\"")
|
2019-10-08 00:15:56 +09:00
|
|
|
link = "https://github.com/zedeus/nitter/commit/" & hash
|
2022-01-03 16:54:22 +09:00
|
|
|
version = &"{date}-{hash}"
|
2019-10-08 00:15:56 +09:00
|
|
|
|
2022-01-10 07:14:01 +09:00
|
|
|
let about =
|
|
|
|
try:
|
|
|
|
readFile("public/md/about.html")
|
|
|
|
except IOError:
|
|
|
|
stderr.write "public/md/about.html not found, please run `nimble md`\n"
|
|
|
|
"<h1>About page is missing</h1><br><br>"
|
2019-09-09 11:41:20 +09:00
|
|
|
|
|
|
|
proc renderAbout*(): VNode =
|
2019-09-13 17:44:21 +09:00
|
|
|
buildHtml(tdiv(class="overlay-panel")):
|
2019-09-23 08:42:00 +09:00
|
|
|
verbatim about
|
2019-10-08 00:15:56 +09:00
|
|
|
h2: text "Instance info"
|
|
|
|
p:
|
2022-01-03 16:54:22 +09:00
|
|
|
text "Version "
|
|
|
|
a(href=link): text version
|