Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly size thumbnail images with nonexistent/unavailable sources #81

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions gallery/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ h2 {
transition: 0.3s box-shadow;
}

.album-wrapper > a {
display: inline-block;
position: relative;
width: 100%;
}

.album {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
transform: rotate(5deg);
display: block;
width: 100%;
Expand Down
2 changes: 2 additions & 0 deletions gallery/templates/view_dir.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
{% if child_type == "Directory" %}
<div class="album-wrapper">
<a href="/view/dir/{{ child.id }}">
<!-- Dummy div, needed for ensuring proper element sizing (see issue #80) -->
<div style="margin-top:100%"></div>
<img class="album" src="/api/thumbnail/get/dir/{{ child.id }}">
</a>
</div>
Expand Down