##// END OF EJS Templates
Added 'alt' attribute to the images to pass the validation. This fixes #2
neko259 -
r82:06eb531e default
parent child Browse files
Show More
@@ -1,162 +1,164 b''
1 1 {% extends "base.html" %}
2 2
3 3 {% load i18n %}
4 4 {% load markup %}
5 5
6 6 {% block head %}
7 7 {% if tag %}
8 8 <title>Neboard - {{ tag }}</title>
9 9 {% else %}
10 10 <title>Neboard</title>
11 11 {% endif %}
12 12 {% endblock %}
13 13
14 14 {% block content %}
15 15
16 16 {% if tag %}
17 17 <div class="tag_info">
18 18 <h2>{% trans 'Tag: ' %}{{ tag }}</h2>
19 19 </div>
20 20 {% endif %}
21 21
22 22 {% if threads %}
23 23 {% for thread in threads %}
24 24 <div class="thread">
25 25 {% if thread.can_bump %}
26 26 <div class="post">
27 27 {% else %}
28 28 <div class="post dead_post">
29 29 {% endif %}
30 30 {% if thread.image %}
31 31 <div class="image">
32 32 <a class="fancy"
33 33 href="{{ thread.image.url }}"><img
34 src="{{ thread.image.url_200x150 }}" />
34 src="{{ thread.image.url_200x150 }}"
35 alt="{% trans 'Post image' %}" />
35 36 </a>
36 37 </div>
37 38 {% endif %}
38 39 <div class="message">
39 40 <div class="post-info">
40 41 <span class="title">{{ thread.title }}</span>
41 42 <a class="post_id" href="{% url 'thread' thread.id %}">
42 43 (#{{ thread.id }})</a>
43 44 [{{ thread.pub_time }}]
44 45 [<a class="link" href="{% url 'thread' thread.id %}#form"
45 46 >{% trans "Reply" %}</a>]
46 47 </div>
47 48 {% autoescape off %}
48 49 {{ thread.text.rendered|truncatewords_html:50 }}
49 50 {% endautoescape %}
50 51 </div>
51 52 <div class="metadata">
52 53 {{ thread.get_reply_count }} {% trans 'replies' %},
53 54 {{ thread.get_images_count }} {% trans 'images' %}.
54 55 {% if thread.tags.all %}
55 56 <span class="tags">{% trans 'Tags' %}:
56 57 {% for tag in thread.tags.all %}
57 58 <a class="tag" href="
58 59 {% url 'tag' tag_name=tag.name %}">
59 60 {{ tag.name }}</a>
60 61 {% endfor %}
61 62 </span>
62 63 {% endif %}
63 64 </div>
64 65 </div>
65 66 {% if thread.get_last_replies %}
66 67 <div class="last-replies">
67 68 {% for post in thread.get_last_replies %}
68 69 {% if thread.can_bump %}
69 70 <div class="post">
70 71 {% else %}
71 72 <div class="post dead_post">
72 73 {% endif %}
73 74 {% if post.image %}
74 75 <div class="image">
75 76 <a class="fancy"
76 77 href="{{ post.image.url }}"><img
77 src="{{ post.image.url_200x150 }}" />
78 src=" {{ post.image.url_200x150 }}"
79 alt="{% trans 'Post image' %}" />
78 80 </a>
79 81 </div>
80 82 {% endif %}
81 83 <div class="message">
82 84 <div class="post-info">
83 85 <span class="title">{{ post.title }}</span>
84 86 <a class="post_id" href="
85 87 {% url 'thread' thread.id %}#{{ post.id }}">
86 88 (#{{ post.id }})</a>
87 89 [{{ post.pub_time }}]
88 90 </div>
89 91 {% autoescape off %}
90 92 {{ post.text.rendered|truncatewords_html:50 }}
91 93 {% endautoescape %}
92 94 </div>
93 95 </div>
94 96 {% endfor %}
95 97 </div>
96 98 {% endif %}
97 99 </div>
98 100 {% endfor %}
99 101 {% else %}
100 102 No threads found.
101 103 <hr />
102 104 {% endif %}
103 105
104 106 <form enctype="multipart/form-data" method="post">{% csrf_token %}
105 107 <div class="post-form-w">
106 108
107 109 <div class="form-title">{% trans "Create new thread" %}</div>
108 110 <div class="post-form">
109 111 <div class="form-row">
110 112 <div class="form-label">{% trans 'Title' %}</div>
111 113 <div class="form-input">{{ form.title }}</div>
112 114 <div class="form-errors">{{ form.title.errors }}</div>
113 115 </div>
114 116 <div class="form-row">
115 117 <div class="form-label">{% trans 'Text' %}</div>
116 118 <div class="form-input">{{ form.text }}</div>
117 119 <div class="form-errors">{{ form.text.errors }}</div>
118 120 </div>
119 121 <div class="form-row">
120 122 <div class="form-label">{% trans 'Image' %}</div>
121 123 <div class="form-input">{{ form.image }}</div>
122 124 <div class="form-errors">{{ form.image.errors }}</div>
123 125 </div>
124 126 <div class="form-row">
125 127 <div class="form-label">{% trans 'Tags' %}</div>
126 128 <div class="form-input">{{ form.tags }}</div>
127 129 <div class="form-errors">{{ form.tags.errors }}</div>
128 130 </div>
129 131 <div class="form-row">
130 132 {{ form.captcha }}
131 133 </div>
132 134 </div>
133 135 <div class="form-submit">
134 136 <input type="submit" value="{% trans "Post" %}"/></div>
135 137 <div>Tags must be delimited by spaces. Text or image is required
136 138 </div>
137 139 <div>Use <a
138 140 href="http://daringfireball.net/projects/markdown/basics">
139 141 markdown</a> syntax for posting.</div>
140 142 </div>
141 143 </form>
142 144
143 145 {% endblock %}
144 146
145 147 {% block metapanel %}
146 148
147 149 <span class="metapanel">
148 150 <b><a href="https://bitbucket.org/neko259/neboard/">Neboard</a>
149 151 2013-05 (dev)</b>
150 152 {% trans "Pages:" %}
151 153 {% for page in pages %}
152 154 [<a href="
153 155 {% if tag %}
154 156 {% url "tag" tag_name=tag page=page %}
155 157 {% else %}
156 158 {% url "index" page=page %}
157 159 {% endif %}
158 160 ">{{ page }}</a>]
159 161 {% endfor %}
160 162 </span>
161 163
162 164 {% endblock %}
@@ -1,109 +1,110 b''
1 1 {% extends "base.html" %}
2 2
3 3 {% load i18n %}
4 4 {% load markup %}
5 5
6 6 {% block head %}
7 7 <title>Neboard - {{ posts.0.title }}</title>
8 8 {% endblock %}
9 9
10 10 {% block content %}
11 11 <script src="{{ STATIC_URL }}js/thread.js"></script>
12 12
13 13 {% if posts %}
14 14 <div id="posts">
15 15 {% for post in posts %}
16 16 {% if posts.0.can_bump %}
17 17 <div class="post" id="{{ post.id }}">
18 18 {% else %}
19 19 <div class="post dead_post" id="{{ post.id }}">
20 20 {% endif %}
21 21 {% if post.image %}
22 22 <div class="image">
23 23 <a
24 24 class="fancy"
25 25 href="{{ post.image.url }}"><img
26 src="{{ post.image.url_200x150 }}" />
26 src="{{ post.image.url_200x150 }}"
27 alt="{% trans 'Post image' %}" />
27 28 </a>
28 29 </div>
29 30 {% endif %}
30 31 <div class="message">
31 32 <div class="post-info">
32 33 <span class="title">{{ post.title }}</span>
33 34 <a class="post_id" href="#{{ post.id }}">
34 35 (#{{ post.id }})</a>
35 36 [{{ post.pub_time }}]
36 37 {% if post.is_get %}
37 38 <span class="get">
38 39 {% trans "Get!" %}
39 40 </span>
40 41 {% endif %}
41 42 </div>
42 43 {% autoescape off %}
43 44 {{ post.text.rendered }}
44 45 {% endautoescape %}
45 46 </div>
46 47 {% if post.tags.all %}
47 48 <div class="metadata">
48 49 <span class="tags">{% trans 'Tags' %}:
49 50 {% for tag in post.tags.all %}
50 51 <a class="tag" href="{% url 'tag' tag.name %}">
51 52 {{ tag.name }}</a>
52 53 {% endfor %}
53 54 </span>
54 55 </div>
55 56 {% endif %}
56 57 </div>
57 58 {% endfor %}
58 59 </div>
59 60 {% else %}
60 61 No thread found.
61 62 <hr />
62 63 {% endif %}
63 64
64 65 <form id="form" enctype="multipart/form-data" method="post"
65 66 >{% csrf_token %}
66 67 <div class="post-form-w">
67 68 <div class="form-title">{% trans "Reply to thread" %}</div>
68 69 <div class="post-form">
69 70 <div class="form-row">
70 71 <div class="form-label">{% trans 'Title' %}</div>
71 72 <div class="form-input">{{ form.title }}</div>
72 73 <div class="form-errors">{{ form.title.errors }}</div>
73 74 </div>
74 75 <div class="form-row">
75 76 <div class="form-label">{% trans 'Text' %}</div>
76 77 <div class="form-input">{{ form.text }}</div>
77 78 <div class="form-errors">{{ form.text.errors }}</div>
78 79 </div>
79 80 <div class="form-row">
80 81 <div class="form-label">{% trans 'Image' %}</div>
81 82 <div class="form-input">{{ form.image }}</div>
82 83 <div class="form-errors">{{ form.image.errors }}</div>
83 84 </div>
84 85 <div class="form-row">
85 86 {{ form.captcha }}
86 87 </div>
87 88 </div>
88 89
89 90 <div class="form-submit"><input type="submit"
90 91 value="{% trans "Post" %}"/></div>
91 92 <div>Use <a
92 93 href="http://daringfireball.net/projects/markdown/basics">
93 94 markdown</a> syntax for posting.</div>
94 95 <div>Example: *<i>italic</i>*, **<b>bold</b>**</div>
95 96 <div>Insert quotes with "&gt;"</div>
96 97 </div>
97 98 </form>
98 99
99 100 {% endblock %}
100 101
101 102 {% block metapanel %}
102 103
103 104 <span class="metapanel">
104 105 {{ posts.0.get_reply_count }} {% trans 'replies' %},
105 106 {{ posts.0.get_images_count }} {% trans 'images' %}.
106 107 {% trans 'Last update: ' %}{{ posts.0.last_edit_time }}
107 108 </span>
108 109
109 110 {% endblock %} No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now