mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
Make menu button slide up (experimental). Disable tabindex on overlay.
This commit is contained in:
parent
4106b2b069
commit
39fd7e19ef
@ -1138,7 +1138,6 @@ p {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
height: 75px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@ -1341,12 +1340,36 @@ p {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
#menu_button:hover #menu_text,
|
||||
#menu_button:focus #menu_text {
|
||||
text-shadow: 0px 0px 20px #fff, 0px 0px 20px #fff;
|
||||
}
|
||||
#menu_button:active {
|
||||
color: #c7c7c7;
|
||||
text-shadow: 0px 0px 20px #c7c7c7, 0px 0px 20px #c7c7c7;
|
||||
}
|
||||
|
||||
#menu_button:hover #menu_img,
|
||||
#menu_button:focus #menu_img {
|
||||
-webkit-filter: drop-shadow(0px 0px 2px #fff);
|
||||
}
|
||||
#menu_button:active #menu_img .arrowLine {
|
||||
stroke: #c7c7c7;
|
||||
}
|
||||
#menu_button:active #menu_img {
|
||||
-webkit-filter: drop-shadow(0px 0px 2px #c7c7c7);
|
||||
}
|
||||
#menu_button:disabled #menu_img .arrowLine {
|
||||
stroke: rgba(255, 255, 255, 0.75);
|
||||
}
|
||||
|
||||
/* Arrow image which floats above the menu button. */
|
||||
#menu_img {
|
||||
height: 11px;
|
||||
margin-left: -2px;
|
||||
transition: 0.25s ease;
|
||||
}
|
||||
|
||||
/* Span which contains the menu button text. */
|
||||
@ -1358,6 +1381,7 @@ p {
|
||||
font-size: 11px;
|
||||
line-height: 30px;
|
||||
display: flex;
|
||||
transition: 0.25s ease;
|
||||
}
|
||||
|
||||
/* * *
|
||||
|
@ -127,6 +127,7 @@ server_selection_button.addEventListener('click', (e) => {
|
||||
toggleServerSelection(true)
|
||||
})
|
||||
|
||||
let menuActive = false
|
||||
// Test menu transform.
|
||||
function slide_(up){
|
||||
const lCUpper = document.querySelector('#landingContainer > #upper')
|
||||
@ -141,13 +142,13 @@ function slide_(up){
|
||||
lCLCenter.style.top = '-200vh'
|
||||
lCLRight.style.top = '-200vh'
|
||||
menuBtn.style.top = '130vh'
|
||||
setTimeout(() => {
|
||||
/*setTimeout(() => {
|
||||
lCLCenter.style.transition = 'none'
|
||||
menuBtn.style.transition = 'none'
|
||||
}, 2000)
|
||||
}, 2000)*/
|
||||
} else {
|
||||
lCLCenter.style.transition = null
|
||||
menuBtn.style.transition = null
|
||||
//lCLCenter.style.transition = null
|
||||
//menuBtn.style.transition = null
|
||||
lCUpper.style.top = '0px'
|
||||
lCLLeft.style.top = '0px'
|
||||
lCLCenter.style.top = '0px'
|
||||
@ -156,6 +157,11 @@ function slide_(up){
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('menu_button').onclick = () => {
|
||||
slide_(!menuActive)
|
||||
menuActive = !menuActive
|
||||
}
|
||||
|
||||
// Update Mojang Status Color
|
||||
const refreshMojangStatuses = async function(){
|
||||
console.log('Refreshing Mojang Statuses..')
|
||||
|
@ -20,6 +20,8 @@ function toggleOverlay(toggleState, dismissable = false, content = 'overlayConte
|
||||
}
|
||||
if(toggleState){
|
||||
document.getElementById('main').setAttribute('overlay', true)
|
||||
// Make things tabbable.
|
||||
$("#main *").attr('tabindex', '-1')
|
||||
$('#' + content).parent().children().hide()
|
||||
$('#' + content).show()
|
||||
if(dismissable){
|
||||
@ -30,6 +32,8 @@ function toggleOverlay(toggleState, dismissable = false, content = 'overlayConte
|
||||
$('#overlayContainer').fadeIn(250)
|
||||
} else {
|
||||
document.getElementById('main').removeAttribute('overlay')
|
||||
// Make things tabbable.
|
||||
$("#main *").removeAttr('tabindex')
|
||||
$('#overlayContainer').fadeOut(250, () => {
|
||||
$('#' + content).parent().children().hide()
|
||||
$('#' + content).show()
|
||||
|
@ -118,7 +118,13 @@
|
||||
<div class="bot_wrapper">
|
||||
<div id="content">
|
||||
<button id="menu_button">
|
||||
<img src="assets/images/icons/arrow.svg" id="menu_img"/>
|
||||
<!--<img src="assets/images/icons/arrow.svg" id="menu_img"/>-->
|
||||
<svg id="menu_img" viewBox="0 0 24.87 13.97">
|
||||
<defs>
|
||||
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;}</style>
|
||||
</defs>
|
||||
<polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>
|
||||
</svg>
|
||||
<span id="menu_text">MENU</span>
|
||||
</button>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user