##// 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,7 +9,11 b''
9 {% block content %}
9 {% block content %}
10
10
11 {% if posts %}
11 {% if posts %}
12 <div class="random-images-table">
13 <table>
14 <tr>
12 {% for post in posts %}
15 {% for post in posts %}
16 <td>
13 <div class="gallery_image">
17 <div class="gallery_image">
14 {% with post.get_first_image as image %}
18 {% with post.get_first_image as image %}
15 {% autoescape off %}
19 {% autoescape off %}
@@ -18,7 +22,15 b''
18 <a href="{{ post.get_absolute_url }}">>>{{ post.id }}</a>
22 <a href="{{ post.get_absolute_url }}">>>{{ post.id }}</a>
19 {% endwith %}
23 {% endwith %}
20 </div>
24 </div>
25 </td>
26 {% if forloop.counter|divisibleby:"3" %}
27 </tr>
28 <tr>
29 {% endif %}
21 {% endfor %}
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