mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Colors
This commit is contained in:
10
index.php
10
index.php
@@ -14,7 +14,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="navbar-fixed">
|
<div class="navbar-fixed">
|
||||||
<nav>
|
<nav id="nav">
|
||||||
<div class="nav-wrapper">
|
<div class="nav-wrapper">
|
||||||
<a href="//zoff.no" class="brand-logo hide-on-small-only">
|
<a href="//zoff.no" class="brand-logo hide-on-small-only">
|
||||||
<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">
|
||||||
@@ -63,15 +63,13 @@
|
|||||||
<div id="list-song-html">
|
<div id="list-song-html">
|
||||||
<div id="list-song" class="card list-song">
|
<div id="list-song" class="card list-song">
|
||||||
<a class="clickable votebg">
|
<a class="clickable votebg">
|
||||||
<div class="card-image cardbg list-image"></div>
|
<span class="card-image cardbg list-image"></span>
|
||||||
</a>
|
</a>
|
||||||
<div class="card-content">
|
<span class="card-content">
|
||||||
<p class="left-align">
|
|
||||||
<span class="flow-text truncate list-title"></span>
|
<span class="flow-text truncate list-title"></span>
|
||||||
<span class="highlighted hide">Votes: </span>
|
<span class="highlighted hide">Votes: </span>
|
||||||
<span class="list-votes hide"></span>
|
<span class="list-votes hide"></span>
|
||||||
</p>
|
</span>
|
||||||
</div>
|
|
||||||
<div class="card-action hide">
|
<div class="card-action hide">
|
||||||
<a id="del" onclick="vote('id','del')" class="clickable" class="waves-effect waves-orange btn-flat">Remove</a>
|
<a id="del" onclick="vote('id','del')" class="clickable" class="waves-effect waves-orange btn-flat">Remove</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -126,6 +126,9 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding:0px;
|
padding:0px;
|
||||||
}
|
}
|
||||||
|
nav{
|
||||||
|
background-color:rgba(255,255,255, 0.1);
|
||||||
|
}
|
||||||
.video-container{
|
.video-container{
|
||||||
height: calc(100% - 64px);
|
height: calc(100% - 64px);
|
||||||
}
|
}
|
||||||
@@ -141,5 +144,11 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
.hover-text{display:none;}
|
.hover-text{display:none;}
|
||||||
.nav-btn:hover > .hover-text {display:inline;}
|
.nav-btn:hover > .hover-text {display:inline;}
|
||||||
|
|
||||||
.list-image{height:40px;}
|
.list-image{
|
||||||
.list-title{display:block;}
|
width: 34%;
|
||||||
|
height: 11%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.list-song{background-color: rgba(255, 255, 255, 0.1);}
|
||||||
|
.card .card-content{padding:0;}
|
||||||
|
.list-title{display:block; color:white;}
|
||||||
|
|||||||
@@ -67,9 +67,9 @@ $(document).ready(function (){
|
|||||||
populate_channels(msg);
|
populate_channels(msg);
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
|
||||||
Materialize.showStaggeredList('#channels');
|
Materialize.showStaggeredList('#channels');
|
||||||
*/
|
|
||||||
var pad = 0;
|
var pad = 0;
|
||||||
document.getElementById("zicon").addEventListener("click", function(){
|
document.getElementById("zicon").addEventListener("click", function(){
|
||||||
pad+=10;
|
pad+=10;
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ var viewers = 1;
|
|||||||
var paused = false;
|
var paused = false;
|
||||||
var playing = false;
|
var playing = false;
|
||||||
|
|
||||||
|
//play new song
|
||||||
socket.on(chan.toLowerCase()+",np", function(obj)
|
socket.on(chan.toLowerCase()+",np", function(obj)
|
||||||
{
|
{
|
||||||
video_id = obj[0][0]["id"];
|
video_id = obj[0][0]["id"];
|
||||||
@@ -53,8 +54,10 @@ socket.on(chan.toLowerCase()+",np", function(obj)
|
|||||||
getTitle(song_title, viewers);
|
getTitle(song_title, viewers);
|
||||||
if(player_ready)
|
if(player_ready)
|
||||||
{
|
{
|
||||||
if(ytplayer.getVideoUrl().split('v=')[1] != video_id)
|
if(ytplayer.getVideoUrl().split('v=')[1] != video_id){
|
||||||
ytplayer.loadVideoById(video_id);
|
ytplayer.loadVideoById(video_id);
|
||||||
|
setBGimage(video_id);
|
||||||
|
}
|
||||||
ytplayer.playVideo();
|
ytplayer.playVideo();
|
||||||
ytplayer.seekTo(seekTo);
|
ytplayer.seekTo(seekTo);
|
||||||
}
|
}
|
||||||
@@ -212,10 +215,9 @@ function setBGimage(id){
|
|||||||
bg.src = "http://i.ytimg.com/vi/"+id+"/mqdefault.jpg";
|
bg.src = "http://i.ytimg.com/vi/"+id+"/mqdefault.jpg";
|
||||||
var color = colorThief.getColor(bg, 10);
|
var color = colorThief.getColor(bg, 10);
|
||||||
var hsl = rgbToHsl(color);*/
|
var hsl = rgbToHsl(color);*/
|
||||||
var hsl=[getRandomInt(0,360), getRandomInt(20,80)]
|
var hsl=[getRandomInt(0,360), getRandomInt(20,50)]
|
||||||
var colorTxt = "hsla("+hsl[0]+", "+hsl[1]+"%, 22%, 0.5);";
|
var colorTxt = "hsla("+hsl[0]+", "+hsl[1]+"%, 20%, 1);";
|
||||||
$("#controls").css("background-color", colorTxt);
|
$("body").css("background-color", colorTxt);
|
||||||
$("#search").css("background-color", colorTxt);
|
|
||||||
}else if(window.mobilecheck()){
|
}else if(window.mobilecheck()){
|
||||||
$("#mobile-banner").css("background-image", "url(http://img.youtube.com/vi/"+id+"/hqdefault.jpg)");
|
$("#mobile-banner").css("background-image", "url(http://img.youtube.com/vi/"+id+"/hqdefault.jpg)");
|
||||||
$("#mobile-banner").css("width",$(window).width());
|
$("#mobile-banner").css("width",$(window).width());
|
||||||
|
|||||||
Reference in New Issue
Block a user