-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathjuice_options.go
114 lines (97 loc) · 2.63 KB
/
juice_options.go
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
package mjml
// JuiceOptions is used to construct Juice options to be passed to the MJML compiler
// Detailed explanations of the options are here: https://github.com/Automattic/juice#options
type JuiceOptions interface {
ApplyAttributesTableElements(bool) JuiceOptions
ApplyHeightAttributes(bool) JuiceOptions
ApplyStyleTags(bool) JuiceOptions
ApplyWidthAttributes(bool) JuiceOptions
ExtraCss(string) JuiceOptions
InsertPreservedExtraCss(bool) JuiceOptions
InlinePseudoElements(bool) JuiceOptions
PreserveFontFaces(bool) JuiceOptions
PreserveImportant(bool) JuiceOptions
PreserveMediaQueries(bool) JuiceOptions
PreserveKeyFrames(bool) JuiceOptions
PreservePseudos(bool) JuiceOptions
RemoveStyleTags(bool) JuiceOptions
XmlMode(bool) JuiceOptions
}
type juiceOptions struct {
data map[string]interface{}
}
func (o *juiceOptions) ApplyAttributesTableElements(b bool) JuiceOptions {
ret := *o
ret.data["applyAttributesTableElements"] = b
return &ret
}
func (o *juiceOptions) ApplyHeightAttributes(b bool) JuiceOptions {
ret := *o
ret.data["applyHeightAttributes"] = b
return &ret
}
func (o *juiceOptions) ApplyStyleTags(b bool) JuiceOptions {
ret := *o
ret.data["applyStyleTags"] = b
return &ret
}
func (o *juiceOptions) ApplyWidthAttributes(b bool) JuiceOptions {
ret := *o
ret.data["applyWidthAttributes"] = b
return &ret
}
func (o *juiceOptions) ExtraCss(s string) JuiceOptions {
ret := *o
ret.data["extraCss"] = s
return &ret
}
func (o *juiceOptions) InsertPreservedExtraCss(b bool) JuiceOptions {
ret := *o
ret.data["insertPreservedExtraCss"] = b
return &ret
}
func (o *juiceOptions) InlinePseudoElements(b bool) JuiceOptions {
ret := *o
ret.data["inlinePseudoElements"] = b
return &ret
}
func (o *juiceOptions) PreserveFontFaces(b bool) JuiceOptions {
ret := *o
ret.data["preserveFontFaces"] = b
return &ret
}
func (o *juiceOptions) PreserveImportant(b bool) JuiceOptions {
ret := *o
ret.data["preserveImportant"] = b
return &ret
}
func (o *juiceOptions) PreserveMediaQueries(b bool) JuiceOptions {
ret := *o
ret.data["preserveMediaQueries"] = b
return &ret
}
func (o *juiceOptions) PreserveKeyFrames(b bool) JuiceOptions {
ret := *o
ret.data["preserveKeyFrames"] = b
return &ret
}
func (o *juiceOptions) PreservePseudos(b bool) JuiceOptions {
ret := *o
ret.data["preservePseudos"] = b
return &ret
}
func (o *juiceOptions) RemoveStyleTags(b bool) JuiceOptions {
ret := *o
ret.data["removeStyleTags"] = b
return &ret
}
func (o *juiceOptions) XmlMode(b bool) JuiceOptions {
ret := *o
ret.data["xmlMode"] = b
return &ret
}
func NewJuiceOptions() JuiceOptions {
return &juiceOptions{
data: map[string]interface{}{},
}
}