1
0
Fork 0

It was like that when I got here

This commit is contained in:
Honbra 2024-11-17 22:52:17 +01:00
parent 331423d3f6
commit 18251d7f00
Signed by: honbra
GPG key ID: B61CC9ADABE2D952
36 changed files with 1534 additions and 1000 deletions

12
templates/admin/base.html Normal file
View file

@ -0,0 +1,12 @@
{% extends "../base.html" %}
{% block bodyClass %}admin{% endblock %}
{% block header %}
<h1>{{title}}</h1>
{% endblock %}
{% block main %}
{{main}}
{% call super() %}
{% endblock %}

View file

@ -0,0 +1,18 @@
{% extends "../base.html" %}
{% block title %}Create Paste{% endblock %}
{% block bodyClass %}admin-pastes{% endblock %}
{% block header %}
<h1>Create Paste</h1>
{% endblock %}
{% block main %}
<form method="post" action="/admin/pastes">
<input type="text" name="title" placeholder="Paste title" required value="{{paste_title}}" />
<textarea name="content" placeholder="Paste content" required>{{paste_content}}</textarea>
<input type="submit" value="Create" />
</form>
{% call super() %}
{% endblock %}

View file

@ -0,0 +1,12 @@
{% extends "../base.html" %}
{% block bodyClass %}admin-pastes{% endblock %}
{% block header %}
<h1>Pastes</h1>
{% endblock %}
{% block main %}
{% call super() %}
{% endblock %}

23
templates/base.html Normal file
View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}{{title}}{% endblock %} | NCPN</title>
<link rel="stylesheet" href="/style.css" />
<script src="/script.js" defer></script>
<noscript>
<style>
.jsonly {
display: none;
}
</style>
</noscript>
{% block head %}{% endblock %}
</head>
<body class="{% block bodyClass %}{% endblock %}">
<header>{% block header %}{% endblock %}</header>
<main>{% block main %}{% endblock %}</main>
<footer>Running NCPN v?.??</footer>
</body>
</html>

16
templates/paste.html Normal file
View file

@ -0,0 +1,16 @@
{% extends "base.html" %}
{% block bodyClass %}paste{% endblock %}
{% block header %}
<h1>{{title}}</h1>
<div class="action-buttons">
<a role="button" href="/p/{{id}}/raw">Raw</a>
<button class="jsonly" onclick="copyPasteContent()">Copy</button>
</div>
{% endblock %}
{% block main %}
<pre id="paste-content">{{content}}</pre>
{% call super() %}
{% endblock %}

1
templates/test.html Normal file
View file

@ -0,0 +1 @@
Hello, {{ name }}!