Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/enhance UI-UX #6

Merged
merged 5 commits into from
Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Popup more user friendly messages on login and register, enhance UI, …
…update logo and favicon
  • Loading branch information
Hoziefa committed Jan 26, 2021
commit 056f44680c91f548149436895c406ccc3095f592
Binary file modified public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 40 additions & 50 deletions src/assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1235,59 +1235,28 @@ button:disabled {

nav.main-nav {
padding: 1rem 0;
border-bottom: 1px solid #ddd;
background-color: $dark-bg;
position: relative;

background-image: radial-gradient(circle at center center, transparent, rgb(255, 255, 255)),
linear-gradient(
309deg,
rgba(90, 90, 90, 0.05) 0%,
rgba(90, 90, 90, 0.05) 50%,
rgba(206, 206, 206, 0.05) 50%,
rgba(206, 206, 206, 0.05) 100%
),
linear-gradient(
39deg,
rgba(13, 13, 13, 0.05) 0%,
rgba(13, 13, 13, 0.05) 50%,
rgba(189, 189, 189, 0.05) 50%,
rgba(189, 189, 189, 0.05) 100%
),
linear-gradient(
144deg,
rgba(249, 249, 249, 0.05) 0%,
rgba(249, 249, 249, 0.05) 50%,
rgba(111, 111, 111, 0.05) 50%,
rgba(111, 111, 111, 0.05) 100%
),
linear-gradient(
166deg,
rgba(231, 231, 231, 0.05) 0%,
rgba(231, 231, 231, 0.05) 50%,
rgba(220, 220, 220, 0.05) 50%,
rgba(220, 220, 220, 0.05) 100%
),
linear-gradient(
212deg,
rgba(80, 80, 80, 0.05) 0%,
rgba(80, 80, 80, 0.05) 50%,
rgba(243, 243, 243, 0.05) 50%,
rgba(243, 243, 243, 0.05) 100%
),
radial-gradient(circle at center center, hsl(107, 19%, 100%), hsl(107, 19%, 100%));

.container {
position: static;
display: flex;
align-items: center;
}

.logo {
padding-left: 2rem;

a {
display: flex;
align-items: center;
column-gap: 0.25rem;
display: block;
width: 60px;

img {
display: block;
max-width: 100%;
height: auto;
filter: hue-rotate(16deg);
transform: scale(2);
}
}
}

Expand Down Expand Up @@ -1433,8 +1402,9 @@ nav.main-nav {
color: inherit;

&.active {
background-color: $secondary-color;
background-image: linear-gradient($secondary-color, $primary-color);
color: ghostwhite;
border-radius: 5px;

button {
font-weight: 900 !important;
Expand Down Expand Up @@ -1510,7 +1480,7 @@ nav.main-nav {
a,
button {
&.active {
background-color: $secondary-color;
border-radius: 0;
}
}
}
Expand All @@ -1522,6 +1492,18 @@ nav.main-nav {
}
}
}

@media (max-width: 480px) {
.logo {
padding-left: 8px;

a {
img {
transform: scale(1.25);
}
}
}
}
}

.home,
Expand All @@ -1530,8 +1512,15 @@ nav.main-nav {
position: relative;

.user-profile {
margin-bottom: 7rem;
display: flex;
align-items: baseline;
margin-bottom: 7rem;

.user-info {
p {
line-height: 2;
}
}

.user-avatar {
margin-left: auto;
Expand All @@ -1540,12 +1529,12 @@ nav.main-nav {
img {
padding: 3px;
background-color: #eee;
border: 3px solid #ddd;
border: 3px solid #ccc;
display: inline-block;
vertical-align: middle;
max-width: 100%;
width: 4.5em;
height: 4.5em;
width: 5em;
height: 5em;
border-radius: 500rem;
}
}
Expand Down Expand Up @@ -1886,7 +1875,8 @@ nav.main-nav {
font-size: 1rem;
}

&:hover {
&:hover,
&:active {
background-color: $primary-color;
}
}
Expand Down
Binary file modified src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/auth/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Login extends Form {
<div className="login-form">
<div className="form-container">
<div className="form-title">
<i className="fas fa-code-branch"></i>
<i className="fas fa-sign-in-alt"></i>
<h2>log in to to-do</h2>
</div>

Expand Down
10 changes: 6 additions & 4 deletions src/components/common/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ class NavBar extends Component {

navRef = React.createRef();

componentDidMount() {
let { height: navHeight } = this.navRef.current.getBoundingClientRect();
componentDidUpdate() {
const { height: navHeight } = this.navRef.current.getBoundingClientRect();
const domElmStyle = document.documentElement.style;

document.documentElement.style.setProperty("--nav-height", `${navHeight}px`);
+domElmStyle.getPropertyValue("--nav-height").split("px")[0] !== navHeight &&
domElmStyle.setProperty("--nav-height", `${navHeight}px`);
}

logoutUser = async () => {
Expand Down Expand Up @@ -69,7 +71,7 @@ class NavBar extends Component {
<div className="container">
<div className="logo">
<Link to="/">
<img src={logo} alt="logo" width="60" height="60" />
<img src={logo} alt="logo" />
</Link>
</div>

Expand Down
4 changes: 0 additions & 4 deletions src/components/reusableComponents/TodosList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import React from "react";
import Todo from "./Todo";

const TodosList = ({ todos }) => {
//ToDo: Render all to-dos length
//ToDo: Render all completed to-dos length
//ToDo: Render all uncompleted to-dos length

return (
<div className="todos-container section-content">
<div className="todos-info">
Expand Down