mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
443 B
27 lines
443 B
class app.views.StaticPage extends app.View
|
|
@className: '_static'
|
|
|
|
@titles:
|
|
about: 'About'
|
|
news: 'News'
|
|
help: 'Help'
|
|
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
|