From 1656b981cdb8b006456897087ff898f7c1ee8852 Mon Sep 17 00:00:00 2001 From: nicholas llerandi Date: Sat, 27 Apr 2019 20:29:40 -0400 Subject: [PATCH 1/5] allquestions-styling --- .../src/components/questions/AllQuestions.js | 69 ++++++++++++++++--- 1 file changed, 60 insertions(+), 9 deletions(-) diff --git a/client/src/components/questions/AllQuestions.js b/client/src/components/questions/AllQuestions.js index 25b7815..acd8ded 100644 --- a/client/src/components/questions/AllQuestions.js +++ b/client/src/components/questions/AllQuestions.js @@ -1,8 +1,10 @@ import React, {Component} from "react"; import {Link} from "react-router-dom"; +import styled from 'styled-components' -// Styled Components -import {Card} from '../../elements' +// Styled Components / Utils +import {lighterblack, black, blue} from '../../utils' +// import {Card} from '../../elements' class AllQuestions extends Component { render() { @@ -13,13 +15,24 @@ class AllQuestions extends Component { {questions.map(question => { return ( - - {question.title} - - - {question.user ? - {question.user.name} : - 'User deleted profile :(' - } +
+
{question.likes.length}
+
likes
+
+ +
+

+ + {question.title} + +

+
+ {question.user ? + {question.user.name} : + 'User deleted profile :(' + } +
+
) })} @@ -28,4 +41,42 @@ class AllQuestions extends Component { } } +const Card = styled.div` + display: flex; + padding: 12px 8px; + border-bottom: 1px solid ${lighterblack}; + color: ${black}; + + .likes { + padding-right: 30px; + + &_value { + text-align: center; + } + } + + .summary { + flex: 1 auto; + width: auto; + float: none; + margin: 0; + overflow: hidden; + + h3 { + font-weight: 400; + margin: 0 0 .35em 0; + line-height: 1.3; + } + } + + a { + text-decoration: none; + color: ${black}; + } + + a:hover { + color: ${blue} + } +`; + export default AllQuestions; \ No newline at end of file From 766e93f601e1e11365e98ffc05dc7f6bf52b1946 Mon Sep 17 00:00:00 2001 From: nicholas llerandi Date: Sat, 27 Apr 2019 21:12:37 -0400 Subject: [PATCH 2/5] added mainbar and sidebar --- client/src/App.js | 19 +++++---- client/src/Global.js | 12 ++++++ client/src/components/homepage/Homepage.js | 2 +- .../src/components/questions/AllQuestions.js | 41 ++++++++++++++----- 4 files changed, 56 insertions(+), 18 deletions(-) diff --git a/client/src/App.js b/client/src/App.js index 00eb03b..7a8cfae 100755 --- a/client/src/App.js +++ b/client/src/App.js @@ -45,13 +45,18 @@ class App extends Component {
- - - - - - - +
+ + + + + + + +
+
+ Here is the sidebar +