summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahesh Gudi2018-11-05 17:07:20 +0530
committerGitHub2018-11-05 17:07:20 +0530
commit5be8a88d0eae56ee84827dd66647fc38476ab80f (patch)
treed2efa6d9b7521341ca097aea62e55bef137072a9
parentd86b6a05b2079df5c967c0eb86936eef7aed7e8b (diff)
parentf3727c726a2c385ce7e22a72064aa12bc4216af7 (diff)
downloadsbhs_server-5be8a88d0eae56ee84827dd66647fc38476ab80f.tar.gz
sbhs_server-5be8a88d0eae56ee84827dd66647fc38476ab80f.tar.bz2
sbhs_server-5be8a88d0eae56ee84827dd66647fc38476ab80f.zip
Merge pull request #6 from CruiseDevice/devHEADmaster
Fix show all boards images view in moderator
-rw-r--r--sbhs/static/css/base.css30
-rw-r--r--sbhs/templates/dashboard/all_images.html18
-rw-r--r--sbhs/views.py2
3 files changed, 41 insertions, 9 deletions
diff --git a/sbhs/static/css/base.css b/sbhs/static/css/base.css
index 6e356f7..4a5174c 100644
--- a/sbhs/static/css/base.css
+++ b/sbhs/static/css/base.css
@@ -33,3 +33,33 @@ html, body{
padding: 10px;
padding-bottom: 60px:
}
+.gallery{
+ -webkit-column-count: 3;
+ -moz-column-count: 3;
+ column-count: 3;
+ -webkit-column-width: 33%;
+ -moz-column-width: 33%;
+ column-width: 33%; }
+.gallery .pics {
+ -webkit-transition: all 350ms ease;
+ transition: all 350ms ease; }
+.gallery .animation {
+ -webkit-transform: scale(1);
+ -ms-transform: scale(1);
+ transform: scale(1); }
+@media (max-width: 450px) {
+ .gallery {
+ -webkit-column-count: 1;
+ -moz-column-count: 1;
+ column-count: 1;
+ -webkit-column-width: 100%;
+ -moz-column-width: 100%;
+ column-width: 100%;
+ }
+}
+@media (max-width: 400px) {
+ .btn.filter {
+ padding-left: 1.1rem;
+ padding-right: 1.1rem;
+ }
+} \ No newline at end of file
diff --git a/sbhs/templates/dashboard/all_images.html b/sbhs/templates/dashboard/all_images.html
index 8bc6e81..9d148a7 100644
--- a/sbhs/templates/dashboard/all_images.html
+++ b/sbhs/templates/dashboard/all_images.html
@@ -6,14 +6,16 @@
{% block main %}
<div class = "container">
<div class = "row">
- <table>
- {% for board in image_links %}
- <tr>
- <td>{{board.board.mid}}</td>
- <td><img src="{% static board.image_link %}"/></td>
- </tr>
- {% endfor %}
- </table>
+ <div class = "gallery" id = "gallery">
+ <div class = "mb-3 pics animation all 2">
+ <div class = "thumbnail">
+ {% for board in image_links %}
+ {{board.borad.mid}}
+ <img src="{% static board.image_link %}">
+ {% endfor %}
+ </div>
+ </div>
+ </div>
</div>
</div>
<script type="text/javascript">
diff --git a/sbhs/views.py b/sbhs/views.py
index 530e692..c79728e 100644
--- a/sbhs/views.py
+++ b/sbhs/views.py
@@ -753,7 +753,7 @@ def all_images(request):
board_image_link["image_link"] = board.image_link()
image_links.append(board_image_link.copy())
context["image_links"] = image_links
- return render(request,'dashboard/all_images.html')
+ return render(request,'dashboard/all_images.html', context)
@login_required