Templates using Picnic
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
c v t 2020-07-05 17:33:29 +02:00
parent d6bf70e5bc
commit efc3c98ba4
8 changed files with 63 additions and 52 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@ data/
dist/
pip-wheel-metadata/
celerybeat-schedule
.envrc

View File

View File

@ -1,13 +0,0 @@
APPS_SPEC = {
"gitea": {
"url": "https://git.autonomic.zone/compose-stacks/gitea",
"secrets": [
"db_passwd",
"db_root_passwd",
"internal_token",
"jwt_secret",
"secret_key",
],
"configs": ["app_ini"],
}
}

View File

@ -1,5 +0,0 @@
SECRET_KEY = 'replace-with-truly-random-string-for-production'
SERVER_NAME = 'localhost:5001'
DEBUG = True

View File

@ -1,19 +1,14 @@
{% extends "base.html" %}
{% from "macros.html" import with_errors %}
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Install {{ app_name | capitalize }}</title>
</head>
<body>
<p>Install {{ app_name | capitalize }}</p>
<form method="POST" action="{{ url_for("apps.install", app_name=app_name) }}">
{% for field in form %}
{{ field.label() }} {{ with_errors(field, style='font-weight: bold') }}
{% endfor %}
<input type="submit" value="Install" />
</form>
</body>
</html>
</html>
{% block title %}Install {{ app_name }} {{ super() }}{% endblock %}
{% block content %}
<h1>Install {{ app_name }}</h1>
<form method="POST" action="{{ url_for("apps.install", app_name=app_name) }}">
{% for field in form %}
{{ field.label() }} {{ with_errors(field, style='font-weight: bold') }}
{% endfor %}
<input type="submit" value="Install" />
</form>
{% endblock content %}

View File

@ -1,17 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Application Listing</title>
</head>
<body>
<ul>
{% for app in apps %}
<li>
<a href="{{ url_for('apps.install', app_name=app) }}">{{ app }}</a>
</li>
{% endfor %}
</ul>
</body>
</html>
</html>
{% extends "base.html" %}
{% block content %}
<h1>Installable apps</h1>
<p>Where the magic h<em>app</em>ens.</p>
<ul>
{% for app in apps %}
<li>
<a href="{{ url_for('apps.install', app_name=app) }}">{{ app }}</a>
</li>
</ul>
{% endfor %}
{% endblock content %}

View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex, nofollow">
{% block meta %}
<meta name="copyright" content="GPLv3">
<meta name="application-name" content="Magic App">
{% endblock meta %}
<link rel="stylesheet" href="{{ url_for('static', filename='picnic.min.css') }}">
{% if debug %}
{% else %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/picnic">
{% endif %}
<title>{% block title %}🎩{% endblock %}</title>
</head>
<body style="padding-top: 3em;">
{% block content %}{% endblock %}
<nav>
<a href="#" class="brand">
<span>Magic App</span>
</a>
<!-- responsive-->
<input id="bmenub" type="checkbox" class="show">
<label for="bmenub" class="burger pseudo button">menu</label>
<div class="menu">
<a href="{{ url_for('apps.listing') }}" class="button">Apps</a>
</div>
</nav>
</body>
</html>

View File

@ -5,4 +5,5 @@ from magic_app.app import create_app
from magic_app.config import CONFIG
config = CONFIG[os.environ["FLASK_ENV"]]
app = create_app(config=config)