Cleanup template

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-04-05 12:23:05 +02:00
parent c151e09d99
commit f53cbb8077
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
5 changed files with 47 additions and 81 deletions

View File

@ -1,18 +1,3 @@
body {
position: absolute;
height: 100%;
width: 100%;
}
#content {
/* #content is the previous sibling of the footer, so its height must match
* the height of its child elements to prevent the footer from overlapping
* them. The server sets "height: 100%" for #content, so that value has to
* be overriden. */
height: auto;
min-height: calc(100vh - 103px); /* 45px(#controls) + 58px(footer) = 103px */
}
/* height fix for ie11 */
html.ie #content {
height: auto;

View File

@ -78,17 +78,6 @@ div.crumb.last a {
list-style: initial;
}
#content-wrapper {
position: relative;
height: calc(100vh - 45px); /* 45px for #controls element */
top: 45px;
padding: 0;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
-webkit-transition: background-color 1s linear;
transition: background-color 1s linear;
}
#app {
/* #app is the parent of #controls and #gallery, and #controls uses a sticky
* position, so the #app height must contain the full gallery for the

View File

@ -133,7 +133,7 @@
*/
_build: function () {
var i, crumbs, name, path, currentAlbum;
var albumName = $('#content').data('albumname');
var albumName = $('#app').data('albumname');
if (!albumName) {
albumName = t('gallery', 'Gallery');
}

View File

@ -222,7 +222,7 @@
download: function (event) {
event.preventDefault();
var path = $('#content').data('albumname');
var path = $('#app').data('albumname');
var files = Gallery.currentAlbum;
var downloadUrl = Gallery.utility.buildFilesUrl(path, files);

View File

@ -24,61 +24,53 @@ style(
style('files_sharing', 'public');
?>
<div id="content-wrapper">
<div id="content" class="app-<?php p($_['appName']) ?>"
data-albumname="<?php p($_['albumName']) ?>">
<div id="app">
<div id="controls">
<div id="breadcrumbs"></div>
<!-- sorting buttons -->
<div class="buttons">
<div id="sort-name-button" class="button sorting left-switch-button">
<div class="flipper">
<img class="svg asc front" src="<?php print_unescaped(
image_path($_['appName'], 'nameasc.svg')
); ?>" alt="<?php p($l->t('Sort by name')); ?>"/>
<img class="svg des back" src="<?php print_unescaped(
image_path($_['appName'], 'namedes.svg')
); ?>" alt="<?php p($l->t('Sort by name')); ?>"/>
</div>
</div>
<div id="sort-date-button" class="button sorting right-switch-button">
<div class="flipper">
<img class="svg asc front" src="<?php print_unescaped(
image_path($_['appName'], 'dateasc.svg')
); ?>" alt="<?php p($l->t('Sort by date')); ?>"/>
<img class="svg des back" src="<?php print_unescaped(
image_path($_['appName'], 'datedes.svg')
); ?>" alt="<?php p($l->t('Sort by date')); ?>"/>
</div>
</div>
<div id="album-info-button" class="button">
<span class="ribbon black"></span>
<img class="svg" src="<?php print_unescaped(
image_path('core', 'actions/info.svg')
); ?>" alt="<?php p($l->t('Album information')); ?>"/>
</div>
<div class="album-info-container">
<div class="album-info-loader"></div>
<div class="album-info-content markdown-body"></div>
</div>
<!-- toggle for opening the current album as file list -->
<div id="filelist-button" class="button view-switcher gallery">
<div id="button-loading" class="hidden"></div>
<img class="svg" src="<?php print_unescaped(
image_path('core', 'actions/toggle-filelist.svg')
); ?>" alt="<?php p($l->t('Picture view')); ?>"/>
</div>
<div id="app" data-albumname="<?php p($_['albumName']) ?>">
<div id="controls">
<div id="breadcrumbs"></div>
<!-- sorting buttons -->
<div class="buttons">
<div id="sort-name-button" class="button sorting left-switch-button">
<div class="flipper">
<img class="svg asc front" src="<?php print_unescaped(
image_path($_['appName'], 'nameasc.svg')
); ?>" alt="<?php p($l->t('Sort by name')); ?>"/>
<img class="svg des back" src="<?php print_unescaped(
image_path($_['appName'], 'namedes.svg')
); ?>" alt="<?php p($l->t('Sort by name')); ?>"/>
</div>
</div>
<div id="gallery" class="hascontrols"
data-requesttoken="<?php p($_['requesttoken']) ?>"
data-token="<?php isset($_['token']) ? p($_['token']) : p(false) ?>">
<div id="sort-date-button" class="button sorting right-switch-button">
<div class="flipper">
<img class="svg asc front" src="<?php print_unescaped(
image_path($_['appName'], 'dateasc.svg')
); ?>" alt="<?php p($l->t('Sort by date')); ?>"/>
<img class="svg des back" src="<?php print_unescaped(
image_path($_['appName'], 'datedes.svg')
); ?>" alt="<?php p($l->t('Sort by date')); ?>"/>
</div>
</div>
<div id="album-info-button" class="button">
<span class="ribbon black"></span>
<img class="svg" src="<?php print_unescaped(
image_path('core', 'actions/info.svg')
); ?>" alt="<?php p($l->t('Album information')); ?>"/>
</div>
<div class="album-info-container">
<div class="album-info-loader"></div>
<div class="album-info-content markdown-body"></div>
</div>
<!-- toggle for opening the current album as file list -->
<div id="filelist-button" class="button view-switcher gallery">
<div id="button-loading" class="hidden"></div>
<img class="svg" src="<?php print_unescaped(
image_path('core', 'actions/toggle-filelist.svg')
); ?>" alt="<?php p($l->t('Picture view')); ?>"/>
</div>
<div id="emptycontent" class="hidden"></div>
</div>
</div>
<footer>
<p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p>
</footer>
</div>
<div id="gallery" class="hascontrols"
data-requesttoken="<?php p($_['requesttoken']) ?>"
data-token="<?php isset($_['token']) ? p($_['token']) : p(false) ?>">
</div>
<div id="emptycontent" class="hidden"></div>
</div>