From ba9aead18c285044e8e654d7f3c65f9c1f02525d Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Wed, 28 Feb 2018 08:06:17 +0000 Subject: [PATCH] Add support for float-right div boxes in German Wikipedia Former-commit-id: 59a28941af9844485d04359aac9016dde71ef439 [formerly 54b89070ee0aad17bb270701e62f939c5284ce0c] Former-commit-id: 99c1dd6f279208e870a2fd93c61d42d5e299ba1a --- www/-/s/css_modules/mobile.css | 4 ++++ www/js/lib/transformStyles.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/www/-/s/css_modules/mobile.css b/www/-/s/css_modules/mobile.css index ee550391..bdc96faa 100644 --- a/www/-/s/css_modules/mobile.css +++ b/www/-/s/css_modules/mobile.css @@ -52,6 +52,10 @@ h1[tabindex="0"].collapsible-heading > .indicator { .client-js .collapsible-heading .indicator { display: none !important; /* this is to hide to "v" icone next to titles in desktop */ } + .float-right { + float: right; + margin-left: 10px; + } } @media all and (max-width: 720px) { .mw-stack, .infobox, .vertical-navbox { diff --git a/www/js/lib/transformStyles.js b/www/js/lib/transformStyles.js index 1e11639e..87d142fb 100644 --- a/www/js/lib/transformStyles.js +++ b/www/js/lib/transformStyles.js @@ -165,7 +165,7 @@ define(['util', 'uiUtil'], function (util, uiUtil) { console.log(zim == "mobile" ? "Transforming display style to desktop..." : "Optimizing cached styles for desktop display..."); uiUtil.poll("mobile" ? "Transforming display style to desktop..." : "Optimizing cached styles for desktop display..."); //If it's in mobile position, move info-box above lead paragraph like on Wikipedia desktop - if (zim == "mobile") { //Actually, move the infobox anyway because the hatnote often gets in the way + if (zim == "mobile") { //Attempt to match div-style infobox first var tableBox = util.matchOuter(html, ']+?(?:infobox|vertical-navbox|qbRight|wv-quickbar|wikitable)[^>]+>', '', 'i'); //If above failed we may have traditional table-style infobox