aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/templates
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-05-13 17:26:25 +0100
committerMatthew Lemon <y@yulqen.org>2024-05-13 17:26:25 +0100
commitefbbd480ddc62e695123d31c31d233b0df5155bd (patch)
treebc2fb465edd5050d83c97f280b1aac8e023fe3e5 /pyblackbird_cc/templates
After first pre-commit processing
Diffstat (limited to 'pyblackbird_cc/templates')
-rw-r--r--pyblackbird_cc/templates/403.html15
-rw-r--r--pyblackbird_cc/templates/403_csrf.html15
-rw-r--r--pyblackbird_cc/templates/404.html15
-rw-r--r--pyblackbird_cc/templates/500.html12
-rw-r--r--pyblackbird_cc/templates/account/base_manage_password.html10
-rw-r--r--pyblackbird_cc/templates/allauth/elements/alert.html7
-rw-r--r--pyblackbird_cc/templates/allauth/elements/badge.html6
-rw-r--r--pyblackbird_cc/templates/allauth/elements/button.html20
-rw-r--r--pyblackbird_cc/templates/allauth/elements/field.html66
-rw-r--r--pyblackbird_cc/templates/allauth/elements/fields.html3
-rw-r--r--pyblackbird_cc/templates/allauth/elements/panel.html19
-rw-r--r--pyblackbird_cc/templates/allauth/elements/table.html6
-rw-r--r--pyblackbird_cc/templates/allauth/layouts/entrance.html34
-rw-r--r--pyblackbird_cc/templates/allauth/layouts/manage.html6
-rw-r--r--pyblackbird_cc/templates/base.html127
-rw-r--r--pyblackbird_cc/templates/pages/about.html1
-rw-r--r--pyblackbird_cc/templates/pages/home.html1
-rw-r--r--pyblackbird_cc/templates/users/user_detail.html31
-rw-r--r--pyblackbird_cc/templates/users/user_form.html21
19 files changed, 415 insertions, 0 deletions
diff --git a/pyblackbird_cc/templates/403.html b/pyblackbird_cc/templates/403.html
new file mode 100644
index 0000000..40954bb
--- /dev/null
+++ b/pyblackbird_cc/templates/403.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+
+{% block title %}
+ Forbidden (403)
+{% endblock title %}
+{% block content %}
+ <h1>Forbidden (403)</h1>
+ <p>
+ {% if exception %}
+ {{ exception }}
+ {% else %}
+ You're not allowed to access this page.
+ {% endif %}
+ </p>
+{% endblock content %}
diff --git a/pyblackbird_cc/templates/403_csrf.html b/pyblackbird_cc/templates/403_csrf.html
new file mode 100644
index 0000000..40954bb
--- /dev/null
+++ b/pyblackbird_cc/templates/403_csrf.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+
+{% block title %}
+ Forbidden (403)
+{% endblock title %}
+{% block content %}
+ <h1>Forbidden (403)</h1>
+ <p>
+ {% if exception %}
+ {{ exception }}
+ {% else %}
+ You're not allowed to access this page.
+ {% endif %}
+ </p>
+{% endblock content %}
diff --git a/pyblackbird_cc/templates/404.html b/pyblackbird_cc/templates/404.html
new file mode 100644
index 0000000..2399b79
--- /dev/null
+++ b/pyblackbird_cc/templates/404.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+
+{% block title %}
+ Page not found
+{% endblock title %}
+{% block content %}
+ <h1>Page not found</h1>
+ <p>
+ {% if exception %}
+ {{ exception }}
+ {% else %}
+ This is not the page you were looking for.
+ {% endif %}
+ </p>
+{% endblock content %}
diff --git a/pyblackbird_cc/templates/500.html b/pyblackbird_cc/templates/500.html
new file mode 100644
index 0000000..c4e2fa3
--- /dev/null
+++ b/pyblackbird_cc/templates/500.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}
+ Server Error
+{% endblock title %}
+{% block content %}
+ <h1>Ooops!!! 500</h1>
+ <h3>Looks like something went wrong!</h3>
+ <p>
+ We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.
+ </p>
+{% endblock content %}
diff --git a/pyblackbird_cc/templates/account/base_manage_password.html b/pyblackbird_cc/templates/account/base_manage_password.html
new file mode 100644
index 0000000..20c44f7
--- /dev/null
+++ b/pyblackbird_cc/templates/account/base_manage_password.html
@@ -0,0 +1,10 @@
+{% extends "account/base_manage.html" %}
+
+{% block main %}
+ <div class="card">
+ <div class="card-body">
+ {% block content %}
+ {% endblock content %}
+ </div>
+ </div>
+{% endblock main %}
diff --git a/pyblackbird_cc/templates/allauth/elements/alert.html b/pyblackbird_cc/templates/allauth/elements/alert.html
new file mode 100644
index 0000000..535d394
--- /dev/null
+++ b/pyblackbird_cc/templates/allauth/elements/alert.html
@@ -0,0 +1,7 @@
+{% load i18n %}
+{% load allauth %}
+
+<div class="alert alert-error">
+ {% slot message %}
+{% endslot %}
+</div>
diff --git a/pyblackbird_cc/templates/allauth/elements/badge.html b/pyblackbird_cc/templates/allauth/elements/badge.html
new file mode 100644
index 0000000..e86669b
--- /dev/null
+++ b/pyblackbird_cc/templates/allauth/elements/badge.html
@@ -0,0 +1,6 @@
+{% load allauth %}
+
+<span class="badge {% if 'success' in attrs.tags %}bg-success{% endif %} {% if 'warning' in attrs.tags %}bg-warning{% endif %} {% if 'secondary' in attrs.tags %}bg-secondary{% endif %} {% if 'danger' in attrs.tags %}bg-danger{% endif %} {% if 'primary' in attrs.tags %}bg-primary{% endif %}">
+ {% slot %}
+{% endslot %}
+</span>
diff --git a/pyblackbird_cc/templates/allauth/elements/button.html b/pyblackbird_cc/templates/allauth/elements/button.html
new file mode 100644
index 0000000..b88a209
--- /dev/null
+++ b/pyblackbird_cc/templates/allauth/elements/button.html
@@ -0,0 +1,20 @@
+{% load allauth %}
+
+{% comment %} djlint:off {% endcomment %}
+<{% if attrs.href %}a href="{{ attrs.href }}"{% else %}button{% endif %}
+ {% if attrs.form %}form="{{ attrs.form }}"{% endif %}
+ {% if attrs.id %}id="{{ attrs.id }}"{% endif %}
+ {% if attrs.name %}name="{{ attrs.name }}"{% endif %}
+ {% if attrs.type %}type="{{ attrs.type }}"{% endif %}
+ class="btn
+{% if 'success' in attrs.tags %}btn-success
+{% elif 'warning' in attrs.tags %}btn-warning
+{% elif 'secondary' in attrs.tags %}btn-secondary
+{% elif 'danger' in attrs.tags %}btn-danger
+{% elif 'primary' in attrs.tags %}btn-primary
+{% else %}btn-primary
+{% endif %}"
+>
+ {% slot %}
+ {% endslot %}
+ </{% if attrs.href %}a{% else %}button{% endif %}>
diff --git a/pyblackbird_cc/templates/allauth/elements/field.html b/pyblackbird_cc/templates/allauth/elements/field.html
new file mode 100644
index 0000000..dc5f303
--- /dev/null
+++ b/pyblackbird_cc/templates/allauth/elements/field.html
@@ -0,0 +1,66 @@
+{% load allauth %}
+{% load crispy_forms_tags %}
+
+{% if attrs.type == "textarea" %}
+ <div class="row mb-3">
+ <div class="col-sm-10">
+ <label for="{{ attrs.id }}">
+ {% slot label %}
+ {% endslot %}
+ </label>
+ </div>
+ <textarea {% if attrs.required %}required{% endif %}
+ {% if attrs.rows %}rows="{{ attrs.rows }}"{% endif %}
+ {% if attrs.disabled %}disabled{% endif %}
+ {% if attrs.readonly %}readonly{% endif %}
+ {% if attrs.checked %}checked{% endif %}
+ {% if attrs.name %}name="{{ attrs.name }}"{% endif %}
+ {% if attrs.id %}id="{{ attrs.id }}"{% endif %}
+ {% if attrs.placeholder %}placeholder="{{ attrs.placeholder }}"{% endif %}
+ class="form-control">{% slot value %}{% endslot %}</textarea>
+</div>
+{% elif attrs.type == "radio" %}
+<div class="row mb-3">
+ <div class="col-sm-10">
+ <div class="form-check">
+ <input {% if attrs.required %}required{% endif %}
+ {% if attrs.disabled %}disabled{% endif %}
+ {% if attrs.readonly %}readonly{% endif %}
+ {% if attrs.checked %}checked{% endif %}
+ {% if attrs.name %}name="{{ attrs.name }}"{% endif %}
+ {% if attrs.id %}id="{{ attrs.id }}"{% endif %}
+ {% if attrs.placeholder %}placeholder="{{ attrs.placeholder }}"{% endif %}
+ {% if attrs.autocomplete %}autocomplete="{{ attrs.autocomplete }}"{% endif %}
+ value="{{ attrs.value|default_if_none:"" }}"
+ type="{{ attrs.type }}" />
+ <label class="form-check-label" for="{{ attrs.id }}">
+ {% slot label %}
+ {% endslot %}
+ </label>
+ </div>
+</div>
+</div>
+{% else %}
+<div class="col-sm-10">
+ <label for="{{ attrs.id }}">
+ {% slot label %}
+ {% endslot %}
+</label>
+</div>
+<div class="col-sm-10">
+ <input {% if attrs.required %}required{% endif %}
+ {% if attrs.disabled %}disabled{% endif %}
+ {% if attrs.readonly %}readonly{% endif %}
+ {% if attrs.checked %}checked{% endif %}
+ {% if attrs.name %}name="{{ attrs.name }}"{% endif %}
+ {% if attrs.id %}id="{{ attrs.id }}"{% endif %}
+ {% if attrs.placeholder %}placeholder="{{ attrs.placeholder }}"{% endif %}
+ {% if attrs.autocomplete %}autocomplete="{{ attrs.autocomplete }}"{% endif %}
+ value="{{ attrs.value|default_if_none:"" }}"
+ type="{{ attrs.type }}"
+ class="form-control" />
+</div>
+{% endif %}
+{% if slots.help_text %}
+ <div class="form-text">{% slot help_text %}{% endslot %}</div>
+{% endif %}
diff --git a/pyblackbird_cc/templates/allauth/elements/fields.html b/pyblackbird_cc/templates/allauth/elements/fields.html
new file mode 100644
index 0000000..ae8e104
--- /dev/null
+++ b/pyblackbird_cc/templates/allauth/elements/fields.html
@@ -0,0 +1,3 @@
+{% load crispy_forms_tags %}
+
+{{ attrs.form|crispy }}
diff --git a/pyblackbird_cc/templates/allauth/elements/panel.html b/pyblackbird_cc/templates/allauth/elements/panel.html
new file mode 100644
index 0000000..43a7a54
--- /dev/null
+++ b/pyblackbird_cc/templates/allauth/elements/panel.html
@@ -0,0 +1,19 @@
+{% load allauth %}
+
+<section>
+ <div class="card mb-4">
+ <div class="card-body">
+ <h2 class="card-title">
+ {% slot title %}
+ {% endslot %}
+ </h2>
+ {% slot body %}
+ {% endslot %}
+ {% if slots.actions %}
+ <ul>
+ {% for action in slots.actions %}<li>{{ action }}</li>{% endfor %}
+ </ul>
+ {% endif %}
+</div>
+</div>
+</section>
diff --git a/pyblackbird_cc/templates/allauth/elements/table.html b/pyblackbird_cc/templates/allauth/elements/table.html
new file mode 100644
index 0000000..13cc5da
--- /dev/null
+++ b/pyblackbird_cc/templates/allauth/elements/table.html
@@ -0,0 +1,6 @@
+{% load allauth %}
+
+<table class="table">
+ {% slot %}
+{% endslot %}
+</table>
diff --git a/pyblackbird_cc/templates/allauth/layouts/entrance.html b/pyblackbird_cc/templates/allauth/layouts/entrance.html
new file mode 100644
index 0000000..4d585cf
--- /dev/null
+++ b/pyblackbird_cc/templates/allauth/layouts/entrance.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+
+{% load i18n %}
+
+{% block bodyclass %}
+ bg-light
+{% endblock bodyclass %}
+{% block css %}
+ {{ block.super }}
+{% endblock css %}
+{% block title %}
+ {% block head_title %}
+ {% trans "Sign In" %}
+ {% endblock head_title %}
+{% endblock title %}
+{% block body %}
+ <div class="d-flex justify-content-center h-100 py-4">
+ <div class="col-md-4 py-4 my-4 px-4">
+ {% if messages %}
+ {% for message in messages %}
+ <div class="alert alert-dismissible {% if message.tags %}alert-{{ message.tags }}{% endif %}">
+ {{ message }}
+ <button type="button"
+ class="btn-close"
+ data-bs-dismiss="alert"
+ aria-label="Close"></button>
+ </div>
+ {% endfor %}
+ {% endif %}
+ {% block content %}
+ {% endblock content %}
+ </div>
+ </div>
+{% endblock body %}
diff --git a/pyblackbird_cc/templates/allauth/layouts/manage.html b/pyblackbird_cc/templates/allauth/layouts/manage.html
new file mode 100644
index 0000000..75b4959
--- /dev/null
+++ b/pyblackbird_cc/templates/allauth/layouts/manage.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+
+{% block main %}
+ {% block content %}
+ {% endblock content %}
+{% endblock main %}
diff --git a/pyblackbird_cc/templates/base.html b/pyblackbird_cc/templates/base.html
new file mode 100644
index 0000000..7c6f1b6
--- /dev/null
+++ b/pyblackbird_cc/templates/base.html
@@ -0,0 +1,127 @@
+{% load static i18n %}
+
+<!DOCTYPE html>
+{% get_current_language as LANGUAGE_CODE %}
+<html lang="{{ LANGUAGE_CODE }}">
+ <head>
+ <meta charset="utf-8" />
+ <meta http-equiv="x-ua-compatible" content="ie=edge" />
+ <title>
+ {% block title %}
+ pyblackbird-cc
+ {% endblock title %}
+ </title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="description" content="Joanna Lemon Resources" />
+ <meta name="author" content="Matthew Lemon" />
+ <link rel="icon" href="{% static 'images/favicons/favicon.ico' %}" />
+ {% block css %}
+ <!-- Latest compiled and minified Bootstrap CSS -->
+ <link rel="stylesheet"
+ href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/css/bootstrap.min.css"
+ integrity="sha512-SbiR/eusphKoMVVXysTKG/7VseWii+Y3FdHrt0EpKgpToZeemhqHeZeLWLhJutz/2ut2Vw1uQEj2MbRF+TVBUA=="
+ crossorigin="anonymous"
+ referrerpolicy="no-referrer" />
+ <!-- Your stuff: Third-party CSS libraries go here -->
+ <!-- This file stores project-specific CSS -->
+ <link href="{% static 'css/project.css' %}" rel="stylesheet" />
+ <link rel="stylesheet" href="{% static "css/wrapper.css" %}" type="text/css" media="screen" charset="utf-8" />
+ {% endblock css %}
+ <!-- Le javascript
+ ================================================== -->
+ {# Placed at the top of the document so pages load faster with defer #}
+ {% block javascript %}
+ <!-- Bootstrap JS -->
+ {#<script defer#}
+ {# src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/js/bootstrap.min.js"#}
+ {# integrity="sha512-1/RvZTcCDEUjY/CypiMz+iqqtaoQfAITmNSJY17Myp4Ms5mdxPS5UV7iOfdZoxcGhzFbOm6sntTKJppjvuhg4g=="#}
+ {# crossorigin="anonymous"#}
+ {# referrerpolicy="no-referrer"></script>#}
+ <!-- Your stuff: Third-party javascript libraries go here -->
+ <!-- place project specific Javascript in this file -->
+ <script defer src="{% static 'js/project.js' %}"></script>
+ {% endblock javascript %}
+ </head>
+ <body class="{% block bodyclass %}{% endblock bodyclass %}">
+ {% block body %}
+ <div class="mb-1">
+ <nav class="navbar navbar-expand-md navbar-light bg-light">
+ <div class="container-fluid">
+ <button class="navbar-toggler navbar-toggler-right"
+ type="button"
+ data-bs-toggle="collapse"
+ data-bs-target="#navbarSupportedContent"
+ aria-controls="navbarSupportedContent"
+ aria-expanded="false"
+ aria-label="Toggle navigation">
+ <span class="navbar-toggler-icon"></span>
+ </button>
+ <a class="navbar-brand" href="{% url 'home' %}">pyblackbird-cc</a>
+ <div class="collapse navbar-collapse" id="navbarSupportedContent">
+ <ul class="navbar-nav mr-auto">
+ <li class="nav-item active">
+ <a class="nav-link" href="{% url 'home' %}">Home <span class="visually-hidden">(current)</span></a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="{% url 'about' %}">About</a>
+ </li>
+ {% if request.user.is_authenticated %}
+ <li class="nav-item">
+ <a class="nav-link" href="{% url 'users:detail' request.user.pk %}">{% translate "My Profile" %}</a>
+ </li>
+ <li class="nav-item">
+ {# URL provided by django-allauth/account/urls.py #}
+ <a class="nav-link" href="{% url 'account_logout' %}">{% translate "Sign Out" %}</a>
+ </li>
+ {% else %}
+ {% if ACCOUNT_ALLOW_REGISTRATION %}
+ <li class="nav-item">
+ {# URL provided by django-allauth/account/urls.py #}
+ <a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% translate "Sign Up" %}</a>
+ </li>
+ {% endif %}
+ <li class="nav-item">
+ {# URL provided by django-allauth/account/urls.py #}
+ <a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% translate "Sign In" %}</a>
+ </li>
+ {% endif %}
+ </ul>
+ </div>
+ </div>
+ </nav>
+ </div>
+ <div class="container">
+ {% if messages %}
+ {% for message in messages %}
+ <div class="alert alert-dismissible {% if message.tags %}alert-{{ message.tags }}{% endif %}">
+ {{ message }}
+ <button type="button"
+ class="btn-close"
+ data-bs-dismiss="alert"
+ aria-label="Close"></button>
+ </div>
+ {% endfor %}
+ {% endif %}
+ {% block main %}
+ {% block content %}
+ <p>Use this document as a way to quick start any new project.</p>
+ {% endblock content %}
+ {% endblock main %}
+ </div>
+ {% endblock body %}
+ <!-- /container -->
+ {% block modal %}
+ {% endblock modal %}
+ {% block inline_javascript %}
+ {% comment %}
+ Script tags with only code, no src (defer by default). To run
+ with a "defer" so that you run inline code:
+ <script>
+ window.addEventListener('DOMContentLoaded', () => {
+ /* Run whatever you want */
+ });
+ </script>
+ {% endcomment %}
+ {% endblock inline_javascript %}
+ </body>
+</html>
diff --git a/pyblackbird_cc/templates/pages/about.html b/pyblackbird_cc/templates/pages/about.html
new file mode 100644
index 0000000..94d9808
--- /dev/null
+++ b/pyblackbird_cc/templates/pages/about.html
@@ -0,0 +1 @@
+{% extends "base.html" %}
diff --git a/pyblackbird_cc/templates/pages/home.html b/pyblackbird_cc/templates/pages/home.html
new file mode 100644
index 0000000..94d9808
--- /dev/null
+++ b/pyblackbird_cc/templates/pages/home.html
@@ -0,0 +1 @@
+{% extends "base.html" %}
diff --git a/pyblackbird_cc/templates/users/user_detail.html b/pyblackbird_cc/templates/users/user_detail.html
new file mode 100644
index 0000000..7d52259
--- /dev/null
+++ b/pyblackbird_cc/templates/users/user_detail.html
@@ -0,0 +1,31 @@
+{% extends "base.html" %}
+
+{% load static %}
+
+{% block title %}
+ User:
+ {{ object.name }}
+{% endblock title %}
+{% block content %}
+ <div class="container">
+ <div class="row">
+ <div class="col-sm-12">
+ <h2>{{ object.name }}</h2>
+ </div>
+ </div>
+ {% if object == request.user %}
+ <!-- Action buttons -->
+ <div class="row">
+ <div class="col-sm-12">
+ <a class="btn btn-primary" href="{% url 'users:update' %}" role="button">My Info</a>
+ <a class="btn btn-primary"
+ href="{% url 'account_email' %}"
+ role="button">E-Mail</a>
+ <a class="btn btn-primary" href="{% url 'mfa_index' %}" role="button">MFA</a>
+ <!-- Your Stuff: Custom user template urls -->
+ </div>
+ </div>
+ <!-- End Action buttons -->
+ {% endif %}
+ </div>
+{% endblock content %}
diff --git a/pyblackbird_cc/templates/users/user_form.html b/pyblackbird_cc/templates/users/user_form.html
new file mode 100644
index 0000000..a53b304
--- /dev/null
+++ b/pyblackbird_cc/templates/users/user_form.html
@@ -0,0 +1,21 @@
+{% extends "base.html" %}
+
+{% load crispy_forms_tags %}
+
+{% block title %}
+ {{ user.name }}
+{% endblock title %}
+{% block content %}
+ <h1>{{ user.name }}</h1>
+ <form class="form-horizontal"
+ method="post"
+ action="{% url 'users:update' %}">
+ {% csrf_token %}
+ {{ form|crispy }}
+ <div class="control-group">
+ <div class="controls">
+ <button type="submit" class="btn btn-primary">Update</button>
+ </div>
+ </div>
+ </form>
+{% endblock content %}