Skip to content

Commit

Permalink
resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdthvxy committed Jun 11, 2019
2 parents e4634fe + 395e45e commit 35cee12
Show file tree
Hide file tree
Showing 12 changed files with 195 additions and 53 deletions.
1 change: 1 addition & 0 deletions src/components/Nav.js
Expand Up @@ -11,6 +11,7 @@ function Nav() {
<li className="navItem"><NavLink to="/" className="navLink" tabIndex='2'>Search</NavLink></li>
<li className="navItem"><NavLink to="/notes" className="navLink" tabIndex='3'>Bookmarks</NavLink></li>
</ul>

<ul className="hiddenNavList">
<li className="navItem"><NavLink to="/" className="navLink" aria-label="search" tabIndex='2'><i class="fas fa-search"></i></NavLink></li>
<li className="navItem"><NavLink to="/notes" className="navLink" tabIndex='3'><i class="fas fa-clipboard-list"></i></NavLink></li>
Expand Down
25 changes: 8 additions & 17 deletions src/components/Notes.js
Expand Up @@ -48,18 +48,6 @@ class Notes extends Component {
}

// handle submit of form
editNote = (key) => {
const found = this.state.bookmarkList.find(item => item.key === key);
this.setState({
modalOpen: 'open',
selectedId: key,
userName: found.name,
userAddress: found.address,
userNote: found.note,
userCategory: found.category
})
}

handleSubmit = (event) => {
event.preventDefault();
const dbRef = firebase.database().ref(this.state.selectedId);
Expand Down Expand Up @@ -194,10 +182,13 @@ class Notes extends Component {
{this.state.bookmarkList.map((item) => {
return (
<div key={item.key} className="singleNote singleContent">
<p className="schoolName">Institution: {item.name}</p>
<p className="address"> Address: {item.address}</p>
<p className="category">Category: {item.category}</p>
<p className="note"> Note: {item.note}</p>
<div className="textWrapper">
<p className="schoolName">Institution: {item.name}</p>
<p className="address"> Address: {item.address}</p>
<p className="category">Category: {item.category}</p>
<p className="note"> Note: {item.note}</p>
</div>


<button className="generalButton" onClick={() => { this.editNote(item.key) }}>
<i className="fas fa-pen" aria-hidden="true"></i>Edit
Expand All @@ -219,7 +210,7 @@ class Notes extends Component {
width: 30,
right: 15,
border: `3px solid #073330`,
background: `rgba(255, 255, 255, 0.548)`,
background: `rgba(255, 255, 255, 0.848)`,
}}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/School.js
Expand Up @@ -143,7 +143,7 @@ class School extends Component {
width: 30,
right: 15,
border: `3px solid #073330`,
background: `rgba(255, 255, 255, 0.548)`,
background: `rgba(255, 255, 255, 0.848)`,
}}
/>
{/* only display the filter when a list of schools is returned */}
Expand Down
9 changes: 7 additions & 2 deletions src/components/Search.js
Expand Up @@ -109,22 +109,25 @@ class Search extends Component {

// handle submit of form
handleSubmit = e => {
<<<<<<< HEAD
// requires error handling of things not selected
e.preventDefault();
// console.log('submitted')
// console.log(this.state.userInput);
// console.log(this.state.institution.length);
=======
>>>>>>> master
if (this.state.institution.length === 0 || this.state.userInput.length === 0) {
swal({
title: "oops",
text: "please make sure all fields are entered",
icon: "warning",
});

} else {
if (/^\s*$/.test(this.state.userInput) === false) {
this.apiCall();

jump('.schoolResults', {
duration: 1000,
offset: -50,
Expand All @@ -138,6 +141,8 @@ class Search extends Component {
});
}
}

e.preventDefault();
};

render() {
Expand Down
35 changes: 33 additions & 2 deletions src/styles/partials/_addSchool.scss
Expand Up @@ -45,21 +45,52 @@
display:none;
}
.radioButtonDot + label {
width: 26.5%;
text-align: center;
width: calc(100% / 3);
padding:8px 10px;
border: 1px solid $white;
border-radius: 2px;
display: inline-block;
transition: 0.2s;
box-shadow: 0 5px #999;
font-weight: 700;
<<<<<<< HEAD
box-shadow: 0 5px #999;
transition: 0.2s;
=======
text-align: center;

>>>>>>> master
}
.radioButtonDot:checked + label {
transform: translateY(3px);
box-shadow: 0 2px #666;
@include color($activeColor, $black);
}

}
}

.editForm{
padding: 10px;
display: flex;
flex-direction: column;
}

@media (max-width:700px) {
.inputFieldContainer {
flex-wrap: wrap;
input,
textarea,
label {
width: 100%;
}
label{
text-align: left;
}

}

.inputFieldContainerRadio .radioButtonDot + label {
width: 100%;
}
}
28 changes: 28 additions & 0 deletions src/styles/partials/_details.scss
Expand Up @@ -76,4 +76,32 @@
.descriptionWrapper {
width:80%;
margin-top: 1rem;
}

@media(max-width: 630px) {
.detailsModal {
width: 450px;
max-height: 90%;
padding: 1rem;
}

.detailsFlex {
flex-direction: column;
}

.imgWrapper {
width: 55%;
}

.smallInfoWrapper,
.descriptionWrapper {
width: 100%;
font-size: 0.8rem;
}
}

@media (max-width: 460px) {
.detailsModal {
width: 300px;
}
}
8 changes: 6 additions & 2 deletions src/styles/partials/_footer.scss
@@ -1,8 +1,11 @@
footer {
@include color($black, $primaryColor);
text-align: center;
margin-top: 20px;
height: 50px;
padding: 5px 0;
p{
line-height: 1;
}
a {
&:hover,
&:focus {
Expand All @@ -13,6 +16,7 @@ footer {

@media (max-width:400px) {
footer {
font-size: 18px;
height: auto;
font-size: 1rem;
}
}
28 changes: 14 additions & 14 deletions src/styles/partials/_nav.scss
@@ -1,14 +1,16 @@
.nav {
@include color($secondaryColor, $white);
height: 80px;
}
.nav .wrapper {
@include flex(flex, space-between, center, center);
.navList {
width:20%;
width:21%;
@include flex(flex, space-between, center, center);
}
h1 {
font-size: 30px;
font-size: 1.667rem;
line-height: 1;
}
.navItem {
margin-right: 20px;
Expand All @@ -19,7 +21,7 @@

.navLink {
text-transform: uppercase;
font-size: 25px;
font-size: 1.1rem;
&:focus,
&:hover {
color: $primaryColor;
Expand All @@ -33,11 +35,11 @@
@media (max-width:1260px) {
.nav .wrapper {
h1 {
font-size: 25px;
font-size: 1.333rem;
}

.navLink {
font-size: 20px;
font-size: 1.01rem;
}
}
}
Expand All @@ -48,9 +50,6 @@
}
@media (max-width:780px) {
.nav .wrapper {
h1 {
font-size: 25px;
}
.navList {
display: none;
}
Expand All @@ -59,27 +58,28 @@
@include flex(row,space-between,center,center);
width: 15%;
i {
font-size: 30px;
font-size: 1.667rem;
}
}
}
@media (max-width:550px) {
.hiddenNavList {
i {
font-size: 22px;
font-size: 1.122rem;
}
}
}
@media (max-width:400px) {
.nav {
height:auto;
}
.nav .wrapper {
h1 {
font-size: 20px;
font-size: 1.111rem;
}
}
.hiddenNavList {
width: 20%;
i {
font-size: 18px;
}

}
}
25 changes: 23 additions & 2 deletions src/styles/partials/_notes.scss
Expand Up @@ -8,14 +8,17 @@
text-align: center;
color: $black;
}
.wrapper {
padding-bottom: 10px;
}
}

.addSign {
@include color(inherit, $black);
display: flex;
margin: 1rem 0;
padding: 10px;
font-size: 20px;
font-size: 1.111rem;
border-radius: 10px;
background: linear-gradient(53deg, rgba(27,65,56,1) 14%, rgba(7,51,48,1) 31%, rgba(13,27,23,1) 69%);
color: $white;
Expand All @@ -37,9 +40,13 @@
}
.singleNote {
margin-bottom: 1.5rem;
.textWrapper {
max-width: 100%;
}
p {
margin-bottom: 0.7rem;
word-wrap:break-word;
overflow-wrap:break-word;
}
button {
width: 25%;
Expand All @@ -53,7 +60,7 @@
}
.schoolName {
margin-bottom: 15px;
font-size: 23px;
font-size: 1.222rem;
font-weight: 700;
}

Expand All @@ -67,4 +74,18 @@
padding: 10px;
border-radius: 10px;
}
}
@media (max-width:1000px) {
.singleNote button {
width: 40%;
margin: 10px;
}
.bookmarks h2 {
font-size: 1.1rem;
}
}
@media(max-width:780px) {
.notes {
grid-template-columns: 1fr;
}
}

0 comments on commit 35cee12

Please sign in to comment.