Skip to content

Commit

Permalink
better footer
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jul 17, 2014
1 parent 07f2cac commit 3cc9b2b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ footer {
font-size: 14px;
font-style: italic;
clear: both;
background: #fafafa;
margin-top: 40px;
text-align: center;
}

footer a {
Expand Down
3 changes: 3 additions & 0 deletions routes/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var url = require('url');
var account = require('../models/account');
var anonymous = CONFIG.authorize.type === 'anonymous';
var crypto = require('crypto');
var spmjsioVersion = require('../package').version;

var githubToken = require('github-token')({
githubClient: CONFIG.authorize.clientId,
Expand All @@ -19,6 +20,7 @@ exports.index = function(req, res) {
var profile = req.session.user;
res.render('account', {
title: 'My account - ' + CONFIG.website.title,
spmjsioVersion: spmjsioVersion,
user: req.session.user,
anonymous: anonymous,
GA: CONFIG.website.GA,
Expand All @@ -38,6 +40,7 @@ exports.user = function(req, res, next) {
var packages = account.getPackages(profile.login);
res.render('account', {
title: user.login + ' - ' + CONFIG.website.title,
spmjsioVersion: spmjsioVersion,
user: req.session.user,
anonymous: anonymous,
GA: CONFIG.website.GA,
Expand Down
7 changes: 7 additions & 0 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var _ = require('lodash');
var capitalize = require('capitalize');
var gu = require('githuburl');
var async = require('async');
var spmjsioVersion = require('../package').version;

var marked = require('marked');
var renderer = new marked.Renderer();
Expand Down Expand Up @@ -71,6 +72,7 @@ exports.index = function(req, res) {
});
var data = {
title: CONFIG.website.title,
spmjsioVersion: spmjsioVersion,
count: Project.getAll().length,
user: req.session.user,
anonymous: anonymous,
Expand Down Expand Up @@ -132,6 +134,7 @@ exports.project = function(req, res, next) {
}
res.render('project', {
title: p.name + ' - '+ CONFIG.website.title,
spmjsioVersion: spmjsioVersion,
user: req.session.user,
anonymous: anonymous,
GA: CONFIG.website.GA,
Expand Down Expand Up @@ -168,6 +171,7 @@ exports.package = function(req, res, next) {
}
res.render('package', {
title: p.name + '@' + p.version + ' - '+ CONFIG.website.title,
spmjsioVersion: spmjsioVersion,
user: req.session.user,
anonymous: anonymous,
GA: CONFIG.website.GA,
Expand All @@ -181,6 +185,7 @@ exports.package = function(req, res, next) {
exports.all = function(req, res) {
res.render('packages', {
title: 'All Packages - ' + CONFIG.website.title,
spmjsioVersion: spmjsioVersion,
user: req.session.user,
anonymous: anonymous,
GA: CONFIG.website.GA,
Expand Down Expand Up @@ -210,6 +215,7 @@ exports.search = function(req, res, next) {
results = results || { hits: [] };
res.render('search', {
title: 'Search Result - ' + CONFIG.website.title,
spmjsioVersion: spmjsioVersion,
user: req.session.user,
anonymous: anonymous,
GA: CONFIG.website.GA,
Expand Down Expand Up @@ -267,6 +273,7 @@ exports.documentation = function(req, res, next) {

res.render('documentation', {
title: capitalize.words(title.replace(/-/g, ' ')) + '- spm documentation',
spmjsioVersion: spmjsioVersion,
user: req.session.user,
anonymous: anonymous,
nav: nav,
Expand Down
5 changes: 2 additions & 3 deletions views/footer.ejs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
</section>
<footer>
<div class="container">
<a href="/">spmjs</a>
© 2013 - 2099
<a target="_blank" href="https://github.com/spmjs/spmjs.io">Github</a>
Based on <a target="_blank" href="https://github.com/spmjs/spmjs.io">spmjs.io@<%= spmjsioVersion %></a>
- ©2013~2099 - JavaScript Rocks!
</div>
</footer>
</body>
Expand Down

0 comments on commit 3cc9b2b

Please sign in to comment.