@blockspoon/cert-badge-renderer 1.0.37 → 1.0.39

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.
@@ -6,7 +6,7 @@ function createRibbonWing15({ mainColor = "#96A6B4", subColor = "#96A6B4", }) {
6
6
  <svg
7
7
  width="100%"
8
8
  height="100%"
9
- viewBox="0 0 392 149"
9
+ viewBox="0 0 252 70"
10
10
  fill="none"
11
11
  xmlns="http://www.w3.org/2000/svg"
12
12
  preserveAspectRatio="xMidYMid meet"
@@ -6,7 +6,7 @@ function createRibbonWing16({ mainColor = "#96A6B4", subColor = "#96A6B4", }) {
6
6
  <svg
7
7
  width="100%"
8
8
  height="100%"
9
- viewBox="0 0 392 149"
9
+ viewBox="0 0 350 120"
10
10
  fill="none"
11
11
  xmlns="http://www.w3.org/2000/svg"
12
12
  preserveAspectRatio="xMidYMid meet"
@@ -6,7 +6,7 @@ function createRibbonWing17({ mainColor = "#96A6B4", subColor = "#96A6B4", }) {
6
6
  <svg
7
7
  width="100%"
8
8
  height="100%"
9
- viewBox="0 0 392 149"
9
+ viewBox="0 0 388 120"
10
10
  fill="none"
11
11
  xmlns="http://www.w3.org/2000/svg"
12
12
  preserveAspectRatio="xMidYMid meet"
@@ -130,7 +130,11 @@ async function generateAchievementHTML(achievementInfo, options = {}) {
130
130
  border: none;
131
131
  padding: 0;
132
132
  display: flex;
133
- align-items: start;
133
+ align-items: ${element.textAlign === "center"
134
+ ? "center"
135
+ : element.textAlign === "left"
136
+ ? "flex-start"
137
+ : "flex-end"};
134
138
  justify-content: ${element.textAlign === "center"
135
139
  ? "center"
136
140
  : element.textAlign === "left"
@@ -6,7 +6,7 @@ function createRibbonWing15({ mainColor = "#96A6B4", subColor = "#96A6B4", }) {
6
6
  <svg
7
7
  width="100%"
8
8
  height="100%"
9
- viewBox="0 0 392 149"
9
+ viewBox="0 0 252 70"
10
10
  fill="none"
11
11
  xmlns="http://www.w3.org/2000/svg"
12
12
  preserveAspectRatio="xMidYMid meet"
@@ -6,7 +6,7 @@ function createRibbonWing16({ mainColor = "#96A6B4", subColor = "#96A6B4", }) {
6
6
  <svg
7
7
  width="100%"
8
8
  height="100%"
9
- viewBox="0 0 392 149"
9
+ viewBox="0 0 350 120"
10
10
  fill="none"
11
11
  xmlns="http://www.w3.org/2000/svg"
12
12
  preserveAspectRatio="xMidYMid meet"
@@ -6,7 +6,7 @@ function createRibbonWing17({ mainColor = "#96A6B4", subColor = "#96A6B4", }) {
6
6
  <svg
7
7
  width="100%"
8
8
  height="100%"
9
- viewBox="0 0 392 149"
9
+ viewBox="0 0 388 120"
10
10
  fill="none"
11
11
  xmlns="http://www.w3.org/2000/svg"
12
12
  preserveAspectRatio="xMidYMid meet"
@@ -130,7 +130,11 @@ async function generateAchievementHTML(achievementInfo, options = {}) {
130
130
  border: none;
131
131
  padding: 0;
132
132
  display: flex;
133
- align-items: start;
133
+ align-items: ${element.textAlign === "center"
134
+ ? "center"
135
+ : element.textAlign === "left"
136
+ ? "flex-start"
137
+ : "flex-end"};
134
138
  justify-content: ${element.textAlign === "center"
135
139
  ? "center"
136
140
  : element.textAlign === "left"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockspoon/cert-badge-renderer",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "description": "Render certificate and badge designs from Kolleges achievement data into HTML, PNG, or Base64.",
5
5
  "main": "./dist/esm/index.js",
6
6
  "exports": {
@@ -8,7 +8,7 @@ export function createRibbonWing15({
8
8
  <svg
9
9
  width="100%"
10
10
  height="100%"
11
- viewBox="0 0 392 149"
11
+ viewBox="0 0 252 70"
12
12
  fill="none"
13
13
  xmlns="http://www.w3.org/2000/svg"
14
14
  preserveAspectRatio="xMidYMid meet"
@@ -8,7 +8,7 @@ export function createRibbonWing16({
8
8
  <svg
9
9
  width="100%"
10
10
  height="100%"
11
- viewBox="0 0 392 149"
11
+ viewBox="0 0 350 120"
12
12
  fill="none"
13
13
  xmlns="http://www.w3.org/2000/svg"
14
14
  preserveAspectRatio="xMidYMid meet"
@@ -8,7 +8,7 @@ export function createRibbonWing17({
8
8
  <svg
9
9
  width="100%"
10
10
  height="100%"
11
- viewBox="0 0 392 149"
11
+ viewBox="0 0 388 120"
12
12
  fill="none"
13
13
  xmlns="http://www.w3.org/2000/svg"
14
14
  preserveAspectRatio="xMidYMid meet"
@@ -178,7 +178,13 @@ export async function generateAchievementHTML(
178
178
  border: none;
179
179
  padding: 0;
180
180
  display: flex;
181
- align-items: start;
181
+ align-items: ${
182
+ element.textAlign === "center"
183
+ ? "center"
184
+ : element.textAlign === "left"
185
+ ? "flex-start"
186
+ : "flex-end"
187
+ };
182
188
  justify-content: ${
183
189
  element.textAlign === "center"
184
190
  ? "center"