Skip to content

Commit

Permalink
Reconfigure page layout, reposition buttons and app name
Browse files Browse the repository at this point in the history
  • Loading branch information
ontoneio committed Nov 22, 2017
1 parent 3c3eae8 commit fee429e
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 25 deletions.
6 changes: 3 additions & 3 deletions public/poetion.js

Large diffs are not rendered by default.

42 changes: 34 additions & 8 deletions public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ body {

.app-name {
z-index: 3;
grid-area: name;
justify-self: center;
align-self: center;
}

.poem-canvas {
Expand Down Expand Up @@ -49,12 +52,16 @@ body {
}

.button-bar {
grid-area: btn-bar;
justify-self: center;
align-self: center;
position: relative;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
left: 62.5px;
flex-grow: 3;
/* left: 62.5px; */
}

.edit-btns {
Expand Down Expand Up @@ -98,12 +105,15 @@ body {
left: 0px;
right: 0px;
min-width: 100%;
height: 150px;
display: flex;
height: 100px;
z-index: 2;
/* display: flex;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
z-index: 2;
align-items: center; */
display: grid;
grid-template-columns: 1.5fr 6fr 1.5fr;
grid-template-areas: "name btn-bar close-btn"
}

/* .form-wrap {
Expand All @@ -113,19 +123,35 @@ body {
} */

.sliding-form {
position: sticky;
display: flex;
flex-direction: column;
justify-content: center;
position: fixed;
justify-content: space-between;
z-index: 1;
width: 650px;
max-height: 475px;
}

.close-btn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
/* flex-grow: 1; */
grid-area: close-btn;
justify-self: center;
align-self: center;
visibility: hidden;
margin-left: 20%
}

.form-field {
margin: 5px 0px;
height: 50px;
}
.poem-field {
margin: 5px 0px;
line-height: 20px;
}
* {
border: .25px solid red;
}
27 changes: 15 additions & 12 deletions src/client/components/Btm-Util-Bar/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
import Name from '../Name';

class BottomUtilityBar extends Component {
constructor(props) {
Expand Down Expand Up @@ -30,8 +31,8 @@ class BottomUtilityBar extends Component {
event.preventDefault();
const artist = new window.Konva.TextPath({ text: this.state.artist });
const poem = new window.Konva.TextPath({ text: this.state.poem });
const artistForm = document.querySelector('.artist-field');
const poemForm = document.querySelector('.poem-field');
const artistForm = document.querySelector('#artist-field');
const poemForm = document.querySelector('#poem-field');
artistForm.value = '';
poemForm.value = '';
}
Expand Down Expand Up @@ -73,7 +74,10 @@ class BottomUtilityBar extends Component {

<div className="bottom-bar">

<div className=""></div>
<div className="app-name">
<Name />
</div>


<div className="button-bar">
<div className="edit-btns" onClick={this.handleNewPoemClick}>
Expand All @@ -89,26 +93,25 @@ class BottomUtilityBar extends Component {
</div>
</div>

<div className="">
<div className="close-btn" onClick={this.handleCloseClick}>
<div className="edit-btns">
<img src="https://res.cloudinary.com/ontoneio/image/upload/c_scale,w_75/v1511343902/Poet-ion/close.png" alt="Close Poem Create/Edit View"/>
</div>
<div className="close-btn" onClick={this.handleCloseClick}>
<div className="edit-btns">
<img src="https://res.cloudinary.com/ontoneio/image/upload/c_scale,w_75/v1511343902/Poet-ion/close.png" alt="Close Poem Create/Edit View"/>
</div>
</div>


</div>


<form className="sliding-form" onSubmit={this.handleSubmit}>
<div className="sliding-form" onSubmit={this.handleSubmit}>

<input className="artist-field" placeholder="Artist Name" name="artistName" onChange={this.handleInputChange} />
<input id="artist-field" className="form-field" placeholder="Artist Name" name="artistName" onChange={this.handleInputChange} />


<textarea className="poem-field" name="poemForm" placeholder="Roses Are Red and Violets are Blue" onChange={this.handleTextAreaChange} />
<textarea id="poem-field" className="poem-field" placeholder="Roses Are Red and Violets are Blue" name="poemForm" onChange={this.handleTextAreaChange} />

<input type="submit" value="Submit" />
</form>
</div>

</div>

Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Name/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, {Component} from 'react';
class Name extends Component {
render() {
return (
<div className="app-name">
<div className="">
<h1> Poetion </h1>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/starter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class Starter extends Component {
return (

<div className="react-root">
<Name />
{/* <Name /> */}
<Credits />

<Stage className="poem-canvas">
Expand Down

0 comments on commit fee429e

Please sign in to comment.