Added doctype in all php files, and adjusted heights and css styling accordingly to the 'new' boxmodel

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-19 18:18:38 +02:00
parent 74f2a3d62a
commit b9707fe37b
8 changed files with 51 additions and 33 deletions

View File

@@ -5,8 +5,8 @@ RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
#Comment out the two folling lines when running server locally to fix issues with localhost #Comment out the two folling lines when running server locally to fix issues with localhost
RewriteCond %{HTTPS} !=on #RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] #RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteRule ^remote/(.*) php/controller.php?id=$1 [L] RewriteRule ^remote/(.*) php/controller.php?id=$1 [L]

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<?php <?php
$guid=substr(base64_encode(crc32($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_ACCEPT_LANGUAGE'])), 0, 8); $guid=substr(base64_encode(crc32($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_ACCEPT_LANGUAGE'])), 0, 8);
if(isset($_GET['chan'])) {header('Location: '.$_GET['chan']); exit;} if(isset($_GET['chan'])) {header('Location: '.$_GET['chan']); exit;}
@@ -6,7 +7,7 @@
else $list=$list[1]; else $list=$list[1];
?> ?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" lang="en">
<head> <head>
<?php include("php/header.php"); ?> <?php include("php/header.php"); ?>
</head> </head>
@@ -134,25 +135,25 @@
</div> </div>
</header> </header>
<main class="container center-align main"> <main class="container center-align main">
<div class="row"> <div id="main-row" class="row">
<div class="col s12 m9 video-container hide-on-small-only"> <div class="col s12 m9 video-container hide-on-small-only">
<ul class="side-nav left-aligned chat-bar" id="chat-bar"> <ul class="side-nav left-aligned chat-bar" id="chat-bar">
<li id="chat-log"> <li id="chat-log">
<ul class="collapsible collapsible-accordion"> <ul class="collapsible collapsible-accordion inherit-height">
<li class="active"> <li class="active inherit-height">
<div class="collapsible-body" style="display: block;"> <div class="collapsible-body inherit-height" style="display: block;">
<ul id="chat"> <ul id="chat inherit-height">
<div class="row"> <div class="row inherit-height">
<div class="col s12"> <div class="col s12">
<ul class="tabs"> <ul class="tabs">
<li class="tab col s3 chat-tab-li"><a class="active chat-tab truncate" href="#channelchat"><?php echo $list; ?></a></li> <li class="tab col s3 chat-tab-li"><a class="active chat-tab truncate" href="#channelchat"><?php echo $list; ?></a></li>
<li class="tab col s3 chat-tab-li"><a class="chat-tab" href="#all_chat">All</a></li> <li class="tab col s3 chat-tab-li"><a class="chat-tab" href="#all_chat">All</a></li>
</ul> </ul>
</div> </div>
<div id="channelchat" class="col s12"><ul id="chatchannel"></ul></div> <div id="channelchat" class="col s12 inherit-height"><ul id="chatchannel" class="inherit-height"></ul></div>
<div id="all_chat" class="col s12"><ul id="chatall"></ul></div> <div id="all_chat" class="col s12 inherit-height"><ul id="chatall" class="inherit-height"></ul></div>
</div> </div>
</ul> </ul>
</div> </div>

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
<head> <head>
<title>Zöff Remote</title> <title>Zöff Remote</title>
@@ -12,7 +13,7 @@
</a> </a>
<a href="zoff.no" class="brand-logo hide-on-med-and-up">Zöff</a> <a href="zoff.no" class="brand-logo hide-on-med-and-up">Zöff</a>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a class="waves-effect waves-green" title="Remote control a Zöff player" href="remote">Remote</a></li> <li><a class="waves-effect green" title="Remote control a Zöff player" href="remote">Remote</a></li>
<li><a class="modal-trigger waves-effect waves-orange" onclick="$('#about').openModal()">About</a></li> <li><a class="modal-trigger waves-effect waves-orange" onclick="$('#about').openModal()">About</a></li>
<li><a class="modal-trigger waves-effect waves-yellow" onclick="$('#legal').openModal()">Legal</a></li> <li><a class="modal-trigger waves-effect waves-yellow" onclick="$('#legal').openModal()">Legal</a></li>
<li><a class="waves-effect waves-purple" href="https://github.com/nixolas1/Zoff">GitHub</a></li> <li><a class="waves-effect waves-purple" href="https://github.com/nixolas1/Zoff">GitHub</a></li>

View File

@@ -4,7 +4,7 @@ var server;
This if for the localhost running This if for the localhost running
******/ ******/
localhost = false; localhost = true;
//https server //https server
if(localhost) if(localhost)

View File

@@ -30,6 +30,7 @@
} }
body { body {
display: flex; display: flex;
min-height: 100vh; min-height: 100vh;
@@ -37,6 +38,14 @@ body {
overflow-x: hidden; overflow-x: hidden;
} }
.main, #main-row, .video-container, #playlist{
height: calc(100vh - 64px) !important;
}
footer{
margin-top:0px !important;
}
/* global colors */ /* global colors */
footer.page-footer, footer.page-footer,
nav, .tabs .tab a, nav, .tabs .tab a,
@@ -57,7 +66,7 @@ input[type=text]:focus:not([readonly]) + label, input[type=password]:focus:not([
span.badge.new, span.badge.new,
.progress .determinate, .progress .determinate,
.progress .indeterminate, .progress .indeterminate,
.switch label input[type=checkbox]:checked + .lever:after, .switch label input[type=checkbox]:checked + .lever:after
{ {
background-color: #2D2D2D; background-color: #2D2D2D;
} }
@@ -72,6 +81,7 @@ input[type=text]:focus:not([readonly]), input[type=password]:focus:not([readonly
nav .brand-logo{ nav .brand-logo{
padding-left: 20px; padding-left: 20px;
position: relative; position: relative;
height:100%;
} }
#fp-nav { #fp-nav {
@@ -86,7 +96,7 @@ nav .brand-logo{
.footer-copyright a:hover{color:#6699FF} .footer-copyright a:hover{color:#6699FF}
main { main {
flex: 1 0 auto; flex: auto;
} }
nav .zbrand{ nav .zbrand{
@@ -120,7 +130,7 @@ display: inline;
.auto-margin{ .auto-margin{
margin-left: auto !important; margin-left: auto !important;
margin-right: auto !important; margin-right: auto !important;
float: center !important;
} }
.clickable, .modal-trigger{cursor:pointer;} .clickable, .modal-trigger{cursor:pointer;}
@@ -162,8 +172,7 @@ display: inline;
.card-action #del { .card-action #del {
color:white; color:white;
} }
.card-action #del:hover{
.card-action #del:hover {
color:grey; color:grey;
} }
@@ -232,6 +241,10 @@ hide mdi-action-visibility mdi-action-visibility-off
/*------------------- Channel page ---------------------------------------------------------------------------- */ /*------------------- Channel page ---------------------------------------------------------------------------- */
#main-row{
margin-bottom:-64px;
}
@media only screen and (min-width: 993px){ @media only screen and (min-width: 993px){
.toast { .toast {
float: left; float: left;
@@ -256,15 +269,19 @@ hide mdi-action-visibility mdi-action-visibility-off
background-color:black !important; background-color:black !important;
} }
#channelchat, #all_chat{
height: calc(100vh - 193px);
}
#chatchannel, #chatall { #chatchannel, #chatall {
height: calc(100% - 49px); height: inherit;
overflow-y:scroll; overflow-y:scroll;
text-align:left; text-align:left;
word-wrap:break-word; word-wrap:break-word;
} }
#chat { #chat {
height: calc(100% - 121px); /*height: calc(100% - 121px);*/
text-align:left; text-align:left;
word-wrap:break-word; word-wrap:break-word;
} }
@@ -331,7 +348,6 @@ ul #chat-log{
} }
.main{ .main{
height: 100%;
width: 100%; width: 100%;
max-width:99%; max-width:99%;
margin: 0px; margin: 0px;
@@ -340,9 +356,6 @@ ul #chat-log{
#nav{ #nav{
background-color:rgba(255,255,255, 0.1); background-color:rgba(255,255,255, 0.1);
} }
.video-container{
height: calc(100% - 64px);
}
.control-list{ .control-list{
position: fixed; position: fixed;
@@ -584,6 +597,7 @@ ul #chat-log{
background-color:rgba(255, 255, 255, 0.1); background-color:rgba(255, 255, 255, 0.1);
width:100%; width:100%;
color:white; color:white;
margin-top:-6px;
} }
#playpause, #duration, #volume-button #playpause, #duration, #volume-button
@@ -855,6 +869,10 @@ ul #chat-log{
display: none; display: none;
} }
.search_input{
height:50% !important;
}
#search::-webkit-input-placeholder { /* WebKit browsers */ #search::-webkit-input-placeholder { /* WebKit browsers */
color: #FFF; color: #FFF;
} }

View File

@@ -50,7 +50,7 @@ socket.on("chat.all", function(inp)
unseen = true; unseen = true;
} }
var color = intToARGB(hashCode(inp[0])).substring(0,6); var color = intToARGB(hashCode(inp[0])).substring(0,6);
$("#chatall").append("<li title='"+inp[2]+"'><span style='color:"+color+";'>"+inp[0]+"</span></li>"); $("#chatall").append("<li title='"+inp[2]+"'><span style='color:#"+color+";'>"+inp[0]+"</span></li>");
var in_text = document.createTextNode(inp[1]); var in_text = document.createTextNode(inp[1]);
$("#chatall li:last")[0].appendChild(in_text); $("#chatall li:last")[0].appendChild(in_text);
document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight
@@ -82,7 +82,7 @@ function setup_chat_listener(channel)
} }
} }
var color = intToARGB(hashCode(data[0])).substring(0,6); var color = intToARGB(hashCode(data[0])).substring(0,6);
$("#chatchannel").append("<li><scrollTopan style='color:"+color+";'>"+data[0]+"</span></li>"); $("#chatchannel").append("<li><span style='color:#"+color+";'>"+data[0]+"</span></li>");
var in_text = document.createTextNode(data[1]); var in_text = document.createTextNode(data[1]);
$("#chatchannel li:last")[0].appendChild(in_text); $("#chatchannel li:last")[0].appendChild(in_text);
document.getElementById("chatchannel").scrollTop = document.getElementById("chatchannel").scrollHeight document.getElementById("chatchannel").scrollTop = document.getElementById("chatchannel").scrollHeight

View File

@@ -3,7 +3,7 @@ var id;
//var socket; //var socket;
$(document).ready(function (){ $(document).ready(function (){
setTimeout(function(){$("#code-input").focus();},500); setTimeout(function(){$("#search").focus();},500);
socket = io.connect('//'+window.location.hostname+':3000'); socket = io.connect('//'+window.location.hostname+':3000');
id = window.location.pathname.split("/")[2]; id = window.location.pathname.split("/")[2];
if(id) if(id)

View File

@@ -172,8 +172,6 @@ function msieversion() {
function onYouTubeIframeAPIReady() { function onYouTubeIframeAPIReady() {
ytplayer = new YT.Player('player', { ytplayer = new YT.Player('player', {
height: window.height*0.75,
width: window.width*0.6,
videoId: video_id, videoId: video_id,
playerVars: { rel:"0", wmode:"transparent", controls: "0" , iv_load_policy: "3", theme:"light", color:"white"}, playerVars: { rel:"0", wmode:"transparent", controls: "0" , iv_load_policy: "3", theme:"light", color:"white"},
events: { events: {