diff options
Diffstat (limited to 'sbhs')
-rw-r--r-- | sbhs/static/css/base.css | 30 | ||||
-rw-r--r-- | sbhs/templates/dashboard/all_images.html | 18 | ||||
-rw-r--r-- | sbhs/views.py | 2 |
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 |