Commit 76e812d0 authored by Alain Takoudjou's avatar Alain Takoudjou

sfu: first working design

parent 517d7edb
......@@ -10,10 +10,25 @@ h1 {
display: inline;
}
.signature {
border-top: solid;
margin-top: 2em;
padding-top: 0em;
border-width: thin;
clear: both;
body {
overflow-x: hidden;
}
body, html {
height: 100%;
}
body {
margin: 0;
font-family: Metropolis,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #687281;
text-align: left;
background-color: #eff3f9;
}
*, :after, :before {
box-sizing: border-box;
}
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,27 +2,46 @@
<html lang="en">
<head>
<title>SFU</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/common.css">
<link rel="stylesheet" href="/mainpage.css">
<link rel="stylesheet" type="text/css" href="/sfu.css"/>
<link rel="author" href="https://www.irif.fr/~jch/"/>
<!-- Font Awesome File -->
<link rel="stylesheet" type="text/css" href="/css/font-awesome.min.css">
</head>
<head>
<title>SFU</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' cdnjs.cloudflare.com; script-src 'self'; style-src 'self' cdnjs.cloudflare.com; font-src 'self'" />
<link rel="stylesheet" href="/common.css">
<link rel="stylesheet" href="/mainpage.css">
<!-- Font Awesome File -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="author" href="https://www.irif.fr/~jch/"/>
</head>
<body>
<h1>SFU</h1>
<div class="home">
<h1 id="title" class="navbar-brand">SFU</h1>
<form id="groupform">
<label for="group">Group:</label>
<input id="group" type="text" name="group"/>
<input type="submit" value="Join"/><br/>
<input id="group" type="text" name="group" class="form-control form-control-inline"/>
<input type="submit" value="Join" class="btn btn-default btn-large"/><br/>
</form>
<div id="public-groups" class="groups">
<h2>Public groups</h2>
<h2>Public groups <i class="fa fa-users" aria-hidden="true"></i></h2>
<table id="public-groups-table"></table>
</div>
<footer class="signature"><p><a href="https://www.irif.fr/~jch/software/sfu/">Unnamed SFU</a> by <a href="https://www.irif.fr/~jch/" rel="author">Juliusz Chroboczek</a></footer>
</div>
<footer class="signature">
<p><a href="https://www.irif.fr/~jch/software/sfu/">Unnamed SFU</a> by <a href="https://www.irif.fr/~jch/" rel="author">Juliusz Chroboczek</a>
</footer>
<script src="/mainpage.js" defer></script>
......
......@@ -6,3 +6,45 @@
}
.signature {
border-top: solid;
padding-top: 0em;
border-width: thin;
clear: both;
height: 50px;
text-align: center;
}
.navbar-brand {
margin-bottom: 80px;
}
.home {
height: calc(100vh - 50px);
padding: 30px;
}
#public-groups-table tr a{
margin-left: 15px;
font-weight: 700;
}
a {
text-decoration: none;
color: #0058e4;
}
a:hover {
color: #0a429c;
}
label {
display: block;
}
@media only screen and (max-device-width: 480px) {
.home {
padding: 10px;
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -2,53 +2,114 @@
<html lang="en">
<head>
<title>SFU</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="/common.css"/>
<link rel="stylesheet" type="text/css" href="/sfu.css"/>
<link rel="author" href="https://www.irif.fr/~jch/"/>
<!-- Font Awesome File -->
<link rel="stylesheet" type="text/css" href="/css/font-awesome.min.css">
</head>
<body>
<h1 id="title">SFU</h1>
<div id="main" class="app">
<div class="row full-height">
<nav id="left-sidebar">
<div class="users-header">
<div class="sfu-header">SFU</div>
</div>
<div class="header-sep"></div>
<div id="users"></div>
</nav>
<div class="container">
<header>
<nav class="topnav navbar navbar-expand navbar-light fixed-top">
<div id="header">
<div class="colapse" title="Colapse" id="sidebarCollapse">
<svg class="svg-inline--fa fa-align-left fa-w-14" aria-hidden="true" data-prefix="fas" data-icon="align-left" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-fa-i2svg="">
<path fill="currentColor" d="M288 44v40c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16V44c0-8.837 7.163-16 16-16h256c8.837 0 16 7.163 16 16zM0 172v40c0 8.837 7.163 16 16 16h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16zm16 312h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm256-200H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16h256c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16z"></path>
</svg>
</div>
<h1 id="title" class="header-title"></h1>
</div>
<ul class="nav-menu">
<li><button id="presentbutton" class="invisible btn btn-success"><i class="fa fa-video-camera" aria-hidden="true"></i><span class="nav-text"> Present</span></button></li>
<li><button id="unpresentbutton" class="invisible btn btn-cancel"><i class="fa fa-stop" aria-hidden="true"></i><span class="nav-text"> Stop presenting</span></button></li>
<li><button id="mutebutton" class="invisible btn btn-default">Mute</button></li>
<li><span id="sharebutton" class="invisible nav-link nav-button"><i class="fa fa-share-square-o" aria-hidden="true"></i></span></li>
<li><span id="unsharebutton" class="invisible nav-link nav-button nav-cancel"><i class="fa fa-window-close-o" aria-hidden="true"></i></span></li>
<li><span class="nav-button nav-link" id="user"><i class="fa fa-user dropbtn" aria-hidden="true"></i></span>
<div id="userDropdown" class="dropdown-content">
<div id="statdiv">
<span id="statspan"></span>
<span id="userspan"></span>
<form id="userform" class="userform">
<label for="username">Username:</label>
<input id="username" type="text" name="username"
autocomplete="username"/>
autocomplete="username" class="form-control"/>
<label for="password">Password:</label>
<input id="password" type="password" name="password"
autocomplete="current-password"/>
<input id="connectbutton" type="submit" value="Connect" disabled/>
autocomplete="current-password" class="form-control"/>
<div class="clear"></div>
<input id="connectbutton" type="submit" class="invisible btn btn-blue" value="Connect" disabled/>
</form>
<input id="disconnectbutton" class="invisible"
<div class="clear"></div>
<input id="disconnectbutton" class="invisible btn btn-warn"
type="submit" value="Disconnect"/>
<span id="errspan"></span>
</div>
</div>
</li>
<li><span class="nav-button nav-link" id="openside"><i class="fa fa-cog" aria-hidden="true"></i></span></li>
</ul>
</nav>
</header>
<div class="row full-width" id="mainrow">
<div class="coln-left">
<div id="chat">
<div id="chatbox">
<div id="box"></div>
<div class="reply">
<form id="inputform">
<textarea id="input" class="form-reply"></textarea>
<input id="inputbutton" type="submit" value="&#10148;" class="btn btn-default"/>
</form>
</div>
</div>
</div>
<div id="resizer">
</div>
</div>
<div class="coln-right">
<div class="video-container">
<div id="peers"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="optionsdiv">
<button id="presentbutton" class="invisible">Present</button>
<button id="unpresentbutton" class="invisible">Stop presenting</button>
<span id="mediaoptions">
<div id="sidebarnav" class="sidenav">
<div class="sidenav-header">
<a class="closebtn" id="clodeside"><i class="fa fa-times" aria-hidden="true"></i></a>
</div>
<div class="sidenav-content" id="optionsdiv">
<h2>Configurations</h2>
<div id="mediaoptions">
<label for="videoselect">Camera:</label>
<select id="videoselect">
<select id="videoselect" class="select select-inline">
<option>default</option>
<option>off</option>
</select>
<label for="audioselect">Microphone:</label>
<select id="audioselect">
<select id="audioselect" class="select select-inline">
<option>default</option>
<option>off</option>
</select>
<button id="mutebutton">Mute</button>
</span>
<button id="sharebutton" class="invisible">Share screen</button>
<button id="unsharebutton" class="invisible">Stop sharing</button>
</div>
<label for="sendselect">Send:</label>
<select id="sendselect">
......@@ -59,7 +120,7 @@
</select>
<label for="requestselect">Receive:</label>
<select id="requestselect">
<select id="requestselect" class="select select-inline">
<option value="audio">audio only</option>
<option value="screenshare">screen share</option>
<option value="everything" selected>everything</option>
......@@ -67,23 +128,6 @@
</div>
</div>
<div id="main">
<div id="users"></div>
<div id="chat">
<div id="chatbox">
<div id="box"></div>
<form id="inputform">
<textarea id="input"></textarea>
<input id="inputbutton" type="submit" value="&#10148;"/>
</form>
</div>
<div id="resizer">
</div>
</div>
<div id="peers"></div>
</div>
<script src="/protocol.js" defer></script>
<script src="/sfu.js" defer></script>
</body>
......
......@@ -52,6 +52,7 @@ function setConnected(connected) {
let statspan = document.getElementById('statspan');
let userform = document.getElementById('userform');
let disconnectbutton = document.getElementById('disconnectbutton');
let connectbutton = document.getElementById('connectbutton');
if(connected) {
clearError();
resetUsers();
......@@ -62,6 +63,7 @@ function setConnected(connected) {
userform.classList.add('invisible');
userform.classList.remove('userform');
disconnectbutton.classList.remove('invisible');
connectbutton.classList.add('invisible');
displayUsername();
} else {
resetUsers();
......@@ -76,6 +78,7 @@ function setConnected(connected) {
userform.classList.add('userform');
userform.classList.remove('invisible');
disconnectbutton.classList.add('invisible');
connectbutton.classList.remove('invisible');
clearUsername();
}
}
......@@ -759,8 +762,11 @@ function formatLines(lines) {
let lastMessage = {};
function addToChatbox(peerId, nick, kind, message){
let row = document.createElement('div');
row.classList.add('message-row');
let container = document.createElement('div');
container.classList.add('message');
row.appendChild(container);
if(kind !== 'me') {
let p = formatLines(message.split('\n'));
if (lastMessage.nick !== nick || lastMessage.peerId !== peerId) {
......@@ -794,7 +800,7 @@ function addToChatbox(peerId, nick, kind, message){
}
let box = document.getElementById('box');
box.appendChild(container);
box.appendChild(row);
if(box.scrollHeight > box.clientHeight) {
box.scrollTop = box.scrollHeight - box.clientHeight;
}
......@@ -1008,6 +1014,40 @@ document.getElementById('disconnectbutton').onclick = function(e) {
serverConnection.close();
};
function openNav() {
document.getElementById("sidebarnav").style.width = "250px";
}
function closeNav() {
document.getElementById("sidebarnav").style.width = "0";
}
document.getElementById('sidebarCollapse').onclick = function(e) {
document.getElementById("left-sidebar").classList.toggle("active");
document.getElementById("mainrow").classList.toggle("full-width-active");
};
document.getElementById('openside').onclick = function(e) {
e.preventDefault();
let sidewidth = document.getElementById("sidebarnav").style.width;
if (sidewidth !== "0px" && sidewidth !== "") {
closeNav();
return;
} else {
openNav();
}
};
document.getElementById('user').onclick = function(e) {
document.getElementById("userDropdown").classList.toggle("show");
};
document.getElementById('clodeside').onclick = function(e) {
e.preventDefault();
closeNav();
};
function serverConnect() {
serverConnection = new ServerConnection();
serverConnection.onconnected = gotConnected;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment