From 693a6d5bcc18181bc6477b5e0f79f820da6e8e5e Mon Sep 17 00:00:00 2001 From: Kathrin Holzmann Date: Fri, 13 Sep 2019 16:06:05 +0200 Subject: [PATCH 1/9] setup vanilla css variant --- package.json | 1 + public/index.html | 8 +--- public/styles/avatar.css | 3 ++ public/styles/base.css | 4 ++ public/styles/blog.css | 7 ++++ public/styles/button.css | 39 +++++++++++++++++++ public/styles/comments.css | 38 ++++++++++++++++++ public/styles/grid.css | 20 ++++++++++ public/styles/header.css | 3 ++ public/styles/index.css | 9 +++++ public/styles/profile.css | 29 ++++++++++++++ public/styles/textField.css | 5 +++ src/App.js | 4 +- src/components/Atoms/Button/index.js | 16 +++++--- .../{CommentForm => CommentArea}/index.js | 17 +++++--- src/components/Organisms/Footer/index.js | 2 +- src/components/index.js | 4 +- src/containers/Blog/index.js | 13 +++++-- yarn.lock | 5 +++ 19 files changed, 202 insertions(+), 25 deletions(-) create mode 100644 public/styles/avatar.css create mode 100644 public/styles/base.css create mode 100644 public/styles/blog.css create mode 100644 public/styles/button.css create mode 100644 public/styles/comments.css create mode 100644 public/styles/grid.css create mode 100644 public/styles/header.css create mode 100644 public/styles/index.css create mode 100644 public/styles/profile.css create mode 100644 public/styles/textField.css rename src/components/Organisms/{CommentForm => CommentArea}/index.js (54%) diff --git a/package.json b/package.json index 19b56dd..7a37123 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "classnames": "^2.2.6", "react": "^16.9.0", "react-dom": "^16.9.0", "react-scripts": "3.1.1" diff --git a/public/index.html b/public/index.html index 80ffd85..468a0e0 100644 --- a/public/index.html +++ b/public/index.html @@ -15,12 +15,8 @@ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> - diff --git a/public/styles/avatar.css b/public/styles/avatar.css new file mode 100644 index 0000000..db24338 --- /dev/null +++ b/public/styles/avatar.css @@ -0,0 +1,3 @@ +.avatar { + max-width: 250px; +} \ No newline at end of file diff --git a/public/styles/base.css b/public/styles/base.css new file mode 100644 index 0000000..01f3371 --- /dev/null +++ b/public/styles/base.css @@ -0,0 +1,4 @@ +body { + font-size: 16px; + background: ivory; +} \ No newline at end of file diff --git a/public/styles/blog.css b/public/styles/blog.css new file mode 100644 index 0000000..3366f8b --- /dev/null +++ b/public/styles/blog.css @@ -0,0 +1,7 @@ +.blogContainer { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 20px; +} \ No newline at end of file diff --git a/public/styles/button.css b/public/styles/button.css new file mode 100644 index 0000000..d77a9b3 --- /dev/null +++ b/public/styles/button.css @@ -0,0 +1,39 @@ +.button { + background: #5CBCFF; + background-image: -webkit-linear-gradient(top, #5CBCFF, #A696FF); + background-image: -moz-linear-gradient(top, #5CBCFF, #A696FF); + background-image: -ms-linear-gradient(top, #5CBCFF, #A696FF); + background-image: -o-linear-gradient(top, #5CBCFF, #A696FF); + background-image: linear-gradient(to bottom, #5CBCFF, #A696FF); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + color: #fff; + border: solid #A696FF 1px; + text-decoration: none; + display: inline-block; + cursor: pointer; + padding: 10px 15px; +} + +.button:hover { + background: #fff; + color: #A696FF; + text-decoration: none; +} + +.button.secondary { + background: #fff; + border-color: #a696ff; + color: #a696ff +} +.button.secondary:hover { + background-color: #fff; + border-color: #a696ff; + opacity: 0.5; +} + +.button.superlike { + font-size: 25px; + font-weight: bold; +} \ No newline at end of file diff --git a/public/styles/comments.css b/public/styles/comments.css new file mode 100644 index 0000000..b9cdf72 --- /dev/null +++ b/public/styles/comments.css @@ -0,0 +1,38 @@ +.comment__form { + display: flex; + flex-direction: column; + align-items: center; +} + +.comment { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + background-color: white; +} + +.comment__avatar { + display: flex; + flex-direction: column; + align-items: center; + border-top-right-radius: 50%; + border-bottom-right-radius: 50%; + background-color: ivory; +} + +.comment__content { + background-color: white; + padding: 40px; + border-radius: 10%; +} + +.comment__form__actions { + display: flex; + justify-content: center; + width: 800px; +} + +.comment__form__actions__btn { + margin: 20px 5px; +} diff --git a/public/styles/grid.css b/public/styles/grid.css new file mode 100644 index 0000000..e4063ab --- /dev/null +++ b/public/styles/grid.css @@ -0,0 +1,20 @@ +.grid { + display: grid; + grid-template-columns: 140px 50px auto 50px 140px; + grid-template-areas: + "header header header header header" + ". main main main ." + "footer footer footer footer footer" +} + +.header { + grid-area: header; +} + +.footer { + grid-area: footer; +} + +.main { + grid-area: main; +} \ No newline at end of file diff --git a/public/styles/header.css b/public/styles/header.css new file mode 100644 index 0000000..3efa158 --- /dev/null +++ b/public/styles/header.css @@ -0,0 +1,3 @@ +.header { + background: rgba(224, 100, 230, 0.3); +} \ No newline at end of file diff --git a/public/styles/index.css b/public/styles/index.css new file mode 100644 index 0000000..2dbb7dc --- /dev/null +++ b/public/styles/index.css @@ -0,0 +1,9 @@ +@import "./base.css"; +@import "./grid.css"; +@import "./header.css"; +@import "./button.css"; +@import "./textField.css"; +@import "./avatar.css"; +@import "./profile.css"; +@import "./comments.css"; +@import "./blog.css"; diff --git a/public/styles/profile.css b/public/styles/profile.css new file mode 100644 index 0000000..a314cdd --- /dev/null +++ b/public/styles/profile.css @@ -0,0 +1,29 @@ +.profile { + position: relative; +} + +.profile__button { + position: absolute; + left: 20px; + bottom: 20px; +} +.profile__image { + max-width: 800px; + display: inline-block; + border: 3px solid silver; + border-radius: 2% 6% 5% 4% / 1% 1% 2% 4%; + position: relative; +} + +.profile__image::before { + content: ''; + border: 2px solid #353535; + display: block; + width: 100%; + height: 100%; + position: absolute; + top: 50%; + left: 50%; + transform: translate3d(-50%, -50%, 0) scale(1.015) rotate(0.5deg); + border-radius: 1% 1% 2% 4% / 2% 6% 5% 4%; +} \ No newline at end of file diff --git a/public/styles/textField.css b/public/styles/textField.css new file mode 100644 index 0000000..51ec71a --- /dev/null +++ b/public/styles/textField.css @@ -0,0 +1,5 @@ +.textField { + width: 800px; + height: 250px; + display: block; +} \ No newline at end of file diff --git a/src/App.js b/src/App.js index 31d8b33..27e6ec2 100644 --- a/src/App.js +++ b/src/App.js @@ -7,9 +7,9 @@ import Blog from './containers/Blog' function App() { return ( -
+
-
+