diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/page.ejs | 2 | ||||
| -rw-r--r-- | views/pageinfo.ejs | 83 | ||||
| -rw-r--r-- | views/purge.ejs | 2 |
3 files changed, 86 insertions, 1 deletions
diff --git a/views/page.ejs b/views/page.ejs index 41ee1e2..2bd4262 100644 --- a/views/page.ejs +++ b/views/page.ejs @@ -12,7 +12,7 @@ <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> + <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/info/<%= path %>">Page info</a></span> </div> </div> </div> diff --git a/views/pageinfo.ejs b/views/pageinfo.ejs new file mode 100644 index 0000000..c0ba59d --- /dev/null +++ b/views/pageinfo.ejs @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page information for <%= standardName %></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>Information for page <%= standardName %></h1> + <table> + <tr> + <td>Standard name</td> + <td><%= standardName %></td> + </tr> + <tr> + <td>Display title</td> + <td><%= displayTitle ?? '-' %></td> + </tr> + <tr> + <td>Last build</td> + <td><%- (buildTime != 0) ? new Date(buildTime) : '-' %></td> + </tr> + <tr> + <td>Primary</td> + <td><%= primary ?? false %></td> + </tr> + <tr> + <td>Show title</td> + <td><%= showTitle ?? false %></td> + </tr> + <tr> + <td>Sort order</td> + <td><%- sortOrder ?? '-' %></td> + </tr> + <tr> + <td>Dependencies</td> + <td> + <% if (dependencies.size === 0) { %> + <%- '-' %> + <% } else { %> + <% dependencies.forEach(e => { %> + <%- `${e}<br>` %> + <% }); %> + <%}%> + </td> + </tr> + <tr> + <td>Pages which depend on this page</td> + <td> + <% if (dependents.size === 0) { %> + <%- '-' %> + <% } else { %> + <% dependents.forEach(e => { %> + <%- `${e}<br>` %> + <% }); %> + <%}%> + </td> + </tr> + <tr> + <td>Errors</td> + <td> + <% if (errors.length === 0) { %> + <%- '-' %> + <% } else { %> + <% errors.forEach(e => { %> + <%- `${e.identifier}: ${e.message}<br>` %> + <% }); %> + <%}%> + </td> + </tr> + </table> + <p><a href="/special/purge/<%= standardName %>">Purge this page?</a></p> + <hr> + <span class=footer><a href="https://github.com/LMBishop/website">GitHub</a> | <a href="/<%= path %>">View original</a></span> + </div> + </div> + </div> +</body> +</html> diff --git a/views/purge.ejs b/views/purge.ejs index 04bae61..df48073 100644 --- a/views/purge.ejs +++ b/views/purge.ejs @@ -17,6 +17,8 @@ <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> + <hr> + <span class=footer><a href="https://github.com/LMBishop/website">GitHub</a> | <a href="/<%= page %>">View original</a></span> </div> </div> </div> |
