-
Notifications
You must be signed in to change notification settings - Fork 4
/
page-font.vtl
40 lines (34 loc) · 1.73 KB
/
page-font.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
#** ===========================================================================
PAGE FONT
This Confluence user macro allows you to change the font on yur page, incl.
size and color.
Version: 1.0.3
Updated: 2022-01-09
Author/s: George Lewe
Source: https://github.com/glewe/confluence-user-macros
License: GNU LGPLv3
Macro Body processing: No macro body
*#
#** ---------------------------------------------------------------------------
PARAMETER
*#
## @param Font:title=Font|type=string|desc=Enter the name of the font you want to use on your page. This will only affect the page content, not the page title or navigation.|default=Segoe UI
## @param Style:title=Style|desc=Select whether you prefer a serif or sans-serif replacement font if your specified one is not found on the viewers computer.|type=enum|enumValues=sans-serif,serif|default=sans-serif
## @param Size:title=Size|type=string|desc=Enter the factor by which you want to increase or decrease the font size, e.g. 1 = normal, 1.2 = 20% bigger.|default=1.2
## @param Color:title=Text Color|type=string|desc=Enter the color hex code for the paragraph text color here. Start with a hash (#), e.g. #000000 = black (find more color codes in the documentation). Default is "inherit" which applies the default color.|default=inherit
#** ---------------------------------------------------------------------------
PROCESS INPUT
*#
#set ($fontSize = $paramSize + "em")
#** ---------------------------------------------------------------------------
OUTPUT
*#
<!-- User Macro: Page Font START -->
<style type="text/css">
#main-content.wiki-content {
font-size: $fontSize;
font-family: $paramFont, $paramStyle;
color: $paramColor;
}
</style>
<!-- User Macro: Page Font END -->