Search func, mobile layout

This commit is contained in:
Nicolas A. Tonne
2015-04-22 12:40:03 +02:00
parent da4b56c926
commit 223c3566cf
8 changed files with 58 additions and 14 deletions

View File

@@ -71,6 +71,24 @@ overflow: hidden;
position: relative;
font-size: 30px;
padding: 0 20px;
left: initial;
display: inline;
}
@media only screen and (min-width: 992px) {
nav .zbrand {
display: inline-block;
}
}
.navbar-fixed {
height: 128px;
}
@media only screen and (min-width: 992px){
.navbar-fixed {
height: 64px;
}
}
.fullwidth{
@@ -168,6 +186,8 @@ hide mdi-action-visibility mdi-action-visibility-off
.chan-name{
text-transform: capitalize;
display: inline-block;
width: 100%;
}
/*#channels li{opacity: 0;}*/
@@ -225,11 +245,20 @@ hide mdi-action-visibility mdi-action-visibility-off
display: block;
}
#song-title{
.song-title{
font-size: 22px;
font-weight: 300;
}
.second-title{
width: 100%;
}
.second-title-container{
padding: 0 10%;
width: 100%;
}
#viewers{
width: initial;
padding-right: 3%;
@@ -237,6 +266,7 @@ hide mdi-action-visibility mdi-action-visibility-off
#player{
height:95%;
height: calc(100% - 32px);
position: relative;
}
@@ -389,7 +419,7 @@ hide mdi-action-visibility mdi-action-visibility-off
#controls
{
opacity:0;
height:5%;
height:32px;
background-color:rgba(255, 255, 255, 0.1);
width:100%;
color:white;

View File

@@ -117,10 +117,12 @@ function populate_list(msg, conf_only)
function vote(id, vote){
socket.emit('vote', [chan, id, vote, guid, adminpass]);
return true;
}
function skip(){
socket.emit('skip', [chan, guid]);
return true;
}
function refresh_scroll()

View File

@@ -125,6 +125,8 @@ function search(search_input){
if(search_input !== ""){
var keyword= encodeURIComponent(search_input);
//response= http://nixo.no/txt/?4574f9b9dd286e0d#X+kzTvyFv5IrdkGQtqmoquhekDRCPJX9N24PSn86CFE=
//var yt_url = "https://www.googleapis.com/youtube/v3/search?videoEmbeddable=true&part=snippet&q=thefatrat&fields=items(id%2Csnippet)&type=video&videoDuration=medium&videoCategoryId=15&key=AIzaSyC3hq93zqwdwcjO8HyD9oToLLFotoAjyWo";
var yt_url='http://gdata.youtube.com/feeds/api/videos?q='+keyword+'&format=5&orderby=relevance&max-results=30&v=2&alt=jsonc';
$.ajax({

View File

@@ -49,7 +49,7 @@ socket.on(chan.toLowerCase()+",np", function(obj)
console.log(obj);
if(obj[0].length == 0){
console.log("Empty list");
document.getElementById('song-title').innerHTML = "Empty channel. Add some songs!"
$('.song-title').innerHTML = "Empty channel. Add some songs!"
}
else{
console.log("gotten new song");
@@ -204,10 +204,10 @@ function getTitle(titt, v)
{
var outPutWord = v > 1 ? "viewers" : "viewer";
var title= decodeURIComponent(titt);
var elem = document.getElementById('song-title');
var elem = $('#song-title');
document.title = title + " • Zöff";
if(!window.mobilecheck()){
elem.innerHTML = title;
elem.text = title;
document.getElementById('viewers').innerHTML = v + " " + outPutWord;
elem.title = title + " • " + v + " " + outPutWord;
}