Show HN: Sleep Timer: Put your Mac to sleep with style
sleeptimerapp.com2 pointsby hierro0 comments
memeId := base36.Decode(param)
var meme *Meme
var template *Template
err := ctx.Orm().One(orm.Eq("Meme|Id", memeId), &meme, &template)
Meme declares a FK to Template, so the ORM automatically joins the tables and populates both pointers. Note that the ORM does not require the backends to be relational, so even when ATM we only have database/sql based backends you could write a backend for mongodb or rethinkdb. {{/*
jquery|if=~ie-gte-9: 2.0.3
jquery|if=ie: 1.10.2
bootstrap|fontawesome=4.0.3: 3.0.0
styles|bundle: css/style.css, lightbox/css/lightbox.css
scripts|top,bundle: js/modernizr.js, js/detectizr.js
scripts|bundle: js/responsiveslides.js, lightbox/js/lightbox-2.6.min.js, js/site.js
analytics|nodebug: {{ $Config.Analytics }}
*/}}
<!DOCTYPE html>
...
{{ template "main" }}...
This server query 1.10 and 2.0 from Google's CDN, bootstrap and fontawesome from bootstrapcdn.com and bundles all our styles and scripts a CSS and a JS file. Then other templates can extend this one and override its blocks e.g. {{/*
extends: base.html
*/}}
{{ define "main" }}...
(note that base.html could also define its own "main" block which would act as a default if you loaded base.html and it would be replaced by main.html's "main" block if you loaded "main").