Added Twig templating engine for handling views; Removed some unneeded CoffeeScript files

This commit is contained in:
2022-05-24 18:41:43 -04:00
parent 15585bac29
commit cb622ebea0
11 changed files with 194 additions and 113 deletions

34
views/index.twig Normal file
View File

@ -0,0 +1,34 @@
{% extends 'layout.twig' %}
{% block content %}
<header class="row">
<div class="columns twelve u-text-center">
<h1>Archon LDAP Manager</h1>
</div>
</header>
<section id="connectionInfo" class="row">
<div class="columns twelve u-text-center">
<p>Connected to: <span id="ldapHost"></span></p>
</div>
</section>
<section id="userActions" class="row">
<div class="columns twelve">
<p><a href="user/create.html">Create new user</a></p>
</div>
</section>
<section id="ldapObjectTable" class="row">
<table>
<thead>
<tr>
<th>User ID</th>
<th>Display Name</th>
<th>Email Address</th>
</tr>
</thead>
<tbody id="ldapUserList"></tbody>
</table>
</section>
{% endblock %}

32
views/layout.twig Normal file
View File

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
<link rel="stylesheet" href="/styles/archon.css">
<title>Archon LDAP Manager</title>
<script src="/js/archon.js" charset="utf-8"></script>
{% block scripts %}{% endblock %}
</head>
<body>
<div class="container">
{% block content %}{% endblock %}
</div>
<footer id="footer">
<div class="container fluid">
<div class="row">
<div class="columns three"><p></p></div>
<div class="columns six">
<p class="no-margin">This app was built using:</p>
<p class="no-margin">
Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
</p>
</div>
</div>
</div>
</footer>
</body>
</html>