diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/error.ejs | 19 | ||||
| -rw-r--r-- | views/index.ejs | 18 | ||||
| -rw-r--r-- | views/page.ejs | 20 | ||||
| -rw-r--r-- | views/partials/header.ejs | 12 | ||||
| -rw-r--r-- | views/partials/navbar.ejs | 3 | ||||
| -rw-r--r-- | views/purge.ejs | 24 | ||||
| -rw-r--r-- | views/rebuild.ejs | 23 |
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> |
