diff --git a/index.php b/index.php index 874af9c9..ee949263 100755 --- a/index.php +++ b/index.php @@ -7,8 +7,7 @@ ?> - + diff --git a/php/header.php b/php/header.php index 28e6cabf..38142c70 100755 --- a/php/header.php +++ b/php/header.php @@ -1,8 +1,9 @@ - + + Zöff diff --git a/php/nochan.php b/php/nochan.php index c686330e..bdf9e92c 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -1,8 +1,8 @@ $to) - { - $file = file_get_contents($files); - $data = json_decode($file, TRUE); - $q = array_values($data["nowPlaying"]); - /*if($q[0]["id"] == "30H2Z8Lr-4c"); - unlink("./lists/".$files);*/ - } - if($time_lasted < $time){ - $file = file_get_contents($files); //Checking if the channel has the setting for showing on the frontpage set to true. - $data = json_decode($file, TRUE); - if($i <= 12 && (!array_key_exists("frontpage", $data['conf']) || $data['conf']['frontpage'] == "true")){ //If it is true, the channelname will be shown on the frontpage - array_push($channels, ucfirst(str_replace(".json", "", $files))); - array_push($viewers, sizeof($data["conf"]["views"])); - array_push($chan_data, $data); - } - } - $i++; - array_push($all_channels, ucfirst(str_replace(".json", "", $files))); - } + if(strpos($files, '.json') !== FALSE){ + $time_lasted = time() - filemtime($files); + if($time_lasted > $to) + { + $file = file_get_contents($files); + $data = json_decode($file, TRUE); + if(isset($data["nowPlaying"])){ + $q = array_values($data["nowPlaying"]); + } + } + if($time_lasted < $time){ + $file = file_get_contents($files); //Checking if the channel has the setting for showing on the frontpage set to true. + $data = json_decode($file, TRUE); + if($i <= 40 && (!array_key_exists("frontpage", $data['conf']) || $data['conf']['frontpage'] == "true")){ //If it is true, the channelname will be shown on the frontpage + array_push($channels, ucfirst(str_replace(".json", "", $files))); + array_push($viewers, sizeof($data["conf"]["views"])); + array_push($chan_data, $data); + } + } + $i++; + array_push($all_channels, ucfirst(str_replace(".json", "", $files))); + } } ?> - + -
- -
+
+ +
-
-
-
-
- - - - ";} ?> - -
-
-
-
-
-
- $d) - { - if(count($d["songs"])>0) - { - $ch=htmlspecialchars($channels[$v]); - $views=$viewers[$v]; - $now=reset($d["nowPlaying"]); - $img="http://img.youtube.com/vi/".$now["id"]."/hqdefault.jpg"; - //echo "".$ch.""; - ?> -
-
- -
- -
-
-
-

- -
- Viewers:  - Songs:  -

-
-
- Listen -
-
-
- -
-
-
+
+
+
+
+ + + + ";} ?> + +
+
+
+ +
+ +
+
- + - - - + + + - - - - + + + + - + diff --git a/static/css/style.css b/static/css/style.css index ea462aac..04e34bd2 100755 --- a/static/css/style.css +++ b/static/css/style.css @@ -16,13 +16,40 @@ body { flex-direction: column; } -/* global color */ +/* global colors */ 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; + background-color: #2D2D2D; +} + +.secondary-content, +.dropdown-content li > a, .dropdown-content li > span, +.input-field .prefix.active, +input[type=text]:focus:not([readonly]) + label, input[type=password]:focus:not([readonly]) + label, input[type=email]:focus:not([readonly]) + label, input[type=url]:focus:not([readonly]) + label, input[type=time]:focus:not([readonly]) + label, input[type=date]:focus:not([readonly]) + label, input[type=datetime-local]:focus:not([readonly]) + label, input[type=tel]:focus:not([readonly]) + label, input[type=number]:focus:not([readonly]) + label, input[type=search]:focus:not([readonly]) + label, textarea.materialize-textarea:focus:not([readonly]) + label +{ + color: #2D2D2D; +} + +span.badge.new, +.progress .determinate, +.progress .indeterminate, +.switch label input[type=checkbox]:checked + .lever:after, +{ + background-color: #2D2D2D; +} + +input[type=text]:focus:not([readonly]), input[type=password]:focus:not([readonly]), input[type=email]:focus:not([readonly]), input[type=url]:focus:not([readonly]), input[type=time]:focus:not([readonly]), input[type=date]:focus:not([readonly]), input[type=datetime-local]:focus:not([readonly]), input[type=tel]:focus:not([readonly]), input[type=number]:focus:not([readonly]), input[type=search]:focus:not([readonly]), textarea.materialize-textarea:focus:not([readonly]) { + border-bottom: 1px solid #9D9D9D; + box-shadow: 0 1px 0 0 #9D9D9D; +} + +/* End global colors */ + +nav .brand-logo{ + padding-left: 20px; } main { @@ -49,6 +76,9 @@ main { height: 120px; } +.card .card-content { + padding: 10px 20px; +} .card .card-action a { padding: 0; margin: 0; @@ -76,10 +106,13 @@ hide mdi-action-visibility mdi-action-visibility-off /* INDEX PAGE */ #zicon{ - width: 50px; - margin: 7px 20px; + /* width: 50px; */ + /* margin: 7px 20px; */ + height: 100%; } .section .search { padding-top: 2.5rem; } + +#channels li{opacity: 0;} \ No newline at end of file diff --git a/static/images/GitHub_Logo.png b/static/images/GitHub_Logo.png index 0389f4d9..f1f88615 100755 Binary files a/static/images/GitHub_Logo.png and b/static/images/GitHub_Logo.png differ diff --git a/static/images/google_play.png b/static/images/google_play.png index 0d55b8c1..259b8420 100755 Binary files a/static/images/google_play.png and b/static/images/google_play.png differ diff --git a/static/images/squareicon.png b/static/images/squareicon.png new file mode 100644 index 00000000..938030d6 Binary files /dev/null and b/static/images/squareicon.png differ diff --git a/static/images/squareicon_small.png b/static/images/squareicon_small.png new file mode 100644 index 00000000..7dea5a5d Binary files /dev/null and b/static/images/squareicon_small.png differ diff --git a/static/js/nochan.js b/static/js/nochan.js new file mode 100644 index 00000000..d408e49c --- /dev/null +++ b/static/js/nochan.js @@ -0,0 +1,40 @@ +function getCookie(cname) { + var name = cname + "="; + var ca = document.cookie.split(';'); + for(var i=0; i= 60) + window.location.href = 'https://www.youtube.com/v/mK2fNG26xFg?autoplay=1&showinfo=0&autohide=1'; + }); + if(navigator.userAgent.toLowerCase().indexOf("android") > -1){ + console.log("android"); + var ca = document.cookie.split(';'); + if(getCookie("show_prompt") == ""){ + var r = confirm("Do you want to download the native app for this webpage?"); + if(r) + window.location.href = 'https://play.google.com/store/apps/details?id=no.lqasse.zoff'; + else + { + var d = new Date(); + d.setTime(d.getTime() + (10*24*60*60*1000)); + var expires = "expires="+d.toUTCString(); + document.cookie = "show_prompt=false;"+expires; + } + } + } +});