Merge branch 'master' of https://github.com/Plume-org/Plume
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
</nav>
|
||||
<nav>
|
||||
{% if account %}
|
||||
<a href="/dashboard">Dashboard</a>
|
||||
<a href="/notifications">Notifications</a>
|
||||
<a href="/me">My account</a>
|
||||
<a href="/logout">Log Out</a>
|
||||
@@ -0,0 +1,26 @@
|
||||
{% extends "base" %}
|
||||
{% import "macros" as macros %}
|
||||
|
||||
{% block title %}
|
||||
{{ blog.title }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ blog.title }} (~{{ blog.actor_id }})</h1>
|
||||
<p>{{ blog.summary }}</p>
|
||||
|
||||
<section>
|
||||
<h2>Latest articles</h2>
|
||||
{% if recents | length < 1 %}
|
||||
<p>No posts to see here yet.</p>
|
||||
{% endif %}
|
||||
{% if is_author %}
|
||||
<a href="new" class="button inline-block">New article</a>
|
||||
{% endif %}
|
||||
<div class="cards">
|
||||
{% for article in recents %}
|
||||
{{ macros::post_card(article=article) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endblock content %}
|
||||
@@ -1,18 +0,0 @@
|
||||
{% extends "base" %}
|
||||
{% import "macros" as macros %}
|
||||
|
||||
{% block title %}
|
||||
{{ blog.title }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ blog.title }} (~{{ blog.actor_id }})</h1>
|
||||
<p>{{ blog.summary }}</p>
|
||||
|
||||
<h2>Latest articles</h2>
|
||||
<div class="cards">
|
||||
{% for article in recents %}
|
||||
{{ macros::post_card(article=article) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,11 @@
|
||||
{% macro post_card(article) %}
|
||||
<div class="card">
|
||||
<h3><a href="{{ article.url }}">{{ article.post.title }}</a></h3>
|
||||
<main
|
||||
<p>{{ article.post.content | striptags | truncate(length=200) }}</p>
|
||||
</main>
|
||||
<p class="author">
|
||||
By <a href="/@/{{ article.author.fqn }}/">{{ article.author.display_name }}</a> ⋅ {{ article.date | date(format="%B %e") }}
|
||||
</p>
|
||||
</div>
|
||||
{% endmacro post_card %}
|
||||
@@ -1,9 +0,0 @@
|
||||
{% macro post_card(article) %}
|
||||
<div class="card">
|
||||
<h3><a href="{{ article.url }}">{{ article.post.title }}</a></h3>
|
||||
<main
|
||||
<p>{{ article.post.content | escape | truncate(length=200) }}</p>
|
||||
</main>
|
||||
<p class="author">By <a href="/@/{{ article.author.fqn }}/">{{ article.author.display_name }}</a> ⋅ {{ article.date | date(format="%B %e") }}</p>
|
||||
</div>
|
||||
{% endmacro post_card %}
|
||||
@@ -9,7 +9,7 @@ Notifications
|
||||
<div class="list">
|
||||
{% for notification in notifications %}
|
||||
<div class="card">
|
||||
<h3><a href="{% if notification.link %}{{ notification.link }}{% else %}#{% endif %}">{{ notification.title }}</h3>
|
||||
<h3><a href="{% if notification.link %}{{ notification.link }}/{% else %}#{% endif %}">{{ notification.title }}</h3>
|
||||
{% if notification.content %}
|
||||
<p>{{ notification.content }}</p>
|
||||
{% endif %}
|
||||
@@ -26,11 +26,23 @@
|
||||
<p>
|
||||
{{ n_likes }} like{{ n_likes | pluralize }}
|
||||
</p>
|
||||
|
||||
{% if has_liked %}
|
||||
<a class="button liked" href="like">I don't like this anymore</a>
|
||||
{% else %}
|
||||
<a class="button" href="like">Like</a>
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
{{ n_reshares }} reshare{{ n_reshares | pluralize }}
|
||||
</p>
|
||||
<a class="button" href="reshare">
|
||||
{% if has_reshared %}
|
||||
I don't want to reshare this anymore
|
||||
{% else %}
|
||||
Reshare
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="comments">
|
||||
@@ -6,6 +6,9 @@ Login
|
||||
|
||||
{% block content %}
|
||||
<h1>Login</h1>
|
||||
{% if message %}
|
||||
<p>{{ message }}</p>
|
||||
{% endif %}
|
||||
<form method="post">
|
||||
<label for="email_or_name">Username or email</label>
|
||||
<input type="text" id="email_or_name" name="email_or_name" />
|
||||
@@ -0,0 +1,25 @@
|
||||
{% extends "base" %}
|
||||
{% import "macros" as macros %}
|
||||
|
||||
{% block title %}
|
||||
Dashboard
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Your Dashboard</h1>
|
||||
|
||||
<section>
|
||||
<h2>Your Blogs</h2>
|
||||
{% if blogs | length < 1 %}
|
||||
<p>You don't have any blog yet. Create your own, or ask to join one.</p>
|
||||
{% endif %}
|
||||
<a class="button inline-block" href="/blogs/new">Start a new blog</a>
|
||||
<div class="list">
|
||||
{% for blog in blogs %}
|
||||
<div class="card">
|
||||
<h3><a href="/~/{{ blog.actor_id }}/">{{ blog.title }}</a></h3>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endblock content %}
|
||||
@@ -31,10 +31,21 @@
|
||||
{{ user.summary | safe }}
|
||||
</div>
|
||||
|
||||
<h2>Latest articles</h2>
|
||||
<div class="cards">
|
||||
{% for article in recents %}
|
||||
{{ macros::post_card(article=article) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if recents | length != 0 %}
|
||||
<h2>Latest articles</h2>
|
||||
<div class="cards">
|
||||
{% for article in recents %}
|
||||
{{ macros::post_card(article=article) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if reshares | length != 0 %}
|
||||
<h2>Recently reshared</h2>
|
||||
<div class="cards">
|
||||
{% for article in reshares %}
|
||||
{{ macros::post_card(article=article) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
@@ -22,8 +22,8 @@
|
||||
<div class="cards">
|
||||
{% for follower in followers %}
|
||||
<div class="card">
|
||||
<h3><a href="{{ follower.ap_url }}">{{ follower.display_name }}</a> — @{{ follower.fqn }}</h3>
|
||||
<main><p>{{ follower.summary }}</p></main>
|
||||
<h3><a href="{{ follower.ap_url }}/">{{ follower.display_name }}</a> — @{{ follower.fqn }}</h3>
|
||||
<main><p>{{ follower.summary | safe }}</p></main>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user