bundled/flask/examples/minitwit/templates/timeline.html @ d483f003d230

Change the mercurial minimum version

the obsstore api was added in mercurial 2.3.
I did _not_ tested with this version though, so we may have to
change it if issues are encountered.
author Christophe de Vienne <cdevienne@gmail.com>
date Fri, 21 Nov 2014 17:04:06 +0100
parents f33efe14bff1
children (none)
{% extends "layout.html" %}
{% block title %}
  {% if request.endpoint == 'public_timeline' %}
    Public Timeline
  {% elif request.endpoint == 'user_timeline' %}
    {{ profile_user.username }}'s Timeline
  {% else %}
    My Timeline
  {% endif %}
{% endblock %}
{% block body %}
  <h2>{{ self.title() }}</h2>
  {% if g.user %}
    {% if request.endpoint == 'user_timeline' %}
      <div class=followstatus>
      {% if g.user.user_id == profile_user.user_id %}
        This is you!
      {% elif followed %}
        You are currently following this user.
        <a class=unfollow href="{{ url_for('unfollow_user', username=profile_user.username)
          }}">Unfollow user</a>.
      {% else %}
        You are not yet following this user.
        <a class=follow href="{{ url_for('follow_user', username=profile_user.username)
          }}">Follow user</a>.
      {% endif %}
      </div>
    {% elif request.endpoint == 'timeline' %}
      <div class=twitbox>
        <h3>What's on your mind {{ g.user.username }}?</h3>
        <form action="{{ url_for('add_message') }}" method=post>
          <p><input type=text name=text size=60><!--
          --><input type=submit value="Share">
        </form>
      </div>
    {% endif %}
  {% endif %}
  <ul class=messages>
  {% for message in messages %}
    <li><img src="{{ message.email|gravatar(size=48) }}"><p>
      <strong><a href="{{ url_for('user_timeline', username=message.username)
      }}">{{ message.username }}</a></strong>
      {{ message.text }}
      <small>&mdash; {{ message.pub_date|datetimeformat }}</small>
  {% else %}
    <li><em>There's no message so far.</em>
  {% endfor %}
  </ul>
{% endblock %}