Skip to content

Commit b971429

Browse files
committed
impr(karaxpython): add simple info line about repo url
1 parent be12b79 commit b971429

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/playground.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
env:
1313
nim-version: 'stable'
14-
git-url-arg: --git.url:https://github.com/${{ github.repository }} --git.commit:master
14+
git-repo-url: https://github.com/${{ github.repository }}
1515
deploy-dir: .gh-pages
1616
jobs:
1717
docs:
@@ -33,7 +33,8 @@ jobs:
3333
run: nimble install karax
3434
- name: buildKarax
3535
run: |
36-
nimble buildKarax -d:homepage="${{ github.event.repository.homepage }}" \
36+
nimble buildKarax \
37+
-d:homepage="${{ github.event.repository.homepage }}" -d:gitRepoUrl="${{ env.git-repo-url }}" \
3738
-d:release --opt:size --includeJs \
3839
--htmlName=index
3940
- name: "CNAME"

Python/karaxpython.nim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ proc interactivePython(input: string): bool {. exportc, discardable .} =
2222
return parseCompileEval(input, lexerInst, rootCst, prevF, finished)
2323

2424
let info = getVersionString(verbose=true)
25-
25+
const gitRepoUrl{.strdefine.} = ""
26+
const repoInfoPre = "This website is frontend-only. Open-Source at "
2627
include karax/prelude
2728
import karax/kdom
2829
import karax/vstyles
@@ -66,6 +67,10 @@ proc createDom(): VNode =
6667
tdiv(class="header"):
6768
p(class="info"):
6869
text info
70+
when gitRepoUrl.len != 0:
71+
small: italic(class="repo-info"): # TODO: artistic
72+
text repoInfoPre
73+
a(href=gitRepoUrl): text "Github"
6974
tdiv(class="stream", id=historyContainerId):
7075
for line in stream:
7176
let (prompt, content) = line

0 commit comments

Comments
 (0)