alistair3149
f70d410779
feat(core): ✨ reduce scroll up header delay
2022-11-23 14:11:48 -05:00
alistair3149
6b13da3318
feat(core): ✨ hide navigation on scroll down
2022-11-21 17:46:09 -05:00
alistair3149
b5ddd26de7
perf(core): ⚡ ️ only add beforeunload listener once
2022-11-21 17:46:04 -05:00
alistair3149
9c871764c3
style: 🎨 fix some eslint issues
2022-11-21 17:45:50 -05:00
alistair3149
31c43fa33b
refactor(core): ♻️ do not init observer when not needed
...
Do not init scroll observer if sentinel is set to display:none
2022-11-21 17:45:42 -05:00
github-actions
159bd8a7d2
ci: 👷 lint code to MediaWiki standards
...
Check commit and GitHub actions for more details
2022-11-21 17:42:28 -05:00
alistair3149
969cd787d6
feat(core): ✨ use different font weight in different themes
...
The same font weight do not provide the same contrast in different themes.
We should be able to change the scaling
2022-11-21 17:42:26 -05:00
alistair3149
ceaf3ed844
feat(core): ✨ tweak responsive layout
2022-11-21 17:42:22 -05:00
alistair3149
a1ce408e43
feat(core): ✨ re-implement responsive toc
2022-11-21 17:42:05 -05:00
alistair3149
3eaeaa15f7
refactor(core): ♻️ pre-work to allow Citizen to render ToC
2022-11-21 17:41:40 -05:00
alistair3149
4f651b41ca
feat(pwa): ✨ add basic support for service worker
...
This is super basic and experimental.
It will be expanded upon in the future, but for now it will satisfy the
requirement for PWA
2022-10-23 16:37:43 -04:00
alistair3149
e72d7c00a3
feat(core): ✨ add sticky body header
2022-09-29 22:33:06 -04:00
alistair3149
eba22354e5
fix(core): run script when DOM is ready
...
Sometimes the scripts start to run before DOM is fully ready. It causes things
like #475 where the checkbox is not in DOM yet but the script is already asking for it.
2022-06-04 17:44:03 -04:00
alistair3149
da619c793b
refactor(core): remove duplicated auto theme handling
...
Refactor auto theme handling into inline script since theme.js is basically duplicated code
at this point. Also add the event listener whenever auto theme is set.
Closes : #461
2022-05-20 17:33:10 -04:00
alistair3149
1be7f5faaf
refactor(core): rewrite ToC scrollspy based on Vector
2022-05-17 15:11:16 -04:00
alistair3149
c978bb1320
refactor(core): rename title hidden class
2022-05-13 00:30:46 -04:00
alistair3149
d59ca5c83a
refactor(core): move intersection observer into a module
...
* We will likely use it for other things in the future
* Based on Vector's implementation
* Also do not get toc element twice
2022-05-13 00:26:53 -04:00
alistair3149
194c73d5bb
style(core): use arrow function
2022-05-12 22:44:17 -04:00
alistair3149
86150d492d
refactor(core): clean up checkboxHack implementation
...
Mostly based on Vector 2022. Now we target checkbox hacks by the HTML classes
.mw-checkbox-hack-TYPE instead of defining each individually, which would
make it more scalable.
2022-05-12 22:37:28 -04:00
alistair3149
508c96ae9d
refactor(core): merge ToC script into core scripts
2022-05-12 17:18:39 -04:00
alistair3149
e0d5eb9657
feat(core): set toc-enabled through Mustache template
...
Since somewhere around MW 1.37, buildSkinFeatures() no longer have access to OutputPage.
That causes $out->isTOCenabled always return null, which makes ToC
broken for any wikis since 1.37. This should fix the issue for now.
More optimizations on the loading behavior will come soon.
2022-05-12 17:01:01 -04:00
alistair3149
b73357cf7c
feat(core): update checkboxHack API
2022-05-11 21:32:36 -04:00
alistair3149
cae7deb945
refactor(core): clean up header icon styles
2022-05-10 11:59:43 -04:00
alistair3149
5ccfbcfdeb
refactor(core): clean up drawer implementation
...
This is a part of the site header refactor
* Use relative units
* Add title to toggle button
* Remove unnessecary CSS
* Rewrite HTML classes
* Temporary remove drawer subsearch, it will be re-explored in a later patch
2022-05-10 10:52:36 -04:00
alistair3149
96013bb126
feat: deprecate --background-color-dp-XX in favor of --color-surface-X
...
--background-color-dp-XX is now fully deprecated in favor of a simpler 4 color surface system. It can be accessed through the --color-surface-X CSS var.
2022-04-25 22:27:52 -04:00
alistair3149
fed5369847
fix: add null check for checkboxObj.target
...
It should no longer throw an exception which causes other script to fail
Closes #432
2022-04-25 21:48:52 -04:00
alistair3149
f7e73cf171
feat: add security header deprecation message for upcoming version
2021-08-05 11:41:31 -04:00
alistair3149
7dc0d14c70
feat: simplify background color variables in core styles
...
--background-color-dp-XX is soft depreciated, please use --color-surface-X instead
2021-07-25 19:16:05 -04:00
alistair3149
63d21cf318
fix: add additional check for ToC elements
...
that should fix the null querySelector bug:
2021-07-12 15:11:11 -04:00
alistair3149
5f168f03ee
feat: add page load progress bar
2021-06-12 09:54:47 -04:00
alistair3149
51ac47691e
feat: implement reading preferences
...
allow visitor to adjust theme, font size, and page width
2021-04-27 13:51:03 -04:00
alistair3149
e2b4a4e49a
feat: show page title on header after scroll
...
The page header also acts as a jump to top link
2021-04-26 11:39:27 -04:00
alistair3149
38882334c8
refactor: use checkboxHack module for search script
2021-04-21 18:47:03 -04:00
alistair3149
8129ca0e5b
feat: use MW core checkboxHack scripts instead
...
Cloned and tweaked to a local file as the core file can be different across MW builds
2021-04-21 16:45:52 -04:00
alistair3149
f44aaa4e4c
refactor: refactor skins.citizen.scripts to ES6
2021-04-21 13:44:28 -04:00
alistair3149
117d839f00
doc: fix lettercase for Window and Document object
2021-04-21 11:32:44 -04:00
alistair3149
c4c607d154
fix: theme toggle button not appearing in initial load
2021-04-20 23:54:32 -04:00
alistair3149
2cec33906e
refactor: integrate skins.citizen.scripts.theme into core scripts
2021-04-20 23:42:45 -04:00
alistair3149
4a0f7af3e0
doc: add missing param document
2021-03-13 12:45:03 -05:00
alistair3149
1b3fff4170
fix: CSS animation flash on page load on Chromium
2021-03-13 12:43:28 -05:00
alistair3149
3ba3a0cb8d
feat: hide menu when clicked outside
2021-01-21 21:08:55 -05:00
alistair3149
56de894f6e
refactor: convert skin.citizen.scripts to packagedFiles
2021-01-16 17:01:58 -05:00