Skip to content

Commit d0758aa

Browse files
committed
moar templates\!
1 parent 9498243 commit d0758aa

File tree

8 files changed

+196
-0
lines changed

8 files changed

+196
-0
lines changed

djitter/templates/connect.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% extends "loggedin.html" %}
2+
3+
{% block title %}{{ block.super }} / Home{% endblock %}
4+
5+
{% block content %}
6+
7+
<div class="row">
8+
<div class="span8">
9+
<ul id="users" class="unstyled">
10+
<li class="user-header">
11+
<h3>Users</h3>
12+
</li>
13+
{% for viewing in users %}
14+
{% include "snippets/user.html" %}
15+
{% endfor %}
16+
</ul>
17+
</div>
18+
</div>
19+
20+
{% endblock %}

djitter/templates/discover.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{% extends "loggedin.html" %}
2+
3+
{% block title %}{{ block.super }} / Home{% endblock %}
4+
5+
{% block content %}
6+
7+
<div class="row">
8+
<div class="span3 offset1 well">
9+
<h2>Search Topics</h2>
10+
<form action="{% url discover %}" method="GET">
11+
{{ form }}
12+
<input type="submit" value="Submit">
13+
14+
</form>
15+
</div>
16+
<div class="span6 well">
17+
<h3>Results</h3>
18+
<ul id="chirps" class="unstyled">
19+
<li class="chirp-header"></li>
20+
{% for chirp in chirps %}
21+
{% include "snippets/chirp.html" %}
22+
{% endfor %}
23+
</ul>
24+
</div>
25+
</div>
26+
27+
{% endblock %}

djitter/templates/edit.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% extends "loggedin.html" %}
2+
{% load i18n %}
3+
4+
{% block content %}
5+
6+
<title>Edit Profile | djitter</title>
7+
<body>
8+
<h3>Editing your Profile</h3>
9+
<form enctype="multipart/form-data" action="{% url edit %}" method="POST">
10+
{% csrf_token %}
11+
<table>
12+
{{ form.as_table }}
13+
</table>
14+
<p><input type="submit" value="Submit"></p>
15+
</form>
16+
</body>
17+
{% endblock %}

djitter/templates/index.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{% extends "loggedin.html" %}
2+
3+
{% block title %}{{ block.super }} / Home{% endblock %}
4+
5+
{% block content %}
6+
7+
<div class="row">
8+
<div class="span3 offset1 well">
9+
<h2>{{ user.profile.name }}</h2>
10+
<form action="{% url cheep %}" method="POST">
11+
{{ chirper }}
12+
<input type="submit" value="Chirp!" />
13+
{% csrf_token %}
14+
</form>
15+
</div>
16+
<div class="span6 well">
17+
<h3>Chirps</h3>
18+
<ul id="chirps" class="unstyled">
19+
<li class="chirp-header"></li>
20+
{% for chirp in chirps %}
21+
{% include "snippets/chirp.html" %}
22+
{% endfor %}
23+
</ul>
24+
</div>
25+
</div>
26+
27+
{% endblock %}

djitter/templates/snippets/chirp.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% load djittertags %}
2+
<li class="chirp">
3+
<small class="time pull-right"><!-- fill me in! --></small>
4+
<a href="<!-- fill me in! -->">
5+
<img src="{{ chirp.user.email|gravatar:48 }}" class="pull-left avatar" />
6+
<strong><!-- fill me in! --></strong>
7+
<span class="username">@<!-- fill me in! --></span>
8+
</a>
9+
<p>{% chirptag chirp.text %}</p>
10+
</li>
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% if user == viewing %}
2+
<a class="pull-right btn btn-success" href="{% url view user.username %}">This is you!</a>
3+
{% else %}
4+
<form method="POST" action="{% url follow viewing.username %}" class="pull-right">
5+
{% csrf_token %}
6+
<input type="submit"
7+
class="pull-right btn
8+
{% if viewing in user.profile.following.all %}
9+
btn-primary
10+
{% endif %}"
11+
value="{% if viewing in user.profile.following.all %}Unfollow{% else %}Follow{%endif %}" />
12+
</form>
13+
{% endif %}

djitter/templates/snippets/user.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% load djittertags %}
2+
<li class="user">
3+
{% include "snippets/follow.html" %}
4+
<a href="<!-- fill me in! -->">
5+
<img src="{{ viewing.email|gravatar:48 }}" class="pull-left avatar" />
6+
<strong><!-- fill me in! --></strong>
7+
<span class="username">@<!-- fill me in! --></span>
8+
</a>
9+
<p class="bio"<!-- fill me in! --></p>
10+
</li>

djitter/templates/view.html

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{% extends "loggedin.html" %}
2+
{% load i18n %}
3+
{% load djittertags %}
4+
5+
{% block title %}{{ viewing.profile.name }} ({{ viewing.username }}) on {{ block.super }}{% endblock %}
6+
7+
{% block content %}
8+
9+
<div class="row">
10+
<div class="span10 offset1">
11+
<div class="row well">
12+
<div class="span7">
13+
<a href="{% if viewing == user %}http://gravatar.com/emails/{% else %}#{% endif %}">
14+
<img src="{{ viewing.email|gravatar:128 }}" class="avatar pull-left" />
15+
</a>
16+
17+
<h1 class="fullname"><!--- fill me in! ---></h1>
18+
<h2 class="username">@<!--- fill me in! ---></h2>
19+
20+
<p class="bio"><!--- fill me in! ---></p>
21+
<p class="location-and-url">
22+
<span class="location"><!--- fill me in! ---></span>
23+
<span class="divider">·</span>
24+
<span class="url"><!--- fill me in! ---></span>
25+
</p>
26+
</div> <!-- .span7 -->
27+
<div class="span2 pull-right">
28+
{% include "snippets/follow.html" %}
29+
</div> <!-- .span1 -->
30+
</div> <!-- .row -->
31+
<div class="row">
32+
<div class="span4 view-followering pull-left">
33+
<div class="sidebar-nav">
34+
<div class="well">
35+
<h3>Following:</h3>
36+
<ul id="following">
37+
<!--- fill me in! --->
38+
<li class = "followee">
39+
<a href = "{% url view followee.username %}">{{ followee.username }}</a>
40+
</li>
41+
<!--- fill me in! --->
42+
</ul>
43+
</div>
44+
<div class="well">
45+
<h3>Followers:</h3>
46+
<ul id="followers">
47+
{% for follower in viewing.followers.all %}
48+
<li class = "follower">
49+
<a href = "{% url view follower.user.username %}">{{ follower.user.username }}</a>
50+
</li>
51+
{% endfor %}
52+
</ul>
53+
</div>
54+
</div>
55+
</div>
56+
<div class="span6 view-chirps">
57+
<div class="row well">
58+
<h3>Chirps</h3>
59+
<ul id="chirps" class="unstyled">
60+
<li class="chirp-header"></li>
61+
<!--- fill me in! --->
62+
{% include "snippets/chirp.html" %}
63+
<!--- fill me in! --->
64+
</ul>
65+
</div>
66+
</div>
67+
</div> <!-- .row -->
68+
</div> <!-- .span10.offset1 -->
69+
</div> <!-- .row -->
70+
71+
72+
{% endblock %}

0 commit comments

Comments
 (0)