Error handling, localstorage fix, styling, search stuff, boobs, fucks and colored people

This commit is contained in:
Nicolas A. Tonne
2015-04-20 14:30:53 +02:00
parent 77ca7f7a6b
commit d3642364d0
7 changed files with 25 additions and 15 deletions

View File

@@ -26,17 +26,17 @@
</div> </div>
<ul class="title-container hide-on-med-and-down"> <ul class="title-container hide-on-med-and-down">
<li class="col s9" id="song-title"> <li class="col s9" id="song-title" onclick="showSearch();">
Loading... Loading...
</li> </li>
<li class="search-container"> <li class="search-container hide" id="search-wrapper">
<input id="search" class="search_input" type="search" required title="Search for songs..." spellcheck="false" placeholder="Search" onsubmit="null;" autocomplete="off"> <input id="search" class="search_input" type="search" required title="Search for songs..." spellcheck="false" placeholder="Search" onsubmit="null;" autocomplete="off">
</li> </li>
</ul> </ul>
<ul class="right control-list"> <ul class="right control-list">
<li> <li>
<a class="nav-btn" href="#" id="search-btn" onclick=""> <a class="nav-btn" href="#" id="search-btn" onclick="showSearch();">
<i class="mdi-action-search"></i> <i class="mdi-action-search"></i>
<span class="hover-text">Find</span> <span class="hover-text">Find</span>
</a> </a>
@@ -48,7 +48,7 @@
</a> </a>
</li> </li>
<li> <li>
<a class="nav-btn" href="#" id="shuffle" onclick="shuffle();"> <a class="nav-btn hide-on-small-only" href="#" id="shuffle" onclick="shuffle();">
<i class="mdi-av-shuffle"></i> <i class="mdi-av-shuffle"></i>
<span class="hover-text">Stir</span> <span class="hover-text">Stir</span>
</a> </a>
@@ -70,7 +70,7 @@
</header> </header>
<main class="container center-align main"> <main class="container center-align main">
<div class="row"> <div class="row">
<div class="col s12 m9 video-container"> <div class="col s12 m9 video-container hide-on-small-only">
<div id="player" class="ytplayer"></div> <div id="player" class="ytplayer"></div>
<div id="controls"> <div id="controls">
<div id="playpause"> <div id="playpause">

View File

@@ -32,7 +32,9 @@
</a> </a>
</p> </p>
<p> <p>
<img src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=http://zoff.no/<?php echo $list; ?>&choe=UTF-8&chld=L|1" alt="QRCode for link" title="QRCode"> <a href="https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl=http://zoff.no/<?php echo $list; ?>&choe=UTF-8&chld=L|1" >
<img src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=http://zoff.no/<?php echo $list; ?>&choe=UTF-8&chld=L|1" alt="QRCode for link" title="QR code for this page, for easy sharing!">
</a>
</p> </p>
</li> </li>
</ul> </ul>

View File

@@ -138,7 +138,7 @@ if(isset($_GET['chan'])){
</a> </a>
</p> </p>
<p> <p>
<a class="waves-effect waves-light btn light-blue share" href="http://twitter.com/intent/tweet?url=http://zoff.no/<?php echo $list; ?>&text=Check out this playlist <?php echo ucfirst($list); ?> on Zöff!&via=zoffmusic" target="popup" onclick="window.open('http://twitter.com/intent/tweet?url=http://zoff.no/<?php echo $list; ?>&text=Check out this playlist <?php echo ucfirst($list); ?> on Zöff!&via=zoffmusic','Share Playlist','width=600,height=300')"> <a class="waves-effect waves-light btn light-blue share" href="http://twitter.com/intent/tweet?url=http://zoff.no/&text=Check out Zöff, a live shared playlist!&via=zoffmusic" target="popup" onclick="window.open('http://twitter.com/intent/tweet?url=http://zoff.no/&text=Check out Zöff, a live shared playlist!&via=zoffmusic&via=zoffmusic','Share Playlist','width=600,height=300')">
<img class="left" src="static/images/twitter.png">Share on Twitter <img class="left" src="static/images/twitter.png">Share on Twitter
</a> </a>
</p> </p>

View File

@@ -65,11 +65,12 @@ main {
} }
nav .zbrand{ nav .zbrand{
max-width: 22%; max-width: 22%;
overflow: hidden; min-width: 200px;
position: relative; overflow: hidden;
padding-left: 0; position: relative;
margin-left: -10px; font-size: 30px;
padding: 0 20px;
} }
.fullwidth{ .fullwidth{
@@ -237,6 +238,7 @@ hide mdi-action-visibility mdi-action-visibility-off
} }
.chan{ .chan{
padding-right:10px;
text-shadow: 4px 4px 9px rgba(0, 0, 0, 0.42); text-shadow: 4px 4px 9px rgba(0, 0, 0, 0.42);
} }

View File

@@ -25,11 +25,13 @@ function fitToScreen()
function initSlider() function initSlider()
{ {
if(localStorage.getItem("volume") !== undefined) if(localStorage.volume)
{ {
vol = localStorage.getItem("volume"); vol = localStorage.getItem("volume");
}else }else{
vol = 100; vol = 100;
localStorage.setItem("volume", vol);
}
$("#volume").slider({ $("#volume").slider({
min: 0, min: 0,
max: 100, max: 100,

View File

@@ -111,6 +111,10 @@ $(document).keyup(function(e) {
} }
}); });
function showSearch(){
$("#search-wrapper").toggleClass("hide");
$("#song-title").toggleClass("hide");
}
function search(search_input){ function search(search_input){

View File

@@ -215,7 +215,7 @@ function getTitle(titt, v)
function errorHandler(newState) function errorHandler(newState)
{ {
socket.emit("end", video_id); socket.emit("skip");
} }
function onPlayerReady(event) { function onPlayerReady(event) {