summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-05 14:17:27 -0600
committerAndrew Godwin2022-11-05 14:17:27 -0600
commitd77dcf62b4005a0f36ef2fa7ba6d3651d2ef38d7 (patch)
treedd356a933b8179a22e5da6e938acd96a175ac0d6 /templates
downloadtakahe-d77dcf62b4005a0f36ef2fa7ba6d3651d2ef38d7.tar.gz
takahe-d77dcf62b4005a0f36ef2fa7ba6d3651d2ef38d7.tar.bz2
takahe-d77dcf62b4005a0f36ef2fa7ba6d3651d2ef38d7.zip
Initial commit (users and statuses)
Diffstat (limited to 'templates')
-rw-r--r--templates/404.html6
-rw-r--r--templates/auth/login.html11
-rw-r--r--templates/base.html34
-rw-r--r--templates/identity/create.html12
-rw-r--r--templates/identity/select.html17
-rw-r--r--templates/identity/view.html13
-rw-r--r--templates/index.html9
-rw-r--r--templates/statuses/_status.html10
-rw-r--r--templates/statuses/home.html15
9 files changed, 127 insertions, 0 deletions
diff --git a/templates/404.html b/templates/404.html
new file mode 100644
index 0000000..6777ecb
--- /dev/null
+++ b/templates/404.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+
+{% block content %}
+ <h1>Page Not Found</h1>
+ <p>Sorry about that.</p>
+{% endblock %}
diff --git a/templates/auth/login.html b/templates/auth/login.html
new file mode 100644
index 0000000..f8e1c9d
--- /dev/null
+++ b/templates/auth/login.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+{% load crispy_forms_tags %}
+
+{% block title %}Login{% endblock %}
+
+{% block content %}
+ <section class="modal identities">
+ <h1>Login</h1>
+ {% crispy form form.helper %}
+ </section>
+{% endblock %}
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..79a5e87
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>{% block title %}{% endblock %} - {{ config.site_name }}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ {% load static %}
+ <link rel="stylesheet" href="{% static "css/style.css" %}" type="text/css" media="screen" />
+ <link rel="stylesheet" href="{% static "fonts/raleway/raleway.css" %}" type="text/css" />
+ <link rel="stylesheet" href="{% static "fonts/font_awesome/all.min.css" %}" type="text/css" />
+ {% block extra_head %}{% endblock %}
+</head>
+<body class="{% block body_class %}{% endblock %}">
+
+ <header>
+ <h1><a href="/">{{ config.site_name }}</a></h1>
+ <menu>
+ <li>
+ {% if user.is_authenticated %}
+ {{ user.email }}
+ {% else %}
+ <a href="/auth/login/">Login</a>
+ {% endif %}
+ </li>
+ </menu>
+ </header>
+
+ <main>
+ {% block content %}
+ {% endblock %}
+ </main>
+
+</body>
+</html>
diff --git a/templates/identity/create.html b/templates/identity/create.html
new file mode 100644
index 0000000..cbf0fb2
--- /dev/null
+++ b/templates/identity/create.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% load crispy_forms_tags %}
+
+{% block title %}Create Identity{% endblock %}
+
+{% block content %}
+ <section class="modal identities">
+ <h1>Create Identity</h1>
+ {% crispy form form.helper %}
+ </section>
+{% endblock %}
diff --git a/templates/identity/select.html b/templates/identity/select.html
new file mode 100644
index 0000000..f5be401
--- /dev/null
+++ b/templates/identity/select.html
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+
+{% block title %}Select Identity{% endblock %}
+
+{% block content %}
+ <section class="modal identities">
+ <h1>Select Identity</h1>
+ {% for identity in identities %}
+ <a class="option" href="{{ identity.urls.activate }}">{{ identity }}</a>
+ {% empty %}
+ <p class="option empty">You have no identities.</p>
+ {% endfor %}
+ <a href="/identity/create/" class="option new">
+ <i class="fa-solid fa-plus"></i> Create a new identity
+ </a>
+ </section>
+{% endblock %}
diff --git a/templates/identity/view.html b/templates/identity/view.html
new file mode 100644
index 0000000..f0a8a02
--- /dev/null
+++ b/templates/identity/view.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+
+{% block title %}{{ identity }}{% endblock %}
+
+{% block content %}
+ <h1>{{ identity }} <small>{{ identity.handle }}</small></h1>
+
+ {% for status in statuses %}
+ {% include "statuses/_status.html" %}
+ {% empty %}
+ No statuses yet.
+ {% endfor %}
+{% endblock %}
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..dfd1805
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block title %}Welcome{% endblock %}
+
+{% block content %}
+ {% for identity in identities %}
+ <a href="{{ identity.urls.view }}">{{ identity }}</a>
+ {% endfor %}
+{% endblock %}
diff --git a/templates/statuses/_status.html b/templates/statuses/_status.html
new file mode 100644
index 0000000..6e61fd9
--- /dev/null
+++ b/templates/statuses/_status.html
@@ -0,0 +1,10 @@
+<div class="status">
+ <h3 class="author">
+ <a href="{{ status.identity.urls.view }}">
+ {{ status.identity }}
+ <small>{{ status.identity.short_handle }}</small>
+ </a>
+ </h3>
+ <time>{{ status.created | timesince }} ago</time>
+ {{ status.text | linebreaks }}
+</div>
diff --git a/templates/statuses/home.html b/templates/statuses/home.html
new file mode 100644
index 0000000..e47ccfd
--- /dev/null
+++ b/templates/statuses/home.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+{% load crispy_forms_tags %}
+
+{% block title %}Home{% endblock %}
+
+{% block content %}
+
+ {% crispy form form.helper %}
+
+ {% for status in statuses %}
+ {% include "statuses/_status.html" %}
+ {% empty %}
+ No statuses yet.
+ {% endfor %}
+{% endblock %}