This repository was archived by the owner on Apr 3, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +116
-6
lines changed Expand file tree Collapse file tree 2 files changed +116
-6
lines changed Original file line number Diff line number Diff line change 5
5
< meta http-equiv ="Content-type " content ="text/html; charset=utf-8 ">
6
6
< title > Twitter Example</ title >
7
7
< style >
8
+ * {
9
+ margin : 0 ;
10
+ padding : 0 ;
11
+ }
12
+ body {
13
+ font-size : 80% ;
14
+ }
8
15
# wrap {
9
- width : 600px ;
10
- margin : 1em auto;
16
+ width : 700px ;
17
+ margin : 0em auto;
18
+ line-height : 1.6 ;
11
19
font-family : Helvetica, Arial, sans-serif;
12
20
}
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
+ }
13
97
</ style >
14
98
</ head >
15
99
16
100
< body >
17
101
< div id ="wrap ">
102
+ < div id ="header ">
18
103
< h1 > Twitter oAuth example</ h1 >
19
-
20
-
104
+ </ div >
105
+ < div id =" content " >
21
106
{% 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 >
23
112
{% endblock %}
113
+ </ div >
24
114
25
115
</ div >
26
116
</ body >
Original file line number Diff line number Diff line change @@ -5,7 +5,27 @@ <h2>Here comes your friends:</h2>
5
5
< ul >
6
6
{% for json in users %}
7
7
{% 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 >
9
29
{% endfor %}
10
30
{% endfor %}
11
31
</ ul >
You can’t perform that action at this time.
0 commit comments