This commit is contained in:
sairaj mote 2022-01-06 16:11:37 +05:30
parent e1a46a20ca
commit 8d09556e38
2 changed files with 23 additions and 58 deletions

View File

@ -609,7 +609,8 @@
<span class="highlight">type="submit"</span> <span class="highlight">type="submit"</span>
</div> </div>
<p> <p>
Whenever enter is pressed inside an active <span class="highlight">sm-input</span>, this will fire click event. <br> Whenever enter is pressed inside an active <span class="highlight">sm-input</span>, this
will fire click event. <br>
This will also change state depending opon validation conditions. This will also change state depending opon validation conditions.
</p> </p>
</div> </div>
@ -628,11 +629,13 @@
<h1 class="page__title">Hamburger menu</h1> <h1 class="page__title">Hamburger menu</h1>
<section class="grid auto-grid-2 gap-3"> <section class="grid auto-grid-2 gap-3">
<div class="grid gap-1"> <div class="grid gap-1">
<img class="screenshot" loading="lazy" src="assets/ham-menu-closed.png" alt="Hamburger menu closed"> <img class="screenshot" loading="lazy" src="assets/ham-menu-closed.png"
alt="Hamburger menu closed">
<h4>Hamburger menu closed</h4> <h4>Hamburger menu closed</h4>
</div> </div>
<div class="grid gap-1"> <div class="grid gap-1">
<img class="screenshot" loading="lazy" src="assets/ham-menu-open.png" alt="Hamburger menu opened"> <img class="screenshot" loading="lazy" src="assets/ham-menu-open.png"
alt="Hamburger menu opened">
<h4>Hamburger menu open</h4> <h4>Hamburger menu open</h4>
</div> </div>
</section> </section>
@ -2015,32 +2018,13 @@
getRef("notification_drawer").clearAll(); getRef("notification_drawer").clearAll();
notify("We are back online.", "success"); notify("We are back online.", "success");
}); });
let zIndex = 10
// function required for popups or modals to appear // function required for popups or modals to appear
class Stack { function showPopup(popupId, pinned) {
constructor() {
this.items = [];
}
push(element) {
this.items.push(element);
}
pop() {
if (this.items.length == 0)
return "Underflow";
return this.items.pop();
}
peek() {
return this.items[this.items.length - 1];
}
}
let popupStack = new Stack(),
zIndex = 10;
async function showPopup(popup, pinned) {
zIndex++ zIndex++
getRef(popup).setAttribute('style', `z-index: ${zIndex}`) getRef(popupId).setAttribute('style', `z-index: ${zIndex}`)
popupStack = getRef(popup).show({ pinned, popupStack }) getRef(popupId).show({ pinned })
return getRef(popup); return getRef(popupId);
} }
// hides the popup or modal // hides the popup or modal
@ -2228,7 +2212,7 @@
else { else {
pageId = targetPage.includes('#') ? targetPage.split('#')[1] : targetPage pageId = targetPage.includes('#') ? targetPage.split('#')[1] : targetPage
} }
if(!appPages.includes(pageId)) return if (!appPages.includes(pageId)) return
document.querySelector('.page:not(.hide-completely)').classList.add('hide-completely') document.querySelector('.page:not(.hide-completely)').classList.add('hide-completely')
document.querySelector('.list__item--active').classList.remove('list__item--active') document.querySelector('.list__item--active').classList.remove('list__item--active')
getRef(pageId).classList.remove('hide-completely') getRef(pageId).classList.remove('hide-completely')

View File

@ -407,32 +407,13 @@
getRef("notification_drawer").clearAll(); getRef("notification_drawer").clearAll();
notify("We are back online.", "success"); notify("We are back online.", "success");
}); });
let zIndex = 10
// function required for popups or modals to appear // function required for popups or modals to appear
class Stack { function showPopup(popupId, pinned) {
constructor() {
this.items = [];
}
push(element) {
this.items.push(element);
}
pop() {
if (this.items.length == 0)
return "Underflow";
return this.items.pop();
}
peek() {
return this.items[this.items.length - 1];
}
}
let popupStack = new Stack(),
zIndex = 10;
async function showPopup(popup, pinned) {
zIndex++ zIndex++
getRef(popup).setAttribute('style', `z-index: ${zIndex}`) getRef(popupId).setAttribute('style', `z-index: ${zIndex}`)
popupStack = getRef(popup).show({ pinned, popupStack }) getRef(popupId).show({ pinned })
return getRef(popup); return getRef(popupId);
} }
// hides the popup or modal // hides the popup or modal
@ -617,7 +598,7 @@
else { else {
pageId = targetPage.includes('#') ? targetPage.split('#')[1] : targetPage pageId = targetPage.includes('#') ? targetPage.split('#')[1] : targetPage
} }
if(!appPages.includes(pageId)) return if (!appPages.includes(pageId)) return
document.querySelector('.page:not(.hide-completely)').classList.add('hide-completely') document.querySelector('.page:not(.hide-completely)').classList.add('hide-completely')
document.querySelector('.list__item--active').classList.remove('list__item--active') document.querySelector('.list__item--active').classList.remove('list__item--active')
getRef(pageId).classList.remove('hide-completely') getRef(pageId).classList.remove('hide-completely')