Skip to content

Commit

Permalink
Added header code and basic style updated using aldevron
Browse files Browse the repository at this point in the history
  • Loading branch information
teshukatepalli1 committed Oct 12, 2023
1 parent 2ef05df commit 78a5436
Show file tree
Hide file tree
Showing 13 changed files with 4,632 additions and 5,210 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
helix-importer-ui
scripts/jquery-1.11.2.min.js
scripts/jquery.colorbox-min.js
scripts/swiper-342.jquery.min.js
scripts/swiper-342.jquery.min.js
scripts/main-scripts.js
scripts/gcse.js
14 changes: 13 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{
"extends": ["stylelint-config-standard"]
"extends": "stylelint-config-standard",
"plugins": ["stylelint-order"],
"rules": {
"no-descending-specificity": null,
"order/properties-alphabetical-order": null,
"selector-class-pattern": null,
"selector-id-pattern": null,
"color-function-notation": null,
"function-no-unknown": [true, {
"ignoreFunctions": ["alpha"]
}],
"font-family-no-missing-generic-family-keyword": null
}
}
276 changes: 1 addition & 275 deletions blocks/header/header.css
Original file line number Diff line number Diff line change
@@ -1,275 +1 @@
/* header and nav layout */
header .nav-wrapper {
background-color: var(--background-color);
width: 100%;
z-index: 2;
position: fixed;
}

header nav {
box-sizing: border-box;
display: grid;
grid-template:
'hamburger brand tools' var(--nav-height)
'sections sections sections' 1fr / auto 1fr auto;
align-items: center;
gap: 0 2em;
margin: auto;
max-width: 1264px;
height: var(--nav-height);
padding: 0 1rem;
font-family: var(--body-font-family);
}

header nav[aria-expanded="true"] {
grid-template:
'hamburger brand' var(--nav-height)
'sections sections' 1fr
'tools tools' var(--nav-height) / auto 1fr;
overflow-y: auto;
min-height: 100vh;
}

@media (min-width: 600px) {
header nav {
padding: 0 2rem;
}
}

@media (min-width: 900px) {
header nav {
display: flex;
justify-content: space-between;
}

header nav[aria-expanded="true"] {
min-height: 0;
overflow: visible;
}
}

header nav p {
margin: 0;
line-height: 1;
}

header nav a:any-link {
color: currentcolor;
}

/* hamburger */
header nav .nav-hamburger {
grid-area: hamburger;
height: 22px;
display: flex;
align-items: center;
}

header nav .nav-hamburger button {
height: 22px;
margin: 0;
border: 0;
border-radius: 0;
padding: 0;
background-color: var(--background-color);
color: inherit;
overflow: initial;
text-overflow: initial;
white-space: initial;
}

header nav .nav-hamburger-icon,
header nav .nav-hamburger-icon::before,
header nav .nav-hamburger-icon::after {
box-sizing: border-box;
display: block;
position: relative;
width: 20px;
}

header nav .nav-hamburger-icon::before,
header nav .nav-hamburger-icon::after {
content: '';
position: absolute;
background: currentcolor;
}

header nav[aria-expanded="false"] .nav-hamburger-icon,
header nav[aria-expanded="false"] .nav-hamburger-icon::before,
header nav[aria-expanded="false"] .nav-hamburger-icon::after {
height: 2px;
border-radius: 2px;
background: currentcolor;
}

header nav[aria-expanded="false"] .nav-hamburger-icon::before {
top: -6px;
}

header nav[aria-expanded="false"] .nav-hamburger-icon::after {
top: 6px;
}

header nav[aria-expanded="true"] .nav-hamburger-icon {
height: 22px;
}

header nav[aria-expanded="true"] .nav-hamburger-icon::before,
header nav[aria-expanded="true"] .nav-hamburger-icon::after {
top: 3px;
left: 1px;
transform: rotate(45deg);
transform-origin: 2px 1px;
width: 24px;
height: 2px;
border-radius: 2px;
}

header nav[aria-expanded="true"] .nav-hamburger-icon::after {
top: unset;
bottom: 3px;
transform: rotate(-45deg);
}

@media (min-width: 900px) {
header nav .nav-hamburger {
display: none;
visibility: hidden;
}
}

/* brand */
header .nav-brand {
grid-area: brand;
flex-basis: 128px;
font-size: var(--heading-font-size-s);
font-weight: 700;
line-height: 1;
}

header nav .nav-brand img {
width: 128px;
height: auto;
}

/* sections */
header nav .nav-sections {
grid-area: sections;
flex: 1 1 auto;
display: none;
visibility: hidden;
background-color: var(--overlay-color);
}

header nav[aria-expanded="true"] .nav-sections {
display: block;
visibility: visible;
align-self: start;
}

header nav .nav-sections ul {
list-style: none;
padding-left: 0;
font-size: var(--body-font-size-s);
font-weight: 500;
}

header nav .nav-sections ul > li {
font-weight: 700;
}

header nav .nav-sections ul > li > ul {
margin-top: 0;
}

header nav .nav-sections ul > li > ul > li {
font-weight: 500;
}

@media (min-width: 900px) {
header nav .nav-sections {
display: block;
visibility: visible;
white-space: nowrap;
}

header nav[aria-expanded="true"] .nav-sections {
align-self: unset;
}

header nav .nav-sections .nav-drop {
position: relative;
padding-right: 16px;
cursor: pointer;
}

header nav .nav-sections .nav-drop::after {
content: '';
display: inline-block;
position: absolute;
top: .5em;
right: 2px;
transform: rotate(135deg);
width: 6px;
height: 6px;
border: 2px solid currentcolor;
border-radius: 0 1px 0 0;
border-width: 2px 2px 0 0;
}

header nav .nav-sections .nav-drop[aria-expanded="true"]::after {
top: unset;
bottom: .5em;
transform: rotate(315deg);
}

header nav .nav-sections ul {
display: flex;
gap: 2em;
margin: 0;
font-size: var(--body-font-size-xs);
}

header nav .nav-sections > ul > li {
flex: 0 1 auto;
position: relative;
font-weight: 500;
}

header nav .nav-sections > ul > li > ul {
display: none;
position: relative;
}

header nav .nav-sections > ul > li[aria-expanded="true"] > ul {
display: block;
position: absolute;
left: -1em;
width: 200px;
margin-top: 12px;
padding: 1em;
background-color: var(--highlight-background-color);
white-space: initial;
}

header nav .nav-sections > ul > li > ul::before {
content: '';
position: absolute;
top: -8px;
left: 8px;
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid var(--highlight-background-color);
}

header nav .nav-sections > ul > li > ul > li {
padding: 8px 0;
}
}

/* tools */
header nav .nav-tools {
grid-area: tools;
}
/* header */
Loading

0 comments on commit 78a5436

Please sign in to comment.