Changes for page InfoboxStyles
Last modified by Mads Pedersen on 2026/07/28 06:53
From version 1.1
edited by Mads Pedersen
on 2026/01/20 14:09
on 2026/01/20 14:09
Change comment:
There is no comment for this version
To version 8.11
edited by Mads Pedersen
on 2026/01/20 14:55
on 2026/01/20 14:55
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (0 modified, 6 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,0 +1,3 @@ 1 +{{wikibox title="Test" data="line1=TTesting"/}} 2 + 3 +
- XWiki.StyleSheetExtension[0]
-
- Caching policy
-
... ... @@ -1,0 +1,1 @@ 1 +long - Code
-
... ... @@ -1,0 +1,20 @@ 1 +.xwiki-infobox { 2 + float: right; 3 + width: 280px; 4 + margin: 0 0 1em 1em; 5 + border: 1px solid #aaa; 6 + background: #f8f9fa; 7 + font-size: 0.9em; 8 +} 9 +.xwiki-infobox table { width: 100%; border-collapse: collapse; } 10 +.xwiki-infobox caption { background: #e5e5e5; font-weight: bold; padding: 6px; } 11 +.xwiki-infobox th, .xwiki-infobox td { 12 + border-top: 1px solid #aaa; 13 + padding: 6px; 14 + text-align: left; 15 + vertical-align: top; 16 +} 17 +.xwiki-infobox .xwiki-infobox-image { text-align: center; padding: 6px; } 18 +.xwiki-infobox .xwiki-infobox-image img { width: 100%; height: auto; } 19 +.xwiki-infobox .xwiki-infobox-image-caption { font-size: 0.85em; color: #555; margin-top: 4px; } 20 + - Name
-
... ... @@ -1,0 +1,1 @@ 1 +wikipedia_infobox - Use this extension
-
... ... @@ -1,0 +1,1 @@ 1 +onDemand
- XWiki.WikiMacroClass[0]
-
- Cached
-
... ... @@ -1,0 +1,1 @@ 1 +No - Asynchronous rendering
-
... ... @@ -1,0 +1,1 @@ 1 +No - Macro code
-
... ... @@ -1,0 +1,46 @@ 1 +{{velocity}} 2 +{{html clean="false"}} 3 +<div style="float:right; width:280px; margin:0 0 1em 1em; border:1px solid #aaa; background:#f8f9fa; font-size:0.9em; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.5; box-shadow: 0 2px 4px rgba(0,0,0,0.1);"> 4 + <table style="width:100%; border-collapse:collapse;"> 5 + ## Title Row 6 + #if($xcontext.macro.params.title && "$!xcontext.macro.params.title" != "") 7 + <caption style="background:#eeeeee; font-weight:bold; padding:10px; border:1px solid #aaa; border-bottom:none; color: #000; font-size: 1.1em;"> 8 + $xcontext.macro.params.title 9 + </caption> 10 + #end 11 + 12 + ## Image Row 13 + #if($xcontext.macro.params.image && "$!xcontext.macro.params.image" != "") 14 + <tr> 15 + <td colspan="2" style="text-align:center; padding:8px; background: #fff;"> 16 + <img src="$xcontext.macro.params.image" style="max-width:100%; height:auto; display:block; margin: 0 auto;"> 17 + #if($xcontext.macro.params.caption && "$!xcontext.macro.params.caption" != "") 18 + <div style="font-size:0.9em; color:#666; padding-top: 6px; font-style: italic;">$xcontext.macro.params.caption</div> 19 + #end 20 + </td> 21 + </tr> 22 + #end 23 + 24 + ## Data Rows (Label=Value) 25 + #set($content = $xcontext.macro.params.data) 26 + #if($content && "$!content" != "") 27 + #foreach($line in $content.split("\n")) 28 + ## Trim the line and check if it has a "=" and isn't just whitespace 29 + #set($trimmedLine = $line.trim()) 30 + #if($trimmedLine.contains("=") && $trimmedLine.length() > 2) 31 + #set($parts = $trimmedLine.split("=", 2)) 32 + <tr> 33 + <th style="border-top:1px solid #ddd; padding:8px; text-align:left; background:#f9f9f9; width:35%; vertical-align: top; font-weight: 600;"> 34 + $parts[0].trim() 35 + </th> 36 + <td style="border-top:1px solid #ddd; padding:8px; vertical-align: top; background: #fff;"> 37 + $parts[1].trim() 38 + </td> 39 + </tr> 40 + #end 41 + #end 42 + #end 43 + </table> 44 +</div> 45 +{{/html}} 46 +{{/velocity}} - Macro content type
-
... ... @@ -1,0 +1,1 @@ 1 +Velocity - Macro content availability
-
... ... @@ -1,0 +1,1 @@ 1 +No content - Macro description
-
... ... @@ -1,0 +1,1 @@ 1 +Wikipedia like infobox - Execution is isolated
-
... ... @@ -1,0 +1,1 @@ 1 +No - Macro id
-
... ... @@ -1,0 +1,1 @@ 1 +wikibox - Macro name
-
... ... @@ -1,0 +1,1 @@ 1 +wikibox - Supports inline mode
-
... ... @@ -1,0 +1,1 @@ 1 +No - Macro visibility
-
... ... @@ -1,0 +1,1 @@ 1 +Current Wiki
- XWiki.WikiMacroParameterClass[0]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +The header text of the box. - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +title - Parameter order property
-
... ... @@ -1,0 +1,1 @@ 1 +10
- XWiki.WikiMacroParameterClass[1]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +URL or attachment name for the image. - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +image - Parameter order property
-
... ... @@ -1,0 +1,1 @@ 1 +11
- XWiki.WikiMacroParameterClass[2]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Text under the image. - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +caption - Parameter order property
-
... ... @@ -1,0 +1,1 @@ 1 +12
- XWiki.WikiMacroParameterClass[3]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Write lines into the infobox like "Label=Example text" - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +data - Parameter order property
-
... ... @@ -1,0 +1,1 @@ 1 +13 - Parameter type
-
... ... @@ -1,0 +1,1 @@ 1 +TextArea