sandbox
Differences
This shows you the differences between two versions of the page.
sandbox [2025/02/01 22:26] – created Wojtek | sandbox [2025/02/01 23:52] (current) – Wojtek | ||
---|---|---|---|
Line 3: | Line 3: | ||
<WRAP tab " | <WRAP tab " | ||
</ | </ | ||
+ | |||
+ | ====== Examples for the Wrap Plugin ====== | ||
+ | |||
+ | ===== Basic syntax ===== | ||
+ | |||
+ | An uppercase **%%< | ||
+ | |||
+ | < | ||
+ | <WRAP classes #id width : | ||
+ | " | ||
+ | </ | ||
+ | |||
+ | or | ||
+ | <block classes #id width : | ||
+ | " | ||
+ | </ | ||
+ | |||
+ | or | ||
+ | <div classes #id width : | ||
+ | " | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | A lowercase **%%< | ||
+ | |||
+ | < | ||
+ | <wrap classes #id width : | ||
+ | |||
+ | or | ||
+ | <inline classes #id width : | ||
+ | |||
+ | or | ||
+ | <span classes #id width : | ||
+ | </ | ||
+ | |||
+ | :!: Please note, some things **won' | ||
+ | * **alignments** (including alignments generated by changing the text direction) | ||
+ | * **multi-columns** | ||
+ | * and **widths** | ||
+ | if the according wrap isn't floated as well. | ||
+ | |||
+ | A shorthand of uppercase **%%< | ||
+ | |||
+ | < | ||
+ | <WRAP classes #id /> | ||
+ | or | ||
+ | <block classes #id /> | ||
+ | or | ||
+ | <div classes #id /> | ||
+ | </ | ||
+ | |||
+ | and | ||
+ | < | ||
+ | <wrap classes #id /> | ||
+ | or | ||
+ | <inline classes #id /> | ||
+ | or | ||
+ | <span classes #id /> | ||
+ | </ | ||
+ | |||
+ | ===== Classes and Styles ===== | ||
+ | |||
+ | |||
+ | ==== Columns and Floats ==== | ||
+ | |||
+ | You can have columns easily by adding the class '' | ||
+ | <WRAP column 30%> | ||
+ | |||
+ | The example below uses the following structure: | ||
+ | |||
+ | < | ||
+ | <WRAP group> | ||
+ | |||
+ | <WRAP third column> | ||
+ | <WRAP third column> | ||
+ | <WRAP third column> | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP group> | ||
+ | <WRAP third column> | ||
+ | === Floating Options === | ||
+ | |||
+ | Normally you would only need the class '' | ||
+ | |||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | </ | ||
+ | |||
+ | <WRAP third column> | ||
+ | === Widths === | ||
+ | |||
+ | You can set any valid widths (but only on divs): '' | ||
+ | |||
+ | ^type^e.g.^note^ | ||
+ | ^'' | ||
+ | ^'' | ||
+ | ^'' | ||
+ | |||
+ | </ | ||
+ | <WRAP third column> | ||
+ | === Width Keywords === | ||
+ | |||
+ | With certain width keywords you can fit your columns automatically to fill the available horizontal space. Those columns will also react to the screen size, so will be responsive and wrap underneath each other on mobile devices. | ||
+ | |||
+ | There are four width keywords. These should not be combined with any other width, only '' | ||
+ | |||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | |||
+ | :!: Attention: In order to work properly, wraps with width keywords need an **additional '' | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | You can use the same options with spans (as each element that floats is automatically a block level element), but it probably doesn' | ||
+ | |||
+ | :!: Attention: What is the difference between widths and width keywords and when is it best to use which? **Widths** can cause problems and will never fully add up, therefore will break the layout under some circumstances. (See [[http:// | ||
+ | |||
+ | All of those options will also work in the [[#boxes and notes]] wraps (see below). | ||
+ | |||
+ | === Old Emulated Headline (deprecated) === | ||
+ | |||
+ | When the '' | ||
+ | |||
+ | If that config options is enabled and you need text that is bold and italic, simply use it the other way around: '' | ||
+ | |||
+ | |||
+ | === Multi-columns === | ||
+ | |||
+ | <WRAP colmedium> | ||
+ | Multi-columns work best in modern browsers (no IE9 and below) but should still be considered experimental as some browser behaviour is still inconsistent and buggy. | ||
+ | |||
+ | Just use **'' | ||
+ | Or you can use **'' | ||
+ | The former type of column is determined by its width, the latter by its amount. The width-based columns are ideal for different layouts and device widths. | ||
+ | |||
+ | :!: Note: Multi-columns don't make sense for spans. | ||
+ | </ | ||
+ | |||
+ | Don't use this for bigger columns containing more than just text. Use the [[#columns and floats]] mentioned above instead. | ||
+ | |||
+ | |||
+ | ==== Alignments ==== | ||
+ | |||
+ | You can use these different text alignments: | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | Center aligned text ... | ||
+ | </ | ||
+ | |||
+ | <WRAP rightalign> | ||
+ | ... and right aligned. | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | <WRAP centeralign> | ||
+ | Center aligned text ... | ||
+ | </ | ||
+ | |||
+ | <WRAP rightalign> | ||
+ | ... and right aligned. | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | :!: You cannot add alignments to spans. | ||
+ | |||
+ | |||
+ | ==== Boxes and Notes ==== | ||
+ | |||
+ | <WRAP round box 500px center> | ||
+ | === round box 500px center === | ||
+ | |||
+ | * '' | ||
+ | * any of the classes '' | ||
+ | * the classes '' | ||
+ | * '' | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP info 300px left> | ||
+ | === Info === | ||
+ | %%<WRAP info></ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP tip 300px left> | ||
+ | === Tip === | ||
+ | %%<WRAP tip></ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP important 300px left> | ||
+ | === Important === | ||
+ | %%<WRAP important></ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP alert 300px left> | ||
+ | === Alert === | ||
+ | %%<WRAP alert></ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP round help 300px left> | ||
+ | === Help === | ||
+ | %%<WRAP round help></ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP download 300px left> | ||
+ | === Download === | ||
+ | %%<WRAP download></ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP todo 300px left> | ||
+ | === Todo === | ||
+ | %%<WRAP todo></ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP clear /> | ||
+ | |||
+ | |||
+ | **Safety Notes:** | ||
+ | |||
+ | Best only use simple markup in safety notes. | ||
+ | |||
+ | <WRAP danger 30% left> | ||
+ | === Danger === | ||
+ | %%<WRAP danger></ | ||
+ | </ | ||
+ | |||
+ | <WRAP warning 30% left> | ||
+ | === Warning === | ||
+ | %%<WRAP warning></ | ||
+ | </ | ||
+ | |||
+ | <WRAP caution 30% left> | ||
+ | === Caution === | ||
+ | %%<WRAP caution></ | ||
+ | </ | ||
+ | |||
+ | <WRAP round notice 30% left> | ||
+ | === Notice === | ||
+ | %%<WRAP round notice></ | ||
+ | </ | ||
+ | |||
+ | <WRAP round safety 30% left> | ||
+ | === Safety === | ||
+ | %%<WRAP round safety></ | ||
+ | </ | ||
+ | |||
+ | <WRAP clear /> | ||
+ | |||
+ | |||
+ | You can use notes and boxes also inside text with spans like this: | ||
+ | <wrap info> | ||
+ | <wrap info> | ||
+ | |||
+ | ==== Marks ==== | ||
+ | |||
+ | You can mark text as <wrap hi> | ||
+ | |||
+ | You can mark text as <wrap hi> | ||
+ | |||
+ | :!: This might look ugly in some templates and should be adjusted accordingly. | ||
+ | |||
+ | ==== Tabs ==== | ||
+ | |||
+ | You can create a row of tabs by simply wrapping a list of links in '' | ||
+ | |||
+ | <WRAP tabs> | ||
+ | * [[Some page]] | ||
+ | * [[example|This page]] | ||
+ | * [[Another page]] | ||
+ | </ | ||
+ | |||
+ | <WRAP tabs> | ||
+ | * [[Some page]] | ||
+ | * [[example|This page]] | ||
+ | * [[Another page]] | ||
+ | </ | ||
+ | |||
+ | :!: Please note, the styling of these tabs depend on the template you are using and not on the wrap plugin. If you only see a list of links and no tabs, please make sure to add " | ||
+ | |||
+ | ==== Miscellaneous ==== | ||
+ | |||
+ | === Clear float === | ||
+ | |||
+ | After using any of the float classes, you might come across following text protruding into the space where only the floating containers should be. To prevent that, you should simply add this after your last column: | ||
+ | |||
+ | <WRAP clear /> | ||
+ | |||
+ | === Table width === | ||
+ | |||
+ | You can set the width of a table via '' | ||
+ | |||
+ | <WRAP tablewidth 80%> | ||
+ | ^ Table ^ is ^ | ||
+ | | 80% | wide | | ||
+ | </ | ||
+ | |||
+ | <WRAP tablewidth 80%> | ||
+ | ^ Table ^ is ^ | ||
+ | | 80% | wide | | ||
+ | </ | ||
+ | |||
+ | === Indent === | ||
+ | |||
+ | <wrap indent> | ||
+ | |||
+ | <wrap indent> | ||
+ | |||
+ | === Outdent === | ||
+ | |||
+ | <wrap outdent> | ||
+ | |||
+ | <wrap outdent> | ||
+ | |||
+ | === Prewrap === | ||
+ | |||
+ | <WRAP prewrap 250px> | ||
+ | < | ||
+ | Inside this code block the words will wrap to a new line although they are all in one line. | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP prewrap 250px> | ||
+ | < | ||
+ | Inside this code block the words will wrap to a new line although they are all in one line. | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | === Spoiler === | ||
+ | |||
+ | Here follows a spoiler: <wrap spoiler> | ||
+ | |||
+ | Here follows a spoiler: <wrap spoiler> | ||
+ | |||
+ | Just select the text in the spoiler box to be able to read its content. | ||
+ | |||
+ | === Button links === | ||
+ | |||
+ | A link that looks like a button: <wrap button> | ||
+ | |||
+ | A link that looks like a button: <wrap button> | ||
+ | |||
+ | === Hide === | ||
+ | |||
+ | The following text is hidden: <wrap hide> | ||
+ | |||
+ | The following text is hidden: <wrap hide> | ||
+ | |||
+ | :!: Warning: The text will still appear in the source code, in non-modern browsers and is searchable. Do not hide any security risky secrets with it! | ||
+ | |||
+ | === Pagebreak === | ||
+ | |||
+ | The following will add a pagebreak: <WRAP pagebreak /> | ||
+ | |||
+ | The following will add a pagebreak: <WRAP pagebreak /> | ||
+ | |||
+ | This has no effect on the browser screen. A [[http:// | ||
+ | |||
+ | === Nopagebreak === | ||
+ | |||
+ | The following will try to avoid a pagebreak: <WRAP nopagebreak> | ||
+ | |||
+ | The following will try to avoid a pagebreak: <WRAP nopagebreak> | ||
+ | |||
+ | This also has no effect on the browser screen. It will try to [[http:// | ||
+ | |||
+ | === Noprint === | ||
+ | |||
+ | <wrap noprint> | ||
+ | |||
+ | <wrap noprint> | ||
+ | |||
+ | === Onlyprint === | ||
+ | |||
+ | <wrap onlyprint> | ||
+ | |||
+ | <wrap onlyprint> | ||
+ | |||
+ | |||
+ | ==== Combining and Nesting ==== | ||
+ | |||
+ | You can combine and nest all classes and types of boxes, e.g. | ||
+ | |||
+ | <WRAP box 350px right :en> | ||
+ | ===Outer box floats right === | ||
+ | |||
+ | <WRAP 165px left> | ||
+ | Inner nested box floats left and is partly <wrap em hi> | ||
+ | </ | ||
+ | |||
+ | Text inside outer right box, but beneath inner left box. | ||
+ | |||
+ | <WRAP clear /> | ||
+ | |||
+ | <WRAP round tip> | ||
+ | Round tip box underneath, after a '' | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | < | ||
+ | <WRAP box 350px right :en> | ||
+ | === Outer box floats right === | ||
+ | |||
+ | <WRAP 165px left> | ||
+ | Inner nested box floats left and is partly <wrap em hi> | ||
+ | </ | ||
+ | |||
+ | Text inside outer right box, but beneath inner left box. | ||
+ | |||
+ | <WRAP clear /> | ||
+ | |||
+ | <WRAP round tip> | ||
+ | Round tip box underneath, after a '' | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Language and Text Direction ===== | ||
+ | |||
+ | You can change the language and the reading direction of a wrap container by simply adding a colon followed by the language code, like this: | ||
+ | |||
+ | < | ||
+ | <WRAP :he> | ||
+ | זה עברית. ((<wrap :en>This means "This is Hebrew.", | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP :he> | ||
+ | זה עברית. ((<wrap :en>This means "This is Hebrew.", | ||
+ | </ | ||
+ | |||
+ | The text direction ('' | ||
+ | (If you specify a language not listed there, it simply won't do anything.) | ||
+ |
sandbox.1738448794.txt.gz · Last modified: 2025/02/01 22:26 by Wojtek