-
Notifications
You must be signed in to change notification settings - Fork 4
/
horizontal-ruler.vtl
47 lines (38 loc) · 1.68 KB
/
horizontal-ruler.vtl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#** ===========================================================================
HORIZONTAL RULER
This Confluence user macro adds a customizable HR element to your page.
Version: 1.0.0
Updated: 2021-11-01
Author/s: George Lewe
Source: https://github.com/glewe/confluence-user-macros
License: GNU LGPLv3
Macro Body processing: No macro body
*#
#** ---------------------------------------------------------------------------
PARAMETER
*#
## @param Strength:title=Strength|type=int|desc=Enter the thickness of the horizontal line in pixel. Default is 1.|default=1
## @param Color:title=Color|type=string|desc=Enter the border color in hexadecimal starting with a #. Default: #cccccc. <a href="http://hslpicker.com/">Color Picker</a>|default=#cccccc
## @param SpaceBefore:title=Space Before|type=string|desc=Enter the space above the line in pixels (add suffix 'px', e.g. 20px). Default: 20px|default=20px
## @param SpaceAfter:title=Space After|type=string|desc=Enter the space below the line in pixels (add suffix 'px', e.g. 20px). Default: 20px|default=20px
#** ---------------------------------------------------------------------------
PROCESS INPUT
*#
#if (!$paramStrength)
#set ($paramStrength="1px")
#end
#if (!$paramColor)
#set ($paramColor="#cccccc")
#end
#if (!$paramSpaceBefore)
#set ($paramSpaceBefore="20px")
#end
#if (!$paramSpaceAfter)
#set ($paramSpaceAfter="20px")
#end
#** ---------------------------------------------------------------------------
* OUTPUT
*#
<!-- User Macro: Horizontal Ruler START -->
<hr style="border:$paramStrength;border-color:$paramColor;margin-top:$paramSpaceBefore;margin-bottom:$paramSpaceAfter;">
<!-- User Macro: Horizontal Ruler END -->