Add tabs to the user profile

This commit is contained in:
Bat 2018-09-05 16:41:31 +01:00
parent 30cfd96e24
commit 99f04893bb
4 changed files with 18 additions and 11 deletions

View File

@ -799,3 +799,7 @@ figcaption {
color: #7765E3; color: #7765E3;
border-bottom: 1px solid #7765E3; border-bottom: 1px solid #7765E3;
} }
.user-summary {
margin: 2em 0px;
}

View File

@ -14,9 +14,9 @@
{% block content %} {% block content %}
{% include "users/header" %} {% include "users/header" %}
<div> {% set user_link = ['/@', user.fqn] %}
{{ user.summary | safe }} {% set followers_link = ['/@', user.fqn, 'followers'] %}
</div> {{ macros::tabs(links=[ user_link | join(sep='/'), followers_link | join(sep='/')], titles=['Articles', 'Followers'], selected=1) }}
{% if recents | length != 0 %} {% if recents | length != 0 %}
<h2> <h2>

View File

@ -8,7 +8,10 @@
{% block content %} {% block content %}
{% include "users/header" %} {% include "users/header" %}
<h2>{{ "Followers" | _ }}</h2> {% set user_link = ['/@', user.fqn] %}
{% set followers_link = ['/@', user.fqn, 'followers'] %}
{{ macros::tabs(links=[ user_link | join(sep='/'), followers_link | join(sep='/')], titles=['Articles', 'Followers'], selected=2) }}
<div class="cards"> <div class="cards">
{% for follower in followers %} {% for follower in followers %}
<div class="card"> <div class="card">

View File

@ -15,11 +15,10 @@
<span class="badge">{{ "It is you" | _ }}</span> <span class="badge">{{ "It is you" | _ }}</span>
{% endif %} {% endif %}
</h1> </h1>
</div>
{% if is_self %} {% if is_self %}
<a href="/@/{{ user.username }}/edit" class="button inline-block">{{ "Edit your profile" | _ }}</a> <a href="/@/{{ user.username }}/edit" class="button inline-block">{{ "Edit your profile" | _ }}</a>
{% endif %} {% endif %}
</div>
{% if is_remote %} {% if is_remote %}
<a class="inline-block button" href="{{ user.ap_url }}" target="_blank">{{ "Open on {{ instance_url }}" | _(instance_url=instance_url) }}</a> <a class="inline-block button" href="{{ user.ap_url }}" target="_blank">{{ "Open on {{ instance_url }}" | _(instance_url=instance_url) }}</a>
@ -35,6 +34,7 @@
{% endif %} {% endif %}
</div> </div>
<div>
<a href="/@/{{ user.fqn }}/followers/">{{ "{{ count }} followers" | _n(singular="One follower", count=n_followers) }}</a> <div class="user-summary">
{{ user.summary | safe }}
</div> </div>