
* feat: big badge configuration * fix: remove google fonts * fix(plugins, server): remove cdn * ci: fix format ignore * feat(server): json configuration * feat: add search route for adding in browser * fix: add arm arch * fix: docker action * fix: engines fallback * doc: change logo * doc: fix logo margin * doc: update version * doc: change layout * dev: add dependabot groups * dev: fix dependabot and format
66 lines
1.9 KiB
Plaintext
66 lines
1.9 KiB
Plaintext
<%
|
|
|
|
// hide private properties from config
|
|
const to_hide = ["host", "port"];
|
|
function replacer(key,value) {
|
|
if (to_hide.includes(key)) return undefined;
|
|
else return value;
|
|
}
|
|
function to_pretty(obj) {
|
|
return JSON.stringify(obj, replacer, 2).replace(/[\[\]{}"]/g, "").replace(/,/g, "");
|
|
}
|
|
%>
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="description" content="<%= config.package.description %>">
|
|
<title>txt. configuration</title>
|
|
<link rel="stylesheet" href="/static/common.css">
|
|
<link rel="stylesheet" href="/static/configuration.css">
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<header>
|
|
<h1>txt<span class="dot">.</span></h1>
|
|
<div class="menu">
|
|
<a class="button secondary" href="/">Home</a>
|
|
</div>
|
|
<p><%= config.package.description %></p>
|
|
</header>
|
|
<div>
|
|
<%- include("./big_badge.ejs", {base_url, config}) %>
|
|
</div>
|
|
<div class="configuration">
|
|
<h2>Configuration</h2>
|
|
<pre> version: <%= config.package.version %><%= to_pretty(config.env) %></pre>
|
|
<h2>Available engines</h2>
|
|
<ol>
|
|
<%
|
|
for (const engine of engines) {
|
|
%><li><%= engine.name %>: <%= engine.description %></li><%
|
|
}
|
|
%>
|
|
</ol>
|
|
<h2>Available middlewares</h2>
|
|
<ol>
|
|
<%
|
|
for (const middleware of middlewares) {
|
|
%><li><%= middleware.name %>: <%= middleware.description %></li><%
|
|
}
|
|
%>
|
|
</ol>
|
|
<h2>Available routes</h2>
|
|
<%
|
|
for (const route of config.dyn.routes) {
|
|
%><a class="button secondary" href="<%= route %>"><%= route %></a><%
|
|
}
|
|
%>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html>
|