Skip to content

Commit

Permalink
modified changes on a project
Browse files Browse the repository at this point in the history
  • Loading branch information
nonoza committed Mar 17, 2024
1 parent bae2a5c commit 4a09dc0
Show file tree
Hide file tree
Showing 11 changed files with 140 additions and 80 deletions.
53 changes: 45 additions & 8 deletions assets/css/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@charset "UTF-8";
/* File that acts as a studyguide will theme colors, fonts and sizes and including bootstrap customes */
/*!
* Bootstrap v5.3.3 (https://getbootstrap.com/)
* Copyright 2011-2024 The Bootstrap Authors
Expand Down Expand Up @@ -11857,6 +11858,7 @@ textarea.form-control-lg {
font-style: bold;
}
/* Stylesheet for the navbar section */
/* File that acts as a studyguide will theme colors, fonts and sizes and including bootstrap customes */
/*!
* Bootstrap v5.3.3 (https://getbootstrap.com/)
* Copyright 2011-2024 The Bootstrap Authors
Expand Down Expand Up @@ -23743,18 +23745,29 @@ textarea.form-control-lg {
position: fixed;
top: 0;
right: 0;
bottom: 32px;
left: 0;
bottom: 0;
left: 100%;
z-index: 1;
height: 100vh;
width: 100vw;
background: hsla(0, 0%, 8%, 0.59);
opacity: 1;
transition: opacity 0.3s ease 0.2s;
opacity: 0;
display: none;
transition: left 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.5s ease;
}
.header-section .overlay.show {
display: block;
left: 0;
opacity: 1;
animation: fadeIn 0.3s forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@media (min-width: 992px) {
.header-section .overlay {
Expand All @@ -23774,6 +23787,7 @@ textarea.form-control-lg {
width: 100vw;
min-height: 100vh;
padding: 23px 20px 0 20px;
box-shadow: -1rem 0rem 3rem hsl(0, 0%, 8%);
}
@media (min-width: 992px) {
.header-section .overlay .main-menu {
Expand Down Expand Up @@ -23809,6 +23823,17 @@ textarea.form-control-lg {
border: none !important;
}
}
.header-section .overlay .navbar-nav .nav-item .dropdown-menu[data-bs-popper] {
animation: fadeIn 0.3s forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.header-section .overlay .navbar-nav .nav-item .dropdown-menu > li .menu-icon {
height: 100%;
}
Expand All @@ -23821,6 +23846,7 @@ textarea.form-control-lg {
.header-section .overlay .navbar-nav .nav-item .nav-link:hover {
color: hsl(0, 0%, 8%);
background: transparent;
transition: all 350ms ease-in-out;
}
.header-section .overlay .navbar-nav .nav-item .nav-link:active {
color: hsl(0, 0%, 8%);
Expand Down Expand Up @@ -23857,6 +23883,7 @@ textarea.form-control-lg {
}
.header-section .overlay .right-section .login:hover {
color: hsl(0, 0%, 8%);
transition: all 350ms ease-in-out;
}
.header-section .overlay .right-section .login:active {
color: hsl(0, 0%, 8%);
Expand All @@ -23866,7 +23893,7 @@ textarea.form-control-lg {
background: transparent;
color: hsl(0, 0%, 41%);
font-family: "epilogue-bold", Arial, sans-serif;
border-radius: 10px;
border-radius: 18px;
padding: 0.9rem 1.9rem;
font-weight: bold;
width: 100%;
Expand All @@ -23885,6 +23912,7 @@ textarea.form-control-lg {
padding: 0.9rem 1.9rem;
border-radius: 18px;
font-weight: bold;
transition: all 350ms ease-in-out;
}
.header-section .overlay .right-section .btn-outline:active {
border: 2px solid hsl(0, 0%, 8%);
Expand All @@ -23897,6 +23925,7 @@ textarea.form-control-lg {
}

/* styles for the main section*/
/* File that acts as a studyguide will theme colors, fonts and sizes and including bootstrap customes */
/*!
* Bootstrap v5.3.3 (https://getbootstrap.com/)
* Copyright 2011-2024 The Bootstrap Authors
Expand Down Expand Up @@ -35830,16 +35859,17 @@ textarea.form-control-lg {
background: transparent;
color: hsl(0, 0%, 41%);
font-family: "epilogue-bold", Arial, sans-serif;
border-radius: 10px;
border-radius: 18px;
padding: 0.9rem 1.9rem;
font-weight: bold;
transition: all 350ms ease-in-out;
}
.hero-section .hero-content button:active {
border: 2px solid hsl(0, 0%, 41%);
background: transparent;
color: hsl(0, 0%, 41%);
font-family: "epilogue-bold", Arial, sans-serif;
border-radius: 10px;
border-radius: 18px;
padding: 0.9rem 1.9rem;
font-weight: bold;
}
Expand All @@ -35848,7 +35878,13 @@ textarea.form-control-lg {
justify-content: center;
align-items: center;
gap: 27px;
margin-bottom: 99px;
margin: 0 12px 99px 12px;
}
@media (min-width: 992px) {
.hero-section .hero-content .logo-section {
margin: 0 0 99px 0;
justify-content: space-between;
}
}
.hero-section .hero-content .logo-section img {
width: 19%;
Expand Down Expand Up @@ -35877,6 +35913,7 @@ textarea.form-control-lg {
font-style: bold;
}
body {
background: hsl(0, 0%, 98%);
font-size: 18px;
}
@media (min-width: 768px) {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/style.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/typography.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
</ul>
</li>
<li class="nav-item mr-3">
<a class="nav-link" href="#">Carrers</a>
<a class="nav-link" href="#">Careers</a>
</li>
<li class="nav-item mr-3">
<a class="nav-link" href="#">About</a>
Expand Down
75 changes: 41 additions & 34 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
window.addEventListener("load", () => {
// Variables for dropdown menu and mobile overlay
let overlay = document.querySelector(".overlay");
let closeMenu = document.querySelector(".close-icon-btn");
let dropDownMenu = document.querySelectorAll(".dropdown");
let dropDownIcon = document.querySelectorAll(".dropdown-icon");
let droptDownMenuItems = document.querySelectorAll(".dropdown-menu");
let mobileIcon = document.querySelector(".navbar-toggler");
let mainMenu = document.querySelector(".main-menu");
let login = document.querySelector(".login");

// Variables for dropdown menu and mobile overlay
let overlay = document.querySelector('.overlay');
let closeMenu = document.querySelector('.close-icon-btn');
let dropDownMenu = document.querySelectorAll('.dropdown');
let dropDownIcon = document.querySelectorAll('.dropdown-icon');
let mobileIcon = document.querySelector('.navbar-toggler');
let mainMenu = document.querySelector('.main-menu');
let login = document.querySelector('.login');
//Dropdown icon switch
dropDownMenu.forEach((menu, index) => {
menu.addEventListener("click", () => {
console.log("clicked droped");

//Toggle the dropdown icon
//Check if the dropdown icons on any index have icon arrow down
if (dropDownIcon[index].src.includes("icon-arrow-down.svg")) {
// If yes, change it to icon arrow up
dropDownIcon[index].src = "./images/icon-arrow-up.svg";
} else {
// else, add the arrow down if arrow up is not found.
dropDownIcon[index].src = "./images/icon-arrow-down.svg";
}

//Dropdown icon switch
dropDownMenu.forEach((menu, index) => {
menu.addEventListener('click', () => {
console.log('clicked droped');

//Toggle the dropdown icon
//Check if the dropdown icons on any index have icon arrow down
if (dropDownIcon[index].src.includes("icon-arrow-down.svg")) {
// If yes, change it to icon arrow up
dropDownIcon[index].src = "./images/icon-arrow-up.svg";
} else {
// else, add the arrow down if arrow up is not found.
dropDownIcon[index].src = "./images/icon-arrow-down.svg";
}

droptDownMenuItems.classList.add("dropdown-menu[data-bs-popper]");
});
});
});

//Overlay for mobile bn
mobileIcon.addEventListener('click',()=>{
console.log('clicked');
overlay.classList.toggle('show');
})
// An event that will happend when the mobile icon is clicked, must show the mobile menu.
mobileIcon.addEventListener("click", () => {
console.log("clicked");
// adding the styles of overlay.
overlay.classList.toggle("show");
});

closeMenu.addEventListener('click',()=> {
console.log('clicked');
overlay.classList.remove('show');
mainMenu.classList.remove('show');
})
// An event that will happend when the close button is clicked, must hide the mobile menu.
closeMenu.addEventListener("click", () => {
console.log("clicked");
// remove the styles of overlay
overlay.classList.remove("show");
// remove the styles for show and hide a menu.
mainMenu.classList.remove("show");
});

//Initialising AOS js library
AOS.init();
});
5 changes: 2 additions & 3 deletions scss/_custom.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//importing bootstrap class that will be overidden.

/* File that acts as a studyguide will theme colors, fonts and sizes and including bootstrap customes */
@import "../node_modules/bootstrap/scss/bootstrap.scss";
@import "./typography.scss";

Expand Down Expand Up @@ -47,5 +46,5 @@ $nav-link-disabled-color: var(--#{$prefix}secondary-color) !default;
$nav-link-focus-box-shadow: $focus-ring-box-shadow !default;


//Nav icon
//Nav icon image
$navbar-dark-toggler-icon-bg: url("../images/icon-arrow-down.svg");
4 changes: 2 additions & 2 deletions scss/_mixin.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//Importing the style guide
@import "./custom";

// buttons

//Styles for outline button
@mixin btn-outline {
border: 2px solid $medium-gray;
background: transparent;
color: $medium-gray;
font-family: $brand-font-reguler;
border-radius: 10px;
border-radius: 18px;
padding: 0.9rem 1.9rem;
font-weight: bold;
}
Expand Down
35 changes: 12 additions & 23 deletions scss/sections/_main.scss
Original file line number Diff line number Diff line change
@@ -1,63 +1,50 @@
/* styles for the main section*/
// Importing the mixin and typography
@import "../mixin";
@import "../typography";
// Hero section styles stars
.hero-section {
display: flex;
flex-direction: column-reverse;

margin-top: 35px;

padding: 0 !important;

@include media-breakpoint-up(lg) {
// Flex direction
@include media-breakpoint-up(lg) { // Larger screens
flex-direction: row;

gap: 200px;

max-width: 1164px;

margin: 79px auto 121px;
}

.hero-content {
margin-top: 46px;

text-align: center;

@include media-breakpoint-up(lg) {
@include media-breakpoint-up(lg) { // Larger screens
text-align: left;
}

.heading {
font-size: 2rem;

font-family: $brand-font-bold;
font-weight: 700;

@include media-breakpoint-up(lg) {
@include media-breakpoint-up(lg) { // Larger screens
font-size: 4.6rem;

line-height: 5rem;

text-align: left;

max-width: 93%;
}
}

p {
padding: 0 20px;

line-height: 2rem;

margin-bottom: 33px;

font-family: $brand-font-reguler;

color: $medium-gray;

@include media-breakpoint-up(lg) {
@include media-breakpoint-up(lg) { // Larger screens
padding: 0;
margin-right: 21px;
}
Expand All @@ -69,6 +56,7 @@

&:hover {
@include btn-outline;
transition: all 350ms ease-in-out;
}

&:active {
Expand All @@ -78,13 +66,15 @@

.logo-section {
display: flex;

justify-content: center;
align-items: center;

gap: 27px;
margin: 0 12px 99px 12px;

margin-bottom: 99px;
@include media-breakpoint-up(lg) {
margin: 0 0 99px 0;
justify-content: space-between;
}

img {
width: 19%;
Expand All @@ -98,7 +88,6 @@

@include media-breakpoint-up(md) {
display: flex;

margin: auto;
width: 100%;
}
Expand Down
Loading

0 comments on commit 4a09dc0

Please sign in to comment.