diff --git a/includes/SkinLakeus.php b/includes/SkinLakeus.php index 680d046..b5225a4 100644 --- a/includes/SkinLakeus.php +++ b/includes/SkinLakeus.php @@ -31,6 +31,7 @@ public function getTemplateData() { $data["is-repository-link-shown"] = true; } $data["is-notice-with-border"] = $config->get( 'LakeusSiteNoticeHasBorder' ); + $data["is-portlet-animated"] = $config->get( 'LakeusShouldAnimatePortlets' ); $pageToolsKey = array_search('p-tb' , array_column( $data["data-portlets-sidebar"]["array-portlets-rest"], 'id' ) ); $data["data-portlets"]["data-page-tools"] = $data["data-portlets-sidebar"]["array-portlets-rest"][$pageToolsKey]; diff --git a/includes/templates/Portlet.mustache b/includes/templates/Portlet.mustache index 89fdd27..a3a4a49 100644 --- a/includes/templates/Portlet.mustache +++ b/includes/templates/Portlet.mustache @@ -2,7 +2,7 @@ aria-labelledby="{{id}}-label">

{{label}}

-
+
diff --git a/resources/skin.less b/resources/skin.less index bfa4d67..52b3922 100644 --- a/resources/skin.less +++ b/resources/skin.less @@ -645,8 +645,11 @@ div.editOptions { .mw-portlet-body { display: block; visibility: hidden; - animation-name: animation-menu-hide; - animation-duration: 0.2s; + + &.should-animate { + animation-name: animation-menu-hide; + animation-duration: 0.2s; + } ul { background: @background-color-portlet-body; @@ -681,7 +684,7 @@ div.editOptions { visibility: visible; } - ~ .mw-portlet-body { + ~ .mw-portlet-body.should-animate { animation-name: animation-menu-show; animation-duration: 0.2s; } diff --git a/skin.json b/skin.json index f0b6fcf..f38d213 100644 --- a/skin.json +++ b/skin.json @@ -256,6 +256,10 @@ "LakeusSiteNoticeHasBorder": { "value": false, "description": "Whether to add a border to site notice. Useful for plain text notices." + }, + "LakeusShouldAnimatePortlets": { + "value": false, + "description": "Whether to animate portlets. May cause visual artifacts when enabled due to z-index issues." } } }