Changes for page InfoboxStyles
Last modified by Mads Pedersen on 2026/07/28 06:53
From version 8.2
edited by Mads Pedersen
on 2026/01/20 14:42
on 2026/01/20 14:42
Change comment:
There is no comment for this version
To version 8.10
edited by Mads Pedersen
on 2026/01/20 14:54
on 2026/01/20 14:54
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (5 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,3 +1,3 @@ 1 -{{wikibox title="Test" caption="Test"data="line1=This is sometekst"}}{{/wikibox}}1 +{{wikibox title="Test" data="line1=TTesting"/}} 2 2 3 3
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -1,31 +1,41 @@ 1 +{{velocity}} 1 1 {{html clean="false"}} 2 -<div style="float:right; width:280px; margin:0 0 1em 1em; border:1px solid #aaa; background:#f8f9fa; font-size:0.9em; font-family: sans-serif; line-height: 1.4;"> 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);"> 3 3 <table style="width:100%; border-collapse:collapse;"> 4 - #if($xcontext.macro.params.title) 5 - <caption style="background:#e5e5e5; font-weight:bold; padding:8px; border:1px solid #aaa; border-bottom:none; color: #333;"> 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;"> 6 6 $xcontext.macro.params.title 7 7 </caption> 8 8 #end 9 - #if($xcontext.macro.params.image) 11 + 12 + ## Image Row 13 + #if($xcontext.macro.params.image && "$!xcontext.macro.params.image" != "") 10 10 <tr> 11 - <td colspan="2" style="text-align:center; padding: 4px;">15 + <td colspan="2" style="text-align:center; padding:8px; background: #fff;"> 12 12 <img src="$xcontext.macro.params.image" style="max-width:100%; height:auto; display:block; margin: 0 auto;"> 13 - #if($xcontext.macro.params.caption) 14 - <div style="font-size:0. 85em; color:#555; padding:4px0;">$xcontext.macro.params.caption</div>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> 15 15 #end 16 16 </td> 17 17 </tr> 18 18 #end 19 19 24 + ## Data Rows (Label=Value) 20 20 #set($content = $xcontext.macro.params.data) 21 - #if($content) 22 - ## Split content by newlines and handle each line 23 - #foreach($line in $content.split("\r?\n")) 24 - #if($line.contains("=")) 25 - #set($parts = $line.split("=", 2)) 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)) 26 26 <tr> 27 - <th style="border-top:1px solid #aaa; padding:6px; text-align:left; background:#f2f2f2; width:35%; vertical-align: top;">$parts[0].trim()</th> 28 - <td style="border-top:1px solid #aaa; padding:6px; vertical-align: top;">$parts[1].trim()</td> 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> 29 29 </tr> 30 30 #end 31 31 #end ... ... @@ -33,3 +33,4 @@ 33 33 </table> 34 34 </div> 35 35 {{/html}} 46 +{{/velocity}} - Macro content type
-
... ... @@ -1,1 +1,1 @@ 1 - Wiki1 +Velocity - Macro content availability
-
... ... @@ -1,0 +1,1 @@ 1 +No content
- XWiki.WikiMacroParameterClass[0]
-
- Parameter order property
-
... ... @@ -1,0 +1,1 @@ 1 +13
- XWiki.WikiMacroParameterClass[1]
-
- Parameter order property
-
... ... @@ -1,0 +1,1 @@ 1 +12
- XWiki.WikiMacroParameterClass[2]
-
- Parameter order property
-
... ... @@ -1,0 +1,1 @@ 1 +11
- XWiki.WikiMacroParameterClass[3]
-
- Parameter description
-
... ... @@ -1,1 +1,1 @@ 1 - The label=valuepairs1 +Write lines into the infobox like "Label=Example text" - Parameter order property
-
... ... @@ -1,0 +1,1 @@ 1 +10 - Parameter type
-
... ... @@ -1,0 +1,1 @@ 1 +TextArea