diff options
author | Julien Dessaux | 2021-10-25 23:33:28 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-10-25 23:33:28 +0200 |
commit | 031473807e1f1d811d1e294e09cbca6c6ba839f9 (patch) | |
tree | a78260577d4ce3ebf2e7b79c8b144eb8d7553335 /src/short.nim | |
parent | Hardcode HEAD for jester and tiny_sqlite while waiting for releases in both p... (diff) | |
download | short-031473807e1f1d811d1e294e09cbca6c6ba839f9.tar.gz short-031473807e1f1d811d1e294e09cbca6c6ba839f9.tar.bz2 short-031473807e1f1d811d1e294e09cbca6c6ba839f9.zip |
Added about page and a nav menu that links to it
Diffstat (limited to 'src/short.nim')
-rw-r--r-- | src/short.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/short.nim b/src/short.nim index df26552..fa5486a 100644 --- a/src/short.nim +++ b/src/short.nim @@ -24,6 +24,9 @@ func renderIndex(): string {.raises: [].} = var req: ShortUrl compileTemplateFile(getScriptDir() / "templates/index.html") +func renderAbout(): string {.raises: [].} = + compileTemplateFile(getScriptDir() / "templates/about.html") + func renderShort(req: ShortUrl): string {.raises: [].} = compileTemplateFile(getScriptDir() / "templates/short.html") @@ -96,6 +99,8 @@ proc handleIndexPost(params: Table[string, string]): (HttpCode, string) {.raises routes: get "/": resp renderIndex() + get "/about": + resp renderAbout() post "/": initDB() var (code, content) = handleIndexPost(request.params) |