~fabrixxm/activist

7f0410023c671ebc9cf132917f6ee0ae65716c78 — fabrixxm a month ago 529dbe7
Add follow(ers|ing) links in navbar, update template
2 files changed, 33 insertions(+), 27 deletions(-)

M activist/templates/base.html.j2
M activist/templates/contacts.html.j2
M activist/templates/base.html.j2 => activist/templates/base.html.j2 +4 -1
@@ 47,7 47,10 @@
        <section class="navbar-section">
            {% block navbar_right %}
                {% if g.user %}
                <a href="{{ url_for('network') }}" class="btn btn-link {{ class({'active':request.endpoint == 'network'}) }}">Network</a>
                	<a href="{{ url_for('following') }}" class="btn btn-link {{ class({'active':request.endpoint == 'following'}) }}">Following</a>
                  <a href="{{ url_for('followers') }}" class="btn btn-link {{ class({'active':request.endpoint == 'followers'}) }}">Followers</a>
                  
									<a href="{{ url_for('network') }}" class="btn btn-link {{ class({'active':request.endpoint == 'network'}) }}">Network</a>
                  <a href="/logout" class="btn btn-link">Logout</a>
                {% else %}
                  <a href="#login-modal" class="btn btn-link">Login</a>

M activist/templates/contacts.html.j2 => activist/templates/contacts.html.j2 +29 -26
@@ 1,26 1,29 @@
<!DOCTYPE html>
<html>
    <head>
        <title>{{ title }} - Activi/st</title>
        <meta charset="utf8">
    </head>
    <body>
       <header>
            <img src="{{ url_for('photo_profile') }}" width="64" height="64" style="float: left; margin: 0 1em 1em 0;">
            <h1 style="margin-bottom: 0em;">{{ title }}</h1>
            <div style="margin-bottom: 1em;"><small>@{{ settings.USER_ACCT}}</small></div>
            <a href="{{ url_for('index') }}">profile</a> -
            <a href="{{ url_for('inbox') }}">inbox</a> -
            <a href="{{ url_for('following') }}">following</a> -
            <a href="{{ url_for('followers') }}">followers</a>           
       </header> 
       <ul>
       {% for obj in data %}
        <li style="margin-bottom: 1em;">
            <a href="{{ obj.id }}"><img src="{% if obj.icon %}{{ obj.icon.url }}{% else %}{{ url_for('static', filename='photo.png') }}{% endif %}" width="48" height="48"></a>
            <a href="{{ obj.id }}">{{ obj.name}}</a>
        </li>
       {% endfor %}
        <ul>
    </body>
</html>
{% extends "base.html.j2" %}

{% block cls %}contacts{% endblock %}

{% block body %}
<div class="container grid-sm">
<h2>{{ title }}</h2>
{% if data %}
    {% for actor in data %}
	<div class="tile">
		<div class="tile-icon">
			{% include "f/avatar.tpl.j2" %}
		</div>
		<div class="tile-content">
			<p class="tile-title">{{ actor.data.name }}</p>
			<p class="tile-subtitle">{{ actor|act }}</p>
		</div>
		<div class="tile-action">
			<button class="btn btn-primary" disabled>?</button>
		</div>
	</div>
    {% endfor %}

    {% include "_pagination.tpl.j2" %}
{% else %}
    <p class="text-center text-muted">Nothing to show</p>
{% endif %}
</div>
{% endblock %}