feat: dynamic main icon

This commit is contained in:
mohamad
2026-05-25 15:57:24 +03:30
parent 4875d8b6c3
commit f08d0aacc0
38 changed files with 1565 additions and 540 deletions
+149 -49
View File
@@ -344,8 +344,7 @@ h1, h2, h3, h4, h5, h6 {
.brand-icon {
width: 26px;
height: 26px;
border-radius: 8px;
border: 1px solid #c4b5fd;
border-radius: 0;
object-fit: cover;
display: block;
flex-shrink: 0;
@@ -390,7 +389,7 @@ h1, h2, h3, h4, h5, h6 {
}
.nav-arrow {
transition: transform 0.22s ease;
transition: transform 0.4s ease;
}
.nav-item.has-megamenu:hover .nav-arrow,
@@ -428,7 +427,7 @@ h1, h2, h3, h4, h5, h6 {
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s ease;
pointer-events: none;
z-index: 999;
}
@@ -444,37 +443,91 @@ h1, h2, h3, h4, h5, h6 {
.megamenu-inner {
max-width: var(--container-max);
margin: 0 auto;
padding: 2rem var(--container-padding);
padding: 1.5rem var(--container-padding);
}
.megamenu-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 1.5rem;
.megamenu-products-scroll {
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
scrollbar-width: thin;
scrollbar-color: rgba(79, 142, 247, 0.45) transparent;
padding-bottom: 0.35rem;
}
.megamenu-column {
padding: 1rem;
.megamenu-products-scroll::-webkit-scrollbar {
height: 6px;
}
.megamenu-products-scroll::-webkit-scrollbar-track {
background: transparent;
}
.megamenu-products-scroll::-webkit-scrollbar-thumb {
background: rgba(79, 142, 247, 0.35);
border-radius: 999px;
}
.megamenu-products-scroll::-webkit-scrollbar-thumb:hover {
background: rgba(79, 142, 247, 0.55);
}
.megamenu-products {
display: flex;
align-items: flex-start;
gap: 1rem;
list-style: none;
margin: 0;
padding: 0;
min-width: min-content;
}
.megamenu-product-item {
flex: 0 0 220px;
max-width: 220px;
border-radius: var(--radius-md);
border: 1px solid var(--glass-border);
background: var(--glass-bg);
transition: var(--transition-fast);
}
.megamenu-column:hover {
background: var(--glass-bg);
.megamenu-product-item:hover,
.megamenu-product-item:focus-within {
border-color: rgba(79, 142, 247, 0.35);
background: rgba(79, 142, 247, 0.06);
}
.megamenu-product-title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 0.95rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 0.4rem;
.megamenu-product-link {
display: block;
padding: 1rem;
text-decoration: none;
}
.megamenu-product-title:hover {
.megamenu-product-name {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
font-size: 0.95rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 0.35rem;
}
.megamenu-product-link:hover .megamenu-product-name,
.megamenu-product-item:focus-within > .megamenu-product-link .megamenu-product-name {
color: var(--accent-blue-light);
}
.megamenu-sub-chevron {
flex-shrink: 0;
color: var(--text-muted);
transition: transform 0.4s ease, color 0.4s ease;
}
.megamenu-product-item.has-subproducts:hover .megamenu-sub-chevron,
.megamenu-product-item.has-subproducts:focus-within .megamenu-sub-chevron {
transform: rotate(180deg);
color: var(--accent-blue-light);
}
@@ -482,44 +535,47 @@ h1, h2, h3, h4, h5, h6 {
font-size: 0.78rem;
color: var(--text-muted);
line-height: 1.5;
margin-bottom: 0.85rem;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.megamenu-sublist {
display: flex;
flex-direction: column;
gap: 0.2rem;
list-style: none;
margin: 0;
padding: 0;
border-top: 1px solid transparent;
max-height: 0;
overflow: hidden;
opacity: 0;
transition: max-height 0.4s ease, opacity 0.35s ease, border-color 0.35s ease;
}
.megamenu-product-item.has-subproducts:hover .megamenu-sublist,
.megamenu-product-item.has-subproducts:focus-within .megamenu-sublist {
max-height: 320px;
opacity: 1;
border-top-color: var(--glass-border);
}
.megamenu-sublink {
display: flex;
align-items: center;
gap: 0.5rem;
display: block;
padding: 0.45rem 1rem;
font-size: 0.82rem;
color: var(--text-secondary);
padding: 0.3rem 0.4rem;
border-radius: var(--radius-sm);
text-decoration: none;
transition: var(--transition-fast);
}
.megamenu-sublink:hover {
.megamenu-sublink:hover,
.megamenu-sublink:focus-visible {
color: var(--accent-blue-light);
background: rgba(79, 142, 247, 0.08);
}
.sublink-dot {
width: 5px; height: 5px;
border-radius: 50%;
background: var(--accent-blue);
flex-shrink: 0;
opacity: 0.6;
transition: var(--transition-fast);
}
.megamenu-sublink:hover .sublink-dot {
opacity: 1;
box-shadow: 0 0 6px var(--accent-blue);
.megamenu-sublink:last-child {
border-radius: 0 0 var(--radius-md) var(--radius-md);
}
/* ============================================================
@@ -831,7 +887,7 @@ h1, h2, h3, h4, h5, h6 {
width: 32px;
height: 32px;
object-fit: contain;
border-radius: var(--radius-sm);
border-radius: 0;
opacity: 0.85;
}
@@ -914,7 +970,7 @@ h1, h2, h3, h4, h5, h6 {
flex-shrink: 0;
width: 52px;
height: 52px;
border-radius: var(--radius-sm);
border-radius: 0;
overflow: hidden;
background: rgba(255, 255, 255, 0.05);
display: flex;
@@ -1054,6 +1110,21 @@ h1, h2, h3, h4, h5, h6 {
line-height: 1.8;
}
.main-product-layout {
padding-top: var(--spacing-xl);
}
.main-product-main .product-detail-text h2 {
font-size: 1.25rem;
font-weight: 700;
margin-bottom: 1rem;
color: var(--text-primary);
}
.main-product-main .sub-downloads {
margin-top: 0;
}
/* ============================================================
Sub-products Grid
============================================================ */
@@ -1136,12 +1207,17 @@ h1, h2, h3, h4, h5, h6 {
align-items: start;
}
.sub-product-main {
.sub-product-main,
.main-product-main {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.sub-product-main .sub-downloads {
margin-top: 0;
}
.sub-product-image {
overflow: hidden;
padding: 0;
@@ -1563,6 +1639,10 @@ a.citation-count-badge:hover {
padding: 2.5rem;
}
.about-custom-card {
padding: 2.5rem;
}
.about-intro h2 {
font-size: 1.4rem;
margin-bottom: 1.25rem;
@@ -2319,6 +2399,10 @@ a.citation-count-badge:hover {
align-items: start;
}
.contact-layout--full {
grid-template-columns: 1fr;
}
.contact-form-wrap {
padding: 2.5rem;
}
@@ -2805,11 +2889,27 @@ a.citation-count-badge:hover {
padding: 1rem;
}
.megamenu-grid {
grid-template-columns: 1fr;
.megamenu-products-scroll {
overflow-x: visible;
padding-bottom: 0;
}
.megamenu-products {
flex-direction: column;
gap: 0.75rem;
}
.megamenu-product-item {
flex: 1 1 auto;
max-width: none;
}
.megamenu-product-item.has-subproducts .megamenu-sublist {
max-height: none;
opacity: 1;
border-top-color: var(--glass-border);
}
.nav-item.has-megamenu:hover .megamenu {
transform: none;
}
+1 -1
View File
@@ -77,7 +77,7 @@ function initMegaMenu() {
hideTimer = setTimeout(() => {
productsItem.classList.remove('open');
trigger.setAttribute('aria-expanded', 'false');
}, 180);
}, 420);
}
productsItem.addEventListener('mouseenter', openMenu);