From 174d215dc4c1990179cba15b7de38574d3d4db9c Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 13 Jan 2021 20:24:28 +0200 Subject: Reworked post component CSS and HTML --- src/DevHive.Angular/.editorconfig | 4 + .../src/app/components/post/post.component.css | 86 ++++++++++------------ .../src/app/components/post/post.component.html | 46 ++++++------ src/DevHive.Angular/src/styles.css | 12 ++- 4 files changed, 77 insertions(+), 71 deletions(-) (limited to 'src/DevHive.Angular') diff --git a/src/DevHive.Angular/.editorconfig b/src/DevHive.Angular/.editorconfig index 3d9a482..5129152 100644 --- a/src/DevHive.Angular/.editorconfig +++ b/src/DevHive.Angular/.editorconfig @@ -8,6 +8,10 @@ indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true +[*.css] +indent_size = 2 +indent_style = space + [*.ts] quote_type = single 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 35bbe7a..1d41398 100644 --- a/src/DevHive.Angular/src/app/components/post/post.component.css +++ b/src/DevHive.Angular/src/app/components/post/post.component.css @@ -1,75 +1,65 @@ .post { - width: 100%; - display: flex; - - border: 2px solid black; - border-radius: 10px; - padding: 4px; -} - -.post-info { - flex: 1; + display: flex; + width: inherit; } -/* Start of navigation */ +/* Author */ -.profile { - width: 25%; - display: flex; - box-sizing: border-box; +.author { + display: flex; + margin-bottom: .2em; } -.post-profile-pic img { - width: 60px; - height: 60px; - border-radius: 50%; +.author > img { + width: 2.2em; + height: 2.2em; + margin-right: .2em; + border-radius: 50%; + object-fit: cover; } -.user-info { - width: 100%; - padding-left: 5px; +.author-info > .handle { + font-size: .9em; + color: gray; } -/* End of navigation */ - - -/* Start of post */ +/* Content */ .content { + flex: 1; } .message { + margin: .3em 0; } -.date-created { - font-size: small; - color: grey; - /* TODO: Do this!!! */ +.timestamp { + font-size: .5em; + color: gray; } -.separator { - width: 100%; -} - -/* End of post */ - - -/* Start of rating */ +/* Rating */ .rating { - height: 100%; - text-align: center; - align-self: center; + display: flex; + flex-direction: column; + align-items: center; + margin-right: -.2em; } -.rating button { - background-color: transparent; - background-repeat: no-repeat; - border: none; +.vote { + flex: 1; + background: white; + font-size: 1em; + box-sizing: border-box; + border: 2px solid white; + border-radius: .3em; } -.rating button:hover { - cursor: pointer; +.vote:hover { + background: lightgray; } -/* End of rating */ +.vote:active { + border-color: black; +} 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 15cfc59..c4f3f8c 100644 --- a/src/DevHive.Angular/src/app/components/post/post.component.html +++ b/src/DevHive.Angular/src/app/components/post/post.component.html @@ -1,30 +1,32 @@ -
-
- -
{{ votesNumber }}
- + +
+ {{ votesNumber }} +
+
diff --git a/src/DevHive.Angular/src/styles.css b/src/DevHive.Angular/src/styles.css index 9acf23f..07a0462 100644 --- a/src/DevHive.Angular/src/styles.css +++ b/src/DevHive.Angular/src/styles.css @@ -7,5 +7,15 @@ html, body { } body { - font: 21px sans-serif; + font: 21px sans-serif !important; +} + +input:focus, button:focus { + outline: 0; +} + +.rounded-border { + border: 2px solid black; + border-radius: .6em; + padding: .4em; } -- cgit v1.2.3