mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-28 12:24:23 +00:00
Remove fix top navbar toggle
This commit is contained in:
parent
0baa57de32
commit
5325878cb6
@ -3,29 +3,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
const rootEl = document.documentElement;
|
||||
const navbarTopEl = document.getElementById('navbar');
|
||||
const navbarBottomEl = document.getElementById('navbarBottom');
|
||||
const fixTopEl = document.getElementById('navbarFixTop');
|
||||
const fixTopElIcon = fixTopEl.querySelector('.fa');
|
||||
const fixBottomEl = document.getElementById('navbarFixBottom');
|
||||
const fixBottomElIcon = fixBottomEl.querySelector('.fa');
|
||||
let fixedTop = false;
|
||||
let fixedBottom = false;
|
||||
|
||||
fixTopEl.addEventListener('click', event => {
|
||||
fixedTop = !fixedTop;
|
||||
|
||||
if (fixedTop) {
|
||||
fixTopEl.className = 'button is-success';
|
||||
fixTopElIcon.className = 'fa fa-check-square-o';
|
||||
rootEl.classList.add('has-navbar-fixed-top');
|
||||
navbarTopEl.classList.add('is-fixed-top', 'has-shadow');
|
||||
} else {
|
||||
fixTopEl.className = 'button is-link';
|
||||
fixTopElIcon.className = 'fa fa-square-o';
|
||||
rootEl.classList.remove('has-navbar-fixed-top');
|
||||
navbarTopEl.classList.remove('is-fixed-top', 'has-shadow');
|
||||
}
|
||||
});
|
||||
|
||||
fixBottomEl.addEventListener('click', event => {
|
||||
fixedBottom = !fixedBottom;
|
||||
|
||||
|
@ -828,12 +828,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
<h4 class="title is-5">Try it out!</h4>
|
||||
|
||||
<div id="navbarToggles" class="buttons">
|
||||
<a id="navbarFixTop" class="button is-link">
|
||||
<span class="icon">
|
||||
<i class="fa fa-square-o"></i>
|
||||
</span>
|
||||
<span>Fix <strong>top</strong> navbar</span>
|
||||
</a>
|
||||
<a id="navbarFixBottom" class="button is-link">
|
||||
<span class="icon">
|
||||
<i class="fa fa-square-o"></i>
|
||||
|
@ -5,29 +5,10 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
var rootEl = document.documentElement;
|
||||
var navbarTopEl = document.getElementById('navbar');
|
||||
var navbarBottomEl = document.getElementById('navbarBottom');
|
||||
var fixTopEl = document.getElementById('navbarFixTop');
|
||||
var fixTopElIcon = fixTopEl.querySelector('.fa');
|
||||
var fixBottomEl = document.getElementById('navbarFixBottom');
|
||||
var fixBottomElIcon = fixBottomEl.querySelector('.fa');
|
||||
var fixedTop = false;
|
||||
var fixedBottom = false;
|
||||
|
||||
fixTopEl.addEventListener('click', function (event) {
|
||||
fixedTop = !fixedTop;
|
||||
|
||||
if (fixedTop) {
|
||||
fixTopEl.className = 'button is-success';
|
||||
fixTopElIcon.className = 'fa fa-check-square-o';
|
||||
rootEl.classList.add('has-navbar-fixed-top');
|
||||
navbarTopEl.classList.add('is-fixed-top', 'has-shadow');
|
||||
} else {
|
||||
fixTopEl.className = 'button is-link';
|
||||
fixTopElIcon.className = 'fa fa-square-o';
|
||||
rootEl.classList.remove('has-navbar-fixed-top');
|
||||
navbarTopEl.classList.remove('is-fixed-top', 'has-shadow');
|
||||
}
|
||||
});
|
||||
|
||||
fixBottomEl.addEventListener('click', function (event) {
|
||||
fixedBottom = !fixedBottom;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user