Files
website/views/source.ejs
2026-01-18 13:22:41 -05:00

80 lines
3.7 KiB
Plaintext
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Directory Tree</title>
<meta name="fediverse:creator" content="@oddbyte@mastodon.social">
<style>
<%- include('partials/style') %>
.directory {
font-weight: bold;
color: #0066cc;
cursor: pointer;
}
.file {
color: #00af00;
}
.directory-tree {
text-align-last: left;
}
</style>
</head>
<body>
<%- include('partials/navbar') %>
<div id="container_top">
<div id="container_main">
<div id="container_thing">
<main>
<h1>Directory Tree</h1>
<p>(here is where all the raw files are)</p>
<ul class="directory-tree">
<% function renderTree(items, indentLevel = 0) { %>
<% items.forEach(item => { %>
<li>
<% if (item.type === 'directory') { %>
<span class="directory"><%= item.name %></span>
<% if (item.children && item.children.length > 0) { %>
<ul>
<%= renderTree(item.children, indentLevel + 1) %>
</ul>
<% } %>
<% } else { %>
<a href="/source/<%= encodeURIComponent(item.path).replaceAll('%2F', '/') %>" class="file"><%= item.name %></a>
<% } %>
</li>
<% }); %>
<% } %>
<%= renderTree(paths) %>
</ul>
<h1>Rendered Pages</h1>
<div style="display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; flex-direction: column; align-self: center;">
<div style="max-width: 500px; display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; flex-direction: column; align-self: center;">
<p>these are the thingies that you see when you use my site like a normal person (in a browser, hopefully)</p>
<p style="text-align-last: left;">
<a href="/">/</a> &lt;-- Main Page <br />
<a href="/music">/music</a> &lt;-- My Youtube Music playlist<br />
<a href="/source">/source</a> &lt;-- You are here :P <br />
<a href="/art">/art</a> &lt;-- My art ^.^<br />
<a href="/blog">/blog</a> &lt;-- My crappy blog<br />
</p>
</div>
</div>
<h1>Files</h1>
<div style="display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; flex-direction: column; align-self: center;">
<div style="max-width: 500px; display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; flex-direction: column; align-self: center;">
<p style="text-align-last: left;">
<a href="/favicon.ico">/favicon.ico</a> &lt;-- icon</br>
<a href="/robots.txt">/robots.txt</a> &lt;-- tells some robots to go away
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>