hubl/index.php

75 lines
2.5 KiB
PHP
Raw Normal View History

2018-04-19 16:24:42 +00:00
<?php
// Some useful variables
$v = rand();// Used to avoid abusive caching by the browser
2018-05-01 04:18:20 +00:00
require_once("config.php");// Use "config-sample.php" to create your own
2018-04-19 16:24:42 +00:00
?>
2018-03-11 23:42:46 +00:00
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Happy Dev App</title>
2018-05-01 04:18:20 +00:00
<?php
// Prod/Dev setup
2018-05-16 06:08:38 +00:00
if (in_array($dn, array('https://app.happy-dev.fr', 'https://staging-app.happy-dev.fr'))) {
2018-05-01 04:18:20 +00:00
require_once("src/html/dependencies-prod.php");
} else {
require_once("src/html/dependencies-dev.php");
}
?>
2018-03-11 23:42:46 +00:00
</head>
<body>
2018-03-18 14:18:29 +00:00
<?php require_once('src/html/menu.html'); ?>
2018-03-18 15:29:31 +00:00
<main id="mainContainer" class="container-fluid">
2018-04-22 06:47:18 +00:00
<?php require_once('src/html/dashboard.html'); ?>
2018-03-18 15:29:31 +00:00
<?php require_once('src/html/members.html'); ?>
<?php require_once('src/html/member.php'); ?>
<?php require_once('src/html/projects.html'); ?>
2018-07-11 21:37:22 +00:00
<?php require_once('src/html/project.php'); ?>
<?php require_once('src/html/client-creation.html'); ?>
2018-04-26 16:48:53 +00:00
<?php require_once('src/html/channels.html'); ?>
2018-07-12 13:18:39 +00:00
<?php require_once('src/html/channel.php'); ?>
2018-05-13 03:06:10 +00:00
<?php require_once('src/html/search.html'); ?>
2018-03-18 15:29:31 +00:00
</main>
<sib-chat
id="chat-singleton"
data-authentication="login"
data-auto-login="true"
data-bosh-service-url="https://jabber.happy-dev.fr/http-bind/"
data-debug="false"
data-locales-url="en"
bind-resources
></sib-chat>
<script>
// Move the chat singleton to the right view on "page load"
window.onload = function() {
if (window.location.pathname.indexOf("-chat") !== -1) {
var chatSingleton = document.querySelector("#chat-singleton");
var pathnameParts = window.location.pathname.split("/");
var viewName = pathnameParts[pathnameParts.length - 1];
var view = document.getElementById(viewName);
view.appendChild(chatSingleton);
chatSingleton.dataset.src = view.dataset.src;
}
}
// Move the chat singleton to the right view on "navigate"
window.addEventListener('navigate', event => {
var chatSingleton = document.querySelector("#chat-singleton");
var view = document.getElementById(event.detail.route);
view.querySelector(".chat-view").appendChild(chatSingleton);
chatSingleton.dataset.src = view.dataset.src;
});
</script>
2018-03-17 17:34:32 +00:00
</body>
</html>