mirror of
https://github.com/YGGverse/mb.git
synced 2026-03-31 17:15:28 +00:00
initial commit
This commit is contained in:
parent
f2b0a1979d
commit
8e7df9ff72
14 changed files with 1011 additions and 0 deletions
33
templates/index.html.tera
Normal file
33
templates/index.html.tera
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{% extends "layout" %}
|
||||
{% block content %}
|
||||
{% if token %}
|
||||
<form action="/submit" method="post">
|
||||
<textarea name="message" placeholder="Enter your message..."></textarea>
|
||||
<input type="hidden" name="token" value="{{ token }}" />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if posts %}
|
||||
{% for post in posts %}
|
||||
<div>
|
||||
<a name="{{ post.id }}"></a>
|
||||
<p>{{ post.message }}</p>
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="{{ post.href.post }}" title="Created">{{ post.time }}</a></li>
|
||||
</ul>
|
||||
{% if post.href.delete %}
|
||||
<div>
|
||||
<a rel="nofollow" href="{{ post.href.delete }}" title="Delete">Delete</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div>Nothing.</div>
|
||||
{% endif %}
|
||||
{% if next %}<a href="{{ next }}">Next</a>{% endif %}
|
||||
{% if back %}<a href="{{ back }}">Back</a>{% endif %}
|
||||
{% if pagination_totals %}<span>{{ pagination_totals }}</span>{% endif %}
|
||||
{% endblock content %}
|
||||
29
templates/layout.html.tera
Normal file
29
templates/layout.html.tera
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>{{ meta_title }}</title>
|
||||
{% if description %}
|
||||
<meta name="description" content="{{ description }}" />
|
||||
{% endif %}
|
||||
<link rel="stylesheet" type="text/css" href="/theme/default.css?v={{ version }}" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a href="{{ home }}">{{ title }}</a>
|
||||
{% if description %}<div>{{ description }}</div>{% endif %}
|
||||
<form action="/" method="GET">
|
||||
<input type="text" name="search" value="{% if search %}{{ search }}{% endif %}" placeholder="Search..." />
|
||||
<input type="hidden" name="token" value="{{ token }}" />
|
||||
<input type="submit" value="Search" />
|
||||
</form>
|
||||
</header>
|
||||
<main>
|
||||
{% block content %}{% endblock content %}
|
||||
</main>
|
||||
<footer>
|
||||
<a href="/rss">RSS</a> |
|
||||
<a href="https://github.com/yggverse/mb" title="v{{ version }}">GitHub</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
17
templates/post.html.tera
Normal file
17
templates/post.html.tera
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "layout" %}
|
||||
{% block content %}
|
||||
<div>
|
||||
<a name="{{ post.id }}"></a>
|
||||
<p>{{ post.message }}</p>
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="{{ post.href.post }}" title="Created">{{ post.time }}</a></li>
|
||||
</ul>
|
||||
{% if post.href.delete %}
|
||||
<div>
|
||||
<a rel="nofollow" href="{{ post.href.delete }}" title="Delete">Delete</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue