Skip to content
This repository was archived by the owner on Apr 3, 2022. It is now read-only.

Commit 44d3d0c

Browse files
Henrik LiedHenrik Lied
authored andcommitted
Fixed some prettier templates
1 parent 7dba2c7 commit 44d3d0c

File tree

2 files changed

+116
-6
lines changed

2 files changed

+116
-6
lines changed

twitter_app/templates/twitter_app/base.html

Lines changed: 95 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,112 @@
55
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
66
<title>Twitter Example</title>
77
<style>
8+
* {
9+
margin: 0;
10+
padding: 0;
11+
}
12+
body {
13+
font-size: 80%;
14+
}
815
#wrap {
9-
width: 600px;
10-
margin: 1em auto;
16+
width: 700px;
17+
margin: 0em auto;
18+
line-height: 1.6;
1119
font-family: Helvetica, Arial, sans-serif;
1220
}
21+
#header {
22+
background: #111;
23+
color: white;
24+
}
25+
#header, #content {
26+
padding: 10px;
27+
}
28+
h1 {
29+
font-family: Georgia;
30+
font-weight: 100;
31+
font-style: italic;
32+
font-size: 30px;
33+
padding-top: 50px;
34+
}
35+
36+
.auth {
37+
font-size: 30px;
38+
color: white;
39+
background: #222;
40+
padding: 25px;
41+
-moz-border-radius: 10px;
42+
-webkit-border-radius: 10px;
43+
border-radius: 10px;
44+
}
45+
.auth:hover {
46+
background: #000;
47+
}
48+
49+
.odd {
50+
background: #f3f3f3;
51+
}
52+
53+
ul {
54+
list-style: none;
55+
}
56+
57+
dl {
58+
width: 500px;
59+
float: right;
60+
}
61+
dt {
62+
float: left;
63+
width: 100px;
64+
text-transform: uppercase;
65+
font-weight: bold;
66+
}
67+
dd {
68+
float: right;
69+
width: 350px;
70+
color: #666;
71+
text-align: right;
72+
}
73+
74+
.image {
75+
float: left;
76+
margin-right: 20px;
77+
width: 100px;
78+
text-align: center;
79+
}
80+
.twitter_user {
81+
padding: 20px;
82+
border-bottom: 1px solid #f1f1f1;
83+
}
84+
.clearer {
85+
clear: both;
86+
}
87+
88+
h2 {
89+
font-size: 34px;
90+
margin-top: 20px;
91+
color: #0b73de;
92+
margin-bottom: 5px;
93+
}
94+
p {
95+
margin-bottom: 1.5em;
96+
}
1397
</style>
1498
</head>
1599

16100
<body>
17101
<div id="wrap">
102+
<div id="header">
18103
<h1>Twitter oAuth example</h1>
19-
20-
104+
</div>
105+
<div id="content">
21106
{% block content %}
22-
<p><a href="auth/">Authenticate on Twitter</a></p>
107+
<h2>Welcome!</h2>
108+
<p>This sample application is here to show you how you can authenticate against Twitter using their
109+
new oAuth API.<br>Press the big button below to authenticate.</p>
110+
111+
<p><a class="auth" href="auth/">Authenticate »</a></p>
23112
{% endblock %}
113+
</div>
24114

25115
</div>
26116
</body>

twitter_app/templates/twitter_app/list.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,27 @@ <h2>Here comes your friends:</h2>
55
<ul>
66
{% for json in users %}
77
{% for twitter in json %}
8-
<li><a href="http://twitter.com/{{ twitter.screen_name }}">{{ twitter.screen_name }}</a></li>
8+
<li>
9+
<div class="twitter_user {% cycle even,odd as rowcolors %}">
10+
<div class="image">
11+
<img src="{{ twitter.profile_image_url }}" alt="{{ twitter.screen_name }}'s avatar">
12+
</div>
13+
<dl>
14+
<dt>Username</dt>
15+
<dd><a href="http://twitter.com/{{ twitter.screen_name }}/">{{ twitter.screen_name }}</a></dd>
16+
17+
<dt>Full name</dt>
18+
<dd>{{ twitter.name|default:"Not specified" }}</dd>
19+
20+
<dt>Status</dt>
21+
<dd><em>{{ twitter.status.text }}</em></dd>
22+
23+
<div class="clearer"></div>
24+
25+
</dl>
26+
<div class="clearer"></div>
27+
</div>
28+
</li>
929
{% endfor %}
1030
{% endfor %}
1131
</ul>

0 commit comments

Comments
 (0)