Rework article button's html / css
authorMarcel Werk <burntime@woltlab.com>
Wed, 21 Jun 2023 15:18:17 +0000 (17:18 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 21 Jun 2023 15:18:17 +0000 (17:18 +0200)
The area was originally only used for the Like buttons, later the report button was also placed there, which is why the name `articleLikeButtons` is now misleading.

Closes #5522

com.woltlab.wcf/templates/article.tpl
wcfsetup/install/files/style/ui/article.scss

index 2d54f675dc869bc2934672399c835969fa5da698..668edd110e17f7c08d0183437717ffc77b2b9299 100644 (file)
                        {/if}
                        
                        <div class="col-xs-12 col-md-6 col-md{if !(MODULE_LIKE && ARTICLE_ENABLE_LIKE && $__wcf->session->getPermission('user.like.canViewLike'))} col-md-offset-6{/if}">
-                               <ul class="articleLikeButtons buttonGroup buttonList smallButtons">
+                               <ul class="articleButtons buttonGroup buttonList smallButtons">
                                        {if $__wcf->session->getPermission('user.profile.canReportContent')}
                                                <li>
                                                        <button
                                                </li>
                                        {/if}
                                        {if MODULE_LIKE && ARTICLE_ENABLE_LIKE && $__wcf->session->getPermission('user.like.canLike') && $article->userID != $__wcf->user->userID}
-                                               <li class="jsOnly"><span class="button reactButton{if $articleLikeData[$article->articleID]|isset && $articleLikeData[$article->articleID]->reactionTypeID} active{/if}" title="{lang}wcf.reactions.react{/lang}" data-reaction-type-id="{if $articleLikeData[$article->articleID]|isset && $articleLikeData[$article->articleID]->reactionTypeID}{$articleLikeData[$article->articleID]->reactionTypeID}{else}0{/if}">{icon name='face-smile'} <span class="invisible">{lang}wcf.reactions.react{/lang}</span></span></li>
+                                               <li class="jsOnly"><span class="button jsTooltip reactButton{if $articleLikeData[$article->articleID]|isset && $articleLikeData[$article->articleID]->reactionTypeID} active{/if}" title="{lang}wcf.reactions.react{/lang}" data-reaction-type-id="{if $articleLikeData[$article->articleID]|isset && $articleLikeData[$article->articleID]->reactionTypeID}{$articleLikeData[$article->articleID]->reactionTypeID}{else}0{/if}">{icon name='face-smile'} <span class="invisible">{lang}wcf.reactions.react{/lang}</span></span></li>
                                        {/if}
-                                       {event name='articleLikeButtons'}
+                                       {event name='articleLikeButtons'}{* deprecated: use articleButtons instead *}
+                                       {event name='articleButtons'}
                                </ul>
                        </div>
                </div>
index fa61d02b1d7c3a7fec6269dff298e0a99e3eeefe..7552cb43b00fe9adce857bebd5021f7c823898a7 100644 (file)
                align-items: center;
        }
 
-       .articleLikeButtons {
+       .articleButtons {
                justify-content: flex-end;
-
-               .invisible {
-                       display: inline;
-               }
        }
 
        .articleLikesSummery:not(:empty),
-       .articleLikeButtons:not(:empty) {
+       .articleButtons:not(:empty) {
                margin-top: 20px;
        }