diff options
author | Akash Keshav <112591754+domesticchores@users.noreply.github.com> | 2025-04-04 20:49:15 -0400 |
---|---|---|
committer | Akash Keshav <112591754+domesticchores@users.noreply.github.com> | 2025-04-04 20:49:15 -0400 |
commit | ac6fa949a754778f268fb91f0b32464c153191ef (patch) | |
tree | fc37f83d5e8f74ca91676c436371469f60e5689c /ufund-ui | |
parent | b4a9cd9d540d42a61bee9045d41ada392305a8d5 (diff) | |
download | JellySolutions-ac6fa949a754778f268fb91f0b32464c153191ef.tar.gz JellySolutions-ac6fa949a754778f268fb91f0b32464c153191ef.tar.bz2 JellySolutions-ac6fa949a754778f268fb91f0b32464c153191ef.zip |
refactor login-page and need-list to support light/dark mode
Diffstat (limited to 'ufund-ui')
-rw-r--r-- | ufund-ui/public/login-cr.png | bin | 0 -> 1750592 bytes | |||
-rw-r--r-- | ufund-ui/public/login-jf.png | bin | 0 -> 1978783 bytes | |||
-rw-r--r-- | ufund-ui/src/app/components/login/login.component.css | 54 | ||||
-rw-r--r-- | ufund-ui/src/app/components/login/login.component.html | 15 | ||||
-rw-r--r-- | ufund-ui/src/app/components/need-list/need-list.component.css | 14 | ||||
-rw-r--r-- | ufund-ui/src/app/components/need-list/need-list.component.html | 4 | ||||
-rw-r--r-- | ufund-ui/src/app/components/need-page/need-page.component.css | 2 | ||||
-rw-r--r-- | ufund-ui/src/styles.css | 10 |
8 files changed, 77 insertions, 22 deletions
diff --git a/ufund-ui/public/login-cr.png b/ufund-ui/public/login-cr.png Binary files differnew file mode 100644 index 0000000..6419821 --- /dev/null +++ b/ufund-ui/public/login-cr.png diff --git a/ufund-ui/public/login-jf.png b/ufund-ui/public/login-jf.png Binary files differnew file mode 100644 index 0000000..ef0e111 --- /dev/null +++ b/ufund-ui/public/login-jf.png diff --git a/ufund-ui/src/app/components/login/login.component.css b/ufund-ui/src/app/components/login/login.component.css index b56b4eb..fc1d9da 100644 --- a/ufund-ui/src/app/components/login/login.component.css +++ b/ufund-ui/src/app/components/login/login.component.css @@ -2,29 +2,60 @@ display: flex; align-items: center; justify-content: center; - height: 100%; - /*background-image: url("https://www.fineshare.com/background/jellyfish-under-fluorescent-illumination.jpg");*/ - background: rgba(0, 0, 0, .65) url("https://4kwallpapers.com/images/wallpapers/blue-jellyfish-aquarium-underwater-glowing-marine-life-1920x1080-3546.jpg"); + width: 100vw; + height: 150vh; + overflow: hidden; + background-color: transparent; background-blend-mode: darken; - margin-top: -66px + margin-top: -150px; + overflow: hidden; +} + +#bg-cr { + position: absolute; + margin-top: -150px; + top:0; + width: 100vw; + height: calc(100vh + 150px); + background: linear-gradient(to bottom, rgba(84, 45, 0, 0) 30%, rgba(84, 45, 0, 0.1) 40%), url("/login-cr.png"); + opacity: calc(var(--opacity-cr)); + z-index: 1; +} +#bg-jf { + position: absolute; + top:0; + width: 100vw; + height: 100vh; + background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 30%), url("/login-jf.png"); + opacity: var(--opacity-jf); + z-index: 1; } #box { display: flex; flex-direction: column; - max-width: 350px; + align-items: center; + aspect-ratio: 4/5; + min-height: 50vh; + margin-top: 15vh; gap: 10px; + /* background-color: var(--background-color); */ backdrop-filter: blur(10px); - background-color: rgba(0, 0, 0, 0.1); - padding: 30px; + padding: 50px 40px; color: white; border-radius: 5px; border-style: solid; border-width: 1px; - border-color: rgb(140, 140, 255); + border-color: var(--highlight-color); + z-index: 2; } +#greeting { + font-size: 32px; + /* text-decoration: underline; + text-decoration-color: var(--highlight-color); */ +} .border { border-style: solid; border-width: 1px; @@ -34,3 +65,10 @@ background-color: white; box-shadow: 0 0 10px 10px black; } + +#signup { + color: var(--highlight-color); + text-decoration: underline; + text-decoration-thickness: 1px; + text-decoration-color: var(--highlight-color); +}
\ No newline at end of file diff --git a/ufund-ui/src/app/components/login/login.component.html b/ufund-ui/src/app/components/login/login.component.html index 1017d0f..27eab96 100644 --- a/ufund-ui/src/app/components/login/login.component.html +++ b/ufund-ui/src/app/components/login/login.component.html @@ -1,9 +1,12 @@ <div id="box"> - <h1>Login</h1> - <input placeholder="Username" type="text" #username (keydown.enter)="login(username.value, password.value)"> - <input placeholder="Password" type="password" #password (keydown.enter)="login(username.value, password.value)"> - <button type="button" (click)="login(username.value, password.value)">Login</button> - <div> - New? <a routerLink="/signup">Create an account</a> + <h1 id="greeting">Login</h1> + <input class="form-input" placeholder="Username" type="text" #username (keydown.enter)="login(username.value, password.value)"> + <input class="form-input" placeholder="Password" type="password" #password (keydown.enter)="login(username.value, password.value)"> + <button class="form-submit" type="button" (click)="login(username.value, password.value)">Login</button> + <div style="display: flex; column-gap: 4px;"> + <p>New?</p> <a routerLink="/signup"><p id="signup">Create an account.</p></a> </div> </div> +<div id="bg-cr"></div> +<div id="bg-jf"></div> + diff --git a/ufund-ui/src/app/components/need-list/need-list.component.css b/ufund-ui/src/app/components/need-list/need-list.component.css index e17609b..0172ff4 100644 --- a/ufund-ui/src/app/components/need-list/need-list.component.css +++ b/ufund-ui/src/app/components/need-list/need-list.component.css @@ -5,7 +5,7 @@ } .needEntry { - background-color: #2e2e2e; + background-color: var(--tertiary-color); display: flex; flex-direction: column; border-radius: 5px; @@ -37,6 +37,14 @@ select { } } +.sort-scheme { + background-color: var(--background-color); + border-style: solid; + border-color: var(--foreground-color); + border-radius: 5px; + border-width: 1px; +} + #sortArea { display: flex; flex-direction: row; @@ -86,7 +94,7 @@ select { .clickable { padding: 10px; - background-color: #3a3a3a; + background-color: var(--secondary-color); border-radius: 5px; cursor: pointer; height: 130px; @@ -96,7 +104,7 @@ select { } .clickable:hover { - background-color: #444444; + background-color: var(--tertiary-color); } .actionArea { diff --git a/ufund-ui/src/app/components/need-list/need-list.component.html b/ufund-ui/src/app/components/need-list/need-list.component.html index 84f80dc..18da39c 100644 --- a/ufund-ui/src/app/components/need-list/need-list.component.html +++ b/ufund-ui/src/app/components/need-list/need-list.component.html @@ -7,7 +7,7 @@ </div> <div id="sortArea"> <label for="sort">Sort by: </label> - <select id='sort' [(ngModel)] = "sortSelection" class="wide-input" (change)="search(searchForm.value)" [value]="sortSelection"> + <select [(ngModel)] = "sortSelection" class="wide-input sort-scheme" (change)="search(searchForm.value)" [value]="sortSelection"> <option *ngFor="let algorithm of SortingAlgoArrays" value="{{algorithm.name}}"> {{algorithm.display[sortMode === 'Ascending' ? 0 : 1]}} </option> @@ -16,7 +16,7 @@ <span class="icon">{{sortMode === 'Ascending' ? 'arrow_upward': 'arrow_downward'}}</span> </button> <label>Needs per page: </label> - <input type ="number" [(ngModel)]="itemsPerPage" (change)="editNeedsPerPage()" min="1" max="{{searchResults.length}}"> + <input class="sort-scheme" type ="number" [(ngModel)]="itemsPerPage" (change)="editNeedsPerPage()" min="1" max="{{searchResults.length}}"> </div> <!--<button (click)="close()">Close</button>--> </div> diff --git a/ufund-ui/src/app/components/need-page/need-page.component.css b/ufund-ui/src/app/components/need-page/need-page.component.css index 44db4b4..47aa8b3 100644 --- a/ufund-ui/src/app/components/need-page/need-page.component.css +++ b/ufund-ui/src/app/components/need-page/need-page.component.css @@ -47,7 +47,7 @@ aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; - box-shadow: rgb(0, 40, 70) 0 0 50px; + box-shadow: var(--dark-highlight-clor) 0 0 50px; } .urgent { diff --git a/ufund-ui/src/styles.css b/ufund-ui/src/styles.css index a1902fd..9fce47d 100644 --- a/ufund-ui/src/styles.css +++ b/ufund-ui/src/styles.css @@ -1,8 +1,8 @@ /* You can add global styles to this file, and also import other style files */ -:root { +/* :root { color-scheme: dark; -} +} */ * { box-sizing: border-box; @@ -12,8 +12,11 @@ [theme="light"] { --background-color: #e6e4df; + --secondary-color: #e0dcd4; + --tertiary-color: #cac6be; --foreground-color: #000000; --highlight-color: #cf9451; + --dark-highlight-clor: #582f00; --hover-color: #d8cdc0; --opacity-cr: 1; --opacity-jf: 0; @@ -21,8 +24,11 @@ [theme="dark"] { --background-color: #000715; + --secondary-color: #444444; + --tertiary-color: #3a3a3a; --foreground-color: #ffffff; --highlight-color: #6091e8; + --dark-highlight-clor: #002846; --hover-color: #394559; --opacity-cr: 0; --opacity-jf: 1; |