##// END OF EJS Templates
Center random images
neko259 -
r1247:116f9cc3 default
parent child Browse files
Show More
@@ -103,3 +103,13 b' textarea, input {'
103 #preview-text {
103 #preview-text {
104 display: none;
104 display: none;
105 }
105 }
106
107 .random-images-table {
108 text-align: center;
109 width: 100%;
110 }
111
112 .random-images-table > table {
113 margin-left: auto;
114 margin-right: auto;
115 }
@@ -9,16 +9,28 b''
9 {% block content %}
9 {% block content %}
10
10
11 {% if posts %}
11 {% if posts %}
12 {% for post in posts %}
12 <div class="random-images-table">
13 <div class="gallery_image">
13 <table>
14 {% with post.get_first_image as image %}
14 <tr>
15 {% autoescape off %}
15 {% for post in posts %}
16 {{ image.get_view }}
16 <td>
17 {% endautoescape %}
17 <div class="gallery_image">
18 <a href="{{ post.get_absolute_url }}">>>{{ post.id }}</a>
18 {% with post.get_first_image as image %}
19 {% endwith %}
19 {% autoescape off %}
20 </div>
20 {{ image.get_view }}
21 {% endfor %}
21 {% endautoescape %}
22 <a href="{{ post.get_absolute_url }}">>>{{ post.id }}</a>
23 {% endwith %}
24 </div>
25 </td>
26 {% if forloop.counter|divisibleby:"3" %}
27 </tr>
28 <tr>
29 {% endif %}
30 {% endfor %}
31 </tr>
32 </table>
33 </div>
22 {% endif %}
34 {% endif %}
23
35
24 {% endblock %}
36 {% endblock %}
@@ -12,7 +12,7 b" TEMPLATE = 'boards/random.html'"
12
12
13 CONTEXT_POSTS = 'posts'
13 CONTEXT_POSTS = 'posts'
14
14
15 RANDOM_POST_COUNT = 10
15 RANDOM_POST_COUNT = 9
16
16
17
17
18 class RandomImageView(View):
18 class RandomImageView(View):
General Comments 0
You need to be logged in to leave comments. Login now