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

Navbar Enhanced to be responsive and new working links #4802

Merged
merged 4 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
191 changes: 78 additions & 113 deletions assets/css/navbar.css
Original file line number Diff line number Diff line change
@@ -1,110 +1,22 @@
#navbar {
display: flex;
align-items: center;
position: relative;
top: 0px;
background-color: rgb(185, 180, 180);
padding: 5px;
z-index: 1000;
}

#logo {
margin: 5px 5px;
font-weight: bold;
font-size: 1.9em;
color: black;
}

#navbar ul {
display: flex;
flex-grow: 1;
justify-content: center;
margin: 0;
padding: 0;
}

#navbar ul li {
list-style: none;
font-size: 1.3rem;
}

#navbar ul li a {
color: rgb(0, 0, 0);
text-decoration: none;
display: block;
padding: 15px 20px;
border-radius: 8px;
}

#navbar ul li a:hover {
text-decoration: underline;
color: rgb(144, 137, 137);
}

#navbar::before {
content: "";
top: 0px;
left: 0px;
background-color: rgb(251, 248, 248);
z-index: -1;
position: absolute;
height: 100%;
width: 100%;
opacity: 1;
}

.navbar-new {
width: 100%;
margin: 0;
padding: 0;
display: flex;
justify-content: space-between;
align-items: baseline;
justify-items: center;
}

.navbar-new .logo {
font-size: 2rem;
font-weight: 600;
color: #fff;
text-decoration: none;
display: flex;
}

.navbar-new .search-box {
width: 100%;
margin: 0;
padding: 0;
height: 100%;
}

@media screen and (max-width: 920px) {
.navbar-new {
flex-direction: column;
align-items: center;
gap: 1rem;
justify-content: center;
margin-top: 50px;
}
.navbar-new .logo {
font-size: 2rem;
font-weight: 600;
color: #fff;
text-decoration: none;
display: flex;
}
}


.navbarr {
display: flex;
justify-content: space-between;
position: fixed;
top: 0;
width: 100%;
z-index: 200;
align-items: center;
padding: 1rem 2rem;
padding: .5rem;
background: linear-gradient(rgb(236, 145, 145),rgb(189, 239, 189),rgb(161, 161, 209),rgb(220, 220, 159));

}

#themeToggle{
border: none;
background-color: transparent;
}
.logox {
display: flex;
font-size: 1.5rem;
font-weight: bolder;
color: rgb(17, 4, 4);
Expand All @@ -115,11 +27,13 @@
list-style: none;
margin: 0;
padding: 0;

font-weight: bold;
}

.nav-linkss li {
margin-right: 4rem;
margin-right: 2rem;
margin-left: 2rem;
}


Expand All @@ -128,28 +42,79 @@
color: #333;
}

.nav-linkss a:hover{
color: aqua;
.navbarr ul li a:hover {
text-decoration: underline;
color: rgb(144, 137, 137);
}



/* Media Queries for responsiveness */
/* Media Queries for responsiveness*/

@media screen and (max-width: 768px) {
.navbar {
flex-direction: column;
align-items: center;
/* media query for screen sizes upto 420px */
@media screen and (max-width:550px){
.logox{
opacity: 0;
width: 0;
transition: opacity .5s ease-in-out, width .1s ease-in-out ;
}
.logox span{
opacity: 0;
width: 0;
transition: opacity .5s ease-in-out, width .5s ease-in-out ;
}
#themeToggleWrapper{
opacity: 0;
width: 0;
padding: 0;
margin: 0;
transition: opacity .5s ease-in-out,width .5s ease-in-out, padding .5s ease-in-out, margin .5s ease-in-out;
}
.nav-linkss li{
margin-right: 1rem;
margin-left: 1rem;
transition: margin-right .5s ease-in-out ,margin-left .5s ease-in-out;
}

.nav-links {
flex-direction: column;
margin-top: 1rem;
}

/* Media query for screens between 420px and 768px wide */
@media screen and (min-width:550px) and (max-width: 768px) {
.logox span{
opacity: 0;
width: 0;
transition: opacity .5s ease-in-out, width .5s ease-in-out ;
}
.logox{
opacity: 1;
width: auto;
transition: opacity .5s ease-in-out, width .1s ease-in-out ;
}
#themeToggleWrapper{
opacity: 1;
width:40px ;
transition: opacity .5s ease-in-out,width .5s ease-in-out;
}
.nav-linkss li{
margin-left: 1rem;
margin-right: 1rem;
transition: margin-right .5s ease-in-out ,margin-left .5s ease-in-out;
}
}



.nav-links li {
margin-right: 0;
margin-bottom: 1rem;
/* Media query for screens between 768px and 1024px wide */
@media screen and (min-width: 768px) and (max-width: 1024px) {
.logox span{
opacity: 1;
width: auto;
transition: opacity .5s ease-in-out, width .5s ease-in-out ;
}
.nav-linkss li{
margin-left:1.5rem ;
margin-right:1.5rem ;
transition: margin-right .5s ease-in-out ,margin-left .5s ease-in-out; ;
}
}

87 changes: 0 additions & 87 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -869,46 +869,6 @@ main {
color: var(--light-gray);
}

/*-----------------------------------*\
#NAVBAR
\*-----------------------------------*/

.navbar {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: hsla(240, 1%, 17%, 0.75);
backdrop-filter: blur(10px);
border: 1px solid var(--jet);
border-radius: 12px 12px 0 0;
box-shadow: var(--shadow-2);
z-index: 5;
}

.navbar-list {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
padding: 0 10px;
}

.navbar-link {
color: var(--light-gray);
font-size: var(--fs-8);
padding: 20px 7px;
transition: color var(--transition-1);
}

.navbar-link:hover,
.navbar-link:focus {
color: var(--light-gray-70);
}

.navbar-link.active {
color: var(--orange-yellow-crayola);
}

/*-----------------------------------*\
#ABOUT
Expand Down Expand Up @@ -1930,22 +1890,6 @@ textarea.form-input::-webkit-resizer {
width: calc(100% - 64px);
}

/**
* #NAVBAR
*/

.navbar {
border-radius: 20px 20px 0 0;
}

.navbar-list {
gap: 20px;
}

.navbar-link {
--fs-8: 14px;
}

/**
* #ABOUT
*/
Expand Down Expand Up @@ -2161,13 +2105,6 @@ textarea.form-input::-webkit-resizer {
gap: 30px 15px;
}

/**
* NAVBAR
*/

.navbar-link {
--fs-8: 15px;
}

/**
* ABOUT
Expand Down Expand Up @@ -2283,30 +2220,6 @@ textarea.form-input::-webkit-resizer {
margin: auto;
}

/**
* NAVBAR
*/

.navbar {
position: absolute;
bottom: auto;
top: 0;
left: auto;
right: 0;
width: max-content;
border-radius: 0 20px;
padding: 0 20px;
box-shadow: none;
}

.navbar-list {
gap: 30px;
padding: 0 20px;
}

.navbar-link {
font-weight: var(--fw-500);
}

/**
* ABOUT
Expand Down
10 changes: 5 additions & 5 deletions assets/js/gamesData.json
Original file line number Diff line number Diff line change
Expand Up @@ -2059,27 +2059,27 @@
"gameUrl": "MathQuiz",
"thumbnailUrl": "MathQuiz.png"
},
"420":{
"410":{
"gameTitle":"Puzzle-Game",
"gameUrl":"puzzle-game",
"thumbnailUrl":"puzzle-game.png"
},
"421":{
"411":{
"gameTitle": "ShroomKnight",
"gameUrl": "ShroomKnight",
"thumbnailUrl": "ShroomKnight.png"
},
"422":{
"412":{
"gameTitle":"Fidget_Spinner_Game",
"gameUrl":"Fidget_Spinner_Game",
"thumbnailUrl":"Fidget.png"
},
"423":{
"413":{
"gameTitle": "16_Puzzle",
"gameUrl": "16_Puzzle",
"thumbnailUrl": "16_Puzzle.png"
},
"424":{
"414":{
"gameTitle" : "Colour_Generator_Game",
"gameUrl": "Colour_Generator_Game",
"thumbnailUrl": "Colour_Generator_Game.png"
Expand Down
Loading
Loading