Vadim Kovalenko
Vadim Kovalenko
This static file has been added in [this](https://github.com/openzim/mwoffliner/commit/45a20b61d632f9990889b122a6e9ed9a0a5cccc9#diff-f24a3dfa196127b36143c8e76f45c5bd6cce702b575e8af943e6dd1ffe80098d) commit. It is responsible for many CSS transformations such as aligning text content and images, paddings, list items, etc. Removing it will...
Current dependencies miss CSS parts that are present in the `inserted_style.css`. There is a comment in [there](https://github.com/openzim/mwoffliner/blob/main/res/inserted_style.css#L1) with this [link](https://fr.m.wikipedia.org/w/load.php?debug=false&lang=fr&modules=ext.cite.styles%7Cext.math.styles%7Cext.timeline.styles%7Cmediawiki.page.gallery.styles%7Cmediawiki.ui.button%2Cicon%7Cskins.minerva.base.reset%2Cstyles%7Cskins.minerva.content.styles%7Cskins.minerva.icons.images%7Cskins.minerva.tablet.styles&only=styles&skin=minerva) to request CSS tailored for the Minerva mobile skin. Shall...
Upd: I compared styles in the `inserted_style.css` and from the [link](https://fr.m.wikipedia.org/w/load.php?debug=false&lang=fr&modules=ext.cite.styles%7Cext.math.styles%7Cext.timeline.styles%7Cmediawiki.page.gallery.styles%7Cmediawiki.ui.button%2Cicon%7Cskins.minerva.base.reset%2Cstyles%7Cskins.minerva.content.styles%7Cskins.minerva.icons.images%7Cskins.minerva.tablet.styles&only=styles&skin=minerva) that has been put in a comment there - I found that they have differences. I assume that `inserted_style.css`...
@kelson42 , I've noticed that `inserted_style.css` consists of thousands CSS rules. It is not possible to quickly separate which rules are needed for mwoffliner and which are not. And does...
@kelson42 It affects rendering because `inserted_style.css` is a legacy set of CSS rules that applies to the output regardless of other modules for the MediawikiDesktop or WikimediaRESTApi (Desktop) article. Let's...
Thanks, @Jaifroid . I'll probably use DOM methods for this indeed, but your idea seems valid.
@kelson42 , I haven't noticed dedicated ticket for mwoffliner. This patch mostly replicates functionality from https://github.com/openzim/mwoffliner/pull/1846 but on top of recent changes. In fact, it solves both problems - reduces...
> Any chance to get that completed today? Update: I've noticed that parsoid API has troubles with media treatment, and probably other issues in the output. Compare the example of...
@kelson42 This PR introduces new renderer based on `parsoid=1` in the **MediaWiki Action API**. Instead of **WikimediaDesktop** that represented by this example https://en.wikipedia.org/api/rest_v1/page/html/Foobar, mwoffliner will query this endpoint: https://en.m.wikipedia.org/w/api.php?action=parse&format=json&prop=text%7Cmodules%7Cjsconfigvars%7Cheadhtml&parsoid=1&page=Foobar As...
Upd: this problem might be mitigated by explicit setting of the main page title in the CLI: `npm start -- --mwUrl=https://en.wikivoyage.org [email protected] --articleList=Main_Page --customMainPage=Main_Page`