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