CSS tweaks, fix #87

This commit is contained in:
2020-08-03 19:15:12 -04:00
parent ca994d3914
commit 465d017e18
11 changed files with 450 additions and 417 deletions

View File

@@ -218,17 +218,24 @@ a:hover, .btn:hover {
background-color: #e0e0e0;
}
.card-img-top {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.fit {
display: block;
min-width: 64px;
max-width: 100%;
max-height: 240px;
max-height: 400px;
margin: 0 auto 0;
padding: 3px 3px 0;
width: auto;
height: auto;
}
.img-padding {
padding: 4px 4px 0 4px;
}
.fit-sm {
display: block;
max-width: 64px;

View File

@@ -157,18 +157,25 @@ body {
overflow: hidden;
}
.card-img-top {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.fit {
display: block;
min-width: 64px;
max-width: 100%;
max-height: 240px;
max-height: 400px;
margin: 0 auto 0;
padding: 3px 3px 0 3px;
width: auto;
height: auto;
}
.img-padding {
padding: 4px 4px 0 4px;
}
.fit-sm {
display: block;
max-width: 64px;

View File

@@ -392,7 +392,11 @@ function makeThumbnail(mimeCategory, hit, imgWrapper, small) {
if (small) {
thumbnail.setAttribute("class", "fit-sm");
} else {
thumbnail.setAttribute("class", "card-img-top fit");
if (hit["_source"].hasOwnProperty("parent")) {
thumbnail.setAttribute("class", "card-img-top fit img-padding");
} else {
thumbnail.setAttribute("class", "card-img-top fit");
}
}
thumbnail.setAttribute("src", `t/${hit["_source"]["index"]}/${hit["_id"]}`);

View File

@@ -12,7 +12,7 @@
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="/">sist2</a>
<span class="badge badge-pill version">2.7.4</span>
<span class="badge badge-pill version">2.8.0</span>
<span class="tagline">Lightning-fast file system indexer and search tool </span>
<a class="btn ml-auto" href="/stats">Stats</a>
<button class="btn" type="button" data-toggle="modal" data-target="#settings" onclick="loadSettings()">Settings
@@ -227,7 +227,6 @@
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="13">13</option>
</select>
</div>

View File

@@ -10,7 +10,7 @@
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="/">sist2</a>
<span class="badge badge-pill version">2.7.4</span>
<span class="badge badge-pill version">2.8.0</span>
<span class="tagline">Lightning-fast file system indexer and search tool </span>
<a style="margin-left: auto" class="btn" href="/">Back</a>
<button class="btn" type="button" data-toggle="modal" data-target="#settings"