Skip to content

Instantly share code, notes, and snippets.

@onionhammer
Created October 26, 2013 19:59
Show Gist options
  • Save onionhammer/7173805 to your computer and use it in GitHub Desktop.
Save onionhammer/7173805 to your computer and use it in GitHub Desktop.
sourcecode filter
TEMPLATE:
#! stdtmpl | standard
#
#template view*(body: expr): stmt {.immediate.} =
#
<link href=style.css rel=stylesheet>
<title>$title</title>
<header>$title</header>
# body
<footer>the end</footer>
VIEW (using master view):
#! stdtmpl | standard
#import models, templates.master
#export models
#
#proc view*(model: TLoginViewModel): string =
# result = ""
# master.view:
<div>Last Log: $model.lastLog</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment