big refactor of url

This commit is contained in:
ian ramzy 2020-03-26 16:44:58 -04:00
parent d80e62a380
commit da3ba0ddd2
48 changed files with 283 additions and 231 deletions

View File

@ -3,10 +3,10 @@
<head>
<meta charset="UTF-8"/>
<title>Neon Chat</title>
<link rel="shortcut icon" href="landing/images/logo.svg">
<link rel="stylesheet" href="chat.css">
<link rel="shortcut icon" href="images/logo.svg">
<link rel="stylesheet" href="../css/chat.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="snackbar.js"></script>
<script src="js/snackbar.js"></script>
<meta property="og:title" content="Neonchat - Decentralized video calls">
<meta property="og:description" content="Decentralized video
calling provides real-time HD quality and latency simply
@ -25,7 +25,7 @@
<div class="buttons" id="buttons">
<div class="center">
<a href="/landing" class="round-button">Back</a>
<a href="/" class="round-button">Back</a>
<a class="round-button" onclick="{openFullscreen()}">Fullscreen</a>
<a class="round-button" onclick="{muteMicrophone()}" id="muteButton">Mute </a>
<!-- <a class="round-button" onclick="{pauseVideo()}" id="videoPauseButton">Pause </a>-->
@ -34,6 +34,6 @@
<script src="/socket.io/socket.io.js"></script>
<script src="/chat.js"></script>
<script src="../js/chat.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 718 B

After

Width:  |  Height:  |  Size: 718 B

View File

Before

Width:  |  Height:  |  Size: 840 B

After

Width:  |  Height:  |  Size: 840 B

View File

Before

Width:  |  Height:  |  Size: 854 B

After

Width:  |  Height:  |  Size: 854 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 860 B

After

Width:  |  Height:  |  Size: 860 B

View File

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 215 KiB

View File

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 215 KiB

View File

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 187 KiB

View File

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 183 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,7 +1,9 @@
if (window.location.pathname === "/") {
if (window.location.pathname === "/room") {
window.location.href = "/landing/newroom";
}
const roomHash = window.location.pathname;
url = window.location.href;
const roomHash = url.substring(url.lastIndexOf('/') + 1);
var isWebRTCSupported =
@ -20,7 +22,7 @@ var isWebRTCSupported =
if (!isWebRTCSupported) {
alert("Your browser doesn't support Neon Chat. Please use Chrome or Firefox.");
window.location.href = "/landing";
window.location.href = "/";
}
@ -95,7 +97,7 @@ var VideoChat = {
chatRoomFull: function () {
alert("Chat room is full. Check to make sure you don't have multiple open tabs, or try with a new room link");
window.location.href = "/landing/newroom";
window.location.href = "/newroom";
},
// When we are ready to call, enable the Call button.
@ -314,7 +316,7 @@ Snackbar.show({
pos: 'top-left',
actionTextColor: '#8688ff',
duration: 50000,
backgroundColor :'#292B32',
backgroundColor: '#292B32',
onActionClick: function (element) {
var copyContent = window.location.href;
$('<input id="some-element">').val(copyContent).appendTo('body').select();

196
public/js/landing.js Executable file
View File

@ -0,0 +1,196 @@
!function () {
"use strict";
const e = document.getElementsByClassName("accordion-header");
function t(e, t) {
e.classList.add("is-active"), t.style.maxHeight = t.scrollHeight + "px"
}
function n(e, t) {
e.classList.remove("is-active"), t.style.maxHeight = null
}
if (e.length > 0) for (let i = 0; i < e.length; i++) {
const s = e[i], a = s.parentNode, l = s.nextElementSibling;
a.classList.contains("is-active") && t(a, l), s.addEventListener("click", function () {
a.classList.contains("is-active") ? n(a, l) : t(a, l)
})
}
}(), function () {
"use strict";
let e = {
touchStartX: 0, touchEndX: 0, minSwipePixels: 30, detectionZone: void 0, swipeCallback: function () {
}, init: function (t, n) {
e.swipeCallback = n, t.addEventListener("touchstart", function (t) {
e.touchStartX = t.changedTouches[0].screenX
}, !1), t.addEventListener("touchend", function (t) {
e.touchEndX = t.changedTouches[0].screenX, e.handleSwipeGesture()
}, !1)
}, handleSwipeGesture: function () {
let t, n;
e.touchEndX <= e.touchStartX && (n = e.touchStartX - e.touchEndX, t = "left"), e.touchEndX >= e.touchStartX && (n = e.touchEndX - e.touchStartX, t = "right"), n > e.minSwipePixels && "undefined" !== t && e.swipe(t, n)
}, swipe: function (t, n) {
let i = {};
i.direction = t, i.movedPixels = n, e.swipeCallback(i)
}
};
const t = document.getElementsByClassName("carousel-items");
function n(e, t) {
void 0 === t && (t = "next");
let n = e.getElementsByClassName("carousel-item is-active")[0],
i = "next" === t ? n.nextElementSibling : n.previousElementSibling, s = n.getAttribute("data-carousel"),
a = e.parentNode.getElementsByClassName("carousel-bullet")[s],
l = "next" === t ? a.nextElementSibling : a.previousElementSibling;
n.classList.remove("is-active"), a.classList.remove("is-active"), i ? (i.classList.add("is-active"), l.classList.add("is-active")) : "next" === t ? (e.firstElementChild.classList.add("is-active"), e.parentNode.getElementsByClassName("carousel-bullets")[0].firstElementChild.classList.add("is-active")) : (e.lastElementChild.classList.add("is-active"), e.parentNode.getElementsByClassName("carousel-bullets")[0].lastElementChild.classList.add("is-active"))
}
function i(e, t) {
let n, i = 0;
for (let e = 0; e < t.length; e++) t[0].parentNode.style.minHeight = i + "px", t[e].classList.add("is-loading"), n = t[e].offsetHeight, t[e].classList.remove("is-loading"), n > i && (i = n);
t[0].parentNode.style.minHeight = i + "px"
}
function s(e) {
e && clearInterval(e)
}
if (t.length > 0) for (let a = 0; a < t.length; a++) {
let l = t[a], c = l.getElementsByClassName("carousel-item"), o = 0, r = l.getAttribute("data-autorotate");
const d = document.createElement("div");
d.className = "carousel-bullets", l.parentNode.insertBefore(d, l.nextSibling);
for (let e = 0; e < c.length; e++) {
c[e].setAttribute("data-carousel", e), c[e].classList.contains("is-active") && (o = e);
let t = document.createElement("button");
t.className = "carousel-bullet", t.setAttribute("data-bullet", e), l.parentNode.getElementsByClassName("carousel-bullets")[0].appendChild(t)
}
c[o].classList.add("is-active");
let u = l.parentNode.getElementsByClassName("carousel-bullet");
u[o].classList.add("is-active"), i(0, c), window.addEventListener("resize", function () {
i(0, c)
});
let m = !1;
r && (m = setInterval(function () {
n(l, "next")
}, r));
for (let e = 0; e < u.length; e++) {
let t = u[e];
t.addEventListener("click", function (e) {
if (e.preventDefault(), t.classList.contains("is-active")) return;
for (let e = 0; e < u.length; e++) u[e].classList.remove("is-active");
for (let e = 0; e < c.length; e++) c[e].classList.remove("is-active");
let n = this.getAttribute("data-bullet");
c[n].classList.add("is-active"), this.classList.add("is-active"), s(m)
})
}
e.init(l, function (e) {
"left" === e.direction ? n(l, "next") : "right" === e.direction && n(l, "prev"), s(m)
})
}
}(), function () {
"use strict";
document.documentElement.classList.remove("no-js"), document.documentElement.classList.add("js"), window.addEventListener("load", function () {
document.body.classList.add("is-loaded")
})
}(), function () {
"use strict";
const e = document.getElementById("header-nav-toggle"), t = document.getElementById("header-nav");
e && (e.addEventListener("click", function () {
document.body.classList.toggle("off-nav-is-active"), t.classList.toggle("is-active"), t.style.maxHeight ? t.style.maxHeight = null : t.style.maxHeight = t.scrollHeight + "px", "true" === this.getAttribute("aria-expanded") ? this.setAttribute("aria-expanded", "false") : this.setAttribute("aria-expanded", "true")
}), document.addEventListener("click", function (n) {
n.target === t || n.target === e || t.contains(n.target) || (document.body.classList.remove("off-nav-is-active"), t.classList.remove("is-active"), t.style.maxHeight = null, e.setAttribute("aria-expanded", "false"))
}))
}(), function () {
"use strict";
const e = document.getElementsByClassName("modal"), t = document.getElementsByClassName("modal-trigger");
function n() {
document.body.classList.remove("modal-is-active");
for (let t = 0; t < e.length; t++) e[t].classList.remove("is-active")
}
if (e.length > 0 && t.length > 0) for (let e = 0; e < t.length; e++) {
let n = t[e], i = document.getElementById(n.getAttribute("aria-controls"));
i && (n.hasAttribute("data-video") && (null !== i.querySelector("iframe") ? i.querySelector("iframe").setAttribute("src", n.getAttribute("data-video")) : null !== i.querySelector("video") && i.querySelector("video").setAttribute("src", n.getAttribute("data-video"))), n.addEventListener("click", function (e) {
var t;
e.preventDefault(), n.hasAttribute("aria-controls") && (t = i) && (document.body.classList.add("modal-is-active"), t.classList.add("is-active"))
}))
}
document.addEventListener("click", function (e) {
(e.target.classList.contains("modal") || e.target.classList.contains("modal-close-trigger")) && (e.preventDefault(), n())
}), document.addEventListener("keydown", function (e) {
27 === (e || window.event).keyCode && n()
})
}(), function () {
"use strict";
const e = document.getElementById("pricing-toggle");
function t() {
const t = document.getElementsByClassName("pricing-switchable");
if (e.checked) for (let e = 0; e < t.length; e++) t[e].innerHTML = t[e].getAttribute("data-pricing-yearly"); else for (let e = 0; e < t.length; e++) t[e].innerHTML = t[e].getAttribute("data-pricing-monthly")
}
e && (window.addEventListener("load", t), e.addEventListener("change", t))
}(), function () {
"use strict";
const e = document.querySelectorAll("[class*=reveal-]");
let t = window.innerHeight;
function n(e, t) {
var n = 0;
return function () {
var i = (new Date).getTime();
if (!(i - n < e)) return n = i, t.apply(void 0, arguments)
}
}
function i() {
for (let i = 0; i < e.length; i++) {
let s = e[i], a = s.getAttribute("data-reveal-delay"),
l = s.getAttribute("data-reveal-offset") ? s.getAttribute("data-reveal-offset") : "200",
c = s.getAttribute("data-reveal-container") ? s.closest(s.getAttribute("data-reveal-container")) : s;
n = l, c.getBoundingClientRect().top <= t - n && !s.classList.contains("is-revealed") && (a && 0 !== a ? setTimeout(function () {
s.classList.add("is-revealed")
}, a) : s.classList.add("is-revealed"))
}
var n;
!function () {
if (e.length > document.querySelectorAll("[class*=reveal-].is-revealed").length) return;
window.removeEventListener("load", i), window.removeEventListener("scroll", s), window.removeEventListener("resize", a)
}()
}
function s() {
n(30, i())
}
function a() {
t = window.innerHeight, n(30, i())
}
e.length > 0 && document.body.classList.contains("has-animations") && (window.addEventListener("load", i), window.addEventListener("scroll", s), window.addEventListener("resize", a))
}(), function () {
"use strict";
const e = document.getElementsByClassName("smooth-scroll"), t = (e, n, i, s, a) => {
const l = n - e;
let c = l / i;
const o = function (e) {
return e < .5 ? 2 * e * e : (4 - 2 * e) * e - 1
}(c = Math.min(c, 1));
window.scroll(0, a + s * o), l < i && window.requestAnimationFrame(n => {
const l = n || (new Date).getTime();
t(e, l, i, s, a)
})
};
if (e.length > 0) for (let n = 0; n < e.length; n++) {
e[n].addEventListener("click", function (e) {
e.preventDefault();
const n = e.target.closest(".smooth-scroll"), i = n.href.split("#")[1], s = document.getElementById(i),
a = n.getAttribute("data-duration") || 1e3;
s && window.requestAnimationFrame(e => {
const n = e || (new Date).getTime(), i = n, l = window.pageYOffset, c = s.getBoundingClientRect().top;
t(i, n, a, c, l)
})
})
}
}();

10
public/js/newroom.js Normal file
View File

@ -0,0 +1,10 @@
var adjectives = ["small", "big", "large", "smelly", "new", "happy", "shiny", "old", "clean", "nice", "bad", "cool",
"hot", "cold", "warm", "hungry", "slow", "fast", "red", "white", "black", "blue", "green"];
var nouns = ["dog", "bat", "wrench", "apple", "pear", "ghost", "cat", "wolf", "squid", "goat", "snail", "hat",
"sock", "plum", "bear", "snake", "turtle", "horse", "spoon", "fork", "spider", "tree", "chair", "table",
"couch", "towel", "panda", "bread", "grape","cake","brick", "rat", "mouse"];
var adjective = adjectives[Math.floor(Math.random() * adjectives.length)];
var noun = nouns[Math.floor(Math.random() * nouns.length)];
noun = noun.charAt(0).toUpperCase() + noun.substring(1);
adjective = adjective.charAt(0).toUpperCase() + adjective.substring(1);
document.getElementById('input-01').value = adjective + noun;

View File

@ -5,49 +5,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Neon Chat</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/landing.css">
<link rel="shortcut icon" href="images/logo.svg">
<meta property="og:title" content="Neonchat - Decentralized video calls">
<meta property="og:description" content="Decentralized video
calling provides real-time HD quality and latency simply
not available with traditional technology.">
<meta property="og:image" content="https://neonchat.io/public/landing/preview.png">
<meta property="og:url" content="https://neonchat.io/landing">
<style>
.pulse {
box-shadow: 0 0 0 rgba(120, 120, 120, 0.4);
animation: pulse 4s infinite;
}
.pulse:hover {
animation: none;
}
@-webkit-keyframes pulse {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(120, 120, 120, 0.4);
}
70% {
-webkit-box-shadow: 0 0 0 15px rgba(120, 120, 120, 0);
}
100% {
-webkit-box-shadow: 0 0 0 0 rgba(120, 120, 120, 0);
}
}
@keyframes pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(120, 120, 120, 0.4);
box-shadow: 0 0 0 0 rgba(120, 120, 120, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 10px rgba(120, 120, 120, 0);
box-shadow: 0 0 0 15px rgba(120, 120, 120, 0);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(120, 120, 120, 0);
box-shadow: 0 0 0 0 rgba(120, 120, 120, 0);
}
}
</style>
<meta property="og:image" content="https://neonchat.io/images/preview.png">
<meta property="og:url" content="https://neonchat.io/">
</head>
<body class="has-animations">
<div class="body-wrap">
@ -55,24 +20,14 @@
<div class="container">
<div class="site-header-inner">
<div class="brand">
<h1 class="m-0"><a href="/landing"><img src="images/logo.svg" alt="Neon"
width="32"
height="32"></a>
<h1 class="m-0"><a href="/"><img src="images/logo.svg" alt="Neon"
width="32"
height="32"></a>
</h1>
</div>
<button id="header-nav-toggle" class="header-nav-toggle" aria-controls="primary-menu"
aria-expanded="false"><span class="screen-reader">Menu</span> <span class="hamburger"><span
class="hamburger-inner"></span></span></button>
<!-- <nav id="header-nav" class="header-nav">-->
<!-- <div class="header-nav-inner">-->
<!-- <ul class="list-reset text-xxs header-nav-right">-->
<!-- <li><a href="additional.html">Secondary page</a></li>-->
<!-- </ul>-->
<!-- <ul class="list-reset header-nav-right">-->
<!-- <li><a class="button button-primary button-sm" href="signup.html">Sign up</a></li>-->
<!-- </ul>-->
<!-- </div>-->
<!-- </nav>-->
</div>
</div>
</header>
@ -83,7 +38,8 @@
<div class="split-wrap invert-mobile">
<div class="split-item">
<div class="hero-content split-item-content center-content-mobile"><h1
class="mt-0 mb-16 reveal-from-bottom" data-reveal-delay="150">Neon Chat.<br>The most advanced
class="mt-0 mb-16 reveal-from-bottom" data-reveal-delay="150">Neon Chat.<br>The most
advanced
video chat ever created.</h1>
<p class="mt-0 mb-32 reveal-from-bottom" data-reveal-delay="300">Decentralized video
calling provides real-time HD quality and latency simply
@ -91,7 +47,7 @@
<div class="reveal-from-bottom" data-reveal-delay="450"><a
class="button button-primary button-wide-mobile pulse"
style="border:0; background: linear-gradient(100deg, #376DF9 0, #FF5FA0 75%, #FFC55A 100%);"
href="/landing/newroom">Try now</a>
href="/newroom">Try now</a>
</div>
</div>
<style>@media (min-width: 641px) {
@ -256,7 +212,7 @@
<div class="center-content">
<a class="button button-primary button-wide-mobile pulse"
style="border:0; background: linear-gradient(100deg, #376DF9 0, #FF5FA0 75%, #FFC55A 100%);"
href="/landing/newroom">Try now</a>
href="/newroom">Try now</a>
</div>
</div>
</div>
@ -339,8 +295,8 @@
<div class="container">
<div class="site-footer-inner">
<div class="footer-top space-between text-xxs">
<div class="brand"><a href="/landing"><img src="images/logo.svg" alt="Neon" width="32"
height="32"></a>
<div class="brand">
<a href="/"><img src="images/logo.svg" alt="Neon" width="32" height="32"></a>
</div>
<!-- <div class="footer-social">-->
<!-- <ul class="list-reset">-->
@ -385,6 +341,6 @@
</div>
</footer>
</div>
<script src="js/main.min.js"></script>
<script src="js/landing.js"></script>
</body>
</html>

View File

@ -1,9 +0,0 @@
;(function () {
'use strict'
document.documentElement.classList.remove('no-js')
document.documentElement.classList.add('js')
window.addEventListener('load', function () {
document.body.classList.add('is-loaded')
})
}())

File diff suppressed because one or more lines are too long

View File

@ -1,62 +0,0 @@
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Neon Template</title>
<link rel="stylesheet" href="../css/style.css">
</head>
<body>
<div class="body-wrap">
<header class="site-header">
<div class="container">
<div class="site-header-inner">
<div class="brand"><h1 class="m-0"><a href="../landing.html"><img src="../images/logo.svg" alt="Neon" width="32"
height="32"></a></h1></div>
</div>
</div>
</header>
<main class="site-content">
<section class="signin section illustration-section-01">
<div class="container-xs">
<div class="signin-inner section-inner">
<div class="section-header center-content"><h1 class="m-0">Welcome back. We exist to make
entrepreneurship easier.</h1></div>
<div class="tiles-wrap">
<div class="tiles-item">
<div class="tiles-item-inner">
<form>
<fieldset>
<div class="mb-12"><label class="form-label screen-reader"
for="email">Email</label> <input id="email"
class="form-input"
type="email"
placeholder="Email"
required></div>
<div class="mb-12"><label class="form-label screen-reader" for="password">Password</label>
<input id="password" class="form-input" type="password"
placeholder="Password" required></div>
<div class="mt-24 mb-32">
<button class="button button-primary button-block">Sign in</button>
</div>
<div class="signin-footer mb-32"><label class="form-checkbox"><input
type="checkbox" id="remember">Remember me</label> <a
class="func-link text-xs" href="#">Forgot password?</a></div>
</fieldset>
</form>
<div class="signin-bottom has-top-divider">
<div class="pt-32 text-xs center-content text-color-low">Don't you have an account?
<a class="func-link" href="signup.html">Sign up</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
</div>
<script src="../js/main.min.js"></script>
</body>
</html>

View File

@ -1,62 +0,0 @@
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Neon Template</title>
<link rel="stylesheet" href="../css/style.css">
</head>
<body>
<div class="body-wrap">
<header class="site-header">
<div class="container">
<div class="site-header-inner">
<div class="brand"><h1 class="m-0"><a href="../landing.html"><img src="../images/logo.svg" alt="Neon" width="32"
height="32"></a></h1></div>
</div>
</div>
</header>
<main class="site-content">
<section class="signin section illustration-section-01">
<div class="container-xs">
<div class="signin-inner section-inner">
<div class="section-header center-content"><h1 class="m-0">Welcome. We exist to make
entrepreneurship easier.</h1></div>
<div class="tiles-wrap">
<div class="tiles-item">
<div class="tiles-item-inner">
<form>
<fieldset>
<div class="mb-12"><label class="form-label screen-reader" for="name">Full
name</label> <input id="name" class="form-input" type="name"
placeholder="Full name" required></div>
<div class="mb-12"><label class="form-label screen-reader"
for="email">Email</label> <input id="email"
class="form-input"
type="email"
placeholder="Email"
required></div>
<div class="mb-12"><label class="form-label screen-reader" for="password">Password</label>
<input id="password" class="form-input" type="password"
placeholder="Password" required></div>
<div class="mt-24 mb-32">
<button class="button button-primary button-block">Sign up</button>
</div>
</fieldset>
</form>
<div class="signin-bottom has-top-divider">
<div class="pt-32 text-xs center-content text-color-low">Already have an account? <a
class="func-link" href="login.html">Login</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
</div>
<script src="../js/main.min.js"></script>
</body>
</html>

View File

@ -5,14 +5,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Neon Chat</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/landing.css">
<link rel="shortcut icon" href="images/logo.svg">
<meta property="og:title" content="Neonchat - Decentralized video calls">
<meta property="og:description" content="Decentralized video
calling provides real-time HD quality and latency simply
not available with traditional technology.">
<meta property="og:image" content="https://neonchat.io/public/landing/preview.png">
<meta property="og:url" content="https://neonchat.io/landing">
<meta property="og:image" content="https://neonchat.io/images/review.png">
<meta property="og:url" content="https://neonchat.io/">
<style>
.pulse {
box-shadow: 0 0 0 rgba(120, 120, 120, 0.4);
@ -56,7 +56,7 @@
<header class="site-header reveal-from-top">
<div class="container">
<div class="site-header-inner">
<div class="brand"><h1 class="m-0"><a href="/landing"><img src="images/logo.svg" alt="Neon"
<div class="brand"><h1 class="m-0"><a href="/"><img src="images/logo.svg" alt="Neon"
width="32"
height="32"></a></h1></div>
<button id="header-nav-toggle" class="header-nav-toggle" aria-controls="primary-menu"
@ -101,7 +101,7 @@
<div class="form-group-desktop">
<input class="form-input" type="text" id="input-01" value="PurpleSquid">
<button class="button button-primary pulse"
onclick="{window.location.href = '/' + document.getElementById('input-01').value}">
onclick="{window.location.href = '/room/' + document.getElementById('input-01').value}">
Go To My Room
</button>
</div>
@ -117,8 +117,8 @@
<div class="container">
<div class="site-footer-inner">
<div class="footer-top space-between text-xxs">
<div class="brand"><a href="/landing"><img src="images/logo.svg" alt="Neon" width="32"
height="32"></a>
<div class="brand">
<a href="/"><img src="images/logo.svg" alt="Neon" width="32" height="32"></a>
</div>
</div>
<div class="footer-bottom space-between text-xxs invert-order-desktop">
@ -133,18 +133,7 @@
</div>
</footer>
</div>
<script src="js/main.min.js"></script>
<script>
var adjectives = ["small", "big", "large", "smelly", "new", "happy", "shiny", "old", "clean", "nice", "bad", "cool",
"hot", "cold", "warm", "hungry", "slow", "fast", "red", "white", "black", "blue", "green"];
var nouns = ["dog", "bat", "wrench", "apple", "pear", "ghost", "cat", "wolf", "squid", "goat", "snail", "hat",
"sock", "plum", "bear", "snake", "turtle", "horse", "spoon", "fork", "spider", "tree", "chair", "table",
"couch", "towel", "panda", "bread", "grape","cake","brick", "rat", "mouse"];
var adjective = adjectives[Math.floor(Math.random() * adjectives.length)];
var noun = nouns[Math.floor(Math.random() * nouns.length)];
noun = noun.charAt(0).toUpperCase() + noun.substring(1);
adjective = adjective.charAt(0).toUpperCase() + adjective.substring(1);
document.getElementById('input-01').value = adjective + noun;
</script>
<script src="js/landing.js"></script>
<script src="js/newroom.js"></script>
</body>
</html>

View File

@ -10,25 +10,22 @@ var public = path.join(__dirname, 'public');
// enable ssl redirect
app.use(sslRedirect());
app.use(express.static('public'));
app.get('/landing/newroom', function (req, res) {
res.sendFile(path.join(public, 'landing/newroom.html'));
});
app.get('/landing', function (req, res) {
res.sendFile(path.join(public, 'landing/landing.html'));
app.get('/', function (req, res) {
res.sendFile(path.join(public, 'landing.html'));
});
app.get('/newroom', function (req, res) {
res.sendFile(path.join(public, 'landing/newroom.html'));
res.sendFile(path.join(public, 'newroom.html'));
});
app.get('/*', function (req, res) {
app.get('/room/*', function (req, res) {
res.sendFile(path.join(public, 'chat.html'));
});
app.use(express.static('public'));
function log(msg, room) {
console.log(room + ": " + msg)