Restructure static files into a single directory

This commit is contained in:
Andrew Miner
2015-03-08 15:05:24 -07:00
parent 997b37ab7d
commit 0a6c185965
5053 changed files with 383 additions and 175 deletions
@@ -0,0 +1,37 @@
###
Crafting Guide - page_controller.coffee
Copyright (c) 2015 by Redwood Labs
All rights reserved.
###
BaseController = require './base_controller'
{Text} = require '../constants'
########################################################################################################################
module.exports = class PageController extends BaseController
constructor: (options={})->
super options
# Public Methods ###############################################################################
getTitle: ->
# subclasses should override this to return the page-specific portion of the title
return null
# BaseController Overrides #####################################################################
refresh: ->
title = @getTitle()
title = if title? then title.trim() else ''
if title.length > 0
title += " | #{Text.title}"
else
title = Text.title
$('title').html title
super