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