Zeshan Merchant
Zeshan Merchant
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
if you dont see a class in css, it means it is just styling class
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
f means flex row and f-c is flex col
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
const hamburger = document.querySelector(".hamburger");
const navMenu = document.getElementById("navbar__items");
const ddNavLinks = document.querySelectorAll(".dd__navLink");

hamburger.addEventListener("click", () => {
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})
const hamburger = document.querySelector(".hamburger");
const navMenu = document.getElementById("navbar__items");
const ddNavLinks = document.querySelectorAll(".dd__navLink");

hamburger.addEventListener("click", () => {
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
@media (max-width: 1100px) {
/* NAVBAR START */
.hamburger {
display: block;
}

.navbar {
padding: 0 3em;
}

.navbar__items {
flex-direction: column;
justify-content: start;
position: fixed;
top: calc(12vh);
width: 50%;
height: 100vh;
right: -1000px;
background-color: var(--primary);
text-align: center;
padding: 20px 0;
margin: 0;
gap: 2em;
transition: all ease 0.5s;
}

.navbar__item {
margin: 10px 0;
}

.navbar__items ul{
position: static;
background: var(--primary--light);
padding-top: 0;
margin-top: 14px;
}

.dd__navLink,.dd__links{
position: static;
}

.dd__navLink:hover .dd__links{
border: 1px solid red;
}

/* NAVBAR END */
@media (max-width: 1100px) {
/* NAVBAR START */
.hamburger {
display: block;
}

.navbar {
padding: 0 3em;
}

.navbar__items {
flex-direction: column;
justify-content: start;
position: fixed;
top: calc(12vh);
width: 50%;
height: 100vh;
right: -1000px;
background-color: var(--primary);
text-align: center;
padding: 20px 0;
margin: 0;
gap: 2em;
transition: all ease 0.5s;
}

.navbar__item {
margin: 10px 0;
}

.navbar__items ul{
position: static;
background: var(--primary--light);
padding-top: 0;
margin-top: 14px;
}

.dd__navLink,.dd__links{
position: static;
}

.dd__navLink:hover .dd__links{
border: 1px solid red;
}

/* NAVBAR END */
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
.dd__links {
position: absolute;
width: max-content;
background: var(--primary);
padding-top: 0;
color: var(--secondary);
align-items: stretch;
left: -55px;
height: 0;
margin-top: 0;
padding-top: 10px;
display: none;
transition: opacity var(--general-transition), visibility var(--general-transition);
}

.dd__links{
display: flex;
flex-direction: column;
position: absolute;
top: 20px;
display: none;
}

.dd__navLink:hover .dd__links {
display: flex;
height: auto;
/* padding-top: 2em; */
}


.dd__link {
color: var(--secondary);
font-size: var(--fs--18-14);
padding: 1em 2em;
width: 100%;
display: block;
transition: var(--general-transition);
}

.dd__link:hover {
background: var(--primary--dark);
}


.hamburger {
display: none;
}

.bar {
display: block;
width: 25px;
height: 3px;
border-radius: 1px;
margin: 5px auto;
transition: var(--general-transition);
background-color: var(--secondary);
}

.bar:nth-child(2) {
width: 30px;
margin-right: 5px;
}

/* Hamburger Menu Animation */
.hamburger.active .bar:nth-child(2) {
opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
transform: translateY(-8px) rotate(-45deg);
}

/* NAVBAR END */
.dd__links {
position: absolute;
width: max-content;
background: var(--primary);
padding-top: 0;
color: var(--secondary);
align-items: stretch;
left: -55px;
height: 0;
margin-top: 0;
padding-top: 10px;
display: none;
transition: opacity var(--general-transition), visibility var(--general-transition);
}

.dd__links{
display: flex;
flex-direction: column;
position: absolute;
top: 20px;
display: none;
}

.dd__navLink:hover .dd__links {
display: flex;
height: auto;
/* padding-top: 2em; */
}


.dd__link {
color: var(--secondary);
font-size: var(--fs--18-14);
padding: 1em 2em;
width: 100%;
display: block;
transition: var(--general-transition);
}

.dd__link:hover {
background: var(--primary--dark);
}


.hamburger {
display: none;
}

.bar {
display: block;
width: 25px;
height: 3px;
border-radius: 1px;
margin: 5px auto;
transition: var(--general-transition);
background-color: var(--secondary);
}

.bar:nth-child(2) {
width: 30px;
margin-right: 5px;
}

/* Hamburger Menu Animation */
.hamburger.active .bar:nth-child(2) {
opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
transform: translateY(-8px) rotate(-45deg);
}

/* NAVBAR END */
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
/* NAVBAR START */
.navbar {
height: 12vh;
width: 100vw;
background-color: var(--primary);
padding: 0;
padding-left: clamp(1.5em, calc(1.5em + ((1vw - 0.87625em) * 7.722)), 4em);
padding-right: clamp(1.5em, calc(1.5em + ((1vw - 0.87625em) * 7.722)), 4em);
position: fixed;
justify-content: space-between;
top: 0;
gap: 5em;
border-bottom: 3px solid var(--accent);
z-index: 999;

}

.logo {
font-weight: 600;
color: var(--accent);
letter-spacing: 2px;
font-size: clamp(1.375em, calc(1.375em + ((1vw - 0.2em) * 1)), 2.375em);
width: fit-content;
}

.navbar__items {
justify-content: space-between;
letter-spacing: 2px;
font-weight: 500;
gap: 1.4em;
flex: 1;
color: var(--secondary);
/* overflow-y: scroll; */
}

.navbar__items.active {
right: 0;
}

.navbar__link {
color: var(--secondary);
position: relative;
gap: 7px;
text-wrap: nowrap;
font-size: var(--fs--18-14);
/* cursor: none !important; */
cursor: default;
}

.dd__navLink {
display: flex;
position: relative;
}

.online_bkg {
font-size: var(--fs--18-14);
}

.dd__navLink img {
transition: var(--general-transition);
}

.dd__navLink img.active {
transform: rotate(180deg);
}
/* NAVBAR START */
.navbar {
height: 12vh;
width: 100vw;
background-color: var(--primary);
padding: 0;
padding-left: clamp(1.5em, calc(1.5em + ((1vw - 0.87625em) * 7.722)), 4em);
padding-right: clamp(1.5em, calc(1.5em + ((1vw - 0.87625em) * 7.722)), 4em);
position: fixed;
justify-content: space-between;
top: 0;
gap: 5em;
border-bottom: 3px solid var(--accent);
z-index: 999;

}

.logo {
font-weight: 600;
color: var(--accent);
letter-spacing: 2px;
font-size: clamp(1.375em, calc(1.375em + ((1vw - 0.2em) * 1)), 2.375em);
width: fit-content;
}

.navbar__items {
justify-content: space-between;
letter-spacing: 2px;
font-weight: 500;
gap: 1.4em;
flex: 1;
color: var(--secondary);
/* overflow-y: scroll; */
}

.navbar__items.active {
right: 0;
}

.navbar__link {
color: var(--secondary);
position: relative;
gap: 7px;
text-wrap: nowrap;
font-size: var(--fs--18-14);
/* cursor: none !important; */
cursor: default;
}

.dd__navLink {
display: flex;
position: relative;
}

.online_bkg {
font-size: var(--fs--18-14);
}

.dd__navLink img {
transition: var(--general-transition);
}

.dd__navLink img.active {
transform: rotate(180deg);
}
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/20/2024 in #front-end
How to achieve this element/design
Thanks mate
7 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/20/2024 in #front-end
How to achieve this element/design
Its just I used a bit of JS for animation and Data handling
7 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/20/2024 in #front-end
How to achieve this element/design
It is dynamic and right now, since i am not connected to backend, i made a dummy json with a statusValue boolean, based on which each circle is connected
7 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/20/2024 in #front-end
How to achieve this element/design
@Chris You wont believe it but I actually had the same thought process and I did implement it the same way u mentioned
7 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/17/2024 in #front-end
SWIPER JS Help
No description
22 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/17/2024 in #front-end
SWIPER JS Help
without them its working fine, only issue is the img size, they all are not of the same size
22 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/17/2024 in #front-end
SWIPER JS Help
in my case i dont need them as they are again making the flags small
22 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/17/2024 in #front-end
SWIPER JS Help
when i tried to change the swiper-slide width, the swiper broke
22 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/17/2024 in #front-end
SWIPER JS Help
Now for smaller screens, I need the whole flag as a rectangle and not like a square, but also with same height and width for all flags. Is there any workaround for this without changing the images?
22 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/17/2024 in #front-end
SWIPER JS Help
No description
22 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/17/2024 in #front-end
SWIPER JS Help
No description
22 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/17/2024 in #front-end
SWIPER JS Help
That might be the reason
22 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/17/2024 in #front-end
SWIPER JS Help
There a high chance that its because of image optimization. Since the site is in development, i dont optimize until a section is completely final
22 replies