mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-25 09:20:59 +00:00
Merge branch 'master' of github.com:chrismccord/live_beats
This commit is contained in:
commit
fba89209bd
2 changed files with 7 additions and 13 deletions
|
@ -180,16 +180,10 @@ let liveSocket = new LiveSocket("/live", Socket, {
|
||||||
let routeUpdated = () => {
|
let routeUpdated = () => {
|
||||||
let target = document.querySelector("main h1") || document.querySelector("main")
|
let target = document.querySelector("main h1") || document.querySelector("main")
|
||||||
if (target) {
|
if (target) {
|
||||||
let origTabIndex = target.getAttribute("tabindex")
|
let origTabIndex = target.tabIndex
|
||||||
target.setAttribute("tabindex", "-1")
|
target.tabIndex = -1
|
||||||
target.focus()
|
target.focus()
|
||||||
window.setTimeout(() => {
|
target.tabIndex = origTabIndex
|
||||||
if (origTabIndex) {
|
|
||||||
target.setAttribute("tabindex", origTabIndex)
|
|
||||||
} else {
|
|
||||||
target.removeAttribute("tabindex")
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +193,7 @@ window.addEventListener("phx:page-loading-start", info => topbar.show())
|
||||||
window.addEventListener("phx:page-loading-stop", info => topbar.hide())
|
window.addEventListener("phx:page-loading-stop", info => topbar.hide())
|
||||||
|
|
||||||
// Accessible routing
|
// Accessible routing
|
||||||
window.addEventListener("phx:page-loading-stop", () => window.requestAnimationFrame(routeUpdated))
|
window.addEventListener("phx:page-loading-stop", routeUpdated)
|
||||||
|
|
||||||
window.addEventListener("js:exec", e => e.target[e.detail.call](...e.detail.args))
|
window.addEventListener("js:exec", e => e.target[e.detail.call](...e.detail.args))
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="mobile-sidebar-container" class="fixed inset-0 flex z-40 lg:hidden" aria-modal="true" style="display: none;">
|
<div id="mobile-sidebar-container" class="fixed inset-0 flex z-40 lg:hidden" aria-modal="true" style="display: none;" role="region">
|
||||||
<div
|
<div
|
||||||
class="fixed inset-0 bg-gray-600 bg-opacity-75"
|
class="fixed inset-0 bg-gray-600 bg-opacity-75"
|
||||||
phx-click={hide_mobile_sidebar()}>
|
phx-click={hide_mobile_sidebar()}>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- Static sidebar for desktop -->
|
<!-- Static sidebar for desktop -->
|
||||||
<div class="hidden lg:flex lg:flex-shrink-0">
|
<div class="hidden lg:flex lg:flex-shrink-0" role="region">
|
||||||
<div class="flex flex-col w-64 border-r border-gray-200 pt-5 pb-4 bg-gray-100">
|
<div class="flex flex-col w-64 border-r border-gray-200 pt-5 pb-4 bg-gray-100">
|
||||||
<div class="flex items-center flex-shrink-0 px-6">
|
<div class="flex items-center flex-shrink-0 px-6">
|
||||||
<.link navigate={home_path(@current_user)}>
|
<.link navigate={home_path(@current_user)}>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
<!-- Main column -->
|
<!-- Main column -->
|
||||||
<div class="flex flex-col w-0 flex-1 overflow-hidden">
|
<div class="flex flex-col w-0 flex-1 overflow-hidden">
|
||||||
<!-- Search header -->
|
<!-- Search header -->
|
||||||
<div class="relative z-10 flex-shrink-0 flex h-16 bg-white border-b border-gray-200 lg:hidden">
|
<div class="relative z-10 flex-shrink-0 flex h-16 bg-white border-b border-gray-200 lg:hidden" role="navigation">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
id="show-mobile-sidebar"
|
id="show-mobile-sidebar"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
|
|
Loading…
Reference in a new issue