Updated mobile look, and fixed error where leaving channel before player initialized crashes

This commit is contained in:
Kasper Rynning-Tønnesen
2016-08-16 11:17:45 +02:00
parent 63f6e19fc0
commit 01989bc39a
4 changed files with 14 additions and 15 deletions

View File

@@ -15,11 +15,11 @@ if(isset($_GET['chan'])){
<header> <header>
<nav id="fp-nav"> <nav id="fp-nav">
<div class="nav-wrapper"> <div class="nav-wrapper">
<a href="#" class="brand-logo hide-on-small-only noselect"> <a href="#" class="brand-logo noselect">
<img id="zicon" src="static/images/squareicon_small.png" alt="zöff" title="Zöff" /> <img id="zicon" src="static/images/squareicon_small.png" alt="zöff" title="Zöff" />
</a> </a>
<span id="frontpage-viewer-counter" class="hide-on-small-only noselect" title="Divided among all channels. Hidden or not"></span> <span id="frontpage-viewer-counter" class="hide-on-small-only noselect" title="Divided among all channels. Hidden or not"></span>
<a href="//zoff.no" class="brand-logo brand-mobile hide-on-med-and-up">Zöff</a> <!--<a href="//zoff.no" class="brand-logo brand-mobile hide-on-med-and-up">Zöff</a>-->
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a class="modal-trigger waves-effect waves-red" title="Need help with the site?" onclick="$('#help').openModal()">Help</a></li> <li><a class="modal-trigger waves-effect waves-red" title="Need help with the site?" onclick="$('#help').openModal()">Help</a></li>
<li><a class="waves-effect green" title="Remote control a Zöff player" href="https://remote.zoff.no">Remote</a></li> <li><a class="waves-effect green" title="Remote control a Zöff player" href="https://remote.zoff.no">Remote</a></li>

View File

@@ -1402,6 +1402,10 @@ nav ul li:hover, nav ul li.active {
right: 0; right: 0;
} }
#zicon{
height:100%;
}
/*.list-remove{ /*.list-remove{
margin-top:-68px; margin-top:-68px;
}*/ }*/

File diff suppressed because one or more lines are too long

View File

@@ -72,15 +72,6 @@ if (navigator.serviceWorker) {
console.log('Service Worker is not supported in this browser.'); console.log('Service Worker is not supported in this browser.');
} }
/*if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistration().then(function(r) {
try {
r.unregister();
} catch(e) {}
});
}*/
$().ready(function(){ $().ready(function(){
if(!fromFront && window.location.pathname != "/") init(); if(!fromFront && window.location.pathname != "/") init();
else if(!fromChannel && window.location.pathname == "/"){ else if(!fromChannel && window.location.pathname == "/"){
@@ -713,7 +704,11 @@ function onepage_load(){
$("#video-container").removeClass("no-opacity"); $("#video-container").removeClass("no-opacity");
$("#main-row").prepend("<div id='player_bottom_overlay' title='To Channel' class='ytplayer player_bottom'></div>"); $("#main-row").prepend("<div id='player_bottom_overlay' title='To Channel' class='ytplayer player_bottom'></div>");
} else { } else {
try{
Player.ytplayer.destroy(); Player.ytplayer.destroy();
} catch(error){
//No player to destroy
}
Player.ytplayer = ""; Player.ytplayer = "";
document.title = "Zöff"; document.title = "Zöff";
} }