Fixed about page by adding static pages controller

This commit is contained in:
Ben Ramey
2014-05-24 17:28:44 -05:00
parent a1b02d229b
commit 8cd7a9a97c
5 changed files with 38 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
/**
* StaticPagesController
*
* @module :: Controller
* @description :: A set of functions called `actions`.
*
* Actions contain code telling Sails how to respond to a certain type of request.
* (i.e. do stuff, then send some JSON, show an HTML page, or redirect to another URL)
*
* You can configure the blueprint URLs which trigger these actions (`config/controllers.js`)
* and/or override them with custom routes (`config/routes.js`)
*
* NOTE: The code you write here supports both HTTP and Socket.io automatically.
*
* @docs :: http://sailsjs.org/#!documentation/controllers
*/
module.exports = {
/**
* Overrides for the settings in `config/controllers.js`
* (specific to StaticPagesController)
*/
_config: {},
about: function(req, res) {
return res.view();
}
};

View File

@@ -37,7 +37,7 @@ block modals
.modal-dialog.modal-lg .modal-dialog.modal-lg
.modal-content .modal-content
.modal-header .modal-header
  |  
button.close(type='button',data-dismiss='modal',aria-hidden='true') × button.close(type='button',data-dismiss='modal',aria-hidden='true') ×
.modal-body .modal-body
h4.hidden.modal-title#menuModalLabel Menu h4.hidden.modal-title#menuModalLabel Menu

View File

@@ -16,6 +16,10 @@ module.exports.policies = {
'*': false, '*': false,
StaticPagesController: {
'*': true
},
RunController: { RunController: {
'*': false, '*': false,
'find': true, 'find': true,

View File

@@ -36,7 +36,8 @@ module.exports.routes = {
view: 'home/index' view: 'home/index'
}, },
'/about': { '/about': {
view: 'about' controller: 'staticPagesController',
action: 'about'
}, },
/* /*

View File

@@ -1,4 +1,4 @@
extends interior-page-layout extends ../interior-page-layout
block pagetitle block pagetitle
span.glyphicon.glyphicon-question-sign span.glyphicon.glyphicon-question-sign
@@ -41,6 +41,7 @@ block interiorcontent
.col-xs-12.col-sm-4 .col-xs-12.col-sm-4
h2 Recent updates h2 Recent updates
ul ul
li [5/24/14] Fixed this page!
li [5/15/14] Moved nav, "rebranded" lunch run me to lunch run|me li [5/15/14] Moved nav, "rebranded" lunch run me to lunch run|me
li [5/13/14] Added meta tags li [5/13/14] Added meta tags
li [5/13/14] Added validation messaging to create-run form li [5/13/14] Added validation messaging to create-run form