From 39a58cee7804ec9ffdd668f852d4d1f2bf8c029c Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Thu, 13 Jul 2017 14:11:02 +0100 Subject: [PATCH] Reduce top padding for mobile styl Former-commit-id: e66027131f4d6c4f4c93756a1be149d3ee904dc8 [formerly f763e201bd7be9564bce3fa4e15f9cc43c3a049d] Former-commit-id: 19d7e01f9aca976d0f065feafc1165defb99f74c --- bin/Release/AppX/vs.appxrecipe | 6 +++--- bin/Release/AppX/www/-/s/css_modules/mobile.css | 2 +- bin/Release/AppX/www/js/app.js | 3 ++- www/js/app.js | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/Release/AppX/vs.appxrecipe b/bin/Release/AppX/vs.appxrecipe index ab3316ef..2696e877 100644 --- a/bin/Release/AppX/vs.appxrecipe +++ b/bin/Release/AppX/vs.appxrecipe @@ -32,7 +32,7 @@ AppxManifest.xml true - 2017-07-13T12:26:48.688 + 2017-07-13T13:08:15.653 @@ -323,7 +323,7 @@ www\-\s\css_modules\mobile.css - 2017-07-13T12:24:22.881 + 2017-07-13T12:39:08.197 www\-\s\style-mobile.css @@ -383,7 +383,7 @@ www\js\app.js - 2017-07-13T12:26:33.372 + 2017-07-13T13:08:00.001 www\js\init.js diff --git a/bin/Release/AppX/www/-/s/css_modules/mobile.css b/bin/Release/AppX/www/-/s/css_modules/mobile.css index 890a1b97..4088363c 100644 --- a/bin/Release/AppX/www/-/s/css_modules/mobile.css +++ b/bin/Release/AppX/www/-/s/css_modules/mobile.css @@ -26,7 +26,7 @@ } .mw-body h1 { font-size: 42px; - font-family: 'Linux Libertine','Georgia','Times',serif; + font-family: 'Linux Libertine','Georgia','Times',serif; /* GK added */ } .mw-body h2 { font-size: 24px; diff --git a/bin/Release/AppX/www/js/app.js b/bin/Release/AppX/www/js/app.js index e517bdc9..ab7d117c 100644 --- a/bin/Release/AppX/www/js/app.js +++ b/bin/Release/AppX/www/js/app.js @@ -858,7 +858,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles cssArray[i] = cssArray[i].replace(/(href\s*=\s*["'])([^"']+)/i, "$1" + blobArray[i]); //DEV note: do not attempt to add onload="URL.revokeObjectURL...)": it fires before the //stylesheet changes have been painted and causes a crash... - //Consider using oneTimeOnly= true when creating blob instead + //Use oneTimeOnly=true when creating blob instead (implemented above) } htmlArticle = htmlArticle.replace(regexpSheetHref, ""); //Void existing stylesheets var cssArray$ = "\r\n" + cssArray.join("\r\n") + "\r\n"; @@ -866,6 +866,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles cssArray$ += cssArray$.match(/-\/s\/css_modules\/content\.parsoid\.css/i) ? "" : '\r\n'; cssArray$ += cssArray$.match(/-\/s\/css_modules\/inserted_style_mobile\.css/i) ? "" : '\r\n'; cssArray$ += cssArray$.match(/-\/s\/css_modules\/mobile\.css/i) ? "" : '\r\n'; + htmlArticle = htmlArticle.replace(/(]*mw-body[^>]+style[^>]+padding\s*:\s*)1em/i, "$10 1em"); htmlArticle = htmlArticle.replace(/class\s*=\s*["']\s*thumb\s+tright\s*["']\s*/ig, 'style="float: right; clear: right; margin-left: 1.4em;"'); htmlArticle = htmlArticle.replace(/class\s*=\s*["']\s*thumb\s+tleft\s*["']\s*/ig, 'style="float: left; clear: left; margin-right: 1.4em;"'); htmlArticle = htmlArticle.replace(/class\s*=\s*["']\s*thumbcaption\s*["']\s*/ig, 'style="margin: 0.5em 0 0.5em; font-size: 0.8em; line-height: 1.5; padding: 0 !important; color: #54595d; width: auto !important;"'); diff --git a/www/js/app.js b/www/js/app.js index e517bdc9..ab7d117c 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -858,7 +858,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles cssArray[i] = cssArray[i].replace(/(href\s*=\s*["'])([^"']+)/i, "$1" + blobArray[i]); //DEV note: do not attempt to add onload="URL.revokeObjectURL...)": it fires before the //stylesheet changes have been painted and causes a crash... - //Consider using oneTimeOnly= true when creating blob instead + //Use oneTimeOnly=true when creating blob instead (implemented above) } htmlArticle = htmlArticle.replace(regexpSheetHref, ""); //Void existing stylesheets var cssArray$ = "\r\n" + cssArray.join("\r\n") + "\r\n"; @@ -866,6 +866,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles cssArray$ += cssArray$.match(/-\/s\/css_modules\/content\.parsoid\.css/i) ? "" : '\r\n'; cssArray$ += cssArray$.match(/-\/s\/css_modules\/inserted_style_mobile\.css/i) ? "" : '\r\n'; cssArray$ += cssArray$.match(/-\/s\/css_modules\/mobile\.css/i) ? "" : '\r\n'; + htmlArticle = htmlArticle.replace(/(]*mw-body[^>]+style[^>]+padding\s*:\s*)1em/i, "$10 1em"); htmlArticle = htmlArticle.replace(/class\s*=\s*["']\s*thumb\s+tright\s*["']\s*/ig, 'style="float: right; clear: right; margin-left: 1.4em;"'); htmlArticle = htmlArticle.replace(/class\s*=\s*["']\s*thumb\s+tleft\s*["']\s*/ig, 'style="float: left; clear: left; margin-right: 1.4em;"'); htmlArticle = htmlArticle.replace(/class\s*=\s*["']\s*thumbcaption\s*["']\s*/ig, 'style="margin: 0.5em 0 0.5em; font-size: 0.8em; line-height: 1.5; padding: 0 !important; color: #54595d; width: auto !important;"');