Small style optimization
authorMarcel Werk <burntime@woltlab.com>
Wed, 9 Oct 2013 14:12:46 +0000 (16:12 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 9 Oct 2013 14:12:46 +0000 (16:12 +0200)
com.woltlab.wcf/templates/attachments.tpl
wcfsetup/install/files/style/attachment.less

index 7ab676e2ecee7787057dbad9be8d74847e418576..6d632f5f0fd57e3be3b49a808fef701eda289f43 100644 (file)
@@ -10,7 +10,7 @@
                                                        {if $attachment->showAsImage() && !$attachment->isEmbedded()}
                                                                <li class="attachmentThumbnail">
                                                                        {if $attachment->hasThumbnail()}
-                                                                               <a href="{link controller='Attachment' object=$attachment}{/link}"{if $attachment->canDownload()} class="jsImageViewer" title="{$attachment->filename}"{/if}><img src="{link controller='Attachment' object=$attachment}thumbnail=1{/link}" alt="" /></a>
+                                                                               <a href="{link controller='Attachment' object=$attachment}{/link}"{if $attachment->canDownload()} class="jsImageViewer" title="{$attachment->filename}"{/if}><img src="{link controller='Attachment' object=$attachment}thumbnail=1{/link}" alt="" style="{if $attachment->thumbnailHeight < ATTACHMENT_THUMBNAIL_HEIGHT}margin-top: {@ATTACHMENT_THUMBNAIL_HEIGHT/2-$attachment->thumbnailHeight/2}px; {/if}{if $attachment->thumbnailWidth < ATTACHMENT_THUMBNAIL_WIDTH}margin-left: {@ATTACHMENT_THUMBNAIL_WIDTH/2-$attachment->thumbnailWidth/2}px{/if}" /></a>
                                                                        {else}
                                                                                <img src="{link controller='Attachment' object=$attachment}{/link}" alt="" style="margin-top: {@ATTACHMENT_THUMBNAIL_HEIGHT/2-$attachment->height/2}px; margin-left: {@ATTACHMENT_THUMBNAIL_WIDTH/2-$attachment->width/2}px" />
                                                                        {/if}
index 6651342be88b60864080075e900fa45ac5660b77..92891bbcc8ee3b6f86ba30f9e32daf3345270cef 100644 (file)
        min-height: ~"@{wcf_option_attachment_thumbnail_height}px";
        min-width: ~"@{wcf_option_attachment_thumbnail_width}px";
        position: relative;
-       text-align: center;
-               
-       > img {
-               margin-left: 0px !important;
-       }
        
        > a {
                display: inline-block;