I did some things

This commit is contained in:
Kasper Rynning-Tønnesen
2015-11-25 23:45:23 +01:00
parent 5b50178639
commit 33803616fc
3 changed files with 107 additions and 36 deletions

View File

@@ -298,14 +298,15 @@ hide mdi-action-visibility mdi-action-visibility-off
} }
.room-namer::-webkit-input-placeholder{ .room-namer::-webkit-input-placeholder{
color:rgb(155, 155, 155) !important; /*color:rgb(155, 155, 155) !important;*/
-webkit-transition:opacity 0.5s; -webkit-transition:opacity 0.5s;
color: rgb(255, 255, 255) !important;
} }
.mega h5{ .mega h5{
box-sizing: border-box; /*box-sizing: border-box; */
color: rgb(255, 255, 255); cursor: default; display: inline; color: rgb(255, 255, 255); cursor: default; display: inline;
font-family: futura-pt, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; /*font-family: futura-pt, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; */
font-size: 50px; font-size: 50px;
font-weight: 100; font-weight: 100;
height: auto; height: auto;
@@ -317,30 +318,48 @@ hide mdi-action-visibility mdi-action-visibility-off
} }
.mega form{ .mega form{
-webkit-background-clip: border-box; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-box-shadow: rgb(68, 68, 68) 0px 0px 8px 0px; background-attachment: scroll; background-clip: border-box; background-color: rgb(255, 255, 255); background-image: none; background-origin: padding-box; background-size: auto; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-shadow: rgb(68, 68, 68) 0px 0px 8px 0px; box-sizing: border-box; color: rgb(255, 255, 255); cursor: text; display: flex; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 17px; font-weight: normal; height: 50px; line-height: 24.2857151031494px; margin-top: 0px; padding-bottom: 5px; padding-left: 20px; padding-right: 5px; padding-top: 5px; text-align: center; width: 507.8125px; display: flex;
/*-webkit-background-clip: border-box; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-box-shadow: rgb(68, 68, 68) 0px 0px 8px 0px; background-attachment: scroll; background-clip: border-box; background-color: rgb(255, 255, 255); background-image: none; background-origin: padding-box; background-size: auto; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-shadow: rgb(68, 68, 68) 0px 0px 8px 0px; box-sizing: border-box; color: rgb(255, 255, 255); cursor: text; display: flex; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 17px; font-weight: normal; height: 50px; line-height: 24.2857151031494px; margin-top: 0px; padding-bottom: 5px; padding-left: 20px; padding-right: 5px; padding-top: 5px; text-align: center; width: 507.8125px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
margin-top: 1%; margin-top: 1%;
margin-bottom: 2%; margin-bottom: 2%;*/
width: 41vw;
margin-right: auto;
margin-left: auto;
text-align: center;
} }
.mega .prething{ .mega .prething{
box-sizing: border-box; color: rgb(155, 155, 155); cursor: text; display: block; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 17px; font-weight: 200; height: 24px; line-height: 24.2857151031494px; margin-bottom: 8px; margin-left: 0px; margin-right: 8.5px; margin-top: 8px; box-sizing: border-box;
/*color: rgb(155, 155, 155);*/
cursor: text; display: block;
text-shadow: rgba(18, 18, 18, 0.76) 0px 1px 4px;
color: rgb(255, 255, 255);
/*font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; */
font-size: 17px;
/*font-weight: 200; */
height: 24px; line-height: 26px; margin-bottom: 8px; margin-left: 0px; margin-right: 8.5px; margin-top: 8px;
min-width: 56px; text-align: center; min-width: 56px; text-align: center;
width: 40px; width: 40px;
margin-right: -85px;
} }
.mega input{ .mega input{
color: rgb(0, 0, 0); /*color: rgb(0, 0, 0);*/
font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; /*font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;*/
font-size: 17px; font-size: 17px;
height: 40px; height: 42px;
line-height: 25px; line-height: 25px;
min-width: 307px; min-width: 307px;
width: 317px; width: 400px;
word-spacing: 0px; word-spacing: 0px;
box-shadow: none !important; box-shadow: none !important;
border:none !important; border:none !important;
color: rgb(255, 255, 255);
text-shadow: rgba(18, 18, 18, 0.76) 0px 1px 4px;
border-bottom: 1px solid white !important;
padding-left: 100px;
} }
.mega .refresh-button{ .mega .refresh-button{
@@ -348,17 +367,54 @@ hide mdi-action-visibility mdi-action-visibility-off
} }
.mega .listen-button{ .mega .listen-button{
-webkit-appearance: none; -webkit-background-clip: border-box; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-writing-mode: horizontal-tb; align-items: flex-start; background-attachment: scroll; background-clip: border-box; /*-webkit-appearance: none; -webkit-background-clip: border-box; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-writing-mode: horizontal-tb; align-items: flex-start; background-attachment: scroll; background-clip: border-box;
background-color: rgb(45, 45, 45); background-image: none; background-origin: padding-box; background-size: auto; border-bottom-color: rgb(250, 70, 104); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: rgb(250, 70, 104); border-left-style: none; border-left-width: 0px; border-right-color: rgb(250, 70, 104); border-right-style: none; border-right-width: 0px; border-top-color: rgb(250, 70, 104); border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: none; border-top-width: 0px; box-sizing: border-box; color: rgb(255, 255, 255); cursor: pointer; display: block; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; height: 40px; letter-spacing: normal; line-height: 35.625px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 30px; padding-top: 0px; text-align: center; text-decoration: none; text-indent: 0px; text-shadow: none; background-color: rgb(45, 45, 45); background-image: none; background-origin: padding-box; background-size: auto; border-bottom-color: rgb(250, 70, 104); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: rgb(250, 70, 104); border-left-style: none; border-left-width: 0px; border-right-color: rgb(250, 70, 104); border-right-style: none; border-right-width: 0px; border-top-color: rgb(250, 70, 104); border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: none; border-top-width: 0px; box-sizing: border-box; color: rgb(255, 255, 255); cursor: pointer; display: block; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; height: 40px; letter-spacing: normal; line-height: 35.625px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 30px; padding-top: 0px; text-align: center; text-decoration: none; text-indent: 0px; text-shadow: none;
text-transform: none; text-transform: none;
word-spacing: 0px; word-spacing: 0px;
color: rgb(255, 255, 255);
text-shadow: rgba(18, 18, 18, 0.76) 0px 1px 4px;
height:41px;*/
background: none;
border: none;
background-size: auto;
border-bottom: 1px solid white;
border-left:1px solid rgba(255,255,255,0);
border-right:1px solid rgba(255,255,255,0);
border-top:1px solid rgba(255,255,255,0);
cursor: pointer;
height: 41px;
line-height: 35.625px;
margin-left: 20px;
padding-left: 30px;
padding-right: 30px;
text-shadow: none;
color: rgb(255, 255, 255);
text-shadow: rgba(18, 18, 18, 0.76) 0px 1px 4px;
-webkit-transition : border 500ms ease-out;
-moz-transition : border 500ms ease-out;
-o-transition : border 500ms ease-out;
transition : border 500ms ease-out;
} }
.listen-button:hover{
border-left:1px solid rgba(255,255,255,1);
border-right:1px solid rgba(255,255,255,1);
border-top:1px solid rgba(255,255,255,1);
border-radius: 2px;
}
.mega .pitch{ .mega .pitch{
box-sizing: border-box; box-sizing: border-box;
color: rgba(255, 255, 255, 0.85); display: inline; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 17px; font-weight: normal; height: auto; line-height: 24.2857151031494px; text-align: center; color: rgba(255, 255, 255, 0.85);
text-shadow: rgba(81, 81, 81, 0.05) 0px 1px 4px; width: auto; display: inline;
margin-top: 20px; /* font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; */
font-size: 18px;
font-weight: 300;
height: auto;
/*line-height: 24.2857151031494px;*/
text-align: center;
text-shadow: rgba(81, 81, 81, 0.05) 0px 1px 4px;
width: auto;
margin-top: 20px;
} }
/*#channels li{opacity: 0;}*/ /*#channels li{opacity: 0;}*/

View File

@@ -1 +1 @@
!function(){var e,t,o={populate_channels:function(t){var n="",a=0;t.sort(o.sortFunction),pre_card=$(e),o.add_backdrop(t,0);for(x in t){var s=t[x][3];if(20>a){var i=t[x][1],l=t[x][0],r="background-image:url('https://img.youtube.com/vi/"+i+"/hqdefault.jpg');",c=t[x][4],d=pre_card;d.find(".chan-name").text(s),d.find(".chan-name").attr("title",s),d.find(".chan-views").text(l),d.find(".chan-songs").text(c),d.find(".chan-bg").attr("style",r),d.find(".chan-link").attr("href",s),$("#channels").append(d.html())}n+="<option value='"+s+"'> ",a++}document.getElementById("preloader").style.display="none",document.getElementById("searches").innerHTML=n,$("#channels").fadeIn(800),$("#search").focus()},sortFunction:function(e,t){var o=e[0],n=t[0],a=e[4],s=t[4];return n>o?1:o>n?-1:s>a?1:a>s?-1:0},getCookie:function(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var a=o[n];" "==a.charAt(0);)a=a.substring(1);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return""},add_backdrop:function(e,t){console.log(e.length),t>=e.length&&(t=0);var n=e[t][1];$.ajax({type:"POST",data:{id:n},url:"/php/imageblob.php",success:function(o){$("#mega-background").css("opacity",0),$(".room-namer").css("opacity",0),setTimeout(function(){$("#mega-background").css("background","url(data:image/png;base64,"+o+")"),$("#mega-background").css("background-size","200%"),$("#mega-background").css("opacity",1),$("#search").attr("placeholder",e[t][3]),$(".room-namer").css("opacity",1)},500)}}),setTimeout(function(){o.add_backdrop(e,t+1)},6e3)}};String.prototype.capitalizeFirstLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)},$(document).ready(function(){"#donation"==window.location.hash&&$("#donation").openModal(),e=$("#channel-list-container").html(),window.list_html=e,$("#channels").empty();var n=io.connect("//"+window.location.hostname+":8880");n.emit("frontpage_lists"),n.on("playlists",function(e){o.populate_channels(e)});var a=0;if(document.getElementById("zicon").addEventListener("click",function(){a+=10,document.getElementById("zicon").style.paddingLeft=a+"%",a>=100&&(window.location.href="https://www.youtube.com/v/0IGsNdVoEh0?autoplay=1&showinfo=0&autohide=1")}),navigator.userAgent.toLowerCase().indexOf("android")>-1&&""==o.getCookie("show_prompt")){var s=confirm("Do you want to download the native app for this webpage?");if(s)window.location.href="https://play.google.com/store/apps/details?id=no.lqasse.zoff";else{var i=new Date;i.setTime(i.getTime()+864e6);var l="expires="+i.toUTCString();document.cookie="show_prompt=false;"+l}}t=$.ajax({type:"GET",url:"https://api.github.com/repos/zoff-music/zoff/commits",async:!1}).responseText,t=$.parseJSON(t),$("#latest-commit").html("Latest Commit: <br>"+t[0].commit.author.date.substring(0,10)+": "+t[0].committer.login+"<br><a href='"+t[0].html_url+"'>"+t[0].sha.substring(0,10)+"</a>: "+t[0].commit.message+"<br")})}(); !function(){var t,e,o={blob_list:[],populate_channels:function(e){var n="",a=0;e.sort(o.sortFunction),pre_card=$(t),o.add_backdrop(e,0);for(x in e){var i=e[x][3];if(20>a){var s=e[x][1],r=e[x][0],c="background-image:url('https://img.youtube.com/vi/"+s+"/hqdefault.jpg');",d=e[x][4],l=pre_card;l.find(".chan-name").text(i),l.find(".chan-name").attr("title",i),l.find(".chan-views").text(r),l.find(".chan-songs").text(d),l.find(".chan-bg").attr("style",c),l.find(".chan-link").attr("href",i),$("#channels").append(l.html())}n+="<option value='"+i+"'> ",a++}document.getElementById("preloader").style.display="none",document.getElementById("searches").innerHTML=n,$("#channels").fadeIn(800),$("#search").focus()},sortFunction:function(t,e){var o=t[0],n=e[0],a=t[4],i=e[4];return n>o?1:o>n?-1:i>a?1:a>i?-1:0},getCookie:function(t){for(var e=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var a=o[n];" "==a.charAt(0);)a=a.substring(1);if(0==a.indexOf(e))return a.substring(e.length,a.length)}return""},add_backdrop:function(t,e){(e>=t.length||e>=8)&&(e=0);var n=t[e][1];void 0!==o.blob_list[e]?($("#mega-background").css("opacity",0),$(".room-namer").css("opacity",0),setTimeout(function(){$("#mega-background").css("background","url(data:image/png;base64,"+o.blob_list[e]+")"),$("#mega-background").css("background-size","200%"),$("#mega-background").css("opacity",1),$("#search").attr("placeholder",t[e][3]),$(".room-namer").css("opacity",1)},500)):$.ajax({type:"POST",data:{id:n},url:"/php/imageblob.php",success:function(n){o.blob_list.push(n),$("#mega-background").css("opacity",0),$(".room-namer").css("opacity",0),setTimeout(function(){$("#mega-background").css("background","url(data:image/png;base64,"+n+")"),$("#mega-background").css("background-size","200%"),$("#mega-background").css("opacity",1),$("#search").attr("placeholder",t[e][3]),$(".room-namer").css("opacity",1)},500)}}),setTimeout(function(){},6e3)}};String.prototype.capitalizeFirstLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)},$(document).ready(function(){"#donation"==window.location.hash&&$("#donation").openModal(),t=$("#channel-list-container").html(),window.list_html=t,$("#channels").empty();var n=io.connect("//"+window.location.hostname+":8880");n.emit("frontpage_lists"),n.on("playlists",function(t){o.populate_channels(t)});var a=0;if(document.getElementById("zicon").addEventListener("click",function(){a+=10,document.getElementById("zicon").style.paddingLeft=a+"%",a>=100&&(window.location.href="https://www.youtube.com/v/0IGsNdVoEh0?autoplay=1&showinfo=0&autohide=1")}),navigator.userAgent.toLowerCase().indexOf("android")>-1&&""==o.getCookie("show_prompt")){var i=confirm("Do you want to download the native app for this webpage?");if(i)window.location.href="https://play.google.com/store/apps/details?id=no.lqasse.zoff";else{var s=new Date;s.setTime(s.getTime()+864e6);var r="expires="+s.toUTCString();document.cookie="show_prompt=false;"+r}}e=$.ajax({type:"GET",url:"https://api.github.com/repos/zoff-music/zoff/commits",async:!1}).responseText,e=$.parseJSON(e),$("#latest-commit").html("Latest Commit: <br>"+e[0].commit.author.date.substring(0,10)+": "+e[0].committer.login+"<br><a href='"+e[0].html_url+"'>"+e[0].sha.substring(0,10)+"</a>: "+e[0].commit.message+"<br")})}();

View File

@@ -16,6 +16,8 @@ function getCookie(cname) {
var Nochan = { var Nochan = {
blob_list: [],
populate_channels: function(lists) populate_channels: function(lists)
{ {
var output = ""; var output = "";
@@ -89,32 +91,45 @@ var Nochan = {
}, },
add_backdrop: function(list, i) { add_backdrop: function(list, i) {
console.log(list.length) if(i >= list.length || i >= 8) i = 0;
if(i >= list.length) i = 0;
var id = list[i][1]; var id = list[i][1];
$.ajax({
type: "POST", if(Nochan.blob_list[i] !== undefined){
data: {id:id}, $("#mega-background").css("opacity", 0);
url: "/php/imageblob.php", $(".room-namer").css("opacity", 0);
success: function(data){ setTimeout(function(){
//data will contain the vote count echoed by the controller i.e. $("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")");
$("#mega-background").css("opacity", 0); $("#mega-background").css("background-size" , "200%");
$(".room-namer").css("opacity", 0); $("#mega-background").css("opacity", 1);
setTimeout(function(){ $("#search").attr("placeholder", list[i][3]);
$("#mega-background").css("background", "url(data:image/png;base64,"+data+")"); $(".room-namer").css("opacity", 1);
$("#mega-background").css("background-size" , "200%"); },500);
$("#mega-background").css("opacity", 1); }else{
$("#search").attr("placeholder", list[i][3]); $.ajax({
$(".room-namer").css("opacity", 1); type: "POST",
},500); data: {id:id},
//then append the result where ever you want like url: "/php/imageblob.php",
//$("span#votes_number").html(data); //data will be containing the vote count which you have echoed from the controller success: function(data){
Nochan.blob_list.push(data);
//data will contain the vote count echoed by the controller i.e.
$("#mega-background").css("opacity", 0);
$(".room-namer").css("opacity", 0);
setTimeout(function(){
$("#mega-background").css("background", "url(data:image/png;base64,"+data+")");
$("#mega-background").css("background-size" , "200%");
$("#mega-background").css("opacity", 1);
$("#search").attr("placeholder", list[i][3]);
$(".room-namer").css("opacity", 1);
},500);
//then append the result where ever you want like
//$("span#votes_number").html(data); //data will be containing the vote count which you have echoed from the controller
} }
}); });
}
setTimeout(function(){ setTimeout(function(){
Nochan.add_backdrop(list, i+1); //Nochan.add_backdrop(list, i+1);
},6000); },6000);
} }