Refactor CSS (#785)

* Refactor CSS

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Refactor about section

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Refactor CSS for experiences section

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Update education section

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Update projects section

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Update publication + accomplishment section

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Update achievements section

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Refactor footer CSS

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Re-use section title adjustment css for top header

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Refactor navbar CSS

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Refactor sidebar CSS

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Use unified navbar for all pages

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Refactor 404 page CSS

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Refactor list page css

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Fix notes page css

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Refactor single page css

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Introduce color variables

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

---------

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
Emruz Hossain 2023-09-29 04:27:19 +06:00 committed by GitHub
parent 77447b7723
commit 6dc9d1d33d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 2532 additions and 3593 deletions

View file

@ -1,3 +1,10 @@
@mixin nav-item-hover-effect() {
color: $accent-color !important;
border-bottom: 2px solid $accent-color !important;
background: rgba($accent-color, 0.1);
@include transition();
}
.top-navbar {
position: fixed;
left: 0;
@ -5,294 +12,173 @@
width: 100%;
height: 50px;
z-index: 99999;
transition: all 0.4s ease-out;
margin: 0px;
padding-top: 0.4rem;
color: $heading-color;
text-align: center;
background-color: $bg-primary;
@include transition();
/* --- initial state start ------ */
&.initial-navbar {
background-color: transparent;
}
&.initial-navbar .navbar-brand {
color: #c0ccda;
.navbar-brand {
color: $heading-color;
font-weight: 600;
img {
width: 42px;
padding: 5px;
margin-left: -10px;
}
}
&.initial-navbar li a {
color: #c0ccda;
img {
display: inline-block;
}
&.initial-navbar .navbar-nav .active,
&.initial-navbar li a:hover {
color: #f9fafc;
transition: all 0.3s ease-out;
transform: translateY(-2px);
.sidebar-icon {
width: 32px;
height: 32px;
filter: invert(0.5);
}
.navbar-collapse {
margin-top: -5px;
li {
a {
color: $heading-color;
font-weight: 500;
@include transition();
border-bottom: 2px solid transparent;
&:hover {
@include nav-item-hover-effect();
}
}
}
.navbar-collapse.show,
.navbar-collapse.collapsing {
background-color: #f9fafc;
padding-left: 1rem;
.navbar-nav .active {
@include nav-item-hover-effect();
}
/* --- initial state end ------ */
/* --- state after scroll start --- */
&.final-navbar {
background-color: #f9fafc;
color: #1c2d41;
transition: all 0.3s ease-out;
}
&.final-navbar .navbar-brand {
color: #1c2d41;
font-weight: 600;
}
&.final-navbar li a {
color: #1c2d41;
font-weight: 500;
transition: all 0.3s ease-out;
border-bottom: 2px solid#F9FAFC;
}
&.final-navbar .navbar-nav .active,
&.final-navbar li a:hover {
color: #2098d1;
transition: all 0.3s ease-out;
border-bottom: 2px solid #2098d1;
background: rgb(2, 0, 36);
background: linear-gradient(
90deg,
rgba(2, 0, 36, 1) 0%,
rgba(34, 136, 168, 0.1) 0%
);
}
.navbar-collapse.show li a,
.navbar-collapse.collapsing li a {
color: #1c2d41;
font-weight: 500;
transition: all 0.3s ease-out;
}
.navbar-collapse.show .navbar-nav .active,
.navbar-collapse.show .navbar-nav a:hover {
color: #2098d1;
}
#top-navbar-divider {
margin-top: 10px;
}
/* --- state after scroll end --- */
#top-navbar-divider {
background: rgba(192, 204, 218, 0.8);
background-color: $muted-text-color;
height: 20px;
width: 2px;
}
&.final-navbar #top-navbar-divider {
background: rgba(0, 0, 0, 0.6);
}
#top-navbar-divider {
height: 20px;
width: 2px;
}
.navbar-brand img {
width: 42px;
padding: 5px;
margin-left: -10px;
}
.dropdown-menu {
box-shadow: 0px 8px 56px rgba(15, 80, 100, 0.16);
border: 1px solid #fff;
box-shadow: $box-shadow;
border: 1px solid $border-color;
max-height: 0vh;
overflow: hidden;
display: block;
visibility: hidden;
transition: all 0.3s ease-out;
@include transition();
&.show {
max-height: 100vh;
visibility: visible;
@include transition();
a {
color: $heading-color !important;
&:hover {
@include nav-item-hover-effect();
}
}
}
}
.dropdown-menu.show {
max-height: 100vh;
visibility: visible;
transition: all 0.3s ease-in;
.navbar-collapse {
margin-top: -5px;
&.show,
&.collapsing {
background-color: $bg-primary;
padding-left: 1rem;
li {
a {
color: $heading-color;
font-weight: 500;
@include transition();
}
}
.navbar-nav {
.active {
color: $accent-color;
}
a:hover {
color: $accent-color;
}
}
}
}
.dropdown-menu a {
color: #1c2d41;
border-bottom: none;
&.transparent-navbar {
background-color: transparent;
.navbar-brand {
color: $inverse-text-color;
font-weight: 600;
}
li {
a {
color: $inverse-text-color;
}
}
.feather-menu {
stroke: $inverse-text-color;
}
}
.dropdown-menu a:hover {
color: #2098d1;
transition: all 0.3s ease-out;
border-bottom: none;
background: rgb(2, 0, 36);
background: linear-gradient(
90deg,
rgba(2, 0, 36, 1) 0%,
rgba(34, 136, 168, 0.2) 0%
);
}
/* ============= Device specific fixes ======= */
/* Large screens such as TV */
@media only screen and (min-width: 1824px) {
}
/* Extra large devices (large desktops, 1200px and up) */
@media (max-width: 1400px) {
}
@media (max-width: 1200px) {
}
/* IPad Pro */
@media (max-width: 1024px) {
@include media('<=large') {
height: -moz-fit-content;
height: fit-content;
padding-bottom: 0px;
padding-top: 0px;
.container {
max-width: 100%;
}
&.initial-navbar .navbar-nav .active,
&.initial-navbar li a:hover {
color: #2098d1;
transition: all 0.3s ease-out;
}
&.final-navbar .navbar-nav .active,
&.final-navbar li a:hover {
color: #2098d1;
transition: none;
border-bottom: none;
background: transparent;
}
&.final-navbar li a {
border-bottom: none;
}
.dropdown-divider {
border-top: 1px solid #c0ccda;
&.transparent-navbar {
.navbar-nav .active,
li a:hover {
color: $accent-color;
@include transition();
}
}
#top-navbar-divider {
background: rgba(0, 0, 0, 0.6);
height: auto;
width: auto;
margin-right: 15px;
border-top: 1px solid #c0ccda;
}
.dropdown-menu {
text-align: center;
margin-bottom: 0.5rem;
margin-right: 1rem;
transition: all 0.3s ease-out;
@include transition();
}
.languageSelector {
position: fixed;
right: 0.5rem;
bottom: 1rem;
z-index: 10000000;
background-color: $bg-primary;
box-shadow: $box-shadow;
}
}
/* Large devices (desktops, 992px and up) */
@media (max-width: 992px) {
&.initial-navbar .navbar-nav .active,
&.initial-navbar li a:hover {
color: #2098d1;
transition: all 0.3s ease-out;
}
&.final-navbar .navbar-nav .active,
&.final-navbar li a:hover {
color: #2098d1;
transition: none;
border-bottom: none;
background: transparent;
}
&.final-navbar li a {
border-bottom: none;
}
.dropdown-divider {
border-top: 1px solid #c0ccda;
}
#top-navbar-divider {
background: rgba(0, 0, 0, 0.6);
height: auto;
width: auto;
margin-right: 15px;
}
}
/* Medium devices (tablets, 768px and up) */
@media only screen and (max-width: 768px) {
&.initial-navbar .navbar-nav .active,
&.initial-navbar li a:hover {
color: #2098d1;
transition: all 0.3s ease-out;
}
&.final-navbar .navbar-nav .active,
&.final-navbar li a:hover {
color: #2098d1;
transition: none;
border-bottom: none;
background: transparent;
}
&.final-navbar li a {
border-bottom: none;
}
.dropdown-divider {
border-top: 1px solid #c0ccda;
}
#top-navbar-divider {
background: rgba(0, 0, 0, 0.6);
height: auto;
width: auto;
margin-right: 15px;
}
}
/* Small devices (landscape phones, 576px and up) */
@media only screen and (max-width: 576px) {
@include media('<=small') {
.dropdown-menu {
margin-left: -1rem;
margin-right: 0rem;
}
}
/* iPhoneX, iPhone 6,7,8 */
@media only screen and (max-width: 375px) {
}
/* Galaxy S5, Moto G4 */
@media only screen and (max-width: 360px) {
}
/* iPhone 5 or before */
@media only screen and (max-width: 320px) {
}
}
}
.feather-sidebar,
.feather-menu {
width: 1.5rem;
height: 1.5rem;
stroke: $text-color;
}