mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-20 04:01:29 +00:00
Winged border on note blocks working
This commit is contained in:
@@ -40,27 +40,20 @@ var EditPage = React.createClass({
|
||||
return {
|
||||
title : this.props.brew.title,
|
||||
text: this.props.brew.text,
|
||||
|
||||
isSaving : false,
|
||||
|
||||
isPending : false,
|
||||
|
||||
errors : null,
|
||||
|
||||
lastUpdated : this.props.brew.updatedAt
|
||||
};
|
||||
},
|
||||
|
||||
savedBrew : null,
|
||||
|
||||
|
||||
componentDidMount: function(){
|
||||
this.debounceSave = _.debounce(this.save, SAVE_TIMEOUT);
|
||||
|
||||
window.onbeforeunload = ()=>{
|
||||
//do state checks
|
||||
|
||||
//return "You have unsaved changes!";
|
||||
if(this.state.isSaving || this.state.isPending){
|
||||
return 'You have unsaved changes!';
|
||||
}
|
||||
}
|
||||
},
|
||||
componentWillUnmount: function() {
|
||||
@@ -112,7 +105,6 @@ var EditPage = React.createClass({
|
||||
},
|
||||
|
||||
save : function(){
|
||||
console.log('saving!');
|
||||
this.debounceSave.cancel();
|
||||
this.setState({
|
||||
isSaving : true
|
||||
@@ -125,7 +117,6 @@ var EditPage = React.createClass({
|
||||
title : this.state.title
|
||||
})
|
||||
.end((err, res) => {
|
||||
console.log('done', res.body);
|
||||
this.savedBrew = res.body;
|
||||
this.setState({
|
||||
isPending : false,
|
||||
@@ -136,34 +127,24 @@ var EditPage = React.createClass({
|
||||
},
|
||||
|
||||
renderSaveButton : function(){
|
||||
|
||||
if(this.state.isSaving){
|
||||
return <Nav.item icon="fa-spinner fa-spin">saving...</Nav.item>
|
||||
return <Nav.item className='save' icon="fa-spinner fa-spin">saving...</Nav.item>
|
||||
}
|
||||
|
||||
|
||||
if(!this.state.isPending && !this.state.isSaving){
|
||||
return <Nav.item>saved.</Nav.item>
|
||||
return <Nav.item className='save saved'>saved.</Nav.item>
|
||||
}
|
||||
|
||||
if(this.state.isPending && this.hasChanges()){
|
||||
return <Nav.item onClick={this.save} color='blue'>Save Now</Nav.item>
|
||||
return <Nav.item className='save' onClick={this.save} color='blue' icon='fa-save'>Save Now</Nav.item>
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
renderNavbar : function(){
|
||||
return <Navbar>
|
||||
<Nav.section>
|
||||
<EditTitle title={this.state.title} onChange={this.handleTitleChange} />
|
||||
</Nav.section>
|
||||
|
||||
<Nav.section>
|
||||
{this.renderSaveButton()}
|
||||
|
||||
<Nav.item newTab={true} href={'/homebrew/share/' + this.props.brew.shareId} color='teal' icon='fa-share'>
|
||||
<Nav.item newTab={true} href={'/homebrew/share/' + this.props.brew.shareId} color='teal' icon='fa-share-alt'>
|
||||
Share
|
||||
</Nav.item>
|
||||
<PrintLink shareId={this.props.brew.shareId} />
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
.editPage{
|
||||
|
||||
|
||||
.navItem.save{
|
||||
width : 75px;
|
||||
text-align: center;
|
||||
&.saved{
|
||||
color : #666;
|
||||
cursor : initial;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
BIN
client/homebrew/phbStyle/note_border.png
Normal file
BIN
client/homebrew/phbStyle/note_border.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 530 B |
File diff suppressed because one or more lines are too long
@@ -171,14 +171,20 @@
|
||||
margin-bottom : 1em;
|
||||
padding : 5px 10px;
|
||||
background-color : @noteGreen;
|
||||
border-top : 2px black solid;
|
||||
border-bottom : 2px black solid;
|
||||
border-style: solid;
|
||||
border-width: 11px;
|
||||
border-image: url('/assets/homebrew/phbStyle/note_border.png') 11;
|
||||
border-image-outset: 9px 0px;
|
||||
box-shadow : 1px 4px 14px #888;
|
||||
p, ul{
|
||||
font-size : 0.352cm;
|
||||
line-height : 1.1em;
|
||||
}
|
||||
}
|
||||
//If a note starts a column, give it space at the top to render border
|
||||
pre+blockquote{
|
||||
margin-top: 11px;
|
||||
}
|
||||
//*****************************
|
||||
// * MONSTER STAT BLOCK
|
||||
// *****************************/
|
||||
|
||||
@@ -318,8 +318,10 @@ table {
|
||||
margin-bottom: 1em;
|
||||
padding: 5px 10px;
|
||||
background-color: #e0e5c1;
|
||||
border-top: 2px black solid;
|
||||
border-bottom: 2px black solid;
|
||||
border-style: solid;
|
||||
border-width: 11px;
|
||||
border-image: url('/assets/homebrew/phbStyle/note_border.png') 11;
|
||||
border-image-outset: 9px 0px;
|
||||
box-shadow: 1px 4px 14px #888;
|
||||
}
|
||||
.phb blockquote em {
|
||||
@@ -336,33 +338,16 @@ table {
|
||||
font-size: 0.352cm;
|
||||
line-height: 1.1em;
|
||||
}
|
||||
.phb pre + blockquote {
|
||||
margin-top: 11px;
|
||||
}
|
||||
.phb hr + blockquote {
|
||||
position: relative;
|
||||
background-color: #FDF1DC;
|
||||
padding-top: 15px;
|
||||
border-image: url('/assets/homebrew/phbStyle/border.png') 10;
|
||||
background-color: #FDF1DC;
|
||||
border-style: solid;
|
||||
border-width: 10px;
|
||||
/*
|
||||
//Top and Bottom Borders
|
||||
&:after, &:before{
|
||||
content : "";
|
||||
position : absolute;
|
||||
height : 4px;
|
||||
width : 100%;
|
||||
padding : 0px 3px;
|
||||
background-color : #E69A28;
|
||||
border : 1px solid black;
|
||||
}
|
||||
&:before{
|
||||
top : 0px;
|
||||
left : -3px;
|
||||
}
|
||||
&:after{
|
||||
bottom : 0px;
|
||||
left : -3px;
|
||||
}
|
||||
*/
|
||||
border-image: url('/assets/homebrew/phbStyle/border.png') 10;
|
||||
}
|
||||
.phb hr + blockquote h2 {
|
||||
margin-top: -8px;
|
||||
@@ -398,6 +383,7 @@ table {
|
||||
column-span: 1;
|
||||
background-color: transparent;
|
||||
border-image: none;
|
||||
border-style: none;
|
||||
-webkit-column-span: 1;
|
||||
}
|
||||
.phb hr + blockquote hr + table tbody tr:nth-child(odd),
|
||||
@@ -414,11 +400,11 @@ table {
|
||||
}
|
||||
.phb hr + blockquote hr {
|
||||
visibility: visible;
|
||||
border: none;
|
||||
height: 6px;
|
||||
margin: 4px 0px;
|
||||
background-image: url('/assets/homebrew/phbStyle/red.png');
|
||||
background-size: 100% 100%;
|
||||
border: none;
|
||||
}
|
||||
.phb hr + hr + blockquote {
|
||||
column-count: 2;
|
||||
@@ -439,6 +425,7 @@ table {
|
||||
border-collapse: separate;
|
||||
background-color: white;
|
||||
border: initial;
|
||||
border-style: solid;
|
||||
border-image-outset: 37px 17px;
|
||||
border-image-repeat: round;
|
||||
border-image-slice: 150 200 150 200;
|
||||
@@ -529,8 +516,8 @@ table {
|
||||
.phb ol ol,
|
||||
.phb ul ol,
|
||||
.phb ol ul {
|
||||
margin-left: 1.5em;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
.phb.print blockquote {
|
||||
box-shadow: none;
|
||||
|
||||
9
todo.md
9
todo.md
@@ -1,6 +1,9 @@
|
||||
# The Homebrewery
|
||||
|
||||
## v2.0.0 todo
|
||||
X make a sproper staging environment
|
||||
X make database backups
|
||||
X Cleanup master
|
||||
X Make statusbar un-fixed
|
||||
X Simplify the panel css to remove the current issues
|
||||
X Build new `BrewRenderer`, clean support for partial rendering
|
||||
@@ -23,15 +26,15 @@ X Move snippets into their new groups
|
||||
X Border shadows on second column renders much better
|
||||
X Saving a pdf no uses the brew title
|
||||
X add /source/shareId route
|
||||
- Add stats nav item
|
||||
X make both ids unique indexes in mongoose
|
||||
X Fix main Page
|
||||
- Write new welcome message
|
||||
- Fix the edit page saving flow
|
||||
- Fix title saving
|
||||
X Fix the edit page saving flow
|
||||
X Fix title saving
|
||||
- Style the snippet groups
|
||||
|
||||
## v2.1.0
|
||||
- Add stats nav item
|
||||
- Adda better error page
|
||||
- IMproved firefox support
|
||||
- Add in window.resize handlers for the elements that need it
|
||||
|
||||
Reference in New Issue
Block a user