Add templates as their own module

This commit is contained in:
Christine Dodrill 2016-02-07 07:03:04 -08:00
parent 244d372fef
commit 732fe30756
2 changed files with 8 additions and 9 deletions

7
src/templates/all.nim Normal file
View File

@ -0,0 +1,7 @@
const
baseTemplate*: string = staticRead "./templates/layout.mustache"
errorTemplate*: string = staticRead "./templates/error.mustache"
indexTemplate*: string = staticRead "./templates/index.mustache"
usersTemplate*: string = staticRead "./templates/users.mustache"
tweetsTemplate*: string = staticRead "./templates/tweets.mustache"
submitTemplate*: string = staticRead "./templates/submit.mustache"

View File

@ -1,13 +1,5 @@
import asyncdispatch, db_sqlite, httpclient, jester, moustachu, os, shorturl,
strutils, tables, times, twtxt, typetraits
const
baseTemplate*: string = staticRead "./templates/layout.mustache"
errorTemplate*: string = staticRead "./templates/error.mustache"
indexTemplate*: string = staticRead "./templates/index.mustache"
usersTemplate*: string = staticRead "./templates/users.mustache"
tweetsTemplate*: string = staticRead "./templates/tweets.mustache"
submitTemplate*: string = staticRead "./templates/submit.mustache"
strutils, tables, templates/all, times, twtxt, typetraits
let
db = open("data/twtxt.db", nil, nil, nil)