starcitizentools / floating-ui
Implements the FloatingUI Javascript library.
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 4
Language:JavaScript
Type:mediawiki-extension
Requires
- composer/installers: >=1.0.1
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-19 15:11:26 UTC
README
The FloatingUI extension implements Floating UI library in MediaWiki.
Extension:FloatingUI on MediaWiki.
Usage
Parser function
{{#floatingui:reference|content}}
Loading library only
There are several ways to load the library on a given page. Once the library is loaded, it can be accessed through window.FloatingUIDOM
in Javascript.
To attach the library to a wikipage, put the following wikitext onto the page:
{{#floatingui:}}
Or alternatively, you can load the ResourceLoader module in Javascript:
mw.loader.load( 'ext.floatingUI.lib' );
Defining elements
- Reference element has to have the HTML class
ext-floatingui-reference
. - Floating element has to have the HTML class
ext-floatingui-content
and place next to the reference element.
Requirements
- MediaWiki 1.39 or later
Installation
You can get the extension via Git (specifying FloatingUI as the destination directory):
git clone https://github.com/StarCitizenTools/mediawiki-extensions-FloatingUI.git FloatingUI
Or download it as zip archive.
In either case, the "FloatingUI" extension should end up in the "extensions" directory of your MediaWiki installation. If you got the zip archive, you will need to put it into a directory called FloatingUI.