Browse Source

Add version to footer

pull/52/head
Luke Childs 7 years ago
parent
commit
0f442a804b
  1. 3
      lib/nunjucks-middleware.js
  2. 28
      public/assets/style.css
  3. 4
      views/index.html

3
lib/nunjucks-middleware.js

@ -1,5 +1,8 @@
const pkg = require('../package.json');
module.exports = (req, res, next) => { module.exports = (req, res, next) => {
res.locals.req = req; res.locals.req = req;
res.locals.res = res; res.locals.res = res;
res.locals.version = pkg.version;
next(); next();
}; };

28
public/assets/style.css

@ -468,6 +468,22 @@ footer {
} }
} }
/* This needs to happen slightly before the next breakpoint */
@media (max-width: 570px) {
/* List footer links */
footer .wrapper > a {
display: block;
margin-bottom: 0.2em;
}
footer .divider {
display: none;
}
.me {
float: none;
}
}
/* Small Mobile */ /* Small Mobile */
@media (max-width: 500px) { @media (max-width: 500px) {
@ -541,18 +557,6 @@ footer {
td:not(:first-child):before { td:not(:first-child):before {
min-width: 6em; min-width: 6em;
} }
/* List footer links */
footer .wrapper > a {
display: block;
margin-bottom: 0.2em;
}
footer .divider {
display: none;
}
.me {
float: none;
}
} }
/* Fix menu button overlapping title on iPhone 5 */ /* Fix menu button overlapping title on iPhone 5 */

4
views/index.html

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="theme-color" content="#895CA1"> <meta name="theme-color" content="#895CA1">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<link rel="stylesheet" href="/assets/style.css"> <link rel="stylesheet" href="/assets/style.css?v2">
</head> </head>
<body class="{{ bodyClass }}"> <body class="{{ bodyClass }}">
@ -28,6 +28,8 @@
<footer role="contentinfo"> <footer role="contentinfo">
<div class="wrapper"> <div class="wrapper">
v{{version}}
<span class="divider">-</span>
<a href="/about">About</a> <a href="/about">About</a>
<span class="divider">-</span> <span class="divider">-</span>
<a target="_blank" href="//github.com/lukechilds/onionite">Source code</a> <a target="_blank" href="//github.com/lukechilds/onionite">Source code</a>

Loading…
Cancel
Save