summaryrefslogtreecommitdiff
path: root/help3xsl/online_transform.xsl
AgeCommit message (Collapse)Author
2022-06-23make generated help files deterministic/reproducibleChristian Lohmaier
generate-id() is only stable within a single invocation, the results vary from run to run, causing two builds of the same codebase result in different output. Due to help including snippets from different files, a simple count won't be unique enough, but combining it with the sourcefile's topic-ID does the trick. Change-Id: I2ab8988bc34c9136fcd99d074cf0b189a8f40eb7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136197 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> (cherry picked from commit b48ace599e8c109c4090c178823c6718f78103da) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136248 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-15Refactor XSLT for code colorizationOlivier Hallot
Change-Id: Ia619b7b0b1548c9de0b183a731e0cca3033eb529 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/134349 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-05-15Add SQL code colorization to Help pagesOlivier Hallot
Change-Id: I2c74e63c67a323a6e6b726da352dd23e1a88d886 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/134329 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-05-13Fix YouTube display for Help online/offlineOlivier Hallot
+ Enhance button CSS display + Refactor XSLT + Refactor XHP Change-Id: I58e46c31a97ad49eb25a4489994aae5dac62dbc3 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/134207 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-05-12Add dir attribute to html element based on language directionalityIlmari Lauhakangas
Change-Id: I1dbb6cc2f3497ab70a806c94ad9d52ee1e10c13f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/133294 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-04-19tdf#148621 Make ScriptForge service tables mobile-friendlyIlmari Lauhakangas
- Introduce <tablehead> element - While considering text-align, I noticed we do not take RTL languages into account. A CSS rule 'html[dir=ltr] th' was added, which does nothing at the moment. We should look into directionality. Change-Id: Ib59aa0c508529c0beaa35542d96bd5cc1aa4db29 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/133114 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-04-17tdf#148621 Improve Basic Help layoutIlmari Lauhakangas
- Get rid of tables - Add normalize-whitespace Prism plugin to get rid of useless indents - Fix code blocks poking through sticky header - Add some word wrapping CSS to fix mobile-unfriendliness Change-Id: I73fd1e0678624b0d4bd5561f50e80990db5567be Reviewed-on: https://gerrit.libreoffice.org/c/help/+/133096 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-03-29Remove redundant image title attributesIlmari Lauhakangas
From web accessiblity evaluation tool: The title attribute value is used to provide advisory information. It typically appears when the user hovers the mouse over an element. The advisory information presented should not be identical to or very similar to the element text or alternative text. Change-Id: Id95d6661d47d7c28ea8a3f6a43ecc1b12c579a95 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132265 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-03-29Use type="search" for index filter inputIlmari Lauhakangas
Change-Id: I0427076aa8d688f837a38c66312b7690336c0d2e Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132264 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-02-12Use max-width in YouTube placeholder styleIlmari Lauhakangas
Change-Id: I8acaa11f8d8c11f5034cea7c4dfc247cee90d487 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/129857 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-02-09Add YouTube consent clickIlmari Lauhakangas
Change-Id: I60d64e1becbc7ea33301d4a8073f0b550998b87d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/129716 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-02-05Drop last 00/00000004.xhp#wie and simplify XSLTOlivier Hallot
Change-Id: I85d2da067db208f806b78020a9ca95889444ce0d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/129519 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-01-25shared/explorer/database is no moreOlivier Hallot
Change-Id: I286096e6de26f5a0e35200b4db7a2a89cfddcb5f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/128934 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-01-25tdf#123318 tdf#129697 Don't hardcode product name in CSS and JSIlmari Lauhakangas
Change-Id: I0ef315146fed188eb1cf33c416ff5f3e9899bbae Reviewed-on: https://gerrit.libreoffice.org/c/help/+/128524 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-09-26Switch from Fuzzysort to FlexSearchIlmari Lauhakangas
FlexSearch has the best performance of JS search libs at the moment. It doesn't have fuzzy search yet, but maybe our users don't even want the feature. RFE is https://github.com/nextapps-de/flexsearch/issues/118 flexsearch.debug.js is used because it is the only unminified version and we can't use minified files in the source code as they are equivalent to binary files (close source). There doesn't seem to be anything that would make it a bad idea to use the debug version in production, only a couple of edge case checks that print warnings to console. This commit also makes automatic filtering work when the input field already has a string upon page load (functions were called in the wrong order). Change-Id: I5055f7f7f99cad92dfa3a544e5314eb85a1faced Reviewed-on: https://gerrit.libreoffice.org/c/help/+/122566 Tested-by: Jenkins Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org> Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-04-15Fix sort order of Calc functionsOlivier Hallot
Change-Id: I8237b0d52b8b0f29fc35196d34648ed7b51669d1 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114113 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-04-14Fix sort command in Help pagesOlivier Hallot
After the introduction of the headings h1 ... h6 in the Help pages the sort command broke. It relied only in the <paragraph> tag for sorting, usually the first paragraph in the section. The patch extend the DTD to handle the new descendant="" attribute to select which tag to sort in the Help page Default is <paragraph> for backward compatibility. Pages with <sort> must be revisited. Change-Id: I3c6f243369429ed7824a68b11757dc15f4555c0f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114110 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-08-18Improve schema.org for online HelpOlivier Hallot
Changed to schema.org/SoftwareApplication Change-Id: Ib5457aaf237153de18a100b9604bfe7ef29dd292 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/100862 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-06-17Add better 404 errorOlivier Hallot
Missing help pages or links with bad HID were redirected to module entry page, masking the real issue in Help. This patch activated the 404 page and add HID information for debug and fix. Change-Id: I0d55f1c36d9a6c3fab0096d5e3cd171087729691 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/96401 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-06-13tdf#133928 Help need javascript enabled in browserOlivier Hallot
Helpcontent2 part Also, optimize XSLT brand template Change-Id: Idfe3647306452f1f8be5632f1e1a70d642533406 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/96238 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-06-07Improve web help headerIlmari Lauhakangas
Header with symbol, logo and navigation dropdowns now uses grid layout when screen width is desktop. Change-Id: I00612ebe04110b3608d9534c0ebdb23d5b788c54 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/95668 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-05-19langnames.js loaded too lateIlmari Lauhakangas
help2.js depends on it being loaded, so lang dropdown is empty on mobile. Hopefully this fixes it. Change-Id: Ic331df0e6e34a2c50b7bd343c877685d4e84d648 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94334 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-05-13tdf#128519 Icon replacement table in build timeOlivier Hallot
As explained in tdf#128519, command <include> in XLST must have its href= hardcoded. Thus, copy online_transform.xsl and create links.txtx.xsl in workdir/ Change-Id: I979fd58f16a51ae6f57fc6f87349700eafdefbd7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94082 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-11tdf#128519 Automate icon repl't table for Help bldOlivier Hallot
The solution here is to create links.txt.xsl in the helpcontent2/helpers/ folder at build time because the <include> directive in XSLT of online_transform.xsl must be hardcoded (compile time) and core/workdir/ is not. Change-Id: I8c4c8d0b8aed58c10a95c5d42bbd1b8acdb39614 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/93436 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-05-01Help CSS: allow title in header to be widerIlmari Lauhakangas
Added a column and let the title section to grow into it. Also removed the hardcoded size from the Xapian search input. Change-Id: Id391264a17556a35d54b705621deb9bdecc16af2 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/93278 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-02-22Refactor XSLTs and CSS (2)Olivier Hallot
class -> id Change-Id: I62c1af5a0203bb66fdd291dbf55633cbb3731353 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/89207 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-02-22Refactor XSLTs and CSSOlivier Hallot
more meanigful names Change-Id: Ib786d2814adaed336f495992711eb89f99d85d39 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/89206 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-02-10Don't hardcode version in links in online helpMike Kaganski
... so that when current page URL is like https://help.libreoffice.org/latest/en-US/text/shared/05/new_help.html links from it will lead to other pages under 'latest', not to https://help.libreoffice.org/6.3/... The problem reason was that in online help, HTML referred to resources with relative URLs starting with version number, like 'href="6.3/media/navigation/favicon.ico"'. The links didn't include the version level in local help: 'href="media/navigation/favicon.ico"'. This was naturally accompanied by <base href="../../../../../"> (online) and '<base href="../../../../">' (local), coming from "tokenize" in help3xsl/online_transform.xsl. This unifies online help behaviour with that of local help. Change-Id: I486cbfbd680d52d00ef99ade9af5ecac2967c115 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/87768 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-11-23Fix div position for Online HelpOlivier Hallot
The condition was masking the div. Now the condition mask the contents Change-Id: I270e20f3ae17a16d4425698f24e674763320fade Reviewed-on: https://gerrit.libreoffice.org/83540 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-11-08Fix missing %PRODUCTNAME replacementsOlivier Hallot
Some contents were still carrying %PRODUCTNAME variable Apply template brand on <bascode>, <meta itemprop../> and <title> Change-Id: Ia93204cba63ba72d1df6014e3de37d7322c68029 Reviewed-on: https://gerrit.libreoffice.org/82256 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-10-22Add Option View help page screenshotOlivier Hallot
+ tweak CSS for images Change-Id: Iaa304a0ccecb6cdea2421de4ffaed52d71a0c76b Reviewed-on: https://gerrit.libreoffice.org/81287 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-10-18Fix <br/> when embeddedOlivier Hallot
Change-Id: I8cfc619adc68718b261d9f661531886789a872ac Reviewed-on: https://gerrit.libreoffice.org/80992 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-10-11Fix xapian search bar in Help online (WIP)Olivier Hallot
Change-Id: Ibe178ff79a27b8a21fcbaf2465c66da0786a28fd WIP: need adjusts for mobile. Reviewed-on: https://gerrit.libreoffice.org/80605 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-10-01redmine#2555 replace Help online Google searchOlivier Hallot
This is the helpcontent2/ part of the patch. Add xapian-omega search to online Help. The patch replaces Google custom search with xapian-omega search. A new build key is introduced. --with-omindex=server : Localizes and adds the xapian result page template, adds the xapian form to each Help page. --with-omindex=noxap : do not localize the result template and do not add a form in the Help page. --with-omindex= will force Online Help build. Default is noxap NOTES: - xapian-omega databases are built in the server. - searches returns results only on localized Help pages, avoiding same resulis in many languages. TODO: - Tweak the xapian-omega result page CSS and markup. Change-Id: I3dc2b79c4111f61fd5fea01b1f8c95bfacab1e8f Reviewed-on: https://gerrit.libreoffice.org/79366 Tested-by: Jenkins Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org> Tested-by: Guilhem Moulin <guilhem@libreoffice.org>
2019-05-18Improve accessibility for modules and lang menusIlmari Lauhakangas
Ever since the contents of the modules and lang menus started being populated upon click, the flow for screenreader users has been potentially confusing. This patch introduces a11y-toggle into the mix: https://github.com/edenspiekermann/a11y-toggle Checkboxes were changed into buttons. This hopefully makes it clear we want the user to click them. The contents tree still uses the checkbox hack, because its items are populated upon page load. Change-Id: I3482bea0c8669f96794498fc37d9d18fe3f829d5 Reviewed-on: https://gerrit.libreoffice.org/72467 Tested-by: Jenkins Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-04-26tdf#122548 copy bascode and pycode to clipboardOlivier Hallot
This will allow easy testing of coding examples. Change-Id: I30fc53642b1579744591f2de0c84a615d1755352 Reviewed-on: https://gerrit.libreoffice.org/71385 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-04-06Revert "Create XSLT replacement table for missing icons"Olivier Hallot
This reverts commit 61f44912beec99f6211399ce567274aa369f817d. Change-Id: Icd69ccd4f487a82426a00169728ec62bbff6d0b6 Reviewed-on: https://gerrit.libreoffice.org/70350 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-04-06Create XSLT replacement table for missing iconsOlivier Hallot
Missing UI icons have a replacement table in /core/icon-themes/colibre/links.txt Help must also use this replacement table when Help pages have missing icons. The previous approach was a manual creation of a XSLT for the replacement. The patch moves the replacement table creation inside the Custom makefile, making it automatic and carrying changes of the original links.txt source. Change-Id: I7f834fa03bbd85f329efbec43e5c51cc86d51586 Reviewed-on: https://gerrit.libreoffice.org/70080 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-03-27tdf#124245 Polyfills and fixes for IE11Ilmari Lauhakangas
The polyfills can be removed after we drop IE11 support. Other IE11 fixes: Change from document.URL to window.location.pathname because otherwise we get local Windows paths with backward slashes. Use clear: left; for google-donation element so it doesn't float on top of other elements. Don't use defer to load fuzzysort.js and prism.js. Change-Id: I6c0143eab555c8b1fbdbde8e749a24baed2f69c8 Reviewed-on: https://gerrit.libreoffice.org/69549 Tested-by: Jenkins Reviewed-by: himajin100000 <himajin100000@gmail.com> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-03-13New approach to switch casesIlmari Lauhakangas
My previous JS patch broke the sys and appl switch behaviour. This patch removes the inline function calls from online_transform.xsl. Instead, help2.js now finds the relevant spans and calls the functions for them. Change-Id: I45d5b75bdb70a7c18eaa0b215beb57e3e1b6719a Reviewed-on: https://gerrit.libreoffice.org/69137 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-03-10Show module & lang navigation on mobileIlmari Lauhakangas
Module & languages menus were not shown on screen widths < 960. Changed module & languages menu background to span the whole width, when on mobile. An arrow function was used in help2.js, which means it was broken on IE. Moved all src .js files to head and used defer for all. Moved inline Piwik & system info JS into help2.js and added a test for onlineness targeting the first meta element in the body. Change-Id: Ic1a928b53ce9029f9f655117977cd511b7e3246d Reviewed-on: https://gerrit.libreoffice.org/69005 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-03-08Donation button and sticky header for HelpIlmari Lauhakangas
Task: https://redmine.documentfoundation.org/issues/2815 Header was made sticky on non-mobile by using position: sticky. This was the only way to make it work with the grid without carving magic numbers into stone. IE11 ignores it, but so what? Donation text was made shorter. The Google search and the donation button were wrapped in a container to make it easy to haul them all over the place. Lots of tweaks were made to the grid areas and the styles of the bottom elements to make everything fit nicely in the new markup order. The result was tested on IE11 to make sure it degrades gracefully. The Displayarea element had a fixed width (my old mistake), which made the min-width: 960px layout look very uncool. Change-Id: I131a1e82290bc3381c938acb4dc9dbc408fb2ba7 Reviewed-on: https://gerrit.libreoffice.org/68890 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-03-04Some optimizing bits in XSLTOlivier Hallot
Change-Id: I27c29677cbf9c704d64b5ed49acc56b7a22432bd Reviewed-on: https://gerrit.libreoffice.org/68646 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-02-01fix commit 622324ec76e54ea1de99d6cea3debc2389049f5Olivier Hallot
* SVG images cannot have undefined width and height * pick'd a mistake in setting generic images width and height Change-Id: I9f3e62e535c82d624c5c209b0e000784b2765604 Reviewed-on: https://gerrit.libreoffice.org/67234 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-01-28tdf#121571 Solve cognitive dissonance with note icons and colorsAdolfo Jayme Barrientos
More often than not, the alarmist colors given to note boxes didn’t match their content. Change-Id: I88d7a8e2d07ffba661c218887fd54638506d21c8
2019-01-28Drop this pitiful, bothersome, gimmicky animationAdolfo Jayme Barrientos
Change-Id: If533f8565e38e02d503cc1ab59f65e2445f1369b
2018-12-30tdf#114263 Help page for BASIC WaitUntil statementOlivier Hallot
Change-Id: I6ef145556a813f65ea509b146eadbf744b6f1fae Reviewed-on: https://gerrit.libreoffice.org/65721 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-12-26Review code in help page and mute l10n when OKOlivier Hallot
+ Added "smathcode" role to render smath code paragraphs + let smath code samples be copied to clipboard. Change-Id: I580c162d0c77f51d0de817ca143a845abf56eca9 Reviewed-on: https://gerrit.libreoffice.org/65621 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-12-22Remove cruft from XSLTOlivier Hallot
Change-Id: I98dd6ad0a5c4dff7333c6f786aedce6b7679aae4 Reviewed-on: https://gerrit.libreoffice.org/65567 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-12-13Add support for python code scriptsOlivier Hallot
Introduced <pycode> section and "pycode" role for paragraphs with same behaviour as BASIC coounterparts. Used to list python scripts examples ans code fragments in help pages Change-Id: Ica76bcc65dcf422a1eb4b7f39a6d671b2e4e573c Reviewed-on: https://gerrit.libreoffice.org/65097 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>