From: Marcel Werk Date: Sun, 1 Jan 2017 18:16:59 +0000 (+0100) Subject: Fixed imageviewer header X-Git-Tag: 3.0.0~80 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3166e0522d908b0d80c5b72e3a0286b2aa5f93f7;p=GitHub%2FWoltLab%2FWCF.git Fixed imageviewer header --- diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js index 569d909349..47f7fb5625 100644 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ b/wcfsetup/install/files/js/WCF.ImageViewer.js @@ -539,7 +539,7 @@ $.widget('ui.wcfImageViewer', { // jump to image page or full version case $.ui.keyCode.ENTER: - var $link = this._ui.header.find('> div > h1 > a'); + var $link = this._ui.header.find('h1 > a'); if ($link.length == 1) { // forward to image page window.location = $link.prop('href'); @@ -718,15 +718,15 @@ $.widget('ui.wcfImageViewer', { // meta data var $title = WCF.String.escapeHTML($image.image.title); if ($image.image.link) $title = '' + $title + ''; - this._ui.header.find('> div > h1').html($title); + this._ui.header.find('h1').html($title); if (!this.options.staticViewer) { var $seriesTitle = ($image.series && $image.series.title ? WCF.String.escapeHTML($image.series.title) : ''); if ($image.series.link) $seriesTitle = '' + $seriesTitle + ''; - this._ui.header.find('> div > h2').html($seriesTitle); + this._ui.header.find('h2').html($seriesTitle); } - this._ui.header.find('> div > h3').text(WCF.Language.get('wcf.imageViewer.seriesIndex').replace(/{x}/, $image.listItem.data('index') + 1).replace(/{y}/, this._items)); + this._ui.header.find('h3').text(WCF.Language.get('wcf.imageViewer.seriesIndex').replace(/{x}/, $image.listItem.data('index') + 1).replace(/{y}/, this._items)); this._ui.slideshow.full.data('link', ($image.image.fullURL ? $image.image.fullURL : $image.image.url)); @@ -866,7 +866,7 @@ $.widget('ui.wcfImageViewer', { this._ui = { buttonNext: $imageList.children('span.wcfImageViewerButtonNext'), buttonPrevious: $imageList.children('span.wcfImageViewerButtonPrevious'), - header: $('
' : ' class="box64">' ) + '

').appendTo(this._container), + header: $('
' : ' class="box64">' ) + '

').appendTo(this._container), imageContainer: $imageContainer, images: [ $imageContainer.children('img:eq(0)').on('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd', function() { $(this).removeClass('animateTransformation'); }), diff --git a/wcfsetup/install/files/style/ui/imageViewer.scss b/wcfsetup/install/files/style/ui/imageViewer.scss index aafd1f5c9e..142fcf5621 100644 --- a/wcfsetup/install/files/style/ui/imageViewer.scss +++ b/wcfsetup/install/files/style/ui/imageViewer.scss @@ -38,14 +38,6 @@ $wcfImageViewerFontColor: rgba(211, 211, 211, 1); } } - &.wcfImageViewerStatic > header > div { - > h1, - > h2, - > h3 { - margin-left: 0 !important; - } - } - &.wcfImageViewerMobile { > header, > footer { @@ -167,37 +159,36 @@ $wcfImageViewerFontColor: rgba(211, 211, 211, 1); top: 0; > div { - > h1, - > h2, - > h3 { - color: $wcfImageViewerFontColor; - margin-left: 80px !important; - - > a { - color: $wcfImageViewerFontColor; - } - } - - > h1 { - font-size: 1.75rem; - } - - > h2 { - font-size: 1.25rem; - } - - > h3 { - color: $wcfImageViewerFontColor; - font-size: .85rem; - margin-top: .25rem; - } - > a > img { height: 64px; width: 64px; } } + h1, + h2, + h3 { + color: $wcfImageViewerFontColor; + + > a { + color: $wcfImageViewerFontColor; + } + } + + h1 { + font-size: 1.75rem; + } + + h2 { + font-size: 1.25rem; + } + + h3 { + color: $wcfImageViewerFontColor; + font-size: .85rem; + margin-top: .25rem; + } + > .wcfImageViewerButtonClose { position: absolute; right: 26px;