Added version information to front page
This commit is contained in:
parent
e19ab7887f
commit
5383008315
7 changed files with 23 additions and 5 deletions
1
TODO
1
TODO
|
@ -59,7 +59,6 @@ refactors:
|
|||
miscellaneous:
|
||||
- endless pager should include information about page number
|
||||
- add log engine and log everything that should be logged
|
||||
- add version on homepage that reads version from package.json and git hash
|
||||
- add README - apache2 has good README:
|
||||
http://svn.apache.org/repos/asf/httpd/httpd/trunk/README
|
||||
- add spinner to forms such as registration, user query, login, settings
|
||||
|
|
|
@ -40,8 +40,10 @@ function readTemplates(grunt) {
|
|||
|
||||
module.exports = function(grunt) {
|
||||
|
||||
var pkg = grunt.file.readJSON('package.json');
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
pkg: pkg,
|
||||
|
||||
phpCheckStyleConfigPath: phpCheckStyleConfigPath,
|
||||
phpSourcesDir: phpSourcesDir,
|
||||
|
@ -114,6 +116,7 @@ module.exports = function(grunt) {
|
|||
processhtml: {
|
||||
options: {
|
||||
data: {
|
||||
version: pkg.version + '@' + exec('git rev-parse --short HEAD', {silent: true}).output.trim(),
|
||||
customFaviconUrl: config.misc.customFaviconUrl,
|
||||
serviceName: config.basic.serviceName,
|
||||
templates: readTemplates(grunt),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "szuru2",
|
||||
"version": "0.0.0",
|
||||
"name": "szurubooru",
|
||||
"version": "0.9.0",
|
||||
"dependencies": {
|
||||
"jquery.cookie": "1.4.1",
|
||||
"jquery": "~2.1.1",
|
||||
|
|
|
@ -32,3 +32,8 @@
|
|||
#home .post-footer img {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
#home .version {
|
||||
opacity: .4;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- build:remove -->
|
||||
<head data-version="dev" data-build-time="">
|
||||
<!-- /build -->
|
||||
<!-- build:template
|
||||
<head data-version="<%= version %>" data-build-time="<%= timestamp %>">
|
||||
/build -->
|
||||
<meta charset="utf-8"/>
|
||||
|
||||
<!-- build:remove -->
|
||||
|
|
|
@ -53,6 +53,8 @@ App.Presenters.HomePresenter = function(
|
|||
canViewPosts: auth.hasPrivilege(auth.privileges.viewPosts),
|
||||
formatRelativeTime: util.formatRelativeTime,
|
||||
formatFileSize: util.formatFileSize,
|
||||
version: jQuery('head').attr('data-version'),
|
||||
buildTime: jQuery('head').attr('data-build-time'),
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
@ -49,4 +49,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<p>
|
||||
<small class="version">Version: <a href="//github.com/rr-/szuru2/commits/master"><%= version %></a> (built <%= formatRelativeTime(buildTime) %>)</small>
|
||||
</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue