added connection status macro and background task scheduling

This commit is contained in:
Bryan Bailey
2022-04-06 22:38:47 -04:00
parent 4f3e0e6feb
commit 4f3d7175f6
16 changed files with 136 additions and 15 deletions

View File

@@ -0,0 +1,12 @@
Welcome to Yo!nk {{ user.username }},
To confirm your account please click on the following link:
{{ url_for('auth.confirm', token=token, _external=True) }}
Sincerely,
The Yo!nk Team
Note: replies to this email address are unmonitored.

View File

@@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block meta %}
{{ super() }}
<!-- Add additional meta tags here -->
{% endblock %}
{% block title %}Testing{% endblock %}
{% block page_content %}
<div class="page-header">
<h1>Register</h1>
</div>
{% endblock %}

View File

@@ -1,3 +1,5 @@
{% import 'macros/connection_status.html' as connection %}
<!DOCTYPE html>
<html lang="en">
<head>
@@ -15,7 +17,7 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script>
{{ moment.include_moment() }}
{% endblock %}
<link rel="shortcut icon" href="{{ url_for('static', filename='images/comic.png') }}" type="image/x-icon">
<link rel="shortcut icon" href="{{ connection.toggle_connection_status(status_code) }}" type="image/x-icon">
</head>
<body>
{% block navbar %}

View File

@@ -1,5 +1,7 @@
{% extends "base.html" %}
{% import 'macros/library.html' as library %}
{% import 'macros/connection_status.html' as connection %}
{% block meta %}
{{ super() }}
@@ -12,7 +14,6 @@
<div class="page-header">
<h1>Y!oink Web App</h1>
</div>
<form method="post" onsubmit="download.disabled = true; url.readOnly = true; return true;">
{{ form.hidden_tag() }}
<div class="input-group mb-3">

View File

@@ -0,0 +1,7 @@
{% macro toggle_connection_status(status_code) %}
{% if status_code == 200 %}
{{ url_for('static', filename='up.png') }}
{% else %}
{{ url_for('static', filename='down.png') }}
{% endif %}
{% endmacro %}