Templates using Picnic
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d6bf70e5bc
commit
efc3c98ba4
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@ data/
|
|||||||
dist/
|
dist/
|
||||||
pip-wheel-metadata/
|
pip-wheel-metadata/
|
||||||
celerybeat-schedule
|
celerybeat-schedule
|
||||||
|
.envrc
|
||||||
|
@ -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"],
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
SECRET_KEY = 'replace-with-truly-random-string-for-production'
|
|
||||||
|
|
||||||
SERVER_NAME = 'localhost:5001'
|
|
||||||
|
|
||||||
DEBUG = True
|
|
@ -1,19 +1,14 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
{% from "macros.html" import with_errors %}
|
{% from "macros.html" import with_errors %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
{% block title %}Install {{ app_name }} {{ super() }}{% endblock %}
|
||||||
<html lang="en">
|
|
||||||
<html>
|
{% block content %}
|
||||||
<head>
|
<h1>Install {{ app_name }}</h1>
|
||||||
<title>Install {{ app_name | capitalize }}</title>
|
<form method="POST" action="{{ url_for("apps.install", app_name=app_name) }}">
|
||||||
</head>
|
{% for field in form %}
|
||||||
<body>
|
{{ field.label() }} {{ with_errors(field, style='font-weight: bold') }}
|
||||||
<p>Install {{ app_name | capitalize }}</p>
|
{% endfor %}
|
||||||
<form method="POST" action="{{ url_for("apps.install", app_name=app_name) }}">
|
<input type="submit" value="Install" />
|
||||||
{% for field in form %}
|
</form>
|
||||||
{{ field.label() }} {{ with_errors(field, style='font-weight: bold') }}
|
{% endblock content %}
|
||||||
{% endfor %}
|
|
||||||
<input type="submit" value="Install" />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</html>
|
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
<!DOCTYPE html>
|
{% extends "base.html" %}
|
||||||
<html lang="en">
|
|
||||||
<html>
|
{% block content %}
|
||||||
<head>
|
<h1>Installable apps</h1>
|
||||||
<title>Application Listing</title>
|
<p>Where the magic h<em>app</em>ens.</p>
|
||||||
</head>
|
<ul>
|
||||||
<body>
|
{% for app in apps %}
|
||||||
<ul>
|
<li>
|
||||||
{% for app in apps %}
|
<a href="{{ url_for('apps.install', app_name=app) }}">{{ app }}</a>
|
||||||
<li>
|
</li>
|
||||||
<a href="{{ url_for('apps.install', app_name=app) }}">{{ app }}</a>
|
</ul>
|
||||||
</li>
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endblock content %}
|
||||||
</ul>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</html>
|
|
||||||
|
36
magic_app/templates/base.html
Normal file
36
magic_app/templates/base.html
Normal 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>
|
@ -5,4 +5,5 @@ from magic_app.app import create_app
|
|||||||
from magic_app.config import CONFIG
|
from magic_app.config import CONFIG
|
||||||
|
|
||||||
config = CONFIG[os.environ["FLASK_ENV"]]
|
config = CONFIG[os.environ["FLASK_ENV"]]
|
||||||
|
|
||||||
app = create_app(config=config)
|
app = create_app(config=config)
|
||||||
|
Reference in New Issue
Block a user