mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
cbfc73951b
Closes #676.
26 lines
449 B
CoffeeScript
26 lines
449 B
CoffeeScript
class app.views.StaticPage extends app.View
|
|
@className: '_static'
|
|
|
|
@titles:
|
|
about: 'About'
|
|
news: 'News'
|
|
help: 'User Guide'
|
|
notFound: '404'
|
|
|
|
deactivate: ->
|
|
if super
|
|
@empty()
|
|
@page = null
|
|
return
|
|
|
|
render: (page) ->
|
|
@page = page
|
|
@html @tmpl("#{@page}Page")
|
|
return
|
|
|
|
getTitle: ->
|
|
@constructor.titles[@page]
|
|
|
|
onRoute: (context) ->
|
|
@render context.page or 'notFound'
|
|
return
|