Browse Source

Addressed issue #1134

pull/1138/head
Jeffrey D 10 years ago
parent
commit
3c48bf8935
  1. 2
      examples/blueprintexample/simple_page/templates/pages/layout.html
  2. 8
      examples/flaskr/templates/layout.html
  3. 10
      examples/flaskr/templates/login.html
  4. 10
      examples/flaskr/templates/show_entries.html
  5. 10
      examples/jqueryexample/templates/index.html
  6. 4
      examples/jqueryexample/templates/layout.html
  7. 12
      examples/minitwit/templates/layout.html
  8. 10
      examples/minitwit/templates/login.html
  9. 14
      examples/minitwit/templates/register.html
  10. 16
      examples/minitwit/templates/timeline.html
  11. 8
      examples/persona/templates/layout.html

2
examples/blueprintexample/simple_page/templates/pages/layout.html

@ -1,6 +1,6 @@
<!doctype html>
<title>Simple Page Blueprint</title>
<div class=page>
<div class="page">
<h1>This is blueprint example</h1>
<p>
A simple page blueprint is registered under / and /pages

8
examples/flaskr/templates/layout.html

@ -1,9 +1,9 @@
<!doctype html>
<title>Flaskr</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>Flaskr</h1>
<div class=metanav>
<div class="metanav">
{% if not session.logged_in %}
<a href="{{ url_for('login') }}">log in</a>
{% else %}
@ -11,7 +11,7 @@
{% endif %}
</div>
{% for message in get_flashed_messages() %}
<div class=flash>{{ message }}</div>
<div class="flash">{{ message }}</div>
{% endfor %}
{% block body %}{% endblock %}
</div>

10
examples/flaskr/templates/login.html

@ -1,14 +1,14 @@
{% extends "layout.html" %}
{% block body %}
<h2>Login</h2>
{% if error %}<p class=error><strong>Error:</strong> {{ error }}{% endif %}
<form action="{{ url_for('login') }}" method=post>
{% if error %}<p class="error"><strong>Error:</strong> {{ error }}{% endif %}
<form action="{{ url_for('login') }}" method="post">
<dl>
<dt>Username:
<dd><input type=text name=username>
<dd><input type="text" name="username">
<dt>Password:
<dd><input type=password name=password>
<dd><input type=submit value=Login>
<dd><input type="password" name="password">
<dd><input type="submit" value="Login">
</dl>
</form>
{% endblock %}

10
examples/flaskr/templates/show_entries.html

@ -1,17 +1,17 @@
{% extends "layout.html" %}
{% block body %}
{% if session.logged_in %}
<form action="{{ url_for('add_entry') }}" method=post class=add-entry>
<form action="{{ url_for('add_entry') }}" method="post" class="add-entry">
<dl>
<dt>Title:
<dd><input type=text size=30 name=title>
<dd><input type="text" size="30" name="title">
<dt>Text:
<dd><textarea name=text rows=5 cols=40></textarea>
<dd><input type=submit value=Share>
<dd><textarea name="text" rows="5" cols="40"></textarea>
<dd><input type="submit" value="Share">
</dl>
</form>
{% endif %}
<ul class=entries>
<ul class="entries">
{% for entry in entries %}
<li><h2>{{ entry.title }}</h2>{{ entry.text|safe }}
{% else %}

10
examples/jqueryexample/templates/index.html

@ -1,6 +1,6 @@
{% extends "layout.html" %}
{% block body %}
<script type=text/javascript>
<script type="text/javascript">
$(function() {
var submit_form = function(e) {
$.getJSON($SCRIPT_ROOT + '/_add_numbers', {
@ -26,8 +26,8 @@
</script>
<h1>jQuery Example</h1>
<p>
<input type=text size=5 name=a> +
<input type=text size=5 name=b> =
<span id=result>?</span>
<p><a href=# id=calculate>calculate server side</a>
<input type="text" size="5" name="a"> +
<input type="text" size="5" name="b"> =
<span id="result">?</span>
<p><a href=# id="calculate">calculate server side</a>
{% endblock %}

4
examples/jqueryexample/templates/layout.html

@ -1,8 +1,8 @@
<!doctype html>
<title>jQuery Example</title>
<script type=text/javascript
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type=text/javascript>
<script type="text/javascript">
var $SCRIPT_ROOT = {{ request.script_root|tojson|safe }};
</script>
{% block body %}{% endblock %}

12
examples/minitwit/templates/layout.html

@ -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 &mdash; A Flask Application
</div>
</div>

10
examples/minitwit/templates/login.html

@ -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 %}

14
examples/minitwit/templates/register.html

@ -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 %}

16
examples/minitwit/templates/timeline.html

@ -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)

8
examples/persona/templates/layout.html

@ -12,15 +12,15 @@
var $CURRENT_USER = {{ g.user|tojson }};
</script>
<script src="{{ url_for('static', filename='persona.js') }}"></script>
<link rel=stylesheet href="{{ url_for('static', filename='style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<header>
<h1>Mozilla Persona Example</h1>
<div class=authbar>
<div class="authbar">
{% if g.user %}
Signed in as <em>{{ g.user }}</em>
(<a href="#" class=signout>Sign out</a>)
(<a href="#" class="signout">Sign out</a>)
{% else %}
Not signed in. <a href="#" class=signin>Sign in</a>
Not signed in. <a href="#" class="signin">Sign in</a>
{% endif %}
</div>
</header>

Loading…
Cancel
Save