Mobile layout
This commit is contained in:
@ -3,6 +3,11 @@ import { AnimeNotifier } from "./AnimeNotifier"
|
||||
import { Diff } from "./Diff"
|
||||
import { findAll } from "./Utils"
|
||||
|
||||
// Toggle sidebar
|
||||
export function toggleSidebar(arn: AnimeNotifier) {
|
||||
arn.app.find("sidebar").classList.toggle("sidebar-visible")
|
||||
}
|
||||
|
||||
// Save new data from an input field
|
||||
export function save(arn: AnimeNotifier, input: HTMLElement) {
|
||||
arn.loading(true)
|
||||
|
@ -115,6 +115,11 @@ export class AnimeNotifier {
|
||||
|
||||
// Push manager
|
||||
this.pushManager = new PushManager()
|
||||
|
||||
// Sidebar control
|
||||
document.body.addEventListener("click", e => {
|
||||
this.app.find("sidebar").classList.remove("sidebar-visible")
|
||||
})
|
||||
}
|
||||
|
||||
async onContentLoaded() {
|
||||
|
@ -160,7 +160,10 @@ export class Application {
|
||||
let url = this.getAttribute("href")
|
||||
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
|
||||
// if(this.dataset.bubble !== "true") {
|
||||
// e.stopPropagation()
|
||||
// }
|
||||
|
||||
if(!url || url === self.currentPath)
|
||||
return
|
||||
|
Reference in New Issue
Block a user