Start adding extension onboarding pages
This commit is contained in:
parent
514f5c8baa
commit
710f4d0709
4
app/onboarding/__init__.py
Normal file
4
app/onboarding/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from .views import (
|
||||
index,
|
||||
final,
|
||||
)
|
8
app/onboarding/base.py
Normal file
8
app/onboarding/base.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from flask import Blueprint
|
||||
|
||||
onboarding_bp = Blueprint(
|
||||
name="onboarding",
|
||||
import_name=__name__,
|
||||
url_prefix="/onboarding",
|
||||
template_folder="templates",
|
||||
)
|
9
app/onboarding/views/final.py
Normal file
9
app/onboarding/views/final.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from app.onboarding.base import onboarding_bp
|
||||
from flask import render_template
|
||||
|
||||
|
||||
@onboarding_bp.route("/final", methods=["GET"])
|
||||
def final():
|
||||
return render_template(
|
||||
"onboarding/final.html",
|
||||
)
|
9
app/onboarding/views/index.py
Normal file
9
app/onboarding/views/index.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from app.onboarding.base import onboarding_bp
|
||||
from flask import render_template
|
||||
|
||||
|
||||
@onboarding_bp.route("/", methods=["GET"])
|
||||
def index():
|
||||
return render_template(
|
||||
"onboarding/index.html",
|
||||
)
|
|
@ -95,6 +95,7 @@ from app.models import (
|
|||
)
|
||||
from app.monitor.base import monitor_bp
|
||||
from app.oauth.base import oauth_bp
|
||||
from app.onboarding.base import onboarding_bp
|
||||
from app.phone.base import phone_bp
|
||||
from app.utils import random_string
|
||||
|
||||
|
@ -216,6 +217,7 @@ def register_blueprints(app: Flask):
|
|||
|
||||
app.register_blueprint(oauth_bp, url_prefix="/oauth")
|
||||
app.register_blueprint(oauth_bp, url_prefix="/oauth2")
|
||||
app.register_blueprint(onboarding_bp)
|
||||
|
||||
app.register_blueprint(discover_bp)
|
||||
app.register_blueprint(api_bp)
|
||||
|
|
23
templates/onboarding/final.html
Normal file
23
templates/onboarding/final.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="flex-fill align-items-center mt-8">
|
||||
<!-- Image container -->
|
||||
<div class="mt-4 mb-4 text-center" style="display:block;">
|
||||
<a class="" href="{{ url_for('dashboard.index') }}">
|
||||
<picture>
|
||||
<source media="(max-width: 650px)" srcset="/static/logo.svg">
|
||||
<img src="/static/logo.svg" style="width: 24rem" alt="logo">
|
||||
</picture>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Text container -->
|
||||
<div class="mt-8 mb-4 text-center">
|
||||
<h2 class="text-red" style="font-size:2rem">All set!</h2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
29
templates/onboarding/index.html
Normal file
29
templates/onboarding/index.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="flex-fill align-items-center mt-8">
|
||||
<!-- Image container -->
|
||||
<div class="mt-4 mb-4 text-center" style="display:block;">
|
||||
<a class="" href="{{ url_for('dashboard.index') }}">
|
||||
<picture>
|
||||
<source media="(max-width: 650px)" srcset="/static/logo.svg">
|
||||
<img src="/static/logo.svg" style="width: 24rem" alt="logo">
|
||||
</picture>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Text container -->
|
||||
<div class="mt-8 mb-4 text-center">
|
||||
<h2 class="text-dark" style="font-size:2rem">Let's take back control of your inbox!</h2>
|
||||
</div>
|
||||
|
||||
<!-- Button container -->
|
||||
<div class="mt-8 text-center">
|
||||
<a class="mx-6 p-4 text-decoration-none" style="background:black;color:white;" href="{{ url_for('auth.register', next=url_for('onboarding.final')) }}">Create a new account</a>
|
||||
<a class="mx-6 p-4 text-decoration-none" style="background:white;color:black;border-radius: 2px;border:1px solid black;" href="{{ url_for('auth.login', next=url_for('onboarding.final')) }}">I already have an account</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in a new issue