Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 8 additions & 26 deletions src/assets/styles/_ViewArticle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,31 @@
box-sizing: border-box;
content: width= device-width, initial-scale=1;
}
// body {
// background-color: #e8eeef;


// }
//MAIN CONTAINER CODE
.container-individual {
margin: auto;
display: grid;
grid-gap: 10px;
padding: 30px 10px 20px 10px;
width: 100%;
//justify-content: center;
max-width: 1000px;
width: 100%;
max-width: 1000px;
align-self: center;
margin-bottom: 1px;
font-family: Helvetica;
margin-top: 3em;
// overflow: auto;

// margin-left: 25%;
// margin-right: 25%;
}


//THIS IS THE INDUVIDWAL VIWE CSS

.card-individual {
// box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
background-color: ghostwhite;
border-bottom: solid 0.1px lightgrey;
overflow: auto;
//overflow: auto;
border-radius: 10px;
// width: 900px;
}

.auther-name-individual {
Expand All @@ -47,9 +41,7 @@
}

.grid-subject2 {

padding: 12px 40px;
// background-color: white;
border-bottom-style: hidden;
text-align: left;
font-weight: bold;
Expand All @@ -72,7 +64,6 @@
font-size: 9pt;
background-color: white;
border: hidden;
//font-weight: bold;
border-radius: 1px;
position: relative;
font-weight: bold;
Expand All @@ -83,7 +74,6 @@
font-size: 9pt;
background-color: white;
border: hidden;
//font-weight: bold;
border-radius: 1px;
position: relative;
font-weight: bold;
Expand All @@ -94,15 +84,13 @@
}
//THIS IS ADD COMMENT CSS
.card-addcomment {
// box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
background-color: ghostwhite;
padding: 4px 4px 30px 4px;
transform: 1.5;
border-bottom: solid 0.2px lightgray;
border-radius: 10px;
}
.card-addcomment:hover {
// box-shadow: 5px 10px 20px 1px rgba(0, 0, 0, 0.9) !important;
border: solid 1px gray;
}

Expand All @@ -116,7 +104,7 @@
float: right;
color: #fae596;
display: inline-block;
margin:2px;
margin: 2px;
}

textarea {
Expand All @@ -129,7 +117,6 @@ textarea {

//THIS IS THE LIST OF COMMENTS CSS
.card-comment {
//box-shadow: 0 1px 2px rgba(0,0,0, 0.4);
background-color: ghostwhite;
margin-top: 4px;
border-bottom: solid 0.2px lightgray;
Expand Down Expand Up @@ -159,7 +146,6 @@ textarea {

.likes-individual {
position: absolute;
// background-color: lightgrey;
padding-top: 0;
padding-right: 0.3em;
padding-left: 0.3em;
Expand All @@ -175,10 +161,6 @@ textarea {
background-color: deepskyblue;
background-size: 10px;
}
.commentdescription{
.commentdescription {
padding-left: 1.5em;

}
.usernamepost{
// padding-left: 1em;
}
9 changes: 3 additions & 6 deletions src/assets/styles/_create_article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@
font-weight: bold;
align-self: flex-end;
background: $main-color;
// background: $secondary-color;
color: lightgray;
// background-color: yellow;

}
.modal-wrapper-postarticle {
background: rgba(0, 0, 0, 0.5);
Expand Down Expand Up @@ -115,15 +114,13 @@
flex-direction: column;
transform: translate(-35%, -35%);
}
//.devedit-form-legend1 {
// font-size: 1em;
//}

}
.autosuggest_list{
font-size: 0.5em;
line-height: 1em;
letter-spacing: -0.08em;
text-align: start;
align-self: flex-start;
// padding: 1em;

}
29 changes: 4 additions & 25 deletions src/assets/styles/_searchbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
}
.mainSearch {
display: flex;
//position:relative;
overflow: hidden;
}
@media only screen {
Expand All @@ -31,9 +30,6 @@
}
@media screen and (min-width: 320px) {
.input-field {
// padding: 10px 10px 10px 30px;
// text-align: left;
// width: 30em;
display: flex;
padding: 5px 10px 10px 30px;
text-align: left;
Expand All @@ -42,18 +38,11 @@
margin-left: 24em;
margin-right: 0.5em;
border-radius: solid 6px;
//background-color: whitesmoke;

}
// .input-icons i {
// position: absolute;
// float: left;
// margin-top: 20px;
// // margin-right: 10em;
// margin-left: -10.5em;
// }

.popover__wrapper {
position: relative;
//margin-top: 1.5rem;
display: inline-block;
}
.popover__content {
Expand Down Expand Up @@ -84,9 +73,7 @@
z-index: 10;
opacity: 1;
visibility: visible;
//transform: translate(0, -0.4px);
transition: all 0.5s cubic-bezier(0.75, -0.02, 0.2, 0.97);
//width: 120em;
}
.popover__message {
text-align: left;
Expand All @@ -102,16 +89,9 @@
border-radius: 10px;
margin-right: 0.2em;
}
// .input-icons i {
// position: absolute;
// float: left;
// margin-top: 20px;
// // margin-right: 5em;
// margin-left: 10.5em;
//}

.popover__wrapper {
position: relative;
//margin-top: 1.5rem;
display: inline-block;
}
.popover__content {
Expand Down Expand Up @@ -141,9 +121,8 @@
z-index: 10;
opacity: 1;
visibility: visible;
//transform: translate(0, -0.4px);
transition: all 0.5s cubic-bezier(0.75, -0.02, 0.2, 0.97);
//width: 120em;

}
.popover__message {
text-align: left;
Expand Down
23 changes: 11 additions & 12 deletions src/components/AddReplys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { withFirebase } from "../Firebase";
import { withRouter } from "react-router-dom";
import { compose } from "recompose";
//import * as ROUTES from "../../constants/routes";

import { AuthUserContext } from "../Session";
const moment = require("moment");
class AddReplys extends React.Component {
Expand All @@ -16,11 +16,11 @@ class AddReplys extends React.Component {
}

togglePopup = () => {
//const{commentId}=this.props

this.setState({
showPopup: !this.state.showPopup
});
//console.log("this is the commentId", commentId)

};
cancle = () => {
this.setState({ showPopup: false });
Expand All @@ -29,12 +29,12 @@ class AddReplys extends React.Component {
handleSubmit =(e,authUser)=> {
e.preventDefault();
const commentId = this.props.commentId;
// console.log("this is the commentId for the reply", commentId)

this.props.firebase
//.replys(commentId)

.comments()
.add({
// commentId:commentId,

reply: this.state.reply,
timeCreated: moment().format(` MMMM DD, YYYY -- hh:mm:ss A `),
userId:authUser.uid,
Expand All @@ -44,8 +44,7 @@ class AddReplys extends React.Component {
console.log('DOC REF', docRef.id)
this.props.firebase.comment(commentId).update({
childCommentId: docRef.id
//console.log(" this is the replysID ", docRef.id)
//console.log(" this is the replysID ", docRef.id)

});

this.setState({
Expand All @@ -62,9 +61,9 @@ class AddReplys extends React.Component {
};

render() {
// const { comment, limited, timeCreated,commentId } = this.props;

const { commentId} = this.props;
//console .log("this is the comment Id i have from comment",commentId)

return (
<AuthUserContext.Consumer>
{authUser => (
Expand All @@ -79,10 +78,10 @@ class AddReplys extends React.Component {
<div className="commentgrid">
<textarea
className="commentContent"
// id="reply"

type="text"
value={this.state.reply}
//name="reply"

placeholder="Write your Reply here! "
autoFocus={true}
onChange={this.handleChange}
Expand Down
13 changes: 6 additions & 7 deletions src/components/Comment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
import { withFirebase } from "../../components/Firebase";
import ReplyComment from "../ReplyComment";
import AddReplys from "../AddReplys";
// const moment = require("moment");
class Comment extends React.Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -81,15 +80,15 @@ class Comment extends React.Component {
);
const numOfReplys = replyToRender.length;
let commentContent = comment.comment;
// console.log("reply",replysId)

if (replys) {
replys.sort((a, b) => {
const isReversed = sortType === "desc" ? 1 : -1;
return isReversed * a.timeCreated.localeCompare(b.timeCreated);
});
}
if (comment.comment && comment.comment.length <= limited) {
// console.log("IF", comment.comment, comment.comment.length);

return (
<AuthUserContext.Consumer>
{(authUser) => (
Expand Down Expand Up @@ -159,10 +158,10 @@ class Comment extends React.Component {
</AuthUserContext.Consumer>
);
} else {
// console.log("ELSE", comment.comment, comment.comment.length);

if (showAll) {
return (
// <div className="card-comment">

<div className="commentDisplay">
<p className="styleDisplay">
<span>
Expand All @@ -180,11 +179,11 @@ class Comment extends React.Component {
);
}
}
//console.log("this is commentContent",commentContent)

const toShow = commentContent.slice(0, limited) + "....";
if (toShow) {
return (
<div //className="card-comment"
<div
>
<div className="commentDisplay ">
<p className="styleDisplay">
Expand Down
Loading