This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
/
article.html
193 lines (145 loc) · 5.01 KB
/
article.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
{% extends "base.html" %}
{% load markup %}
{% load thumbnail %}
{% block title %}{{ article.headline }}{% endblock %}
{% block css %}
<style type="text/css">
h1#masthead { background: url({% thumbnail article.issue.banner 900x129 crop %}) !important;
}
</style>
{% endblock %}
{% block bodyclass %}article{% endblock %}
{% block masthead %}{{ article.headline }}{% endblock %}
{% block content %}
<div id="faux">
<div id="main">
{% if article.cartoon %}
<h2 class="cartoon">{{ article.headline }}</h2>
{% else %}
<h2>{{ article.headline }}</h2>
{% endif %}
<div id="byline">
<div class="article-thumb">
<a href="/team/{{ article.author.first_name }}_{{ article.author.last_name }}/"><img src="{% thumbnail article.author.headshot 65x65 crop,upscale %}"
width="65" height="65" /></a>
</div>
<p><a href="/team/{{ article.author.first_name }}_{{ article.author.last_name }}/">{{ article.author.fullname}}</a></p>
</div>
<div class="clear"></div>
{% if article.cartoon %}
{% thumbnail article.image 650x30000 as cartoonimg %}
<img src="{{ cartoonimg.absolute_url }}" width="{{ cartoonimg.width }}" alt="{{ cartoonimg.height }}" />
<div class="blurb">
{% if article.content %}
{{ article.content|markdown }}
{% endif %}
</div>
{% else %}
{% if article.image %}
<div class="article-thumb">
<img src="{% thumbnail article.image 200x200 crop %}"
width="200"
height="200"
alt=""
/>
{% if article.source %}
<div class="image-source">{{ article.source }}</div>
{% endif %}
</div>
{% endif %}
{% if article.lede %}<p class="lede">{{ article.lede}}</p>{% endif %}
{{ article.content|markdown }}
{% endif %}
{% if article.tags.all %}
<hr />
<div id="tags">Tags:
{% for tag in article.tags.all %}
<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
{% if not forloop.last %} / {% endif %}
{% endfor %}
</div>
{% endif %}
<hr />
<a title="post to delicious" href="http://del.icio.us/post?url=http://the-fu.com{{article.get_absolute_url|urlencode}}&title={{article.headline|urlencode}}"><img src="http://images.del.icio.us/static/img/delicious.small.gif"
border="0"
width="10" height="10" alt="add to delicious"
/></a>
<a href="http://reddit.com/submit?url=http://the-fu.com{{article.get_absolute_url|urlencode}}&title={{article.headline|urlencode}}"
title="post to reddit"><img src="http://static.reddit.com/blog_head.png"
height="16" width="16" border="0" /></a>
<a title="digg it" href="http://digg.com/submit?phase=2&url=http://the-fu.com{{article.get_absolute_url|urlencode}}&title={{article.headline|urlencode}}"><img src="http://digg.com/img/badges/16x16-digg-guy.gif"
width="16"
height="16"
border="0"
alt="digg this"/></a>
<hr />
<div id="comments">
{% if not article.approved_comments %}
{% else %}
<h3>comments</h3>
{% for comment in article.approved_comments %}
<div class="comment" id="comment-{{ comment.id }}">
<div class="comment-byline">
{% if comment.url %}
<a href="{{ comment.url }}">{{ comment.name }}</a>
{% else %}
{{ comment.name }}
{% endif %}
at <i>{{ comment.timestamp|date:"D d M Y H:i:s" }}</i>
</div>
{{ comment.content|markdown:"safe" }}
</div>
{% endfor %}
{% endif %}
</div>
<div id="comment-form">
<form action="{{ article.get_absolute_url }}add_comment/"
method="post" onsubmit="return commentSubmit()">
<textarea name="content" id="comment-textarea"></textarea><br />
<p style="font-size: .8em;">formatting is
with <a
href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>
syntax.</p>
<table>
<tr><th>name</th><td><input type="text" name="name" id="comment-name"/></td><td>required</td></tr>
<tr><th>email</th><td><input type="text" name="email" id="comment-email"/></td><td>required</td></tr>
<tr><th>url</th><td><input type="text" name="url" id="comment-url"/></td><td></td></tr>
<tr><th></th><td><input type="checkbox" checked="checked"
name="remember" id="comment-remember"
/>
remember info?
</td><td></td></tr>
</table><br />
<input type="submit" value="add comment" />
</form>
</div>
<div class="clear"></div>
</div>
<div id="sidebar">
<h2 class="sidebar-main">In This Issue</h2>
{% for article in article.issue.non_main_articles %}
<div class="article">
<div class="article-thumb">
{% thumbnail article.author.headshot 65x65 crop,bw,upscale as bwheadshot %}
{% thumbnail article.author.headshot 65x65 crop,upscale as colorheadshot %}
<a href="{{ article.get_absolute_url }}"><img src="{{ bwheadshot }}"
onmouseover="this.src = '{{colorheadshot}}'"
onmouseout="this.src = '{{ bwheadshot }}'"
width="65" height="65" border="0" /></a>
</div>
<h2><a href="{{ article.get_absolute_url }}">{{ article.headline }}</a></h2>
<p>{{ article.author.fullname }}</p>
<div class="clear"></div>
</div>
{% endfor %}
<h3>Tag cloud</h3>
<div id="tag-cloud">
{% for tag in tag_cloud %}
<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
{% if not forloop.last %} / {% endif %}
{% endfor %}
</div>
<div id="clear"></div>
</div>
</div>
{% endblock %}