summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2023-07-24 15:19:56 -0500
committerluxagraf <sng@luxagraf.net>2023-07-24 15:19:56 -0500
commitdc7a649e783546c8e8a47bc004be3799b1b60d1a (patch)
tree9fc591eea6fcc9bfe62746bb08310510e1200fa2 /templates
parentd5c3fdc2be4cf7e19102218aea980ff2f52fc02b (diff)
notes: rearranged some things, added registration templates
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html7
-rw-r--r--templates/django_registration/activation_complete.html7
-rw-r--r--templates/django_registration/activation_email_body.txt5
-rw-r--r--templates/django_registration/activation_email_subject.txt1
-rw-r--r--templates/django_registration/logged_out.html9
-rw-r--r--templates/django_registration/registration_complete.html7
-rw-r--r--templates/django_registration/registration_form.html24
-rw-r--r--templates/registration/login.html38
8 files changed, 97 insertions, 1 deletions
diff --git a/templates/base.html b/templates/base.html
index c771084..e248573 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -20,9 +20,14 @@
<a class="logo-link" href="/" title="Home">Wired Guide Tool</span></a>
</div>
<nav>
- <a class="nav-item" href="/posts" title="View Guides">Guides</a>
<a class="nav-item" href="/notes/todo" title="See what needs to be called in">Todo</a>
<a class="nav-item" href="/notes" title="View Guides">Notes</a>
+ <a class="nav-item" href="/posts" title="View Guides">Guides</a>
+ <span class="nav-item" >
+ <form class="inline btn" action="/logout/" method="post">{% csrf_token %}
+ <button type="submit" value="Log out" class="btn-link">Log out</button>
+ </form>
+ </span>
</nav>
</header>
{% block breadcrumbs %}{% endblock %}
diff --git a/templates/django_registration/activation_complete.html b/templates/django_registration/activation_complete.html
new file mode 100644
index 0000000..d83317a
--- /dev/null
+++ b/templates/django_registration/activation_complete.html
@@ -0,0 +1,7 @@
+{% extends 'base.html' %}
+{% block content %}
+<main class="single-col">
+<h1>Your account is now active.</h1>
+<p><a href="{% url 'login' %}">Login</a> and get started!</p>
+</main>
+{% endblock %}
diff --git a/templates/django_registration/activation_email_body.txt b/templates/django_registration/activation_email_body.txt
new file mode 100644
index 0000000..8b1e134
--- /dev/null
+++ b/templates/django_registration/activation_email_body.txt
@@ -0,0 +1,5 @@
+Thanks for signing up with {{site}}, just one more thing to do, click this link to confirm your email:
+
+<a href="{{scheme}}://{{site}}/activate/{{activation_key}}">{{scheme}}://{{site}}/register/{{activation_key}}</a>
+
+
diff --git a/templates/django_registration/activation_email_subject.txt b/templates/django_registration/activation_email_subject.txt
new file mode 100644
index 0000000..ea275d2
--- /dev/null
+++ b/templates/django_registration/activation_email_subject.txt
@@ -0,0 +1 @@
+Please Activate Your Account
diff --git a/templates/django_registration/logged_out.html b/templates/django_registration/logged_out.html
new file mode 100644
index 0000000..cccb58b
--- /dev/null
+++ b/templates/django_registration/logged_out.html
@@ -0,0 +1,9 @@
+{% extends 'base.html' %}
+
+{% block title %}Logged Out{% endblock %}
+
+{% block primary %}
+<h2>You're logged out</h2>
+<h4>Thanks for visiting the site today</h4>
+<a href="{%url 'login'%}">Login again</a>
+{% endblock %}
diff --git a/templates/django_registration/registration_complete.html b/templates/django_registration/registration_complete.html
new file mode 100644
index 0000000..59677ce
--- /dev/null
+++ b/templates/django_registration/registration_complete.html
@@ -0,0 +1,7 @@
+{% extends 'base.html' %}
+{% block content %}
+<main class="single-col">
+<h1>Thanks for signing up.</h1>
+<p>Please check your email for a link to confirm you new account.<?p>
+</main>
+{% endblock %}
diff --git a/templates/django_registration/registration_form.html b/templates/django_registration/registration_form.html
new file mode 100644
index 0000000..8573918
--- /dev/null
+++ b/templates/django_registration/registration_form.html
@@ -0,0 +1,24 @@
+{% extends 'base.html' %}
+{% block content %}
+<form action="" method="post">
+{% csrf_token %}
+{{ form.non_field_errors }}
+{% for field in form %}
+<fieldset {% if field.errors %}class="error"{%endif%}>
+{{field.label_tag}}
+{{field}}
+{% if field.label == "Password" %}<span class="helptext">Password should be 8 or more characters.</span>{% endif %}
+{% if field.errors %}{{field.errors}}{% endif %}
+</fieldset>
+{% endfor %}
+<p><input class="btn" value="submit" type="submit" /></p>
+</form>
+<p class="text-muted">Already have an account? <a href="{% url 'login' %}">Log in</a>.</p>
+{% endblock %}
+{% block extra %}
+<div class="overlay-content" id="js-overlay-content" style="display: none;">
+ {% include 'lib/login.html' with form=login_form site=site %}
+ {{login_form}}
+</div>
+{{site.name}}
+{%endblock%}
diff --git a/templates/registration/login.html b/templates/registration/login.html
new file mode 100644
index 0000000..a7e7978
--- /dev/null
+++ b/templates/registration/login.html
@@ -0,0 +1,38 @@
+{% extends 'base.html' %}
+{% block primary %}
+<main class="narrow">
+<form class="form-narrow" method="post" action="{% url 'login' %}">
+<legend class="fancy-legend">Login to {{site.name}}</legend>
+{% if form.errors %}
+<p>Your username and password didn't match. Please try again.</p>
+{% endif %}
+
+{% if next %}
+ {% if user.is_authenticated %}
+ <p>Your account doesn't have access to this page. To proceed,
+ please login with an account that has access.</p>
+ {% else %}
+ <p>Please login to see this page.</p>
+ {% endif %}
+{% endif %}
+
+{% csrf_token %}
+<fieldset>
+ {{ form.username.label_tag }}
+ {{ form.username }}
+</fieldset>
+<fieldset>
+ {{ form.password.label_tag }}
+ {{ form.password }}
+</fieldset>
+
+<input type="submit" class="btn sm" value="login">
+<input type="hidden" name="next" value="{{ next }}">
+</form>
+
+{# Assumes you setup the password_reset view in your URLconf #}
+<hr />
+<!--comment <p class="text-center">No account yet? <a href="/register/">Sign up</a>.<br>-->
+<a href="{% url 'password_reset' %}">Forgot your password?</a></p>
+</main>
+{% endblock %}