Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
glider-frank/test-place.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
141 lines (89 sloc)
3.19 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title>Grid Layout Example</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="manifest" href="site.webmanifest"> | |
<link rel="apple-touch-icon" href="icon.png"> | |
<!-- Place favicon.ico in the root directory --> | |
<link rel="stylesheet" href="css/normalize.css"> | |
<link rel="stylesheet" href="css/main.css"> | |
</head> | |
<body> | |
<FlightPlan> | |
<phase> | |
<display part="1" place="1"></display> | |
<display part="2" place="2"></display> | |
<display part="99" place="3"></display> | |
</phase> | |
<phase> | |
<display part="8" place="1"></display> | |
<display part="3" place="2"></display> | |
</phase> | |
<phase> | |
<display part="4" place="2"></display> | |
<display part="5" place="1"></display> | |
</phase> | |
<phase> | |
<display part="7" place="2"></display> | |
</phase> | |
</FlightPlan> | |
<div class="central-layout display-wall-4x3"> | |
</div> | |
<div class="place-3-holder"> | |
</div> | |
<script src="js/vendor/modernizr-3.6.0.min.js"></script> | |
<script src="js/plugins.js"></script> | |
<script src="https://www.gstatic.com/firebasejs/4.3.1/firebase.js"></script> | |
<script src="https://www.gstatic.com/firebasejs/5.0.4/firebase.js"></script> | |
<script> | |
// Initialize Firebase | |
var config = { | |
apiKey: "AIzaSyDiG79nyWATW1tcjLsD2YY2Zr5z8qW7ZyU", | |
authDomain: "glider-flightplan-example.firebaseapp.com", | |
databaseURL: "https://glider-flightplan-example.firebaseio.com", | |
projectId: "glider-flightplan-example", | |
storageBucket: "glider-flightplan-example.appspot.com", | |
messagingSenderId: "201089278480" | |
}; | |
firebase.initializeApp(config); | |
const currentPhase = firebase.database().ref().child('currentPhase'); | |
currentPhase.on('value', function(snapshot) { | |
myphase = snapshot.val(); | |
console.log(myphase); | |
}); | |
const activePairs = firebase.database().ref().child('activePairs'); | |
activePairs.on('value', function(snapshot) { | |
mypairs = snapshot.val(); | |
console.log(mypairs); | |
}); | |
</script> | |
<script src="js/Place.js"></script> | |
<script src="js/FlightPlan.js"></script> | |
<script src="js/main.js"></script> | |
<script> | |
let customPlace = getRequestParam("place"); | |
let places = []; | |
if (customPlace == undefined) { | |
// TODO: messy, but if current client is a custom place | |
// (i.e., not the central presentation), we don't need to render all the places | |
let centralLayout = document.querySelector(".central-layout"); | |
let place1 = new Place(1, centralLayout, true, "screen", 1, 1, 2, 2); | |
place1.activate(); | |
let place2 = new Place(2, centralLayout, true, "screen", 3, 1, 1, 2); | |
place2.activate(); | |
places.push(place1); | |
places.push(place2); | |
} else { | |
let parent = document.querySelector(".place-3-holder"); | |
let place3 = new Place(customPlace, parent, false, null, null, null, null, null) | |
place3.activate(); | |
places.push(place3); | |
} | |
const flightPlan = new FlightPlan(places); | |
</script> | |
</body> | |
</html> |