@blockspoon/cert-badge-renderer 1.0.43 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,6 +46,18 @@ async function generateAchievementHTML(achievementInfo, options = {}) {
|
|
|
46
46
|
<title>Certificate</title>
|
|
47
47
|
<style>
|
|
48
48
|
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
|
|
49
|
+
@font-face {
|
|
50
|
+
font-family: 'BookkMyungjo';
|
|
51
|
+
src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/BookkMyungjo-Lt.woff2') format('woff2');
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
font-style: normal;
|
|
54
|
+
}
|
|
55
|
+
@font-face {
|
|
56
|
+
font-family: 'BookkMyungjo';
|
|
57
|
+
src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/BookkMyungjo-Bd.woff2') format('woff2');
|
|
58
|
+
font-weight: 700;
|
|
59
|
+
font-style: normal;
|
|
60
|
+
}
|
|
49
61
|
* {
|
|
50
62
|
margin: 0;
|
|
51
63
|
padding: 0;
|
|
@@ -140,8 +152,22 @@ async function generateAchievementHTML(achievementInfo, options = {}) {
|
|
|
140
152
|
: element.textAlign === "left"
|
|
141
153
|
? "flex-start"
|
|
142
154
|
: "flex-end"};
|
|
143
|
-
word-break: ${type === "badge"
|
|
144
|
-
|
|
155
|
+
word-break: ${type === "badge" ||
|
|
156
|
+
(element.controlType === "text" &&
|
|
157
|
+
element.designType === index_js_1.CERTIFICATE_DESIGN_TYPE.TEXT) ||
|
|
158
|
+
(element.controlType === "text" &&
|
|
159
|
+
element.designType === index_js_1.CERTIFICATE_DESIGN_TYPE.PROPS &&
|
|
160
|
+
element.bindingKey === "description")
|
|
161
|
+
? "break-word"
|
|
162
|
+
: "normal"};
|
|
163
|
+
white-space: ${type === "badge" ||
|
|
164
|
+
(element.controlType === "text" &&
|
|
165
|
+
element.designType === index_js_1.CERTIFICATE_DESIGN_TYPE.TEXT) ||
|
|
166
|
+
(element.controlType === "text" &&
|
|
167
|
+
element.designType === index_js_1.CERTIFICATE_DESIGN_TYPE.PROPS &&
|
|
168
|
+
element.bindingKey === "description")
|
|
169
|
+
? "pre-wrap"
|
|
170
|
+
: "normal"};
|
|
145
171
|
opacity: ${element.opacity || 1};
|
|
146
172
|
`;
|
|
147
173
|
if (element.controlType === "svg") {
|
|
@@ -46,6 +46,18 @@ async function generateAchievementHTML(achievementInfo, options = {}) {
|
|
|
46
46
|
<title>Certificate</title>
|
|
47
47
|
<style>
|
|
48
48
|
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
|
|
49
|
+
@font-face {
|
|
50
|
+
font-family: 'BookkMyungjo';
|
|
51
|
+
src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/BookkMyungjo-Lt.woff2') format('woff2');
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
font-style: normal;
|
|
54
|
+
}
|
|
55
|
+
@font-face {
|
|
56
|
+
font-family: 'BookkMyungjo';
|
|
57
|
+
src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/BookkMyungjo-Bd.woff2') format('woff2');
|
|
58
|
+
font-weight: 700;
|
|
59
|
+
font-style: normal;
|
|
60
|
+
}
|
|
49
61
|
* {
|
|
50
62
|
margin: 0;
|
|
51
63
|
padding: 0;
|
|
@@ -140,8 +152,22 @@ async function generateAchievementHTML(achievementInfo, options = {}) {
|
|
|
140
152
|
: element.textAlign === "left"
|
|
141
153
|
? "flex-start"
|
|
142
154
|
: "flex-end"};
|
|
143
|
-
word-break: ${type === "badge"
|
|
144
|
-
|
|
155
|
+
word-break: ${type === "badge" ||
|
|
156
|
+
(element.controlType === "text" &&
|
|
157
|
+
element.designType === index_js_1.CERTIFICATE_DESIGN_TYPE.TEXT) ||
|
|
158
|
+
(element.controlType === "text" &&
|
|
159
|
+
element.designType === index_js_1.CERTIFICATE_DESIGN_TYPE.PROPS &&
|
|
160
|
+
element.bindingKey === "description")
|
|
161
|
+
? "break-word"
|
|
162
|
+
: "normal"};
|
|
163
|
+
white-space: ${type === "badge" ||
|
|
164
|
+
(element.controlType === "text" &&
|
|
165
|
+
element.designType === index_js_1.CERTIFICATE_DESIGN_TYPE.TEXT) ||
|
|
166
|
+
(element.controlType === "text" &&
|
|
167
|
+
element.designType === index_js_1.CERTIFICATE_DESIGN_TYPE.PROPS &&
|
|
168
|
+
element.bindingKey === "description")
|
|
169
|
+
? "pre-wrap"
|
|
170
|
+
: "normal"};
|
|
145
171
|
opacity: ${element.opacity || 1};
|
|
146
172
|
`;
|
|
147
173
|
if (element.controlType === "svg") {
|
package/package.json
CHANGED
|
@@ -69,6 +69,18 @@ export async function generateAchievementHTML(
|
|
|
69
69
|
<title>Certificate</title>
|
|
70
70
|
<style>
|
|
71
71
|
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
|
|
72
|
+
@font-face {
|
|
73
|
+
font-family: 'BookkMyungjo';
|
|
74
|
+
src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/BookkMyungjo-Lt.woff2') format('woff2');
|
|
75
|
+
font-weight: 400;
|
|
76
|
+
font-style: normal;
|
|
77
|
+
}
|
|
78
|
+
@font-face {
|
|
79
|
+
font-family: 'BookkMyungjo';
|
|
80
|
+
src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/BookkMyungjo-Bd.woff2') format('woff2');
|
|
81
|
+
font-weight: 700;
|
|
82
|
+
font-style: normal;
|
|
83
|
+
}
|
|
72
84
|
* {
|
|
73
85
|
margin: 0;
|
|
74
86
|
padding: 0;
|
|
@@ -192,8 +204,26 @@ export async function generateAchievementHTML(
|
|
|
192
204
|
? "flex-start"
|
|
193
205
|
: "flex-end"
|
|
194
206
|
};
|
|
195
|
-
word-break: ${
|
|
196
|
-
|
|
207
|
+
word-break: ${
|
|
208
|
+
type === "badge" ||
|
|
209
|
+
(element.controlType === "text" &&
|
|
210
|
+
element.designType === CERTIFICATE_DESIGN_TYPE.TEXT) ||
|
|
211
|
+
(element.controlType === "text" &&
|
|
212
|
+
element.designType === CERTIFICATE_DESIGN_TYPE.PROPS &&
|
|
213
|
+
element.bindingKey === "description")
|
|
214
|
+
? "break-word"
|
|
215
|
+
: "normal"
|
|
216
|
+
};
|
|
217
|
+
white-space: ${
|
|
218
|
+
type === "badge" ||
|
|
219
|
+
(element.controlType === "text" &&
|
|
220
|
+
element.designType === CERTIFICATE_DESIGN_TYPE.TEXT) ||
|
|
221
|
+
(element.controlType === "text" &&
|
|
222
|
+
element.designType === CERTIFICATE_DESIGN_TYPE.PROPS &&
|
|
223
|
+
element.bindingKey === "description")
|
|
224
|
+
? "pre-wrap"
|
|
225
|
+
: "normal"
|
|
226
|
+
};
|
|
197
227
|
opacity: ${element.opacity || 1};
|
|
198
228
|
`;
|
|
199
229
|
|