initial template rendering
This commit is contained in:
127
assets/templates/repo/base.html
Normal file
127
assets/templates/repo/base.html
Normal file
@@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<!--
|
||||
Copyright (c) 2022 Sasha Koshka <sashakoshka@tebibyte.media>
|
||||
Copyright (c) 2023,2025 Emma Tebibyte <emma@tebibyte.media>
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
This file is part of Mintee.
|
||||
|
||||
Mintee is free software: you can redistribute it and/or modify it under the
|
||||
terms of the GNU Affero General Public License as published by the Free
|
||||
Software Foundation, either version 3 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
Mintee is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Mintee. If not, see https://www.gnu.org/licenses/.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<title>{%block title %}{{ owner }}/{{ repo }} – {% endblock title %}Mintee</title>
|
||||
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="res/style.css">
|
||||
<link rel="stylesheet" href="res/martian.css">
|
||||
<script>
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this page.
|
||||
|
||||
Copyright (c) 2022 Sasha Koshka <sashakoshka@tebibyte.media>
|
||||
|
||||
The JavaScript code in this page is free software: you can
|
||||
redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License (GNU GPL) as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option)
|
||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
|
||||
As additional permission under GNU GPL version 3 section 7, you
|
||||
may distribute non-source (e.g., minimized or compacted) forms of
|
||||
that code without the copy of the GNU GPL normally required by
|
||||
section 4, provided you include this license notice and a URL
|
||||
through which recipients can access the Corresponding Source.
|
||||
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this page.
|
||||
*/
|
||||
</script>
|
||||
</head>
|
||||
<body id="{% block page %}{% endblock page %}">
|
||||
|
||||
<div id=stickyWrap>
|
||||
<nav>
|
||||
<div class=buttonListWrap>
|
||||
<ul class=buttonList>
|
||||
<li><a href="/">{{ site }}</a></li>
|
||||
<li><a class=dashboardButton href="/">
|
||||
<span class=collapse>dashboard</span>
|
||||
</a></li>
|
||||
<li><a class=profileButton href="/{{ user }}">
|
||||
<span class=collapse>profile</span>
|
||||
</a>
|
||||
</li>
|
||||
<li><a class=notificationsButton href="/notifications">
|
||||
<span class=collapse>notifications</span>
|
||||
{{ notif_count}}
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class=buttonListWrap>
|
||||
<ul class=buttonList>
|
||||
<li><a href="./">code</a></li>
|
||||
<li><a href="./commits">commits</a></li>
|
||||
<li><a href="./tags">tags</a></li>
|
||||
<li><a href="./tickets">issues {{ ticket_count }}</a></li>
|
||||
<li><a href="/">releases</a></li>
|
||||
<li><a href="/">settings</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<header>
|
||||
<span>
|
||||
viewing
|
||||
<span class=linkedPath>
|
||||
<a href="/">{{ owner }}</a>/<a href="/">{{ repo }}</a>/<a href="/">{{ branch }}</a>
|
||||
</span>
|
||||
</span>
|
||||
<ul class=buttonList>
|
||||
<li><a class=watchButton href="/">watch</a></li>
|
||||
<li><a class=starButton href="/">star</a></li>
|
||||
<li><a class=forkButton href="/">fork</a></li>
|
||||
<li><a class=cloneButton href="/">clone</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
{% block content %}{%endblock content %}
|
||||
|
||||
<script>
|
||||
let stickyWrap = document.querySelector("#stickyWrap")
|
||||
document.addEventListener ("scroll", () => {
|
||||
if (document.documentElement.scrollTop > 0) {
|
||||
stickyWrap.className = "lifted"
|
||||
} else {
|
||||
stickyWrap.className = ""
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<footer>
|
||||
<a href="https://git.tebibyte.media/meta/mintee">Mintee</a>,
|
||||
the fresh and tasty git frontend. page: #s. template: #s.
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
38
assets/templates/repo/code.html
Normal file
38
assets/templates/repo/code.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block page %}code{% endblock page %}
|
||||
|
||||
{% block content %}
|
||||
<div id=contentWrap>
|
||||
<aside>
|
||||
<p class=sidebarLabel>
|
||||
<a href="/"></a><a href="/">{{ directory }}</a>
|
||||
</p>
|
||||
<table class=files border=1>
|
||||
<tbody>
|
||||
{% block entries_list %}
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td><a class={{ entry.class }} href="/">{{ entry.path }}</a></td>
|
||||
<td><a class=commit href="./commit/{{ entry.last_commit }}">
|
||||
{{ entry.last_commit_short }}
|
||||
</a></td>
|
||||
<td><time datetime="{{ entry.last_commit_time }}">
|
||||
{{ entry.last_commit_time | date(format="%Y-%m-%d %H:%M")}}
|
||||
</time></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endblock entries %}
|
||||
</tbody>
|
||||
</table>
|
||||
</aside>
|
||||
{% block readme %}
|
||||
<main>
|
||||
<p class=previewLabel>README.md</p>
|
||||
<article class=preview>
|
||||
{{ readme_content }}
|
||||
</article>
|
||||
</main>
|
||||
{% endblock readme %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user