From 8a2152c98dc1c82b6476d6b8108615b2770e008a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 22 Jan 2021 19:06:46 +0200 Subject: Made some minor front-end design improvements: better implemented scrolling of part of a page, fixed some alignments (mainly in the files) --- .../src/app/components/feed/feed.component.css | 27 ++----- .../src/app/components/feed/feed.component.html | 10 +-- .../src/app/components/post/post.component.css | 2 +- .../profile-settings.component.css | 28 +++++++ .../profile-settings.component.html | 90 +++++++++++----------- .../app/components/profile/profile.component.css | 1 + .../app/components/profile/profile.component.html | 56 +++++++------- src/DevHive.Angular/src/styles.css | 36 +++++---- 8 files changed, 137 insertions(+), 113 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 fe3f4a1..bbb1668 100644 --- a/src/DevHive.Angular/src/app/components/feed/feed.component.css +++ b/src/DevHive.Angular/src/app/components/feed/feed.component.css @@ -1,9 +1,11 @@ #feed-page { + height: 100%; max-width: 40em; - margin: 0 auto; - border: .5em solid var(--bg-color); - border-bottom: 0; box-sizing: border-box; + border: .5em solid var(--bg-color); + + margin: 0 auto; + display: flex; } @@ -28,22 +30,8 @@ #feed-content { flex: 1; -} - -#posts { - max-height: calc(100vh - 3.5em); - overflow-y: auto; -} - - /* Hide scrollbar for Chrome, Safari and Opera */ -#posts::-webkit-scrollbar { - display: none; -} - - /* Hide scrollbar for IE, Edge and Firefox */ -#posts { - -ms-overflow-style: none; /* IE and Edge */ - scrollbar-width: none; /* Firefox */ + display: flex; + flex-direction: column; } /* Profile bar */ @@ -94,7 +82,6 @@ margin-bottom: .5em; } - #top-bar-profile-pic { height: 2.5em; width: 2.5em; 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 22213bc..4a93120 100644 --- a/src/DevHive.Angular/src/app/components/feed/feed.component.html +++ b/src/DevHive.Angular/src/app/components/feed/feed.component.html @@ -14,7 +14,7 @@ -
+
-
    -
  • +
    +
    -
  • -
+
+
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 4769191..9de5a27 100644 --- a/src/DevHive.Angular/src/app/components/post/post.component.css +++ b/src/DevHive.Angular/src/app/components/post/post.component.css @@ -8,7 +8,7 @@ padding: .5em; background-color: var(--card-bg); border-radius: .6em; -box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px; + box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px; } /* So the bottom shadow of the last element diff --git a/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.css b/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.css index becae6d..3f31373 100644 --- a/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.css +++ b/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.css @@ -7,6 +7,10 @@ justify-content: start; } +form { + width: 100%; +} + hr { width: calc(100% - 1em); color: black; @@ -31,8 +35,32 @@ hr { margin-left: 0; } +/* Form */ + +.input-field { + border-color: var(--focus-color) !important; + caret-color: var(--focus-color); + border-width: 2px !important; + margin-top: -1px !important; +} + +.input-field-label { + font-size: .7em; + color: var(--focus-color); + transform: translate(0, -1.2em); +} + /* Buttons */ +#successful-update-msg { + background-color: var(--success); + color: white; + width: 100%; + padding: .2em; + margin-top: .5em; + text-align: center; +} + #delete-account:hover { color: indianred; border-color: indianred !important; diff --git a/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.html b/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.html index 4477ce2..9a3fe25 100644 --- a/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.html +++ b/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.html @@ -6,62 +6,64 @@
-
-
- - +
+ +
+ + -
- - +
+ + +
-
-
- - +
+ + -
- - +
+ + +
-
-
- - +
+ + -
- - +
+ + +
-
-
- - +
+ + -
- - +
+ + +
-
-
- - +
+ + -
- - - +
+ + + +
-
- -
- Profile updated successfully! -
- -
- + +
+ Profile updated successfully! +
+ +
+ +
diff --git a/src/DevHive.Angular/src/app/components/profile/profile.component.css b/src/DevHive.Angular/src/app/components/profile/profile.component.css index 6954b22..7d96624 100644 --- a/src/DevHive.Angular/src/app/components/profile/profile.component.css +++ b/src/DevHive.Angular/src/app/components/profile/profile.component.css @@ -49,6 +49,7 @@ hr { display: flex; flex-direction: column; align-items: center; + text-align: center; } #other-main-info > * { diff --git a/src/DevHive.Angular/src/app/components/profile/profile.component.html b/src/DevHive.Angular/src/app/components/profile/profile.component.html index 442cb8b..d775b46 100644 --- a/src/DevHive.Angular/src/app/components/profile/profile.component.html +++ b/src/DevHive.Angular/src/app/components/profile/profile.component.html @@ -7,37 +7,39 @@
-
- -
-
- {{ user.firstName }} {{ user.lastName }} +
+
+ +
+
+ {{ user.firstName }} {{ user.lastName }} +
+
+ @{{ user.userName }} +
-
- @{{ user.userName }} -
-
-
-
- Languages: -
- C#
-
- TypeScript +
+ Languages: +
+ C# +
+
+ TypeScript +
-
-
- Technologies: -
- .NET 5 +
+ Technologies: +
+ .NET 5 +
+
+ Angular +
-
- Angular +
+
+ Posts go here
-
-
- Posts go here -
diff --git a/src/DevHive.Angular/src/styles.css b/src/DevHive.Angular/src/styles.css index 1881272..1320795 100644 --- a/src/DevHive.Angular/src/styles.css +++ b/src/DevHive.Angular/src/styles.css @@ -5,6 +5,8 @@ --bg-color: white; --focus-color: forestgreen; --card-bg: white; + --success: forestgreen; + --failure: indianred; } html, body { @@ -26,8 +28,7 @@ input:focus, button:focus { box-sizing: border-box; border: .5em solid var(--bg-color); - margin-left: auto; - margin-right: auto; + margin: 0 auto; display: flex; align-items: center; @@ -35,20 +36,6 @@ input:focus, button:focus { flex-direction: column; } -#error-bar { - text-align: center; - width: 100%; - position: absolute; - top: 0; - background-color: indianred; - color: white; - padding: .2em; -} - -#error-bar:empty { - display: none; -} - .rounded-border { border: 2px solid black; border-radius: .6em; @@ -69,6 +56,23 @@ input:focus, button:focus { color: red; } +.scroll-standalone { + width: 100%; + max-height: 100%; + overflow-y: auto; +} + + /* Hide scrollbar for Chrome, Safari and Opera */ +.scroll-standalone::-webkit-scrollbar { + display: none; +} + + /* Hide scrollbar for IE, Edge and Firefox */ +.scroll-standalone { + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ +} + /* Inputs, the type found in login and register */ .input-selection { -- cgit v1.2.3