From ca7e618ca3350a5cf200ae39c851b016c9088d41 Mon Sep 17 00:00:00 2001 From: transtrike Date: Thu, 25 Feb 2021 20:51:24 +0200 Subject: Footer added; Pages fucked up --- src/app/components/profile/profile.component.html | 67 +++++++++++++++-------- 1 file changed, 44 insertions(+), 23 deletions(-) (limited to 'src/app/components/profile/profile.component.html') diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html index 0e5f633..0d9dc6a 100644 --- a/src/app/components/profile/profile.component.html +++ b/src/app/components/profile/profile.component.html @@ -3,25 +3,48 @@
-
+
- +
-
- {{ user.firstName }} {{ user.lastName }} -
-
- @{{ user.userName }} -
-
- -
- +
{{ user.firstName }} {{ user.lastName }}
+
@{{ user.userName }}
+ + +
+
@@ -32,9 +55,7 @@ {{ lang.name }}
-
-  None -
+
 None
Technologies: @@ -43,18 +64,18 @@ {{ tech.name }}
-
-  None -
+
 None
-
+
- {{ user.firstName }} {{ user.lastName }} hasn't posted anything yet! + {{ user.firstName }} {{ user.lastName }} hasn't posted anything + yet!
+ -- cgit v1.2.3 From 4b094fb29ea7eaeb58f0c29df60e55586a74db76 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 6 Mar 2021 14:29:14 +0200 Subject: Reverted footer --- src/app/app.module.ts | 4 +- .../admin-panel-page.component.html | 154 +++----------- .../comment-page/comment-page.component.html | 19 +- src/app/components/feed/feed.component.html | 71 ++----- src/app/components/footer/footer.component.css | 20 -- src/app/components/footer/footer.component.html | 12 -- src/app/components/footer/footer.component.ts | 18 -- src/app/components/login/login.component.html | 40 +--- .../components/not-found/not-found.component.html | 15 +- .../components/post-page/post-page.component.html | 63 ++---- .../profile-settings.component.html | 234 ++++----------------- src/app/components/profile/profile.component.html | 67 ++---- .../components/register/register.component.html | 134 ++---------- 13 files changed, 151 insertions(+), 700 deletions(-) delete mode 100644 src/app/components/footer/footer.component.css delete mode 100644 src/app/components/footer/footer.component.html delete mode 100644 src/app/components/footer/footer.component.ts (limited to 'src/app/components/profile/profile.component.html') diff --git a/src/app/app.module.ts b/src/app/app.module.ts index e331a5d..1bf44ad 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -25,7 +25,6 @@ import { CommentComponent } from './components/comment/comment.component'; import { CommentPageComponent } from './components/comment-page/comment-page.component'; import { PostAttachmentComponent } from './components/post-attachment/post-attachment.component'; import { RouterModule } from '@angular/router'; -import { FooterComponent } from './components/footer/footer.component'; @NgModule({ declarations: [ @@ -44,8 +43,7 @@ import { FooterComponent } from './components/footer/footer.component'; AdminPanelPageComponent, CommentComponent, CommentPageComponent, - PostAttachmentComponent, - FooterComponent + PostAttachmentComponent ], imports: [ BrowserModule.withServerTransition({ appId: 'serverApp' }), diff --git a/src/app/components/admin-panel-page/admin-panel-page.component.html b/src/app/components/admin-panel-page/admin-panel-page.component.html index 0c0954a..31f0849 100644 --- a/src/app/components/admin-panel-page/admin-panel-page.component.html +++ b/src/app/components/admin-panel-page/admin-panel-page.component.html @@ -2,182 +2,84 @@
-
+
- -
+ +
- +
- - + +
- +
-
+
Available languages:
-
+
{{ lang.name }}
-
+
- -
+ +
- +
- - + +
- +
- -
+ +
Available technologies:
-
+
{{ tech.name }}
-
+
- -
+ +
- +
- +
- +
-
+
-
diff --git a/src/app/components/comment-page/comment-page.component.html b/src/app/components/comment-page/comment-page.component.html index d59c956..ae114da 100644 --- a/src/app/components/comment-page/comment-page.component.html +++ b/src/app/components/comment-page/comment-page.component.html @@ -2,26 +2,15 @@
-
- + +
-
diff --git a/src/app/components/feed/feed.component.html b/src/app/components/feed/feed.component.html index 7f3cb68..230c27b 100644 --- a/src/app/components/feed/feed.component.html +++ b/src/app/components/feed/feed.component.html @@ -3,81 +3,41 @@
-
+
- None of your friends have posted anything yet!
+ None of your friends have posted anything yet!
Try refreshing your page!
@@ -85,5 +45,4 @@
-
diff --git a/src/app/components/footer/footer.component.css b/src/app/components/footer/footer.component.css deleted file mode 100644 index b93e1f3..0000000 --- a/src/app/components/footer/footer.component.css +++ /dev/null @@ -1,20 +0,0 @@ -footer { - display: flex; - width: 100%; -} - -footer > * { - flex: 1; -} - -#version { - text-align: left; -} - -#middle-footer-message { - text-align: center; -} - -#license { - text-align: right; -} diff --git a/src/app/components/footer/footer.component.html b/src/app/components/footer/footer.component.html deleted file mode 100644 index d410597..0000000 --- a/src/app/components/footer/footer.component.html +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/src/app/components/footer/footer.component.ts b/src/app/components/footer/footer.component.ts deleted file mode 100644 index e83f840..0000000 --- a/src/app/components/footer/footer.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-footer', - templateUrl: './footer.component.html', - styleUrls: ['./footer.component.css'] -}) -export class FooterComponent implements OnInit { - public version: string = "v0.1"; - public licenseUrl: string = "https://github.com/Team-Kaleidoscope/DevHive-Angular/blob/main/LICENSE"; - public organizationUrl: string = "https://github.com/Team-Kaleidoscope"; - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html index d4f956d..9f74faa 100644 --- a/src/app/components/login/login.component.html +++ b/src/app/components/login/login.component.html @@ -2,55 +2,29 @@ Login
-
+
- +
- +
- +
- +
-
+
- - + diff --git a/src/app/components/not-found/not-found.component.html b/src/app/components/not-found/not-found.component.html index 4588d2c..83d73ce 100644 --- a/src/app/components/not-found/not-found.component.html +++ b/src/app/components/not-found/not-found.component.html @@ -1,13 +1,10 @@
- Page not found! -
+ + Page not found! + +
-
diff --git a/src/app/components/post-page/post-page.component.html b/src/app/components/post-page/post-page.component.html index 9781c18..b8e7e22 100644 --- a/src/app/components/post-page/post-page.component.html +++ b/src/app/components/post-page/post-page.component.html @@ -2,75 +2,36 @@
- +
-
- - - + + + +
- {{ file.name ? file.name : "Attachment" }} -
+ {{ file.name ? file.name : 'Attachment' }} +
- +
-
diff --git a/src/app/components/profile-settings/profile-settings.component.html b/src/app/components/profile-settings/profile-settings.component.html index f5f19bd..502697d 100644 --- a/src/app/components/profile-settings/profile-settings.component.html +++ b/src/app/components/profile-settings/profile-settings.component.html @@ -3,276 +3,114 @@
-
+
-
- + +
- +
- +
-
-
+
+
- +
- - + +
- +
- - + +
- +
- - + +
- +
- - + +
- +
- - - + + +
- +
- +
- +
Available languages:
-
+
{{ lang.name }}
- +
- +
- +
Available technologies:
-
+
{{ tech.name }}
- + -
+
- Are you sure you want to delete your account?
This is - permanent! + Are you sure you want to delete your account?
This is permanent!
- +
-
diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html index 0d9dc6a..0e5f633 100644 --- a/src/app/components/profile/profile.component.html +++ b/src/app/components/profile/profile.component.html @@ -3,48 +3,25 @@
-
+
- +
-
{{ user.firstName }} {{ user.lastName }}
-
@{{ user.userName }}
-
- -
- +
+ {{ user.firstName }} {{ user.lastName }} +
+
+ @{{ user.userName }} +
+ + +
+
@@ -55,7 +32,9 @@ {{ lang.name }}
-
 None
+
+  None +
Technologies: @@ -64,18 +43,18 @@ {{ tech.name }}
-
 None
+
+  None +
-
+
- {{ user.firstName }} {{ user.lastName }} hasn't posted anything - yet! + {{ user.firstName }} {{ user.lastName }} hasn't posted anything yet!
- diff --git a/src/app/components/register/register.component.html b/src/app/components/register/register.component.html index c521d44..0075b1d 100644 --- a/src/app/components/register/register.component.html +++ b/src/app/components/register/register.component.html @@ -2,160 +2,64 @@ Register
-
+
- +
- - + +
- +
- - + +
- +
- - + +
- +
- - + +
- +
- - - + + +
-
+
- - + -- cgit v1.2.3 From afe30ab78432d16c42b2f19e3bd8355e3f27a0e1 Mon Sep 17 00:00:00 2001 From: Danail Dimitrov Date: Sun, 14 Mar 2021 21:06:33 +0200 Subject: fixed rating not beeing highlighted on init and and added capability of rating to handle multiple posts --- .vs/slnx.sqlite | Bin 167936 -> 167936 bytes src/app/components/feed/feed.component.html | 4 ++-- src/app/components/post/post.component.ts | 20 ++++++++------------ src/app/components/profile/profile.component.html | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) (limited to 'src/app/components/profile/profile.component.html') diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 8b6d17b..36ca8dd 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/src/app/components/feed/feed.component.html b/src/app/components/feed/feed.component.html index 230c27b..5ff2dca 100644 --- a/src/app/components/feed/feed.component.html +++ b/src/app/components/feed/feed.component.html @@ -40,8 +40,8 @@ None of your friends have posted anything yet!
Try refreshing your page! -
- +
+
diff --git a/src/app/components/post/post.component.ts b/src/app/components/post/post.component.ts index 89620d7..a38d507 100644 --- a/src/app/components/post/post.component.ts +++ b/src/app/components/post/post.component.ts @@ -20,6 +20,7 @@ export class PostComponent implements OnInit { public votesNumber: number; public timeCreated: string; @Input() paramId: string; + @Input() index: number; public loggedIn = false; private voteBtns: HTMLCollectionOf; @@ -33,9 +34,7 @@ export class PostComponent implements OnInit { this._postService.getPostRequest(Guid.parse(this.paramId)).subscribe( (result: object) => { - Object.assign(this.post, result); - - console.log(this.post.postId); + Object.assign(this.post, result); this.post.fileURLs = Object.values(result)[7]; this.votesNumber = this.post.currentRating; @@ -46,17 +45,16 @@ export class PostComponent implements OnInit { this.loadUser(); } - ); - - window.addEventListener("load", () => { - this.highlightButtonsOnInit(); - }); + ); } private loadUser(): void { this._userService.getUserByUsernameRequest(this.post.creatorUsername).subscribe( (result: object) => { Object.assign(this.user, result); + + this.highlightButtonsOnInit(); + this.loaded = true; } ); @@ -123,8 +121,8 @@ export class PostComponent implements OnInit { } private changeColorOfVoteButton(isUpvoted: boolean, isDownvoted: boolean): void { - this.voteBtns.item(0)!.style.backgroundColor = (isUpvoted) ? 'lightblue' : 'white'; - this.voteBtns.item(1)!.style.backgroundColor = (isDownvoted) ? 'lightblue' : 'white'; + this.voteBtns.item(this.index * 2)!.style.backgroundColor = (isUpvoted) ? 'lightblue' : 'white'; + this.voteBtns.item((this.index * 2) + 1)!.style.backgroundColor = (isDownvoted) ? 'lightblue' : 'white'; } private highlightButtonsOnInit(): void { @@ -132,8 +130,6 @@ export class PostComponent implements OnInit { (x: object) => { const isLike: boolean = Object.values(x)[3]; - console.log(this.voteBtns); - this.changeColorOfVoteButton(isLike, !isLike); } ); diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html index 0e5f633..5c21cee 100644 --- a/src/app/components/profile/profile.component.html +++ b/src/app/components/profile/profile.component.html @@ -52,8 +52,8 @@
{{ user.firstName }} {{ user.lastName }} hasn't posted anything yet!
-
- +
+
-- cgit v1.2.3 From 5916079f20c5cd36e4092fd717c1bcc8814670f7 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 19 Mar 2021 16:07:42 +0200 Subject: Added navbar component to pages that need it --- src/app/components/admin-panel-page/admin-panel-page.component.html | 2 ++ src/app/components/comment-page/comment-page.component.html | 2 ++ src/app/components/feed/feed.component.html | 2 ++ src/app/components/post-page/post-page.component.html | 2 ++ src/app/components/profile-settings/profile-settings.component.html | 2 ++ src/app/components/profile/profile.component.html | 2 ++ 6 files changed, 12 insertions(+) (limited to 'src/app/components/profile/profile.component.html') diff --git a/src/app/components/admin-panel-page/admin-panel-page.component.html b/src/app/components/admin-panel-page/admin-panel-page.component.html index 31f0849..96ab545 100644 --- a/src/app/components/admin-panel-page/admin-panel-page.component.html +++ b/src/app/components/admin-panel-page/admin-panel-page.component.html @@ -1,3 +1,5 @@ + +
diff --git a/src/app/components/comment-page/comment-page.component.html b/src/app/components/comment-page/comment-page.component.html index ae114da..1b94568 100644 --- a/src/app/components/comment-page/comment-page.component.html +++ b/src/app/components/comment-page/comment-page.component.html @@ -1,3 +1,5 @@ + +
diff --git a/src/app/components/feed/feed.component.html b/src/app/components/feed/feed.component.html index 5ff2dca..5694b09 100644 --- a/src/app/components/feed/feed.component.html +++ b/src/app/components/feed/feed.component.html @@ -1,3 +1,5 @@ + +
diff --git a/src/app/components/post-page/post-page.component.html b/src/app/components/post-page/post-page.component.html index 5da8cc7..fe12177 100644 --- a/src/app/components/post-page/post-page.component.html +++ b/src/app/components/post-page/post-page.component.html @@ -1,3 +1,5 @@ + +
diff --git a/src/app/components/profile-settings/profile-settings.component.html b/src/app/components/profile-settings/profile-settings.component.html index 502697d..dbfc747 100644 --- a/src/app/components/profile-settings/profile-settings.component.html +++ b/src/app/components/profile-settings/profile-settings.component.html @@ -1,3 +1,5 @@ + +
diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html index 5c21cee..dede887 100644 --- a/src/app/components/profile/profile.component.html +++ b/src/app/components/profile/profile.component.html @@ -1,3 +1,5 @@ + +
-- cgit v1.2.3 From 97f3e372bd96195e6f243358ef7063a63278f699 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 19 Mar 2021 19:07:24 +0200 Subject: Major redesign of profile component styling --- src/app/components/profile/profile.component.css | 109 +++------------------- src/app/components/profile/profile.component.html | 100 ++++++++++---------- src/app/components/profile/profile.component.ts | 12 --- src/styles.css | 13 +++ 4 files changed, 72 insertions(+), 162 deletions(-) (limited to 'src/app/components/profile/profile.component.html') diff --git a/src/app/components/profile/profile.component.css b/src/app/components/profile/profile.component.css index ebcd406..c14fd00 100644 --- a/src/app/components/profile/profile.component.css +++ b/src/app/components/profile/profile.component.css @@ -1,105 +1,18 @@ -* { - box-sizing: border-box; +#user-info { + font-size: 1.3em; } -#content { - max-width: 22em; - justify-content: start; +#profile-picture { + height: 5rem; + width: 5rem; } -hr { - width: calc(100% - 1em); - color: black; - border: 1px solid black; +.sec-info-title { + padding-bottom: 0.2em; + margin-bottom: 0.3em; } -form { - width: 100%; -} - -/* Navigation bar (for loggedin user) */ - -#navigation { - display: flex; - width: 100%; -} - -.submit-btn { - flex: 1; - margin-top: 0; - margin-left: .5em; - font-size: inherit; -} - -#navigation > .submit-btn:first-child { - margin-left: 0; -} - -/* Top card */ - -#main-info { - display: flex; - width: 100%; - margin-bottom: .25em -} - -#main-info > img { - width: 5em; - height: 5em; -} - -#other-main-info { - flex: 1; - display: flex; - flex-direction: column; - align-items: center; - text-align: center; -} - -#other-main-info > * { - font-size: 1.4em; -} - -#other-main-info *:nth-child(1) { - margin-top: auto; -} - -#other-main-info *:nth-last-child(1) { - margin-bottom: auto; -} - -#add-friend, #loggedin-password { - flex: 0 !important; - margin-top: .4em; - max-width: 8em; - font-size: .6em !important; -} - -#loggedin-password { - max-width: 100%; -} - -/* Languages and technologies */ - -.secondary-info { - margin-top: .25em; - margin-bottom: .25em; - width: 100%; - display: flex; - align-items: center; - flex-wrap: wrap; -} - -/* Posts */ - -#no-posts { - width: 100%; - text-align: center; - color: gray; - margin-top: .2em; -} - -#posts { - width: 100%; - height: 100%; +.sec-info { + background-color: #424242; + margin: 0 0.3em 0.3em 0; } diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html index dede887..45e51a5 100644 --- a/src/app/components/profile/profile.component.html +++ b/src/app/components/profile/profile.component.html @@ -2,61 +2,57 @@ -
- -
-
-
- -
-
- {{ user.firstName }} {{ user.lastName }} -
-
- @{{ user.userName }} -
-
- -
- -
-
+
+
+
+
-
- Languages: -
-
- {{ lang.name }} -
+
+
+ {{ user.firstName }} {{ user.lastName }}
-
-  None +
+ @{{ user.userName }}
+
+ +
+ +
-
- Technologies: -
-
- {{ tech.name }} -
-
-
-  None -
+
+
+
+ Languages
-
-
-
- {{ user.firstName }} {{ user.lastName }} hasn't posted anything yet! -
-
- -
+ + None + +
+ + {{ lang.name }} + +
+
+
+
+ Technologies +
+ + None + +
+ + {{ tech.name }} + +
+
+
+
+ {{ user.firstName }} {{ user.lastName }} hasn't posted anything yet! +
+
+
-
-
+ +
diff --git a/src/app/components/profile/profile.component.ts b/src/app/components/profile/profile.component.ts index ed17f33..fc5d4d6 100644 --- a/src/app/components/profile/profile.component.ts +++ b/src/app/components/profile/profile.component.ts @@ -131,18 +131,6 @@ export class ProfileComponent implements OnInit { } } - goBack(): void { - this._router.navigate(['/']); - } - - navigateToAdminPanel(): void { - this._router.navigate(['/admin-panel']); - } - - navigateToSettings(): void { - this._router.navigate([this._router.url + '/settings']); - } - logout(): void { this._tokenService.logoutUserFromSessionStorage(); diff --git a/src/styles.css b/src/styles.css index b4f7539..64aa79f 100644 --- a/src/styles.css +++ b/src/styles.css @@ -89,6 +89,7 @@ input[type=file]::file-selector-button { width: 100%; max-height: 100%; overflow-y: auto; + flex-wrap: nowrap !important; } /* Hide scrollbar for Chrome, Safari and Opera */ @@ -142,6 +143,10 @@ input[type=file]::file-selector-button { justify-content: flex-end; } +.flex-justify-center { + justify-content: center; +} + .flex-center-align-children > * { display: flex; align-items: center; @@ -178,6 +183,10 @@ input[type=file]::file-selector-button { /* General text */ +.text-centered { + text-align: center; +} + .text-vertical-middle { vertical-align: middle; } @@ -268,6 +277,10 @@ input[type=file]::file-selector-button { /* Misc */ +.full-width { + width: 100%; +} + .centered-content { max-width: var(--max-width); margin: 0 auto; -- cgit v1.2.3 From da7ee0c5d640083fcce8af38730c587c4fb15395 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 19 Mar 2021 19:18:21 +0200 Subject: Fixed height of pages that were the whole window height but were also below the navbar --- src/app/components/comment-page/comment-page.component.html | 2 +- src/app/components/feed/feed.component.html | 2 +- src/app/components/navbar/navbar.component.css | 1 + src/app/components/post-page/post-page.component.html | 2 +- src/app/components/profile-settings/profile-settings.component.html | 2 +- src/app/components/profile/profile.component.html | 2 +- src/app/services/comment.service.ts | 2 +- src/styles.css | 5 +++++ 8 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src/app/components/profile/profile.component.html') diff --git a/src/app/components/comment-page/comment-page.component.html b/src/app/components/comment-page/comment-page.component.html index 1b94568..553b545 100644 --- a/src/app/components/comment-page/comment-page.component.html +++ b/src/app/components/comment-page/comment-page.component.html @@ -2,7 +2,7 @@ -
+
diff --git a/src/app/components/feed/feed.component.html b/src/app/components/feed/feed.component.html index c5c4401..a8290a1 100644 --- a/src/app/components/feed/feed.component.html +++ b/src/app/components/feed/feed.component.html @@ -2,7 +2,7 @@ -
+
diff --git a/src/app/components/navbar/navbar.component.css b/src/app/components/navbar/navbar.component.css index aa666b0..d02e928 100644 --- a/src/app/components/navbar/navbar.component.css +++ b/src/app/components/navbar/navbar.component.css @@ -1,4 +1,5 @@ #navbar { + height: var(--navbar-height); width: 100%; background-color: var(--card-bg); } diff --git a/src/app/components/post-page/post-page.component.html b/src/app/components/post-page/post-page.component.html index fe12177..ad748e3 100644 --- a/src/app/components/post-page/post-page.component.html +++ b/src/app/components/post-page/post-page.component.html @@ -2,7 +2,7 @@ -
+