summaryrefslogtreecommitdiffstats
path: root/templates/activities
diff options
context:
space:
mode:
Diffstat (limited to 'templates/activities')
-rw-r--r--templates/activities/_home_menu.html6
-rw-r--r--templates/activities/_post.html15
-rw-r--r--templates/activities/federated.html21
-rw-r--r--templates/activities/home.html31
4 files changed, 59 insertions, 14 deletions
diff --git a/templates/activities/_home_menu.html b/templates/activities/_home_menu.html
new file mode 100644
index 0000000..29d19e9
--- /dev/null
+++ b/templates/activities/_home_menu.html
@@ -0,0 +1,6 @@
+<nav>
+ <a href="/" {% if current_page == "home" %}class="selected"{% endif %}>Home</a>
+ <a href="/" {% if current_page == "mentions" %}class="selected"{% endif %}>Mentions</a>
+ <a href="/" {% if current_page == "public" %}class="selected"{% endif %}>Public</a>
+ <a href="/federated/" {% if current_page == "federated" %}class="selected"{% endif %}>Federated</a>
+</nav>
diff --git a/templates/activities/_post.html b/templates/activities/_post.html
index eef09db..a5e637f 100644
--- a/templates/activities/_post.html
+++ b/templates/activities/_post.html
@@ -1,4 +1,5 @@
{% load static %}
+{% load activity_tags %}
<div class="post">
{% if post.author.icon_uri %}
@@ -7,20 +8,20 @@
<img src="{% static "img/unknown-icon-128.png" %}" class="icon">
{% endif %}
- <h3 class="author">
- <a href="{{ post.author.urls.view }}">
- {{ post.author.name_or_handle }} <small>@{{ post.author.handle }}</small>
- </a>
- </h3>
<time>
<a href="{{ post.urls.view }}">
{% if post.authored %}
- {{ post.authored | timesince }} ago
+ {{ post.authored | timedeltashort }}
{% else %}
- {{ post.created | timesince }} ago
+ {{ post.created | timedeltashort }}
{% endif %}
</a>
</time>
+
+ <a href="{{ post.author.urls.view }}" class="handle">
+ {{ post.author.name_or_handle }} <small>@{{ post.author.handle }}</small>
+ </a>
+
<div class="content">
{{ post.safe_content }}
</div>
diff --git a/templates/activities/federated.html b/templates/activities/federated.html
new file mode 100644
index 0000000..8d8297b
--- /dev/null
+++ b/templates/activities/federated.html
@@ -0,0 +1,21 @@
+{% extends "base.html" %}
+
+{% block title %}Federated Timeline{% endblock %}
+
+{% block content %}
+ {% include "activities/_home_menu.html" %}
+
+ <section class="columns">
+ <div class="left-column">
+ {% for post in timeline_posts %}
+ {% include "activities/_post.html" %}
+ {% empty %}
+ No posts yet.
+ {% endfor %}
+ </div>
+ <div class="right-column">
+ <h2>?</h2>
+ </div>
+
+ </section>
+{% endblock %}
diff --git a/templates/activities/home.html b/templates/activities/home.html
index 9fe4bba..c777ce8 100644
--- a/templates/activities/home.html
+++ b/templates/activities/home.html
@@ -1,15 +1,32 @@
{% extends "base.html" %}
-{% load crispy_forms_tags %}
{% block title %}Home{% endblock %}
{% block content %}
+ {% include "activities/_home_menu.html" %}
- {% crispy form form.helper %}
+ <section class="columns">
- {% for post in timeline_posts %}
- {% include "activities/_post.html" %}
- {% empty %}
- No posts yet.
- {% endfor %}
+ <div class="left-column">
+ {% for post in timeline_posts %}
+ {% include "activities/_post.html" %}
+ {% empty %}
+ No posts yet.
+ {% endfor %}
+ </div>
+
+ <div class="right-column">
+ <h2>Compose</h2>
+ <form action="." method="POST" class="compose">
+ {% csrf_token %}
+ {{ form.text }}
+ {{ form.content_warning }}
+ <div class="buttons">
+ <span class="button toggle" _="on click toggle .enabled then toggle .hidden on #id_content_warning">CW</span>
+ <button>Post</button>
+ </div>
+ </form>
+ </div>
+
+ </section>
{% endblock %}