1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-12 23:45:57 +00:00

got the changelog page working, yayyyyyyyyyy

This commit is contained in:
Scott
2016-02-19 20:14:28 -05:00
parent ac8579ccc9
commit 8d61a21fa7
8 changed files with 54 additions and 10 deletions

View File

@@ -1,25 +1,41 @@
## changelog
# changelog
#### Tuesday, 16/02/2016, `v2.0.0`
## v1.3.0
### Friday, 19/02/2016
* Improved the admin panel
* Added ability to clear away old empty brews
* Added delete butotn to the edit page
* Added a dynamically updating changelog page! Nifty!
* Added stlying for wide monster stat blocks and single column class tables
* Added snippets for wide monster stat blocks and single column class tables
### Tuesday, 16/02/2016
* Paragraphs right after tables now indent (thanks LikeAJi6!)
* Added a `@page` css rule to auto turn off margins when printing
* Added a `page-break` property on each `.phb` page to properly page the pages up when exporting (thanks Jokefury!)
#### Sunday, 17/01/2016
## v1.2.0
### Sunday, 17/01/2016
* Added a printer friendly snippet that injects some CSS to remove backbrounds and images
* Adjusted the styling specific to spell blocks to give it tighter spacing
* Added a changelog! How meta!
#### Thursday, 14/01/2016
## v1.1.0
### Thursday, 14/01/2016
* Added view source to see the markdown that made the page
* Added print view
* Fixed API issues that were causing the server to crash
* Increased padding on table cells
* Raw html now shows in view source
#### Wednesday, 3/01/2016
## v1.0.0 - Release
### Wednesday, 3/01/2016
* Added `phb.standalone.css` plus a build system for creating it
* Added page numbers and footer text

View File

@@ -14,6 +14,7 @@ var Homebrew = React.createClass({
return {
url : "",
welcomeText : "",
changelog : "",
brew : {
text : "",
shareId : null,
@@ -28,9 +29,13 @@ var Homebrew = React.createClass({
'/homebrew/edit/:id' : (args) => {
return <EditPage id={args.id} entry={this.props.brew} />
},
'/homebrew/share/:id' : (args) => {
return <SharePage id={args.id} entry={this.props.brew} />
},
'/homebrew/changelog' : (args) => {
return <SharePage entry={{text : this.props.changelog}} />
},
'/homebrew*' : <HomePage welcomeText={this.props.welcomeText} />,
});
},

View File

@@ -90,6 +90,14 @@ var Statusbar = React.createClass({
</a>
},
renderChangelogButton : function(){
if(this.props.editId || this.props.shareId) return null;
return <a className='changelogButton' target='_blank' href='/homebrew/changelog'>
Changelog <i className='fa fa-file-text-o' />
</a>
},
renderShare : function(){
if(!this.props.shareId) return null;
@@ -138,6 +146,7 @@ var Statusbar = React.createClass({
</a>
</div>
<div className='controls right'>
{this.renderChangelogButton()}
{this.renderStatus()}
{this.renderInfo()}
{this.renderSourceButton()}

View File

@@ -58,6 +58,14 @@
background-color : fade(@green, 70%);
}
}
.changelogButton{
.animate(background-color);
color : white;
text-decoration : none;
&:hover{
background-color : fade(@purple, 70%);
}
}
.deleteButton{
.animate(background-color);
color : white;

View File

@@ -18,13 +18,14 @@ var Router = CreateRouter({
var NaturalCrit = React.createClass({
getDefaultProps: function() {
return {
url : '/'
url : '/',
changelog : ''
};
},
render : function(){
return <div className='naturalCrit'>
<Router initialUrl={this.props.url} />
<Router initialUrl={this.props.url} scope={this}/>
</div>
},
});

View File

@@ -1,7 +1,7 @@
{
"name": "naturalCrit",
"description": "A super rad project!",
"version": "0.0.0",
"version": "1.3.0",
"scripts": {
"postinstall": "gulp prod",
"start": "node server.js"
@@ -21,7 +21,7 @@
"moment": "^2.11.0",
"mongoose": "^4.3.3",
"pico-flux": "^1.1.0",
"pico-router": "^1.0.0",
"pico-router": "^1.1.0",
"react": "^0.14.2",
"react-dom": "^0.14.2",
"shortid": "^2.2.4",

View File

@@ -10,6 +10,8 @@ app.use(bodyParser.json());
//Mongoose
var mongoose = require('mongoose');
var mongoUri = process.env.MONGOLAB_URI || process.env.MONGOHQ_URL || 'mongodb://localhost/naturalcrit';

View File

@@ -3,6 +3,8 @@ var Moment = require('moment');
var vitreumRender = require('vitreum/render');
var HomebrewModel = require('./homebrew.model.js').model;
var changelogText = require('fs').readFileSync('./changelog.md', 'utf8');
var getTopBrews = function(cb){
HomebrewModel.find().sort({views: -1}).limit(5).exec(function(err, brews) {
@@ -166,7 +168,8 @@ module.exports = function(app){
prerenderWith : './client/homebrew/homebrew.jsx',
initialProps: {
url: req.originalUrl,
welcomeText : welcomeText
welcomeText : welcomeText,
changelog : changelogText
},
clearRequireCache : true,
}, function (err, page) {