Front page

This commit is contained in:
Nicolas A. Tonne
2015-04-07 16:19:42 +02:00
parent 0d9029e8a9
commit 88412cb9f2
3 changed files with 107 additions and 67 deletions

View File

@@ -10,4 +10,50 @@
/* GLOBAL STYLES */
/* INDEX PAGE */
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
/* global color */
footer.page-footer,
nav, .tabs .tab a,
.side-nav .collapsible-body li.active,
.side-nav.fixed .collapsible-body li.active,
.pagination li.active{
background-color: #2196f3;
}
main {
flex: 1 0 auto;
}
.fullwidth{
width:100%;
}
/*
play mdi-av-play-arrow
pause mdi-av-pause
remove mdi-content-clear
search mdi-action-search
password mdi-communication-vpn-key
volume mdi-av-volume-up s
kip mdi-av-skip-next
shuffle mdi-av-shuffle
settings mdi-action-settings
errors mdi-alert-warning mdi-alert-error mdi-action-info
success mdi-action-done
vote mdi-action-thumb-up
hide mdi-action-visibility mdi-action-visibility-off
*/
/* INDEX PAGE */
#zicon{
width: 50px;
margin: 7px 20px;
}

View File

@@ -406,10 +406,11 @@ function readyLooks()
function setBGimage(id){
if(!window.mobilecheck()){
var bg = $(".thumb.lthumb")[0]; //new Image();
//bg.src = "http://i.ytimg.com/vi/"+id+"/mqdefault.jpg";
/*var bg = $(".thumb.lthumb")[0]; //new Image();
bg.src = "http://i.ytimg.com/vi/"+id+"/mqdefault.jpg";
var color = colorThief.getColor(bg, 10);
var hsl = rgbToHsl(color);
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);
@@ -430,6 +431,10 @@ function notifyUser(id, title) {
}
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
function rgbToHsl(r, g, b){
r /= 255, g /= 255, b /= 255;
var max = Math.max(r, g, b), min = Math.min(r, g, b);