Addressed issue #1134
This commit is contained in:
parent
f6618c7638
commit
3c48bf8935
11 changed files with 52 additions and 52 deletions
|
|
@ -1,9 +1,9 @@
|
|||
<!doctype html>
|
||||
<title>{% block title %}Welcome{% endblock %} | MiniTwit</title>
|
||||
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
|
||||
<div class=page>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
|
||||
<div class="page">
|
||||
<h1>MiniTwit</h1>
|
||||
<div class=navigation>
|
||||
<div class="navigation">
|
||||
{% if g.user %}
|
||||
<a href="{{ url_for('timeline') }}">my timeline</a> |
|
||||
<a href="{{ url_for('public_timeline') }}">public timeline</a> |
|
||||
|
|
@ -16,17 +16,17 @@
|
|||
</div>
|
||||
{% with flashes = get_flashed_messages() %}
|
||||
{% if flashes %}
|
||||
<ul class=flashes>
|
||||
<ul class="flashes">
|
||||
{% for message in flashes %}
|
||||
<li>{{ message }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<div class=body>
|
||||
<div class="body">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
<div class=footer>
|
||||
<div class="footer">
|
||||
MiniTwit — A Flask Application
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@
|
|||
{% block title %}Sign In{% endblock %}
|
||||
{% block body %}
|
||||
<h2>Sign In</h2>
|
||||
{% if error %}<div class=error><strong>Error:</strong> {{ error }}</div>{% endif %}
|
||||
<form action="" method=post>
|
||||
{% if error %}<div class="error"><strong>Error:</strong> {{ error }}</div>{% endif %}
|
||||
<form action="" method="post">
|
||||
<dl>
|
||||
<dt>Username:
|
||||
<dd><input type=text name=username size=30 value="{{ request.form.username }}">
|
||||
<dd><input type="text" name="username" size="30" value="{{ request.form.username }}">
|
||||
<dt>Password:
|
||||
<dd><input type=password name=password size=30>
|
||||
<dd><input type="password" name="password" size="30">
|
||||
</dl>
|
||||
<div class=actions><input type=submit value="Sign In"></div>
|
||||
<div class="actions"><input type="submit" value="Sign In"></div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,18 +2,18 @@
|
|||
{% block title %}Sign Up{% endblock %}
|
||||
{% block body %}
|
||||
<h2>Sign Up</h2>
|
||||
{% if error %}<div class=error><strong>Error:</strong> {{ error }}</div>{% endif %}
|
||||
<form action="" method=post>
|
||||
{% if error %}<div class="error"><strong>Error:</strong> {{ error }}</div>{% endif %}
|
||||
<form action="" method="post">
|
||||
<dl>
|
||||
<dt>Username:
|
||||
<dd><input type=text name=username size=30 value="{{ request.form.username }}">
|
||||
<dd><input type="text" name="username" size="30" value="{{ request.form.username }}">
|
||||
<dt>E-Mail:
|
||||
<dd><input type=text name=email size=30 value="{{ request.form.email }}">
|
||||
<dd><input type="text" name="email" size="30" value="{{ request.form.email }}">
|
||||
<dt>Password:
|
||||
<dd><input type=password name=password size=30>
|
||||
<dd><input type="password" name="password" size="30">
|
||||
<dt>Password <small>(repeat)</small>:
|
||||
<dd><input type=password name=password2 size=30>
|
||||
<dd><input type="password" name="password2" size="30">
|
||||
</dl>
|
||||
<div class=actions><input type=submit value="Sign Up"></div>
|
||||
<div class="actions"><input type="submit" value="Sign Up"></div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -12,30 +12,30 @@
|
|||
<h2>{{ self.title() }}</h2>
|
||||
{% if g.user %}
|
||||
{% if request.endpoint == 'user_timeline' %}
|
||||
<div class=followstatus>
|
||||
<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)
|
||||
<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)
|
||||
<a class="follow" href="{{ url_for('follow_user', username=profile_user.username)
|
||||
}}">Follow user</a>.
|
||||
{% endif %}
|
||||
</div>
|
||||
{% elif request.endpoint == 'timeline' %}
|
||||
<div class=twitbox>
|
||||
<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 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>
|
||||
<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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue