aboutsummaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorLMBishop <13875753+LMBishop@users.noreply.github.com>2021-12-20 14:48:04 +0000
committerLMBishop <13875753+LMBishop@users.noreply.github.com>2021-12-20 14:48:04 +0000
commit3f91a121b33151cd466de930d0e68bdf87f4d19e (patch)
tree62e9555661340d85537d8441da8cb92384d21180 /views
parent1a1f5a10fb60426dae868d2a73ed2cac46100f2b (diff)
Convert to typescript
Diffstat (limited to 'views')
-rw-r--r--views/error.ejs19
-rw-r--r--views/index.ejs18
-rw-r--r--views/page.ejs20
-rw-r--r--views/partials/header.ejs12
-rw-r--r--views/partials/navbar.ejs3
-rw-r--r--views/purge.ejs24
-rw-r--r--views/rebuild.ejs23
7 files changed, 119 insertions, 0 deletions
diff --git a/views/error.ejs b/views/error.ejs
new file mode 100644
index 0000000..88e1a27
--- /dev/null
+++ b/views/error.ejs
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Error: <%= code %></title>
+ <link rel="stylesheet" href="/css/globalstyles.css">
+</head>
+<body>
+ <div id="main-container">
+ <%- include('partials/header') %>
+ <div id="content-container">
+ <%- include('partials/navbar') %>
+ <div id="content">
+ <h1>An error occurred (<%= code %>)</h1>
+ <p>Go <a href="/">home</a>?</p>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/views/index.ejs b/views/index.ejs
new file mode 100644
index 0000000..f47b830
--- /dev/null
+++ b/views/index.ejs
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title><%= title %></title>
+ <link rel="stylesheet" href="/css/globalstyles.css">
+</head>
+<body>
+ <div id="main-container">
+ <%- include('partials/header') %>
+ <div id="content-container">
+ <%- include('partials/navbar') %>
+ <div id="content">
+ <%- page %>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/views/page.ejs b/views/page.ejs
new file mode 100644
index 0000000..41ee1e2
--- /dev/null
+++ b/views/page.ejs
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title><%= title %></title>
+ <link rel="stylesheet" href="/css/globalstyles.css">
+</head>
+<body>
+ <div id="main-container">
+ <%- include('partials/header') %>
+ <div id="content-container">
+ <%- include('partials/navbar') %>
+ <div id="content">
+ <%- content %>
+ <hr>
+ <span class=footer><a href="https://github.com/LMBishop/website">GitHub</a> | <a href="/<%= path %>.wiki">View raw</a> | Page built: <%= buildTime %> | <a href="/special/purge/<%= path %>">Purge this page</a></span>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/views/partials/header.ejs b/views/partials/header.ejs
new file mode 100644
index 0000000..bd11ce0
--- /dev/null
+++ b/views/partials/header.ejs
@@ -0,0 +1,12 @@
+<pre class="website-name">
+
+<!--
+██╗ ███╗ ███╗██████╗ ██╗███████╗██╗ ██╗ ██████╗ ██████╗
+██║ ████╗ ████║██╔══██╗██║██╔════╝██║ ██║██╔═══██╗██╔══██╗
+██║ ██╔████╔██║██████╔╝██║███████╗███████║██║ ██║██████╔╝
+██║ ██║╚██╔╝██║██╔══██╗██║╚════██║██╔══██║██║ ██║██╔═══╝
+███████╗██║ ╚═╝ ██║██████╔╝██║███████║██║ ██║╚██████╔╝██║
+╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝
+
+ -->
+</pre>
diff --git a/views/partials/navbar.ejs b/views/partials/navbar.ejs
new file mode 100644
index 0000000..ff0c84d
--- /dev/null
+++ b/views/partials/navbar.ejs
@@ -0,0 +1,3 @@
+<div id="navbar">
+ <%- navbar %>
+</div>
diff --git a/views/purge.ejs b/views/purge.ejs
new file mode 100644
index 0000000..04bae61
--- /dev/null
+++ b/views/purge.ejs
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Purge page</title>
+ <link rel="stylesheet" href="/css/globalstyles.css">
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js" ntegrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
+ <script src="/scripts/purge.js"></script>
+</head>
+<body>
+ <div id="main-container">
+ <%- include('partials/header') %>
+ <div id="content-container">
+ <%- include('partials/navbar') %>
+ <div id="content">
+ <h1>Purge page</h1>
+ <span id="response"></span>
+ <p>Are you sure you wish to purge the page <span class="highlight"><%= page %></span>?</p>
+ <p>The last build time for this page was <span class="highlight"><%= buildTime %></span> (<span class="highlight"><%= buildTimeRelative %></span> minutes ago).</p>
+ <button id="confirm" data-page="<%= page %>">Confirm</button>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/views/rebuild.ejs b/views/rebuild.ejs
new file mode 100644
index 0000000..9f9cfaa
--- /dev/null
+++ b/views/rebuild.ejs
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Rebuild</title>
+ <link rel="stylesheet" href="/css/globalstyles.css">
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js" ntegrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
+ <script src="/scripts/rebuild.js"></script>
+</head>
+<body>
+ <div id="main-container">
+ <%- include('partials/header') %>
+ <div id="content-container">
+ <%- include('partials/navbar') %>
+ <div id="content">
+ <h1>Rebuild</h1>
+ <span id="response"></span>
+ <p>Are you sure you wish to rebuild the page directory?</p>
+ <button id="confirm">Confirm</button>
+ </div>
+ </div>
+ </div>
+</body>
+</html>