From 0412b54d5ed02e1482a31c7f15866d5539adca7d Mon Sep 17 00:00:00 2001 From: transtrike Date: Mon, 11 Jan 2021 23:49:15 +0200 Subject: Posts design fixes --- .../src/app/components/feed/feed.component.css | 27 ++-- .../src/app/components/feed/feed.component.html | 144 +++++---------------- .../src/app/components/post/post.component.css | 71 ++-------- .../src/app/components/post/post.component.html | 4 +- 4 files changed, 62 insertions(+), 184 deletions(-) (limited to 'src/DevHive.Angular') diff --git a/src/DevHive.Angular/src/app/components/feed/feed.component.css b/src/DevHive.Angular/src/app/components/feed/feed.component.css index d81f233..b6c1d3e 100644 --- a/src/DevHive.Angular/src/app/components/feed/feed.component.css +++ b/src/DevHive.Angular/src/app/components/feed/feed.component.css @@ -1,19 +1,21 @@ #feed-page { - width: 75%; - margin-left: auto; - margin-right: auto; + width: 45%; + display: flex; + margin-left: auto; + margin-right: auto; margin-top: 10px; + + place-content: center center; +} + +.side-bar { + } .top-bar { - display: inline-grid; + display: flex; width: 100%; - - grid-template-columns: 50px auto 50px; - grid-template-rows: 50px; - place-items: stretch stretch; - place-content: stretch stretch; } .top-bar img { @@ -21,6 +23,10 @@ height: 50px; } +.nav-bar-profile-pic { + border-radius: 50%; +} + .on-your-mind { margin-left: 10px; margin-right: 10px; @@ -36,5 +42,6 @@ } .post { - padding: 1% 0%; + padding: 1% 0%; + box-sizing: border-box; } \ No newline at end of file diff --git a/src/DevHive.Angular/src/app/components/feed/feed.component.html b/src/DevHive.Angular/src/app/components/feed/feed.component.html index 44ae438..465adeb 100644 --- a/src/DevHive.Angular/src/app/components/feed/feed.component.html +++ b/src/DevHive.Angular/src/app/components/feed/feed.component.html @@ -1,117 +1,33 @@
-
diff --git a/src/DevHive.Angular/src/app/components/post/post.component.css b/src/DevHive.Angular/src/app/components/post/post.component.css index 3a3300d..35bbe7a 100644 --- a/src/DevHive.Angular/src/app/components/post/post.component.css +++ b/src/DevHive.Angular/src/app/components/post/post.component.css @@ -1,13 +1,6 @@ .post { width: 100%; - display: grid; - position: relative; - - grid-template-columns: 25% auto 40px; - grid-template-rows: 10% 10% auto 5% 10%; - - /* justify-content: space-between; - align-items: center; */ + display: flex; border: 2px solid black; border-radius: 10px; @@ -15,55 +8,26 @@ } .post-info { - grid-column-start: 1; - grid-column-end: 2; - - grid-row-start: 1; - grid-row-end: 4; + flex: 1; } /* Start of navigation */ .profile { width: 25%; - display: grid; + display: flex; box-sizing: border-box; - - grid-column-start: 1; - grid-column-end: 2; - - grid-row-start: 1; - grid-row-end: 2; } .post-profile-pic img { width: 60px; height: 60px; - - grid-column-start: 1; - grid-column-end: 1; - - grid-row-start: 1; - grid-row-end: 2; + border-radius: 50%; } .user-info { width: 100%; padding-left: 5px; - - grid-column-start: 2; - grid-column-end: 2; - - grid-row-start: 1; - grid-row-end: 2; -} - -.profile-names { - grid-row: 1; -} - -.profile-username { - grid-row: 2; } /* End of navigation */ @@ -72,18 +36,15 @@ /* Start of post */ .content { - grid-column-start: 1; - grid-column-end: 2; } .message { - grid-row-start: 3; - grid-row-end: 3; } .date-created { - grid-row-start: 4; - grid-row-end: 4; + font-size: small; + color: grey; + /* TODO: Do this!!! */ } .separator { @@ -93,28 +54,22 @@ /* End of post */ -/* Start of ranking */ +/* Start of rating */ -.ranking { - width: 40px; +.rating { height: 100%; text-align: center; - - grid-column-start: 3; - grid-column-end: 3; - - grid-row-start: 1; - grid-row-end: 4; + align-self: center; } -.ranking button { +.rating button { background-color: transparent; background-repeat: no-repeat; border: none; } -.ranking button:hover { +.rating button:hover { cursor: pointer; } -/* End of ranking */ +/* End of rating */ diff --git a/src/DevHive.Angular/src/app/components/post/post.component.html b/src/DevHive.Angular/src/app/components/post/post.component.html index ee8f495..15cfc59 100644 --- a/src/DevHive.Angular/src/app/components/post/post.component.html +++ b/src/DevHive.Angular/src/app/components/post/post.component.html @@ -17,12 +17,12 @@
Here, a cool way to style elements in CSS
-
12.01.2021
+
17:27 - 06 dec 2020

idk.html
-
+
{{ votesNumber }}
-- cgit v1.2.3