Skip to content

Commit

Permalink
fix: image filename overflow (closes #92)
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Jul 16, 2024
1 parent 86cf46f commit ae67d89
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## Next Release

- Fixes a bug where image filenames could overflow their containers if long

## v3.0.0 (2024-06-10)

- Upgrades Laravel from v10 to v11
Expand Down
6 changes: 6 additions & 0 deletions src/resources/sass/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
flex-direction: column;
}

.image-filename {
width: 100%;
word-wrap: break-word;
overflow-wrap: break-word;
}

.auto-margin-top {
margin-top: auto;
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/partials/image-gallery.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class="img-thumbnail image-preview">
</div>
<div class="auto-margin-top">
<p>{{ $image->filename }}</p>
<p class="image-filename">{{ $image->filename }}</p>
@if (str_contains(Request::url(), 'images'))
<form action="/images/{{ $image->id }}" method="POST">
@csrf
Expand Down

0 comments on commit ae67d89

Please sign in to comment.