hyperflask 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hyperflask-0.1.2 → hyperflask-0.1.4}/PKG-INFO +2 -2
- {hyperflask-0.1.2 → hyperflask-0.1.4}/README.md +1 -1
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/app.py +12 -2
- hyperflask-0.1.4/hyperflask/layouts/email.mjml +80 -0
- hyperflask-0.1.2/hyperflask/layout.html → hyperflask-0.1.4/hyperflask/layouts/web.html +1 -1
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/icons.html +1 -1
- {hyperflask-0.1.2 → hyperflask-0.1.4}/pyproject.toml +1 -1
- {hyperflask-0.1.2 → hyperflask-0.1.4}/LICENSE +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/__init__.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/__main__.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/api.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/cli.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/components/__init__.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/components/alpine.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/components/core.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/components/webcomponent.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/factory.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/forms/__init__.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/forms/fields.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/forms/widgets.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/page_helpers.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/reactivity.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/resources.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/static/alpine.js +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/static/app.js +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/static/htmx.js +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/static/reactive.js +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/static/stimulus.js +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/static/translations.js +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/README.md +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/actions/Button.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/actions/Dropdown.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/actions/DropdownItem.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/actions/LinkButton.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/actions/Modal.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/actions/ModalAction.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/actions/ModalTitle.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-display/Accordion.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-display/AccordionPanel.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/Checkbox.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/FileInput.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/FormControl.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/Input.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/LabeledCheckbox.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/LabeledTextInput.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/Radiobox.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/Range.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/Rating.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/Select.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/Textarea.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/Toggle.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/feedback/Loading.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/feedback/Toast.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/layout/Footer.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/layout/FooterLink.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/layout/FooterNav.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/layout/Indicator.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/navigation/Link.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/navigation/Navbar.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/forms.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/modal.html +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/utils/__init__.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/utils/htmx.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/utils/page_actions.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/utils/request.py +0 -0
- {hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/utils/tokens.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hyperflask
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Full stack web framework
|
|
5
5
|
Home-page: https://github.com/hyperflask/hyperflask
|
|
6
6
|
License: MIT
|
|
@@ -42,7 +42,7 @@ Requires-Dist: redis (>=5.0,<6.0)
|
|
|
42
42
|
Project-URL: Repository, https://github.com/hyperflask/hyperflask
|
|
43
43
|
Description-Content-Type: text/markdown
|
|
44
44
|
|
|
45
|
-
<div><img src="assets/banner.svg" width="100%"></div>
|
|
45
|
+
<div><img src="https://raw.githubusercontent.com/hyperflask/hyperflask/main/assets/banner.svg" width="100%"></div>
|
|
46
46
|
<hr>
|
|
47
47
|
<div align="center">
|
|
48
48
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# flask
|
|
2
2
|
from flask import Flask
|
|
3
3
|
from jinja2 import ChoiceLoader, FileSystemLoader, PrefixLoader
|
|
4
|
+
from werkzeug.middleware.proxy_fix import ProxyFix
|
|
4
5
|
# hyperflask extensions
|
|
5
6
|
from jinja_layout import LayoutExtension
|
|
6
7
|
from jinja_wtforms import WtformExtension
|
|
@@ -54,7 +55,9 @@ class Hyperflask(Flask):
|
|
|
54
55
|
def __init__(self, *args, static_mode="hybrid", instrument=False, layouts_folder="layouts", partials_folder="partials",
|
|
55
56
|
emails_folder="emails", forms_folder="forms", assets_folder="assets", pages_folder="pages", migrations_folder="migrations",
|
|
56
57
|
config=None, config_filename="config.yml", **kwargs):
|
|
58
|
+
|
|
57
59
|
super().__init__(*args, **kwargs)
|
|
60
|
+
self.wsgi_app = ProxyFix(self.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1)
|
|
58
61
|
|
|
59
62
|
self.config.update({
|
|
60
63
|
"FREEZER_DESTINATION": os.path.join(self.root_path, "_site"),
|
|
@@ -91,8 +94,8 @@ class Hyperflask(Flask):
|
|
|
91
94
|
self.jinja_env.loader.loaders.append(layout_loader)
|
|
92
95
|
self.jinja_env.loader.loaders.append(PrefixLoader({os.path.basename(layouts_folder): layout_loader}))
|
|
93
96
|
self.jinja_env.loader.loaders.extend([
|
|
94
|
-
FileLoader(os.path.join(os.path.dirname(__file__), "layout.html")
|
|
95
|
-
FileLoader(os.path.join(os.path.dirname(__file__), "
|
|
97
|
+
FileLoader(os.path.join(os.path.dirname(__file__), "layouts/web.html"), "layout.html"),
|
|
98
|
+
FileLoader(os.path.join(os.path.dirname(__file__), "layouts/web.html"), "hyperflask_layout.html"),
|
|
96
99
|
PrefixLoader({"ui": FileSystemLoader(os.path.join(os.path.dirname(__file__), "ui"))})
|
|
97
100
|
])
|
|
98
101
|
|
|
@@ -148,6 +151,13 @@ class Hyperflask(Flask):
|
|
|
148
151
|
)
|
|
149
152
|
self.assets.include("@hyperflask", 0)
|
|
150
153
|
|
|
154
|
+
self.extensions['mail_templates'].jinja_env.add_extension(LayoutExtension)
|
|
155
|
+
self.extensions['mail_templates'].jinja_env.default_layout = "layout.mjml"
|
|
156
|
+
self.extensions['mail_templates'].loaders.extend([
|
|
157
|
+
FileLoader(os.path.join(os.path.dirname(__file__), 'layouts/email.mjml'), 'layout.mjml'),
|
|
158
|
+
FileLoader(os.path.join(os.path.dirname(__file__), 'layouts/email.mjml'), 'hyperflask_layout.mjml')
|
|
159
|
+
])
|
|
160
|
+
|
|
151
161
|
self.macros.register_from_directory(os.path.join(os.path.dirname(__file__), "ui"))
|
|
152
162
|
if hasattr(file_routes, "loader"):
|
|
153
163
|
self.forms.register_from_loader(file_routes.loader, "pages")
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<mjml>
|
|
2
|
+
<mj-head>
|
|
3
|
+
{% block head %}
|
|
4
|
+
<mj-title>{% block head_title %}{{config.get("SITE_TITLE", "")}}{% endblock %}</mj-title>
|
|
5
|
+
<mj-preview>Pre-header Text</mj-preview>
|
|
6
|
+
<mj-attributes>
|
|
7
|
+
<mj-all font-family="'Helvetica Neue', Helvetica, Arial, sans-serif"></mj-all>
|
|
8
|
+
<mj-text font-weight="400" font-size="16px" color="#000000" line-height="24px" font-family="'Helvetica Neue', Helvetica, Arial, sans-serif"></mj-text>
|
|
9
|
+
</mj-attributes>
|
|
10
|
+
<mj-style inline="inline">
|
|
11
|
+
.body-section {
|
|
12
|
+
-webkit-box-shadow: 1px 4px 11px 0px rgba(0, 0, 0, 0.15);
|
|
13
|
+
-moz-box-shadow: 1px 4px 11px 0px rgba(0, 0, 0, 0.15);
|
|
14
|
+
box-shadow: 1px 4px 11px 0px rgba(0, 0, 0, 0.15);
|
|
15
|
+
}
|
|
16
|
+
</mj-style>
|
|
17
|
+
<mj-style inline="inline">
|
|
18
|
+
.footer-link {
|
|
19
|
+
color: #4d4d4d
|
|
20
|
+
}
|
|
21
|
+
</mj-style>
|
|
22
|
+
{% endblock %}
|
|
23
|
+
</mj-head>
|
|
24
|
+
<mj-body {% block body_tags %}background-color="{{config.get("EMAIL_BACKGROUND_COLOR", "#c8c8c8")}}" width="600px"{% endblock %}>
|
|
25
|
+
<mj-section full-width="full-width" background-color="{{config.get("EMAIL_BACKGROUND_ACCENT_COLOR", "#a6a6a6")}}" padding-bottom="0">
|
|
26
|
+
<mj-column width="100%">
|
|
27
|
+
<mj-text color="#4d4d4d" font-weight="bold" align="center" font-size="16px" letter-spacing="1px">
|
|
28
|
+
{% block brand %}
|
|
29
|
+
{{config.get("SITE_TITLE", "")}}
|
|
30
|
+
{% endblock %}
|
|
31
|
+
</mj-text>
|
|
32
|
+
<mj-wrapper padding="0">
|
|
33
|
+
<mj-section background-color="#fff">
|
|
34
|
+
<mj-column width="100%" padding-left="15px" padding-right="15px">
|
|
35
|
+
<mj-text color="#2d2d2d" font-weight="bold" font-size="20px">
|
|
36
|
+
{% block title %}
|
|
37
|
+
{% if title is defined %}{{ title }}{% endif %}
|
|
38
|
+
{% endblock %}
|
|
39
|
+
</mj-text>
|
|
40
|
+
</mj-column>
|
|
41
|
+
</mj-section>
|
|
42
|
+
</mj-wrapper>
|
|
43
|
+
</mj-column>
|
|
44
|
+
</mj-section>
|
|
45
|
+
<mj-wrapper padding-top="0" padding-bottom="0" css-class="body-section">
|
|
46
|
+
{% block body %}
|
|
47
|
+
<mj-section background-color="#ffffff" padding-left="15px" padding-right="15px">
|
|
48
|
+
<mj-column width="100%">
|
|
49
|
+
{% block content %}{% endblock %}
|
|
50
|
+
</mj-column>
|
|
51
|
+
</mj-section>
|
|
52
|
+
{% endblock %}
|
|
53
|
+
</mj-wrapper>
|
|
54
|
+
|
|
55
|
+
<mj-wrapper full-width="full-width">
|
|
56
|
+
{% block footer %}
|
|
57
|
+
<mj-section>
|
|
58
|
+
<mj-column width="100%" padding="0">
|
|
59
|
+
{% block footer_content %}
|
|
60
|
+
<mj-text color="#4d4d4d" font-size="11px" align="center" line-height="16px">
|
|
61
|
+
You are receiving this email because you have agreed to receive emails from us.
|
|
62
|
+
</mj-text>
|
|
63
|
+
{% endblock %}
|
|
64
|
+
</mj-column>
|
|
65
|
+
</mj-section>
|
|
66
|
+
<mj-section padding-top="0">
|
|
67
|
+
<mj-group>
|
|
68
|
+
<mj-column width="100%" padding-right="0">
|
|
69
|
+
<mj-text color="#4d4d4d" font-size="11px" align="center" line-height="16px" font-weight="bold">
|
|
70
|
+
{% block footer_links %}
|
|
71
|
+
<a class="footer-link" href="{{url_for('index', _external=True)}}">Go to site</a>
|
|
72
|
+
{% endblock %}
|
|
73
|
+
</mj-text>
|
|
74
|
+
</mj-column>
|
|
75
|
+
</mj-group>
|
|
76
|
+
</mj-section>
|
|
77
|
+
{% endblock %}
|
|
78
|
+
</mj-wrapper>
|
|
79
|
+
</mj-body>
|
|
80
|
+
</mjml>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{% block head -%}
|
|
5
5
|
{% block head_metas %}
|
|
6
6
|
<meta charset="utf-8">
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
8
|
{% endblock %}
|
|
9
9
|
{% if config["PWA"] -%}
|
|
10
10
|
<link rel="manifest" href="{{url_for("pwa_manifest")}}" />
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-display/AccordionPanel.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/LabeledCheckbox.html
RENAMED
|
File without changes
|
{hyperflask-0.1.2 → hyperflask-0.1.4}/hyperflask/ui/components/data-input/LabeledTextInput.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|