Switch to single page application #2
1 changed files with 8 additions and 5 deletions
13
src/main.nim
13
src/main.nim
|
@ -8,12 +8,15 @@ appRoutes("app"):
|
|||
component Nav
|
||||
component Glass("Blog in a Matrix")
|
||||
|
||||
"/<article>":
|
||||
component Nav
|
||||
component Glass($article)
|
||||
# TODO: pass article title to component which renders the article; modify Glass or a new component is needed
|
||||
# TODO: check if article name exists otherwise route to /404
|
||||
|
||||
"/<errorCode>":
|
||||
component Nav
|
||||
component Glass("HTTP Error: " & $errorCode)
|
||||
|
||||
"/<article>":
|
||||
component Nav
|
||||
component Glass($article)
|
||||
# TODO: pass article title to component which renders the article
|
||||
# TODO: modify Glass or a new component is needed
|
||||
notfound:
|
||||
route "/404"
|
Loading…
Add table
Reference in a new issue