This commit is contained in:
Matthieu
2018-06-17 20:14:58 +02:00
47 changed files with 1534 additions and 450 deletions
+5 -5
View File
@@ -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">
+10 -23
View File
@@ -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) }}
+6 -6
View File
@@ -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 %}
+15 -15
View File
@@ -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> &mdash; @{{ follower.fqn }}</h3>
<h3><a href="/@/{{ follower.fqn }}/">{{ follower_name }}</a> &mdash; @{{ follower.fqn }}</h3>
<main><p>{{ follower.summary | safe }}</p></main>
</div>
{% endfor %}
+32
View File
@@ -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>
+7 -7
View File
@@ -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 %}