aboutsummaryrefslogtreecommitdiff
path: root/src/app/components
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-03-22 16:32:25 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-03-22 16:32:25 +0200
commitc95ced58bab3bbf84e2be372b8c138051d983da9 (patch)
tree82273e33bd1e89afbb18c01939539946d88a1684 /src/app/components
parentf629eeadba6499b12801ee512d5e7fa14b4b2777 (diff)
downloadDevHive-Angular-c95ced58bab3bbf84e2be372b8c138051d983da9.tar
DevHive-Angular-c95ced58bab3bbf84e2be372b8c138051d983da9.tar.gz
DevHive-Angular-c95ced58bab3bbf84e2be372b8c138051d983da9.zip
Major redesign of technology and language selection design in profile settings (with this, profile settings is fully redesigned)
Diffstat (limited to 'src/app/components')
-rw-r--r--src/app/components/profile-settings/profile-settings.component.css105
-rw-r--r--src/app/components/profile-settings/profile-settings.component.html70
2 files changed, 47 insertions, 128 deletions
diff --git a/src/app/components/profile-settings/profile-settings.component.css b/src/app/components/profile-settings/profile-settings.component.css
index 347c650..a8451c2 100644
--- a/src/app/components/profile-settings/profile-settings.component.css
+++ b/src/app/components/profile-settings/profile-settings.component.css
@@ -1,107 +1,10 @@
-* {
- box-sizing: border-box;
-}
-
-#content {
- max-width: 22em;
- justify-content: start;
-}
-
-form {
- width: 100%;
-}
-
-hr {
- width: calc(100% - 1em);
- color: black;
- border: 1px solid black;
-}
-
-/* Navigation bar (for loggedin user) */
-
-#navigation {
- display: flex;
- width: 100%;
-}
-
-#navigation > .submit-btn {
- flex: 1;
- margin-top: 0;
- margin-left: .5em;
- font-size: inherit;
-}
-
-#navigation > .submit-btn:nth-of-type(1) {
- margin-left: 0;
-}
-
-/* Form */
-
-#update-profile-picture {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 0 .5em;
- flex-wrap: wrap;
-}
-
#profile-picture {
width: 5em;
height: 5em;
}
-#submit-file {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 1em;
-}
-
-#upload-file:hover {
- cursor: inherit;
-}
-
-#upload-file > input:hover {
- cursor: pointer;
-}
-
-#update-user {
- margin-top: 1.1em;
-}
-
-#all-languages, #all-technologies {
- display: flex;
- flex-wrap: wrap;
-}
-
-/* Buttons */
-
-.edit-btn {
- border-radius: 0 !important;
- color: var(--focus-color);
- background-color: white;
- border-color: var(--focus-color);
-}
-
-.edit-btn:hover {
- color: white;
- background-color: black;
- border-color: black !important;
-}
-
-.submit-btn {
- margin-bottom: .5em;
-}
-
-#update-profile-btn {
- margin-top: 1em;
-}
-
-#confirm-delete {
- box-sizing: border-box;
- width: 100%;
- background-color: var(--failure);
- color: white;
- padding: .2em;
- text-align: center;
+.sec-info {
+ width: fit-content;
+ background-color: #424242;
+ margin: 0 0.3em 0.3em 0;
}
diff --git a/src/app/components/profile-settings/profile-settings.component.html b/src/app/components/profile-settings/profile-settings.component.html
index e5edf42..f5989ef 100644
--- a/src/app/components/profile-settings/profile-settings.component.html
+++ b/src/app/components/profile-settings/profile-settings.component.html
@@ -3,7 +3,7 @@
<app-loading *ngIf="!dataArrived"></app-loading>
<main class="scroll-standalone under-navbar centered-content flex-col">
- <form class="flex-row card font-size-dot9" [formGroup]="updateProfilePictureFormGroup" (ngSubmit)="updateProfilePicture()">
+ <form class="flex-row card full-width font-size-dot9 margin-top-bot-very-big" [formGroup]="updateProfilePictureFormGroup" (ngSubmit)="updateProfilePicture()">
<img id="profile-picture" class="round-image" [src]="user.profilePictureURL">
<section class="flexible flex-col flex-center-align-items flex-justify-center side-padding-font">
<input class="full-width faded-slim-border padding-smaller lighter-hover click-effect border-radius-smaller" type="file" accept="image/*" formControlName="fileUpload" (change)="onFileUpload($event)">
@@ -12,7 +12,7 @@
</button>
</section>
</form>
- <form class="flex-col card padding-big" [formGroup]="updateUserFormGroup" (ngSubmit)="onSubmit()">
+ <form class="flex-col card full-width padding-big" [formGroup]="updateUserFormGroup" (ngSubmit)="onSubmit()">
<section class="flex-col">
<div class="flex-row">
<label class="flexible focus-fg-color">First Name</label>
@@ -59,41 +59,57 @@
</div>
<input type="password" class="fancy-input faded-slim-border border-bottom-only" formControlName="password" required>
</section>
- <button type="button" class="submit-btn edit-btn" (click)="toggleLanguages()">▼ Edit Languages ▼</button>
- <div *ngIf="showLanguages">
- <div class="input-selection">
- <input type="text" class="input-field" formControlName="languageInput" required>
- <div class="input-errors">
- <label class="error">Type in your desired languages, separated by a space</label>
- </div>
+ <button type="button" class="focus-fg-color full-width faded-slim-border padding-smaller lighter-hover click-effect margin-top-normal" (click)="toggleLanguages()">
+ ▼ Edit Languages ▼
+ </button>
+ <section *ngIf="showLanguages">
+ <div class="margin-top-bigger">
+ <label class="error">
+ Type in your desired languages, separated by a space
+ </label>
+ <input class="fancy-input full-width faded-slim-border border-bottom-only" type="text" placeholder="You have no selected languages!" formControlName="languageInput" required>
+ </div>
+ <div class="none-message" *ngIf="availableLanguages.length === 0">
+ No languages available!
+ </div>
+ <div *ngIf="availableLanguages.length > 0">
+ Available languages:
</div>
- Available languages:
- <div id="all-languages">
- <div class="user-language" *ngFor="let lang of availableLanguages">
+ <div class="flex-row margin-top-normal" *ngFor="let lang of availableLanguages">
+ <div class="sec-info border-radius-normal padding-small">
{{ lang.name }}
</div>
</div>
- </div>
- <button type="button" class="submit-btn edit-btn" (click)="toggleTechnologies()">▼ Edit Technologies ▼</button>
- <div *ngIf="showTechnologies">
- <div class="input-selection">
- <input type="text" class="input-field" formControlName="technologyInput" required>
- <div class="input-errors">
- <label class="error">Type in your desired technologies, separated by a space</label>
- </div>
+ </section>
+ <button type="button" class="focus-fg-color full-width faded-slim-border padding-smaller lighter-hover click-effect margin-top-normal" (click)="toggleTechnologies()">
+ ▼ Edit Technologies ▼
+ </button>
+ <section *ngIf="showTechnologies">
+ <div class="margin-top-bigger">
+ <label class="error">
+ Type in your desired technologies, separated by a space
+ </label>
+ <input class="fancy-input full-width faded-slim-border border-bottom-only" type="text" placeholder="You have no selected technologies!" formControlName="technologyInput" required>
+ </div>
+ <div class="none-message" *ngIf="availableTechnologies.length === 0">
+ No technologies available!
+ </div>
+ <div *ngIf="availableTechnologies.length > 0">
+ Available technologies:
</div>
- Available technologies:
- <div id="all-technologies">
- <div class="user-technology" *ngFor="let tech of availableTechnologies">
+ <div class="flex-row margin-top-normal" *ngFor="let tech of availableTechnologies">
+ <div class="sec-info border-radius-normal padding-small">
{{ tech.name }}
</div>
</div>
- </div>
- <button class="full-width faded-slim-border padding-smaller lighter-hover click-effect border-radius-smaller margin-top-normal" type="submit">
+ </section>
+ <section class="margin-top-bot-smaller">
+ <app-success-bar></app-success-bar>
+ <app-error-bar></app-error-bar>
+ </section>
+ <button class="full-width faded-slim-border padding-smaller lighter-hover click-effect border-radius-smaller" type="submit">
Update profile
</button>
- <app-success-bar></app-success-bar>
- <app-error-bar></app-error-bar>
</form>
<section class="card full-width">
<div class="margin-bot-bigger text-centered error-fg-color" *ngIf="deleteAccountConfirm">