mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
Change the compress menu button and add a back button if it is a PWA
This commit is contained in:
parent
243a300016
commit
24d0525f7d
3 changed files with 19 additions and 10 deletions
|
@ -19,16 +19,19 @@
|
|||
transition: all 0.25s ease-in-out;
|
||||
}
|
||||
|
||||
#menuBackButton,
|
||||
#compressMenu{
|
||||
display: none;
|
||||
}
|
||||
|
||||
body.youtube #compressMenu{
|
||||
body.youtube #compressMenu,
|
||||
body.pwa #menuBackButton{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#buttonMenu{
|
||||
border-radius: 4px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body.youtube #buttonMenu{
|
||||
|
@ -36,17 +39,17 @@ body.youtube #buttonMenu{
|
|||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
body.youtube #compressMenu .fa-chevron-left{
|
||||
body.youtube #compressMenu .compress{
|
||||
display: inline-block;
|
||||
}
|
||||
body.youtube #compressMenu .fa-chevron-right{
|
||||
body.youtube #compressMenu .expand{
|
||||
display: none;
|
||||
}
|
||||
|
||||
body.youtube.compressedMenu #compressMenu .fa-chevron-right{
|
||||
body.youtube.compressedMenu #compressMenu .expand{
|
||||
display: inline-block;
|
||||
}
|
||||
body.youtube.compressedMenu #compressMenu .fa-chevron-left{
|
||||
body.youtube.compressedMenu #compressMenu .compress{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
<ul class="left-side">
|
||||
<li style="max-width: 80px;">
|
||||
<div class="btn-group justified">
|
||||
<button type="button" id="compressMenu" class="btn btn-default" onclick="YPTSidebarCompressToggle();">
|
||||
<i class="fa-solid fa-chevron-right" data-toggle="tooltip" title="<?php echo __('Uncompress Menu'); ?>" data-placement="right"></i>
|
||||
<i class="fa-solid fa-chevron-left" data-toggle="tooltip" title="<?php echo __('Compress Menu'); ?>" data-placement="right"></i>
|
||||
<button type="button" id="menuBackButton" class="btn btn-default" onclick="window.history.back();" data-toggle="tooltip" title="<?php echo __('Back'); ?>" data-placement="bottom">
|
||||
<i class="fa-solid fa-chevron-left"></i>
|
||||
</button>
|
||||
<?php
|
||||
echo getHamburgerButton('buttonMenu', 'x', 'class="btn btn-default pull-left hamburger" data-toggle="tooltip" title="' . __("Main Menu") . '" data-placement="right"');
|
||||
echo getHamburgerButton('buttonMenu', 'x', 'class="btn btn-default pull-left hamburger" data-toggle="tooltip" title="' . __("Main Menu") . '" data-placement="bottom"');
|
||||
?>
|
||||
<button type="button" id="compressMenu" class="btn btn-default" onclick="YPTSidebarCompressToggle();">
|
||||
<i class="fa-solid fa-compress compress" data-toggle="tooltip" title="<?php echo __('Compress Menu'); ?>" data-placement="bottom"></i>
|
||||
<i class="fa-solid fa-expand expand" data-toggle="tooltip" title="<?php echo __('Expand Menu'); ?>" data-placement="bottom"></i>
|
||||
</button>
|
||||
<?php
|
||||
if ($advancedCustom->disableNavBarInsideIframe) {
|
||||
?>
|
||||
|
|
|
@ -69,6 +69,10 @@ try {
|
|||
} catch (e) {
|
||||
//console.log('Variable declaration ERROR', e);
|
||||
}
|
||||
//add the class pwa in the <body> tag if is a pwa app
|
||||
if (window.navigator.standalone || window.matchMedia('(display-mode: standalone)').matches) {
|
||||
document.body.classList.add('pwa');
|
||||
}
|
||||
|
||||
var queryString = window.location.search;
|
||||
var urlParams = new URLSearchParams(queryString);
|
||||
|
@ -4146,4 +4150,3 @@ function formatNumber(num) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue