Skip to content

Commit

Permalink
Merge pull request #13540 from unoplatform/mergify/bp/release/stable/…
Browse files Browse the repository at this point in the history
…4.10/pr-13536

docs: Revert #12816 and #12867 (backport #13536)
  • Loading branch information
jeromelaban authored Sep 6, 2023
2 parents 37a6d6f + c391801 commit 80355df
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 70 deletions.
18 changes: 0 additions & 18 deletions doc/templates/uno/component/navbar.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
function setNavbarHeight() {
let headerHeight = $("#header-container").outerHeight();
let intViewportHeight = window.innerHeight;
let maxHeightNavbar = intViewportHeight - headerHeight;
$("#navbar").css("max-height", maxHeightNavbar);
}


/**
* Load the navbar from the uno website
*/
Expand Down Expand Up @@ -66,9 +58,6 @@ function initializeNavbar() {

}
});

setNavbarHeight();

}

/**
Expand All @@ -94,13 +83,6 @@ function updateLogoOnResize() {
}


function updateNavbarHeightOnResize() {
$(window).on('resize', function () {
setNavbarHeight();
});
}


// Update href in navbar
function renderNavbar() {
const navbar = $('#navbar ul')[0];
Expand Down
131 changes: 87 additions & 44 deletions doc/templates/uno/component/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,26 @@
.visibility-opacity-transition {
@include media-breakpoint-up(lg) {
visibility: hidden;
opacity: 0;
transition: visibility 100ms, opacity 100ms ease-in-out;

list-style: none;

transition: visibility 100ms, opacity 100ms ease-in-out;
opacity: 0;
}
}

#header-container {
display: flex;
position: fixed;
padding: 16px 32px;
z-index: 9999;
background: #fff;

display: flex;
position: fixed;
width: 100%;
min-height: 75px;

padding: 16px 32px;
min-height: 67px;
max-height: 67px;
border-bottom: 1px solid #f4f2f3;

justify-content: space-between;

z-index: 9999;

&::after,
&::before {
Expand All @@ -46,11 +44,13 @@

#menu-menu-principal {
float: right;

list-style: none;

@include media-breakpoint-down(lg) {
width: 100%;
// 70vh is a magic value found by trial and error.
max-height: 70vh;
overflow-y: auto;
}

@include media-breakpoint-up(lg) {
Expand All @@ -62,20 +62,23 @@
#header-logo-container {
width: 36px;
vertical-align: middle;
z-index: 9;


img {
width: 100%;
}

@include media-breakpoint-up(lg) {
width: 120px;
min-width: 120px;
}
}

.navbar-toggle {
padding: 0;
margin: 10px 0;
display: none !important;
z-index: 9;

.icon-bar {
background: $darkgray;
Expand All @@ -98,29 +101,36 @@
nav {
a {
padding: 10px;

font-size: 16px;
font-size: 13px;
font-weight: 600;
font-stretch: normal;
font-style: normal;
line-height: 16px;
line-height: 14px;
letter-spacing: normal;
text-transform: uppercase;
color: $black;

&:hover,
&:focus {
border-radius: 4px;
background-color: transparentize($turquoise, 0.8);
color: $purple;
}

@include media-breakpoint-up(lg) {
font-size: 19px;
line-height: 17px;
}
}

/**
* Top level menu items
*/
& > ul > li {
margin: 0 16px;
align-self: center;

@include media-breakpoint-up(lg) {
margin: 0 16px;
align-self: center;
min-width: max-content;
}

/**
* has-children means there is a submenu
Expand All @@ -129,26 +139,54 @@
// actual submenu
position: relative;

& > a {


&::after {
display: inline-block;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
font: normal normal normal 10px/1 FontAwesome;
content: "\f078";
line-height: 12px;
margin-left: 12px;
vertical-align: top;

@include media-breakpoint-up(lg) {
line-height: 21px;
font: normal normal normal 15px/1 FontAwesome;
}
}
}

& > ul {
@extend .visibility-opacity-transition;
width: inherit;
width: 100%;

@include media-breakpoint-up(lg) {
width: max-content;
display: flex;
position: absolute;
padding: 24px 48px;
padding: 20px;
top: 170% !important;
left: -100% !important;
left: -25% !important;

flex-direction: column;

border-radius: 4px;
//border-radius: 4px;
box-shadow: 0 0 20px 2px rgba(36, 36, 36, 0.2);
background-color: $white;
}

li {
display: flex;
border-bottom: 1px solid $lightblue;
background: $white;

@include media-breakpoint-up(lg) {
border: none;
}

}

a {
Expand All @@ -164,16 +202,8 @@
flex-direction: column;

& > a {
cursor: default;

font-weight: 700;
line-height: normal !important;
color: $black;

&:hover,
&:focus {
background-color: transparent;
}
}

ul {
Expand Down Expand Up @@ -238,6 +268,7 @@
padding: 8px 32px;

font-size: 16px;
line-height: 24px;
font-weight: 700;
min-width: 125px;
text-align: center;
Expand All @@ -247,12 +278,12 @@
background-color: $turquoise;
background: linear-gradient(to top, $blue 50%, $turquoise 50%);
background-size: 100% 200%;
background-position:left top;
transition:all 0.5s cubic-bezier(.69,.04,.9,.65);
background-position: left top;
transition: all 0.5s cubic-bezier(.69, .04, .9, .65);

&:hover {
color: $white;
background-position:bottom left;
background-position: bottom left;
}
}
}
Expand All @@ -262,24 +293,32 @@
@media (max-width: 979px) {

overflow: auto !important;

position: fixed;
width: 100%;
margin: 0;
margin: -16px 0 0 0;
padding: 0;

top: 75px;
padding-top: 67px;
left: 0;

text-align: left;

background: #fff;
background: $lightblue;

transition: height .4s ease .1s, opacity .6s ease;
opacity: 0;

&.collapse {
display: none!important;
height: 67px !important;
display: none !important;
}


&.collapse.in {
display: block!important;
display: block !important;
height: 100vh !important;
opacity: 1;
}

.menu {
Expand All @@ -291,6 +330,13 @@
display: block;
padding: 0;

&.get-started-btn {
position: absolute;
padding: 0 16px;
bottom: 10%;
width: 100%;
}

&.has-children {
position: relative;

Expand All @@ -314,17 +360,14 @@
a {
display: block;
padding: 10px 25px;

line-height: 1.4;
font-weight: 700;
}
}
}
}

.subnav {
position: fixed;
top: 75px;
top: 67px;
width: 100%;
z-index: 999;
background-color: #f8f8f8;
Expand Down
6 changes: 6 additions & 0 deletions doc/templates/uno/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,9 @@ h3 {
}
}
}


// Algolia
.DocSearch-Hit-content-wrapper {
height: 100%;
}
1 change: 1 addition & 0 deletions doc/templates/uno/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ renderNavbar();
renderLogo();
updateLogo()
updateLogoOnResize();
updateNavbarHeightOnResize();
updateTocHeightOnResize();
updateSidenavTopOnResize();
renderFooter();
Expand Down
6 changes: 1 addition & 5 deletions doc/templates/uno/styles/docfx.js

Large diffs are not rendered by default.

Loading

0 comments on commit 80355df

Please sign in to comment.