Commit 5b49e661 authored by Corentin Mors's avatar Corentin Mors
Browse files

Add layout + index template

parent eba5f0b3
[Dolphin]
Timestamp=2018,12,21,19,10,41
Version=4
ViewMode=1
var express = require('express');
exports.home = function(req, res, next) {
res.render('index');
}
exports.room = function(req, res, next) {
res.render('room');
}
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OnMap - Location Sharing</title>
<link rel="stylesheet" href="/assets/style.css">
<!-- OpenLayer CSS -->
<link href="/assets/openlayer.min.css" rel="stylesheet">
</head>
<body>
{% extends '_layout.html' %}
{% block content %}
<div class="container-main">
<div id="map" class="map"></div>
......@@ -41,9 +32,4 @@
</ul>
</div>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="assets/openlayer.min.js"></script>
<script src="assets/main.js"></script>
</body>
</html>
\ No newline at end of file
{% endblock %}
\ No newline at end of file
......@@ -3,8 +3,11 @@ var express = require('express'),
indexController = require('../controllers');
router.route('/room')
.get(indexController.room);
router.route('/')
.get(indexController.home);
router.route('/room')
.get(indexController.room);
module.exports = router
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OnMap - Location Sharing</title>
<link rel="stylesheet" href="/assets/style.css">
<!-- OpenLayer CSS -->
<link href="/assets/openlayer.min.css" rel="stylesheet">
</head>
<body>
{% block content %}
{% endblock %}
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="assets/openlayer.min.js"></script>
<script src="assets/main.js"></script>
</body>
</html>
\ No newline at end of file
{% extends '_layout.html' %}
{% block content %}
<div class="container">
<form method="POST" action="/room">
<label for="room-name">Room:</label>
<input id="room-name" type="text" name="room">
<label for="room-name">Username:</label>
<input id="user-name" type="text" name="username">
</form>
</div>
{% endblock %}
\ No newline at end of file
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