-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create a basic front end using Bootstrap 5
- Loading branch information
Showing
7 changed files
with
117 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{%- from 'bootstrap5/nav.html' import render_nav_item -%} | ||
{%- from 'bootstrap5/utils.html' import render_messages -%} | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/> | ||
<title>Stuart, a self-hostable galaxy and market data aggregator for Elite: Dangerous</title> | ||
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}"/> | ||
{{ bootstrap.load_css() }} | ||
<style> | ||
pre { | ||
background: #ddd; | ||
padding: 10px; | ||
} | ||
h2 { | ||
margin-top: 20px; | ||
} | ||
footer { | ||
margin: 20px; | ||
} | ||
</style> | ||
</head> | ||
<body class="d-flex flex-column min-vh-100"> | ||
<nav class="navbar navbar-expand-lg navbar-light bg-light mb-4"> | ||
<div class="container"> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" | ||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
{{- render_nav_item("main.home", "Home") -}} | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<main class="container"> | ||
{{- render_messages(container=False, dismissible=True, dismiss_animate=True) }} | ||
{%- block content %}{%- endblock %} | ||
</main> | ||
|
||
<footer class="mt-auto text-center"> | ||
{% block footer %} | ||
<small> | ||
<p>Stuart {{ stuart_version }}, a self-hostable game data aggregator for <a href="https://www.elitedangerous.com/">Elite: Dangerous</a>. | ||
Copyright © 2023 <a href="https://github.com/xenophonf">Matthew X. Economou</a>. | ||
<br>License AGPLv3+: <a href="https://www.gnu.org/licenses/agpl.html">GNU AGPL version 3 or later</a>. | ||
Source code for this version can be found at <a href="https://github.com/irtnog/stuart">https://github.com/irtnog/stuart</a>.</p> | ||
</small> | ||
{% endblock %} | ||
</footer> | ||
|
||
{{ bootstrap.load_js() }} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{%- extends 'base.html' %} | ||
{%- block content %} | ||
<h1>Greetings, commanders!</h1> | ||
<p>And to everyone else out there, the secret is to bang the rocks together, guys!<p> | ||
{%- endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# stuart, a self-hostable game data aggregator for Elite: Dangerous | ||
# Copyright (C) 2023 Matthew X. Economou | ||
# | ||
# This program 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. | ||
# | ||
# This program 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 this program. If not, see | ||
# <https://www.gnu.org/licenses/>. | ||
|
||
from pytest import mark | ||
|
||
from stuart import __version__ | ||
|
||
|
||
@mark.order("first") | ||
@mark.smoke | ||
def test_main(client): | ||
response = client.get( | ||
"/", | ||
environ_overrides={"wsgi.url_scheme": "https"}, | ||
) | ||
assert response.status_code == 200 | ||
assert "<!DOCTYPE html>" in response.text | ||
assert __version__ in response.text |