| [10273] | 1 | = Wiki Boxes |
|---|
| 2 | [[PageOutline(2-3, Content)]] |
|---|
| 3 | |
|---|
| 4 | To highlight a section on a wiki page, use the `box`, `rbox`, `newsbox` and |
|---|
| 5 | `imagebox` WikiProcessors: |
|---|
| 6 | |
|---|
| 7 | {{{ |
|---|
| [10367] | 8 | {{{#!box type align=... width=... |
|---|
| [10273] | 9 | ... |
|---|
| 10 | }}} |
|---|
| 11 | |
|---|
| [10367] | 12 | {{{#!rbox type width=... |
|---|
| [10273] | 13 | ... |
|---|
| 14 | }}} |
|---|
| 15 | |
|---|
| 16 | {{{#!newsbox |
|---|
| 17 | ... |
|---|
| 18 | }}} |
|---|
| 19 | |
|---|
| 20 | {{{#!imagebox |
|---|
| 21 | ... |
|---|
| 22 | }}} |
|---|
| 23 | }}} |
|---|
| 24 | |
|---|
| [10367] | 25 | For shorter content, macro syntax may be preferable: |
|---|
| 26 | {{{ |
|---|
| 27 | [[box(..., type=..., align=..., width=...)]] |
|---|
| 28 | |
|---|
| 29 | [[rbox(..., type=..., width=...)]] |
|---|
| 30 | |
|---|
| 31 | [[newsbox(...)]] |
|---|
| 32 | |
|---|
| 33 | [[imagebox(...)]] |
|---|
| 34 | }}} |
|---|
| 35 | |
|---|
| [10273] | 36 | Following sections demonstrates each box and how to use the parameters. |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | == box and rbox |
|---|
| 40 | |
|---|
| 41 | The normal `box` looks like this, and is as wide as the page. |
|---|
| 42 | |
|---|
| 43 | {{{#!box |
|---|
| 44 | = box |
|---|
| 45 | This is a normal box. |
|---|
| 46 | == Subheading |
|---|
| 47 | Some text |
|---|
| 48 | = Second Heading 1 |
|---|
| 49 | Some text |
|---|
| 50 | }}} |
|---|
| 51 | |
|---|
| 52 | {{{ |
|---|
| 53 | {{{#!box |
|---|
| 54 | = box |
|---|
| 55 | This is a normal box. |
|---|
| 56 | == Subheading |
|---|
| 57 | Some text |
|---|
| 58 | = Second Heading 1 |
|---|
| 59 | Some text |
|---|
| 60 | }}} |
|---|
| 61 | }}} |
|---|
| 62 | |
|---|
| 63 | An `rbox` is aligned to the right of the page, with a fixed width. |
|---|
| 64 | |
|---|
| 65 | {{{#!rbox |
|---|
| 66 | = rbox |
|---|
| 67 | An `rbox` is aligned to the right of the page, with a |
|---|
| 68 | fixed with. Use this for side notes, references etc. |
|---|
| 69 | }}} |
|---|
| 70 | |
|---|
| 71 | {{{ |
|---|
| 72 | {{{#!rbox |
|---|
| 73 | = rbox |
|---|
| 74 | An `rbox` is aligned to the right of the page, with a |
|---|
| 75 | fixed with. Use this for side notes, references etc. |
|---|
| 76 | }}} |
|---|
| 77 | }}} |
|---|
| 78 | |
|---|
| 79 | |
|---|
| [10349] | 80 | === Box types |
|---|
| [10367] | 81 | The box type can optionally be stated, either as a flag or as a parameter |
|---|
| 82 | `type=...`. Here are all box types demonstrated. When `box` and `rbox` |
|---|
| 83 | co-exist, they will share the page width. |
|---|
| [10273] | 84 | |
|---|
| 85 | |
|---|
| [10367] | 86 | {{{#!rbox configure style="margin-top:0" |
|---|
| [10273] | 87 | = configure, configuration, tool |
|---|
| [10349] | 88 | This box is created by the wiki markup |
|---|
| 89 | {{{ |
|---|
| [10367] | 90 | {{{#!rbox configure |
|---|
| [10349] | 91 | ... |
|---|
| [10273] | 92 | }}} |
|---|
| [10349] | 93 | }}} |
|---|
| [10367] | 94 | See the box description to the left for more details. |
|---|
| [10349] | 95 | }}} |
|---|
| 96 | |
|---|
| [10367] | 97 | {{{#!rbox details |
|---|
| [10349] | 98 | = details, look, magnifier |
|---|
| [10273] | 99 | }}} |
|---|
| 100 | |
|---|
| [10367] | 101 | {{{#!rbox stop |
|---|
| [10273] | 102 | = critical, stop |
|---|
| 103 | }}} |
|---|
| [10349] | 104 | |
|---|
| [10367] | 105 | {{{#!rbox warning |
|---|
| [10273] | 106 | = bug, error, important, warning |
|---|
| 107 | }}} |
|---|
| 108 | |
|---|
| [10367] | 109 | {{{#!rbox information |
|---|
| [10273] | 110 | = information, note |
|---|
| 111 | }}} |
|---|
| [10349] | 112 | |
|---|
| [10367] | 113 | {{{#!rbox question |
|---|
| [10273] | 114 | = help, question |
|---|
| 115 | }}} |
|---|
| [10349] | 116 | |
|---|
| [10367] | 117 | {{{#!rbox tips |
|---|
| [10273] | 118 | = tips |
|---|
| 119 | }}} |
|---|
| 120 | |
|---|
| [10367] | 121 | {{{#!rbox comment |
|---|
| [10273] | 122 | = comment |
|---|
| 123 | }}} |
|---|
| [10349] | 124 | |
|---|
| [10367] | 125 | {{{#!rbox discussion |
|---|
| [10273] | 126 | = chat, discussion, talk |
|---|
| 127 | }}} |
|---|
| [10349] | 128 | |
|---|
| [10367] | 129 | {{{#!rbox yes |
|---|
| [10273] | 130 | = ok, good, yes |
|---|
| 131 | }}} |
|---|
| [10349] | 132 | |
|---|
| [10367] | 133 | {{{#!rbox no |
|---|
| [10273] | 134 | = bad, no, nok |
|---|
| 135 | }}} |
|---|
| 136 | |
|---|
| 137 | |
|---|
| [10367] | 138 | {{{#!box configure style="margin-top:0" |
|---|
| [10273] | 139 | = configure, configuration, tool |
|---|
| [10349] | 140 | White boxes are part of the normal content. |
|---|
| [10273] | 141 | |
|---|
| [10349] | 142 | This box is created by the wiki markup |
|---|
| 143 | {{{ |
|---|
| [10367] | 144 | {{{#!box configure |
|---|
| 145 | ... |
|---|
| 146 | }}} |
|---|
| 147 | }}} |
|---|
| 148 | or |
|---|
| 149 | {{{ |
|---|
| [10349] | 150 | {{{#!box type=configure |
|---|
| 151 | ... |
|---|
| [10273] | 152 | }}} |
|---|
| [10349] | 153 | }}} |
|---|
| 154 | Alternatively, `configuration` or `tool` may be used too, as well as a unique |
|---|
| 155 | abbreviation like `config`. |
|---|
| 156 | }}} |
|---|
| 157 | |
|---|
| [10367] | 158 | {{{#!box details |
|---|
| [10349] | 159 | = details, look, magnifier |
|---|
| [10273] | 160 | }}} |
|---|
| 161 | |
|---|
| [10367] | 162 | {{{#!box stop |
|---|
| [10273] | 163 | = critical, stop |
|---|
| 164 | Red boxes contain some really important information! Pay close attention to |
|---|
| 165 | these to avoid running into problems. |
|---|
| 166 | }}} |
|---|
| [10349] | 167 | |
|---|
| [10367] | 168 | {{{#!box warning |
|---|
| [10273] | 169 | = bug, error, important, warning |
|---|
| 170 | }}} |
|---|
| 171 | |
|---|
| [10367] | 172 | {{{#!box information |
|---|
| [10273] | 173 | = information, note |
|---|
| 174 | Yellow boxes contain essential, but not critical information. |
|---|
| 175 | }}} |
|---|
| [10349] | 176 | |
|---|
| [10367] | 177 | {{{#!box question |
|---|
| [10273] | 178 | = help, question |
|---|
| 179 | }}} |
|---|
| [10349] | 180 | |
|---|
| [10367] | 181 | {{{#!box tips |
|---|
| [10273] | 182 | = tips |
|---|
| 183 | }}} |
|---|
| 184 | |
|---|
| [10367] | 185 | {{{#!box comment |
|---|
| [10273] | 186 | = comment |
|---|
| [10349] | 187 | Blue boxes contain elaborative information; they are used to elaborate on-going |
|---|
| [10273] | 188 | work and should not, ideally, be left behind when work is done. |
|---|
| 189 | }}} |
|---|
| [10349] | 190 | |
|---|
| [10367] | 191 | {{{#!box discussion |
|---|
| [10273] | 192 | = chat, discussion, talk |
|---|
| 193 | }}} |
|---|
| [10349] | 194 | |
|---|
| [10367] | 195 | {{{#!box yes |
|---|
| [10273] | 196 | = ok, good, yes |
|---|
| 197 | }}} |
|---|
| [10349] | 198 | |
|---|
| [10367] | 199 | {{{#!box no |
|---|
| [10273] | 200 | = bad, no, nok |
|---|
| 201 | }}} |
|---|
| 202 | |
|---|
| 203 | |
|---|
| 204 | === Specify width |
|---|
| 205 | Use the `width` parameter to set the width of the box: |
|---|
| 206 | |
|---|
| 207 | {{{#!box width=6em |
|---|
| 208 | Small box |
|---|
| 209 | }}} |
|---|
| 210 | |
|---|
| 211 | {{{ |
|---|
| 212 | {{{#!box width=6em |
|---|
| 213 | Small box |
|---|
| 214 | }}} |
|---|
| 215 | }}} |
|---|
| 216 | |
|---|
| 217 | Use `width=auto` to auto-size right-aligned boxes: |
|---|
| 218 | {{{#!rbox width=auto |
|---|
| 219 | Auto-sized rbox |
|---|
| 220 | }}} |
|---|
| 221 | {{{ |
|---|
| 222 | {{{#!rbox width=auto |
|---|
| 223 | Auto-sized rbox |
|---|
| 224 | }}} |
|---|
| 225 | }}} |
|---|
| 226 | (`width=auto` does not have this effect on `box` since this is the default |
|---|
| 227 | width for it, which is the whole page width.) |
|---|
| 228 | |
|---|
| 229 | |
|---|
| 230 | === Center-aligned box |
|---|
| 231 | |
|---|
| 232 | Boxes can be center-aligned too. Default width is always `auto`, which causes |
|---|
| 233 | the box to become as narrow as possible. |
|---|
| 234 | |
|---|
| 235 | {{{#!box align=center |
|---|
| 236 | Center-aligned box |
|---|
| 237 | }}} |
|---|
| 238 | |
|---|
| 239 | {{{ |
|---|
| 240 | {{{#!box align=center |
|---|
| 241 | Center-aligned box |
|---|
| 242 | }}} |
|---|
| 243 | }}} |
|---|
| 244 | |
|---|
| 245 | Define `width`, or apply a custom style, for widening the centered box. |
|---|
| 246 | |
|---|
| 247 | Width: |
|---|
| 248 | |
|---|
| 249 | {{{#!box align=center width=14em |
|---|
| 250 | Center-aligned box with defined width |
|---|
| 251 | }}} |
|---|
| 252 | |
|---|
| 253 | {{{ |
|---|
| 254 | {{{#!box align=center width=14em |
|---|
| 255 | Center-aligned box with defined width |
|---|
| 256 | }}} |
|---|
| 257 | }}} |
|---|
| 258 | |
|---|
| 259 | Custom style: |
|---|
| 260 | |
|---|
| 261 | {{{#!box align=center style="white-space:nowrap" |
|---|
| 262 | Center-aligned box with no white space\\ |
|---|
| 263 | wrapping |
|---|
| 264 | }}} |
|---|
| 265 | |
|---|
| 266 | {{{ |
|---|
| 267 | {{{#!box align=center style="white-space:nowrap" |
|---|
| 268 | Center-aligned box with no white space\\ |
|---|
| 269 | wrapping |
|---|
| 270 | }}} |
|---|
| 271 | }}} |
|---|
| 272 | |
|---|
| 273 | |
|---|
| 274 | === Left-aligned box |
|---|
| 275 | |
|---|
| 276 | {{{#!box align=left |
|---|
| 277 | Left-aligned box |
|---|
| 278 | }}} |
|---|
| 279 | |
|---|
| 280 | Boxes can be left-aligned too, text will flow to the right of it. The width |
|---|
| 281 | will adapt to its content (i.e. default width is `auto`). |
|---|
| 282 | |
|---|
| 283 | {{{ |
|---|
| 284 | {{{#!box align=left |
|---|
| 285 | Left-aligned box |
|---|
| 286 | }}} |
|---|
| 287 | }}} |
|---|
| 288 | |
|---|
| 289 | |
|---|
| 290 | === Custom styling |
|---|
| 291 | {{{ |
|---|
| 292 | #!box type=config style="background-color:white; border:2pt inset gray; max-width:350px; border-radius:0; box-shadow:none" |
|---|
| 293 | = Customizable |
|---|
| 294 | You can also apply some custom styling to text boxes. |
|---|
| 295 | }}} |
|---|
| 296 | |
|---|
| 297 | {{{ |
|---|
| 298 | {{{ |
|---|
| 299 | #!box type=config style="background-color:white; border:2pt inset gray; max-width:350px; border-radius:0; box-shadow:none" |
|---|
| 300 | = Customizable |
|---|
| 301 | You can also apply some custom styling to text boxes. |
|---|
| 302 | }}} |
|---|
| 303 | }}} |
|---|
| 304 | |
|---|
| 305 | |
|---|
| 306 | == newsbox |
|---|
| 307 | |
|---|
| 308 | A newsbox is very simple to use. |
|---|
| 309 | |
|---|
| 310 | {{{#!newsbox |
|---|
| 311 | = Headline |
|---|
| 312 | A `newsbox` is aligned to the right of the page, |
|---|
| 313 | with a fixed with. Use this for announcements etc. |
|---|
| 314 | }}} |
|---|
| 315 | |
|---|
| 316 | {{{ |
|---|
| 317 | {{{#!newsbox |
|---|
| 318 | = Headline |
|---|
| 319 | A `newsbox` is aligned to the right of the page, |
|---|
| 320 | with a fixed with. Use this for announcements etc. |
|---|
| 321 | }}} |
|---|
| 322 | }}} |
|---|
| 323 | |
|---|
| [10367] | 324 | A newsbox accepts the same parameters as an ordinary box, but are normally not |
|---|
| 325 | used. |
|---|
| [10273] | 326 | |
|---|
| [10367] | 327 | |
|---|
| [10273] | 328 | == imagebox |
|---|
| 329 | |
|---|
| 330 | Use the `imagebox` to show a single image with caption. |
|---|
| 331 | |
|---|
| 332 | {{{#!imagebox |
|---|
| 333 | [[Image(htdocs:../common/guide/original-workflow.png, border=1, link=)]] |
|---|
| 334 | |
|---|
| 335 | Original ticket workflow |
|---|
| 336 | }}} |
|---|
| 337 | |
|---|
| 338 | {{{ |
|---|
| 339 | {{{#!imagebox |
|---|
| 340 | [[Image(htdocs:../common/guide/original-workflow.png, border=1, link=)]] |
|---|
| 341 | |
|---|
| 342 | Original ticket workflow |
|---|
| 343 | }}} |
|---|
| 344 | }}} |
|---|
| 345 | |
|---|
| [10367] | 346 | An imagebox accepts the same parameters as an ordinary box, but are normally |
|---|
| 347 | not used. |
|---|
| [10273] | 348 | |
|---|
| [10367] | 349 | |
|---|
| [10349] | 350 | == Macro syntax examples |
|---|
| 351 | The macro syntax may be preferable for shorter content: |
|---|
| 352 | |
|---|
| [10350] | 353 | [[rbox(A short comment)]] |
|---|
| [10349] | 354 | {{{ |
|---|
| [10350] | 355 | [[rbox(A short comment)]] |
|---|
| [10349] | 356 | }}} |
|---|
| 357 | |
|---|
| 358 | The type can be set as a parameter: |
|---|
| [10350] | 359 | [[rbox(A short comment, type=comment)]] |
|---|
| [10349] | 360 | {{{ |
|---|
| [10350] | 361 | [[rbox(A short comment, type=comment)]] |
|---|
| [10349] | 362 | }}} |
|---|
| 363 | |
|---|
| 364 | Alignment too: |
|---|
| 365 | {{{ |
|---|
| [10350] | 366 | [[box(Learn how to use boxes, align=center)]] |
|---|
| [10349] | 367 | }}} |
|---|
| [10350] | 368 | [[box(Learn how to use boxes, align=center)]] |
|---|
| [10349] | 369 | |
|---|
| [10367] | 370 | Finally, width as well: |
|---|
| 371 | [[rbox(Auto-sized rbox, width=auto)]] |
|---|
| 372 | {{{ |
|---|
| 373 | [[rbox(Auto-sized rbox, width=auto)]] |
|---|
| 374 | }}} |
|---|
| [10349] | 375 | |
|---|
| [10367] | 376 | |
|---|
| [10273] | 377 | == Macro instructions |
|---|
| 378 | Here follows the built in macro instructions concerning boxes, as they appear |
|---|
| 379 | on WikiMacros. |
|---|
| 380 | |
|---|
| 381 | [[box?]] |
|---|