Merge branch 'master' of https://github.com/Plume-org/Plume
This commit is contained in:
@@ -2,28 +2,28 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block title %}{% endblock title %} ⋅ Plume</title>
|
||||
<title>{% block title %}{% endblock title %} ⋅ {{ "Plume" | _ }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="/static/main.css" />
|
||||
<link rel="stylesheet" href="/static/fontawesome-5.0.10/css/fontawesome-all.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav id="menu"><a href="#">Menu</a></nav>
|
||||
<nav id="menu"><a href="#">{{ "Menu" | _ }}</a></nav>
|
||||
<nav>
|
||||
<a href="/" class="title">Plume</a>
|
||||
<a href="/" class="title">{{ "Plume" | _ }}</a>
|
||||
{% block header %}
|
||||
{% endblock header %}
|
||||
</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>
|
||||
<a href="/dashboard">{{ "Dashboard" | _ }}</a>
|
||||
<a href="/notifications">{{ "Notifications" | _ }}</a>
|
||||
<a href="/me">{{ "My account" | _ }}</a>
|
||||
<a href="/logout">{{ "Log Out" | _ }}</a>
|
||||
{% else %}
|
||||
<a href="/login">Log In</a>
|
||||
<a href="/users/new">Register</a>
|
||||
<a href="/login">{{ "Log In" | _ }}</a>
|
||||
<a href="/users/new">{{ "Register" | _ }}</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
<p>{{ blog.summary }}</p>
|
||||
|
||||
<section>
|
||||
<h2>Latest articles</h2>
|
||||
<h2>{{ "Latest articles" | _ }}</h2>
|
||||
{% if recents | length < 1 %}
|
||||
<p>No posts to see here yet.</p>
|
||||
<p>{{ "No posts to see here yet." | _ }}</p>
|
||||
{% endif %}
|
||||
{% if is_author %}
|
||||
<a href="new" class="button inline-block">New article</a>
|
||||
<a href="new" class="button inline-block">{{ "New article" | _ }}</a>
|
||||
{% endif %}
|
||||
<div class="cards">
|
||||
{% for article in recents %}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
New blog
|
||||
{{ "New blog" | _ }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Create a blog</h1>
|
||||
<h1>{{ "Create a blog" | _ }}</h1>
|
||||
<form method="post">
|
||||
<label for="title">Title</label>
|
||||
<label for="title">{{ "Title" | _ }}</label>
|
||||
<input type="text" id="title" name="title" />
|
||||
|
||||
<input type="submit" value="Create blog" />
|
||||
<input type="submit" value="{{ "Create blog"}}" />
|
||||
</form>
|
||||
{% endblock content %}
|
||||
| _ {% endblock content %}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
Comment "{{ post.title }}"
|
||||
{{ 'Comment "{{ post }}"' | _(post=post.title) }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Comment "{{ post.title }}"</h1>
|
||||
<h1>{{ 'Comment "{{ post }}"' | _(post=post.title) }}</h1>
|
||||
<form method="post">
|
||||
<label for="content">Content</label>
|
||||
<label for="content">{{ "Content" | _ }}</label>
|
||||
<textarea id="content" name="content"></textarea>
|
||||
<input type="submit" value="Comment" />
|
||||
<input type="submit" value="{{ "Submit comment" | _ }}" />
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "errors/base" %}
|
||||
|
||||
{% block error %}
|
||||
<h1>Something broke on our side.</h1>
|
||||
<p>Sorry about that. If you think this is a bug, please report it.</p>
|
||||
<h1>{{ "Something broke on our side." | _ }}</h1>
|
||||
<p>{{ "Sorry about that. If you think this is a bug, please report it." | _ }}</p>
|
||||
{% endblock error %}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
Configuration
|
||||
{{ "Configuration" | _ }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Configure your instance</h1>
|
||||
<h1>{{ "Configure your instance" | _ }}</h1>
|
||||
<form method="post">
|
||||
<label for="name">Name</label>
|
||||
<label for="name">{{ "Name" | _ }}</label>
|
||||
<input type="text" id="name" name="name" />
|
||||
|
||||
<input type="submit" value="Let's go!" />
|
||||
<input type="submit" value="{{ "Let's go!" | _ }}" />
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Welcome on {{ instance.name }}</h1>
|
||||
<h1>{{ "Welcome on {{ instance_name }}" | _(instance_name=instance.name) }}</h1>
|
||||
|
||||
<h2>Latest articles</h2>
|
||||
<h2>{{ "Latest articles" | _ }}</h2>
|
||||
<div class="cards">
|
||||
{% for article in recents %}
|
||||
{{ macros::post_card(article=article) }}
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
{% macro post_card(article) %}
|
||||
{% if article.author.display_name %}
|
||||
{% set name = article.author.display_name %}
|
||||
{% else %}
|
||||
{% set name = article.author.username %}
|
||||
{% endif %}
|
||||
<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") }}
|
||||
By <a href="/@/{{ article.author.fqn }}/">{{ name }}</a> ⋅ {{ article.date | date(format="%B %e") }}
|
||||
</p>
|
||||
</div>
|
||||
{% endmacro post_card %}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
Notifications
|
||||
{{ "Notifications" | _ }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Notifications</h1>
|
||||
<h1>{{ "Notifications" | _ }}</h1>
|
||||
<div class="list">
|
||||
{% for notification in notifications %}
|
||||
<div class="card">
|
||||
|
||||
@@ -9,9 +9,24 @@
|
||||
{% endblock header %}
|
||||
|
||||
{% block content %}
|
||||
<<<<<<< HEAD
|
||||
<h1 class="article">{{ post.title }}</h1>
|
||||
<p class="article-info">
|
||||
<span class="author">Written by <a href="/@/{{ author.fqn }}/">{{ author.display_name }}</a></span>
|
||||
|
||||
{% if author.display_name %}
|
||||
{% set name = author.display_name %}
|
||||
{% else %}
|
||||
{% set name = author.username %}
|
||||
{% endif %}
|
||||
|
||||
<span class="author">{{ "Written by {{ link_1 }}{{ url }}{{ link_2 }}{{ name }}{{ link_3 }}" | _(
|
||||
link_1='<a href="/@/',
|
||||
url=author.fqn,
|
||||
link_2='/">',
|
||||
name=name,
|
||||
link_3="</a>"
|
||||
)
|
||||
}}</a></span>
|
||||
—
|
||||
<span class="date">{{ date | date(format="%B %e, %Y") }}</span>
|
||||
</p>
|
||||
@@ -20,43 +35,49 @@
|
||||
</article>
|
||||
|
||||
<div class="article-meta">
|
||||
<p>This article is under the {{ post.license }} license.</p>
|
||||
<p>{{ "This article is under the {{ license }} license." | _(license=post.license) }}</p>
|
||||
|
||||
<div class="likes">
|
||||
<p>
|
||||
{{ n_likes }} like{{ n_likes | pluralize }}
|
||||
{{ "{{ count }} likes" | _n(singular="One like", count=n_likes) }}
|
||||
</p>
|
||||
|
||||
{% if has_liked %}
|
||||
<a class="button liked" href="like">I don't like this anymore</a>
|
||||
<a class="button liked" href="like">{{ "I don't like this anymore" | _ }}</a>
|
||||
{% else %}
|
||||
<a class="button" href="like">Like</a>
|
||||
<a class="button" href="like">{{ "Add yours" | _ }}</a>
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
{{ n_reshares }} reshare{{ n_reshares | pluralize }}
|
||||
{{ "{{ count }} reshares" | _n(singular="One reshare", count=n_reshares) }}
|
||||
</p>
|
||||
<a class="button" href="reshare">
|
||||
{% if has_reshared %}
|
||||
I don't want to reshare this anymore
|
||||
{{ "I don't want to reshare this anymore" | _ }}
|
||||
{% else %}
|
||||
Reshare
|
||||
{{ "Reshare" | _ }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="comments">
|
||||
<h2>Comments</h2>
|
||||
<a class="button" href="comment?">Comment</a>
|
||||
<h2>{{ "Comments" | _ }}</h2>
|
||||
<a class="button" href="comment?">{{ "Comment" | _ }}</a>
|
||||
<div class="list">
|
||||
{% for comment in comments %}
|
||||
{% if comment.author.display_name %}
|
||||
{% set comment_author_name = comment.author.display_name %}
|
||||
{% else %}
|
||||
{% set comment_author_name = comment.author.username %}
|
||||
{% endif %}
|
||||
|
||||
<div class="comment" id="comment-{{ comment.id }}">
|
||||
<a class="author" href="{{ comment.author.ap_url }}">
|
||||
<span class="display-name">{{ comment.author.display_name }}</span>
|
||||
<span class="username">@{{ comment.author.username }}</span>
|
||||
</a>
|
||||
<div class="text">{{ comment.content | safe }}</div>
|
||||
<a class="button" href="comment?responding_to={{ comment.id }}">Respond</a>
|
||||
<a class="button" href="comment?responding_to={{ comment.id }}">{{ "Respond" | _ }}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
New post
|
||||
{{ "New post" | _ }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Create a post</h1>
|
||||
<h1>{{ "Create a post" | _ }}</h1>
|
||||
<form class="new-post" method="post">
|
||||
<input type="text" class="title" name="title" placeholder="Title">
|
||||
<textarea name="content" placeholder="Content..."></textarea>
|
||||
<input type="text" class="title" name="title" placeholder="{{ "Title" | _ }}">
|
||||
<textarea name="content" placeholder="{{ "Content" | _ }}"></textarea>
|
||||
|
||||
<label for="license">License</label>
|
||||
<label for="license">{{ "License" | _ }}</label>
|
||||
<input type="text" id="licence" name="license" />
|
||||
|
||||
<input type="submit" value="Publish" />
|
||||
<input type="submit" value="{{ "Publish" | _ }}" />
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
Login
|
||||
{{ "Login" | _ }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Login</h1>
|
||||
<h1>{{ "Login" | _ }}</h1>
|
||||
{% if message %}
|
||||
<p>{{ message }}</p>
|
||||
{% endif %}
|
||||
<form method="post">
|
||||
<label for="email_or_name">Username or email</label>
|
||||
<label for="email_or_name">{{ "Username or email" | _ }}</label>
|
||||
<input type="text" id="email_or_name" name="email_or_name" />
|
||||
|
||||
<label for="password">Password</label>
|
||||
<label for="password">{{ "Password" | _ }}</label>
|
||||
<input type="password" id="password" name="password" />
|
||||
|
||||
<input type="submit" value="Login" />
|
||||
<input type="submit" value="{{ "Login" | _ }}" />
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
{% import "macros" as macros %}
|
||||
|
||||
{% block title %}
|
||||
Dashboard
|
||||
{{ "Dashboard" | _ }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Your Dashboard</h1>
|
||||
<h1>{{ "Your Dashboard" | _ }}</h1>
|
||||
|
||||
<section>
|
||||
<h2>Your Blogs</h2>
|
||||
<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>
|
||||
<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>
|
||||
<a class="button inline-block" href="/blogs/new">{{ "Start a new blog" | _ }}</a>
|
||||
<div class="list">
|
||||
{% for blog in blogs %}
|
||||
<div class="card">
|
||||
|
||||
@@ -2,37 +2,24 @@
|
||||
{% import "macros" as macros %}
|
||||
|
||||
{% block title %}
|
||||
{{ user.display_name }}
|
||||
{% if user.display_name %}
|
||||
{% set name = user.display_name %}
|
||||
{% else %}
|
||||
{% set name = user.username %}
|
||||
{% endif %}
|
||||
|
||||
{{ name }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1>
|
||||
{{ user.display_name }}
|
||||
{% if user.is_admin %}
|
||||
<span class="badge">Admin</span>
|
||||
{% endif %}
|
||||
|
||||
{% if is_self %}
|
||||
<span class="badge">It is you</span>
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{% if is_self %}
|
||||
<a href="edit" class="button inline-block">Edit your profile</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="followers">{{ n_followers }} follower{{ n_followers | pluralize }}</a>
|
||||
</div>
|
||||
{% include "users/header" %}
|
||||
|
||||
<div>
|
||||
{{ user.summary | safe }}
|
||||
</div>
|
||||
|
||||
{% if recents | length != 0 %}
|
||||
<h2>Latest articles</h2>
|
||||
<h2>{{ "Latest articles" | _ }}</h2>
|
||||
<div class="cards">
|
||||
{% for article in recents %}
|
||||
{{ macros::post_card(article=article) }}
|
||||
@@ -41,7 +28,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if reshares | length != 0 %}
|
||||
<h2>Recently reshared</h2>
|
||||
<h2>{{ "Recently reshared" | _ }}</h2>
|
||||
<div class="cards">
|
||||
{% for article in reshares %}
|
||||
{{ macros::post_card(article=article) }}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
Edit your account
|
||||
{{ "Edit your account" | _ }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Your Profile</h1>
|
||||
<h1>{{ "Your Profile" | _ }}</h1>
|
||||
<form method="post">
|
||||
<!-- Rocket hack to use various HTTP methods -->
|
||||
<input type=hidden name="_method" value="put">
|
||||
|
||||
<label for="display_name">Display Name</label>
|
||||
<label for="display_name">{{ "Display Name" | _ }}</label>
|
||||
<input name="display_name" value="{{ account.display_name }}">
|
||||
|
||||
<label for="email">Email</label>
|
||||
<label for="email">{{ "Email" | _ }}</label>
|
||||
<input name="email" value="{{ account.email }}">
|
||||
|
||||
<label for="summary">Summary</label>
|
||||
<label for="summary">{{ "Summary" | _ }}</label>
|
||||
<input name="summary" value="{{ account.summary }}">
|
||||
|
||||
<input type="submit" value="Update account"/>
|
||||
<input type="submit" value="{{ "Update account" | _ }}"/>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
{{ user.display_name }}'s Followers
|
||||
{% if user.display_name %}
|
||||
{% set name = user.display_name %}
|
||||
{% else %}
|
||||
{% set name = user.username %}
|
||||
{% endif %}
|
||||
|
||||
{{ "{{ name }}'s followers" | _(name=name) }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1>
|
||||
{{ user.display_name }}
|
||||
{% if user.is_admin %}
|
||||
<span class="badge">Admin</span>
|
||||
{% endif %}
|
||||
|
||||
{% if is_self %}
|
||||
<span class="badge">It is you</span>
|
||||
{% endif %}
|
||||
</h1>
|
||||
</div>
|
||||
{% include "users/header" %}
|
||||
|
||||
<h2>Followers</h2>
|
||||
<h2>{{ "Followers" | _ }}</h2>
|
||||
<div class="cards">
|
||||
{% for follower in followers %}
|
||||
{% if follower.display_name %}
|
||||
{% set follower_name = follower.display_name %}
|
||||
{% else %}
|
||||
{% set follower_name = follower.username %}
|
||||
{% endif %}
|
||||
<div class="card">
|
||||
<h3><a href="{{ follower.ap_url }}/">{{ follower.display_name }}</a> — @{{ follower.fqn }}</h3>
|
||||
<h3><a href="/@/{{ follower.fqn }}/">{{ follower_name }}</a> — @{{ follower.fqn }}</h3>
|
||||
<main><p>{{ follower.summary | safe }}</p></main>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<div>
|
||||
<h1>
|
||||
{{ name }}
|
||||
{% if user.is_admin %}
|
||||
<span class="badge">{{ "Admin" | _ }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if is_self %}
|
||||
<span class="badge">{{ "It is you" | _ }}</span>
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{% if is_self %}
|
||||
<a href="edit" class="button inline-block">{{ "Edit your profile" | _ }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if is_remote %}
|
||||
<a class="inline-block button" href="{{ user.ap_url }}">{{ "Open on {{ instance_url }}" | _(instance_url=instance_url) }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not is_self and account %}
|
||||
{% if follows %}
|
||||
<a href="follow/" class="inline-block button">{{ "Follow" | _ }}</a>
|
||||
{% else %}
|
||||
<a href="follow/" class="inline-block button">{{ "Unfollow" | _ }}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="followers/">{{ "{{ count }} followers" | _n(singular="One follower", count=n_followers) }}</a>
|
||||
</div>
|
||||
@@ -1,24 +1,24 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
New Account
|
||||
{{ "New Account" | _ }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Create an account</h1>
|
||||
<h1>{{ "Create an account" | _ }}</h1>
|
||||
<form method="post">
|
||||
<label for="username">Username</label>
|
||||
<label for="username">{{ "Username" | _ }}</label>
|
||||
<input type="text" id="username" name="username" />
|
||||
|
||||
<label for="email">Email</label>
|
||||
<label for="email">{{ "Email" | _ }}</label>
|
||||
<input type="email" id="email" name="email" />
|
||||
|
||||
<label for="password">Password</label>
|
||||
<label for="password">{{ "Password" | _ }}</label>
|
||||
<input type="password" id="password" name="password" />
|
||||
|
||||
<label for="password_confirmation">Password confirmation</label>
|
||||
<label for="password_confirmation">{{ "Password confirmation" | _ }}</label>
|
||||
<input type="password" id="password_confirmation" name="password_confirmation" />
|
||||
|
||||
<input type="submit" value="Create account" />
|
||||
<input type="submit" value="{{ "Create account" | _ }}" />
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
||||
Reference in New Issue
Block a user