update header/navbar/footer

* update mobile hamburger menu to be aligned correctly
* change hamburger color to #2566f4
* change the navbar layout to be inline with what we expect
    * big logo
    * mobile and screen now layout normally
    * we do not want upper menu on mobile
* tooltip added to all upper menu as an overlay
    * header navbar uppermenu
    * footer stay-in-touch list

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
newmemberlevels
Toshaan Bharvani 3 years ago
parent 2407070f0c
commit 573cfced4e

@ -16,7 +16,7 @@ body {
.header {
padding: 10px 0;
@media screen and (max-width: $lg) {
padding-top:17px;
padding-top: 17px;
}
border-bottom: 1px solid #1b1c1f;
position: fixed;
@ -28,6 +28,18 @@ body {
&-col {
flex-grow: 0;
}
@media screen and (max-width: $lg) {
img {
width: 143px;
height: 39px;
}
}
@media screen and (min-width: $lg) {
img {
width: 297px;
height: 49px;
}
}
}
&__menu {
margin-bottom: 0;
@ -89,20 +101,24 @@ body {
margin-left: 1.5em;
}
&__uppermenu {
margin-bottom: 0.75rem;
align-items: center;
line-height: 1.0;
li {
margin-left: 0.35em;
margin-right: 0.35em;
margin-left: 0.25em;
margin-right: 0.25em;
}
@media screen and (max-width: $lg) {
display: none;
}
}
}
#mobile-nav-toggle {
color: #2566f4;
border: none;
height: 45px;
margin-right: 5px;
background-color:transparent;
background-color: transparent;
float: right;
@media screen and (min-width: $lg) {
display: none;
}
@ -207,15 +223,15 @@ body {
.header__logo {
img {
@media screen and (max-width: $lg) {
max-width:200px;
max-width: 200px;
height: auto;
}
@media screen and (min-width:$lg) and (max-width: $xl) {
max-width:120px;
max-width: 120px;
height: auto;
}
@media screen and (min-width:$xl) and (max-width: $xxl) {
max-width:120px;
max-width: 120px;
height: auto;
}
}

@ -4974,7 +4974,6 @@ textarea.form-control-lg {
background-color: #fff;
}
.social__item i {
padding-left: 25%;
color: #2566f4;
}


@ -0,0 +1,52 @@
.tooltip-wrapper {
cursor: help;
margin: 0 auto;
position: relative;
text-align: center;
-webkit-transform: translateZ(999);
-webkit-font-smoothing: antialiased;
}
.tooltip-wrapper .tooltip-text {
background: #2566f4;
top: 100%;
color: #fff;
display: block;
left: 0;
margin-bottom: 15px;
opacity: 0;
padding: 20px;
pointer-events: none;
position: absolute;
z-index: 9999;
-webkit-transform: translateY(10px);
-moz-transform: translateY(10px);
-ms-transform: translateY(10px);
-o-transform: translateY(10px);
transform: translateY(10px);
-webkit-transition: all .25s ease-out;
-moz-transition: all .25s ease-out;
-ms-transition: all .25s ease-out;
-o-transition: all .25s ease-out;
transition: all .25s ease-out;
-webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
-moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
-ms-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
-o-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
}
.tooltip-wrapper:hover .tooltip-text {
opacity: 1;
pointer-events: auto;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px);
z-index: 999;
}
.lte8 .tooltip-wrapper .tooltip-text {
display: none;
}
.lte8 .tooltip-wrapper:hover .tooltip-text {
display: block;
}

@ -52,30 +52,30 @@
<li>Social Links<ul>
{{ range .Site.Menus.social }}
<li>
<a target="_blank" class="social__item" href="{{ .URL }}">
<i class="{{ .Pre }}"></i>
<span class="visually-hidden">{{ .Name }}</span>
</a>
<div class="tooltip-wrapper">
<a target="_blank" class="social__item" href="{{ .URL }}"><i class="{{ .Pre }}"></i></a>
<div class="tooltip-text">{{ .Name }}</div>
</div>
</li>
{{ end }}
</ul></li>
<li>Discussion Links<ul>
{{ range .Site.Menus.discuss }}
<li>
<a target="_blank" class="social__item" href="{{ .URL }}">
<i class="{{ .Pre }}"></i>
<span class="visually-hidden">{{ .Name }}</span>
</a>
<div class="tooltip-wrapper">
<a target="_blank" class="social__item" href="{{ .URL }}"><i class="{{ .Pre }}"></i></a>
<div class="tooltip-text">{{ .Name }}</div>
</div>
</li>
{{ end }}
</ul></li>
<li>Code Links<ul>
{{ range .Site.Menus.code }}
<li>
<a target="_blank" class="social__item" href="{{ .URL }}">
<i class="{{ .Pre }}"></i>
<span class="visually-hidden">{{ .Name }}</span>
</a>
<div class="tooltip-wrapper">
<a target="_blank" class="social__item" href="{{ .URL }}"><i class="{{ .Pre }}"></i></a>
<div class="tooltip-text">{{ .Name }}</div>
</div>
</li>
{{ end }}
</ul></li>

@ -43,7 +43,8 @@
{{ $footer := resources.Get "css/footer.scss" }}
{{ $changelog := resources.Get "css/changelog.scss" }}
{{ $forms := resources.Get "css/forms.scss" }}
{{ $scss := slice $variables $header $promo $home $groups $ready $bod $timeline $pages $footer $changelog $forms | resources.Concat "css/custom.scss" }}
{{ $tooltip := resources.Get "css/tooltip.scss" }}
{{ $scss := slice $variables $header $promo $home $groups $ready $bod $timeline $pages $footer $changelog $forms $tooltip | resources.Concat "css/custom.scss" }}
{{ $css := $scss | toCSS (dict "targetPath" "css/custom.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $minicss := $css | resources.Minify }}
<link rel="stylesheet" href="{{ $minicss.RelPermalink }}">

@ -3,13 +3,12 @@
<div class="row-fluid d-lg-flex flex-lg-nowrap">
{{ $imageresource := resources.Get "img/logo.png" }}
{{ $imagefile := $imageresource.Resize "350x60 webp" }}
<div class="header__logo-col col d-flex justify-content-center align-items-center">
<div class="header__logo-col col d-flex">
<a class="header__logo" href="{{ "/" | relURL }}">
<img src="{{ $imagefile.RelPermalink }}" width="297" height="49" alt="OpenPOWER">
</a>
</div>
<div class="header__menu-col col">
<div class="header__menu-col-row">&nbsp;</div>
<div class="header__uppermenu">&nbsp;</div>
<div class="header__menu-col-row">
<nav class="navbar navbar-expand-lg header__menu-nav" id="nav-menu-container">
<ul class="nav-menu header__menu d-lg-flex justify-content-center list-unstyled">
@ -67,31 +66,23 @@
{{ end }}
{{ end }}
</ul>
<div class="mobile-view-social-join pt-3">
<div class="header__contact-btn join-us-button mobile-view py-4">
<a class="d-inline-block btn-outline-primary btn-sm btn" href="{{ "/join/" | relURL }}">Join</a>
</div>
<div class="header__login-btn login-button mobile-view py-4">
<a class="d-block" href="https://portal.openpower.foundation/"> Login&nbsp;<i class="fas fa-sign-in-alt"></i></a>
</div>
</div>
</nav>
</div>
</div>
<div class="header__contact-col">
<div class="header__contact-col-row">
<div class="header__contact-col-row col d-flex flex-nowrap justify-content-center align-items-center">
<ul class="header__uppermenu d-lg-flex justify-content-end list-unstyled">
&nbsp;|&nbsp;
{{ range .Site.Menus.discuss }}
<li><a href="{{ .URL }}"><i class="{{ .Pre }}"></i></a></li>
<li><a href="{{ .URL }}"><div class="tooltip-wrapper"><i class="{{ .Pre }}"></i><div class="tooltip-text">{{ .Name }}</div></div></a></li>
{{ end }}
&nbsp;|&nbsp;
{{ range .Site.Menus.code }}
<li><a href="{{ .URL }}"><i class="{{ .Pre }}"></i></a></li>
<li><a href="{{ .URL }}"><div class="tooltip-wrapper"><i class="{{ .Pre }}"></i><div class="tooltip-text">{{ .Name }}</div></div></a></li>
{{ end }}
&nbsp;|&nbsp;
{{ range .Site.Menus.social }}
<li><a href="{{ .URL }}"><i class="{{ .Pre }}"></i></a></li>
<li><a href="{{ .URL }}"><div class="tooltip-wrapper"><i class="{{ .Pre }}"></i><div class="tooltip-text">{{ .Name }}</div></div></a></li>
{{ end }}
&nbsp;|&nbsp;
</ul>
@ -106,5 +97,6 @@
</div>
</div>
</div>
</div>
</div>
</header>

Loading…
Cancel
Save