Skip to content

Commit

Permalink
fix: Adding scrollable for exif
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed May 29, 2022
1 parent 2fb6a01 commit 20e4b46
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 32 deletions.
42 changes: 22 additions & 20 deletions cmd/fibr/templates/exif.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,32 @@ <h2 class="flex flex-center header no-margin">
<a href="#" class="button white small">Close</a>
</h2>

{{ if not .Exif.Date.IsZero }}
<p class="padding no-margin code">
<strong>Date:</strong> {{ .Exif.Date.Format "2006-01-02T15:04:05Z07:00" }}<br>
</p>
{{ end }}
<div class="scrollable">
{{ if not .Exif.Date.IsZero }}
<p class="padding no-margin code">
<strong>Date:</strong> {{ .Exif.Date.Format "2006-01-02T15:04:05Z07:00" }}<br>
</p>
{{ end }}

{{ if or .Exif.Geocode.HasAddress .Exif.Geocode.HasCoordinates }}
<p class="padding no-margin code">
{{ if .Exif.Geocode.HasCoordinates }}
<strong>Coordinates:</strong> <a class="primary" href="http://www.openstreetmap.org/?mlat={{ .Exif.Geocode.Latitude }}&mlon={{ .Exif.Geocode.Longitude }}&zoom=16">{{ .Exif.Geocode.Latitude }},{{ .Exif.Geocode.Longitude }}</a><br>
{{ end }}
{{ if or .Exif.Geocode.HasAddress .Exif.Geocode.HasCoordinates }}
<p class="padding no-margin code">
{{ if .Exif.Geocode.HasCoordinates }}
<strong>Coordinates:</strong> <a class="primary" href="http://www.openstreetmap.org/?mlat={{ .Exif.Geocode.Latitude }}&mlon={{ .Exif.Geocode.Longitude }}&zoom=16">{{ .Exif.Geocode.Latitude }},{{ .Exif.Geocode.Longitude }}</a><br>
{{ end }}

<strong>Location</strong><br>
{{ range $key, $value := .Exif.Geocode.Address }}
  <em>{{ $key }}:</em> {{ $value }}<br>
<strong>Location</strong><br>
{{ range $key, $value := .Exif.Geocode.Address }}
  <em>{{ $key }}:</em> {{ $value }}<br>
{{ end }}
</p>
{{ end }}

<p class="padding no-margin code">
{{ range $key, $value := .Exif.Data }}
<strong>{{ $key }}:</strong> {{ $value }}<br>
{{ end }}
</p>
{{ end }}

<p class="padding no-margin code">
{{ range $key, $value := .Exif.Data }}
<strong>{{ $key }}:</strong> {{ $value }}<br>
{{ end }}
</p>
</div>
</div>
</div>
{{ end }}
Expand Down
6 changes: 1 addition & 5 deletions cmd/fibr/templates/search-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@
#size {
width: 7rem;
}

#search-form {
overflow-y: auto;
}
</style>

<div id="search" class="modal">
<div class="modal-content">
<h2 class="flex flex-center header no-margin">Search files</h2>

<form method="GET" id="search-form" action="#">
<form method="GET" id="search-form" class="scrollable" action="#">
<input type="hidden" name="search">

<p class="padding no-margin">
Expand Down
4 changes: 4 additions & 0 deletions cmd/fibr/templates/style.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@
font-size: 1.6rem;
}

.scrollable {
overflow-y: auto;
}

.padding-left {
padding-left: 1rem;
}
Expand Down
9 changes: 2 additions & 7 deletions cmd/fibr/templates/upload-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,8 @@
pointer-events: none;
}

#upload-form {
overflow-y: auto;
}

#upload-list {
margin: 1rem auto;
overflow-y: auto;
}

#upload-duration {
Expand Down Expand Up @@ -500,7 +495,7 @@ <h2 class="flex flex-center header no-margin">

<form
id="upload-form"
class="flex flex-column flex-grow flex-center"
class="flex flex-column flex-grow flex-center scrollable"
method="post"
enctype="multipart/form-data"
action="#"
Expand All @@ -521,7 +516,7 @@ <h2 class="flex flex-center header no-margin">
<label id="file-label" for="file" tabindex="0" class="hidden button bg-success">Choose file...</label>
</p>

<div id="upload-list" class="hidden upload-width full"></div>
<div id="upload-list" class="hidden upload-width full scrollable"></div>

<p class="padding no-margin center">
<button id="upload-button" type="submit" class="button bg-primary">Upload</button>
Expand Down

0 comments on commit 20e4b46

Please sign in to comment.