@contentgrowth/content-widget 1.3.5 → 1.3.7
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.
- package/README.md +14 -0
- package/dist/astro/FeaturedCard.astro +109 -36
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/inline-markdown.d.ts +13 -0
- package/dist/core/inline-markdown.d.ts.map +1 -0
- package/dist/core/inline-markdown.js +29 -0
- package/dist/react/FeaturedCard.d.ts +9 -0
- package/dist/react/FeaturedCard.d.ts.map +1 -1
- package/dist/react/FeaturedCard.js +67 -20
- package/dist/styles.css +174 -68
- package/dist/vue/FeaturedCard.vue +104 -28
- package/dist/widget/widget.css +1 -1
- package/dist/widget/widget.dev.css +174 -68
- package/dist/widget/widget.dev.js +3 -3
- package/dist/widget/widget.js +1 -1
- package/package.json +1 -1
|
@@ -1019,7 +1019,7 @@ a.cg-card {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
|
|
1021
1021
|
.cg-featured-card-inner {
|
|
1022
|
-
padding: 2rem 2.5rem;
|
|
1022
|
+
padding: var(--cg-card-padding, 2rem 2.5rem);
|
|
1023
1023
|
height: 100%;
|
|
1024
1024
|
display: flex;
|
|
1025
1025
|
flex-direction: column;
|
|
@@ -1118,51 +1118,114 @@ a.cg-card {
|
|
|
1118
1118
|
line-height: 1.7;
|
|
1119
1119
|
}
|
|
1120
1120
|
|
|
1121
|
-
/*
|
|
1122
|
-
.cg-
|
|
1123
|
-
.cg-featured-card-summary ol {
|
|
1121
|
+
/* ===== Structured Summary Items ===== */
|
|
1122
|
+
.cg-summary-items {
|
|
1124
1123
|
margin: 0;
|
|
1125
|
-
padding: 1.25rem
|
|
1126
|
-
padding-left: 1.5rem;
|
|
1124
|
+
padding: 1rem 1.25rem;
|
|
1127
1125
|
list-style: none;
|
|
1128
1126
|
background: var(--cg-items-bg);
|
|
1129
1127
|
border-radius: 8px;
|
|
1130
1128
|
}
|
|
1131
1129
|
|
|
1132
|
-
.cg-
|
|
1133
|
-
|
|
1134
|
-
|
|
1130
|
+
.cg-summary-items li {
|
|
1131
|
+
display: flex;
|
|
1132
|
+
gap: 0.75rem;
|
|
1133
|
+
margin-bottom: 1rem;
|
|
1135
1134
|
line-height: 1.5;
|
|
1136
|
-
position: relative;
|
|
1137
1135
|
}
|
|
1138
1136
|
|
|
1139
|
-
.cg-
|
|
1137
|
+
.cg-summary-items li:last-child {
|
|
1140
1138
|
margin-bottom: 0;
|
|
1141
1139
|
}
|
|
1142
1140
|
|
|
1143
|
-
/*
|
|
1144
|
-
.cg-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1141
|
+
/* Hide the legacy counter ::before for new structure */
|
|
1142
|
+
.cg-summary-items li::before {
|
|
1143
|
+
display: none;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
/* Numbered badge */
|
|
1147
|
+
.cg-item-number {
|
|
1148
|
+
flex-shrink: 0;
|
|
1149
|
+
width: 1.5rem;
|
|
1150
|
+
height: 1.5rem;
|
|
1151
1151
|
background: var(--cg-primary);
|
|
1152
|
-
|
|
1152
|
+
color: white;
|
|
1153
|
+
border-radius: 4px;
|
|
1154
|
+
font-size: 0.75rem;
|
|
1155
|
+
font-weight: 700;
|
|
1156
|
+
display: flex;
|
|
1157
|
+
align-items: center;
|
|
1158
|
+
justify-content: center;
|
|
1159
|
+
margin-top: 0.125rem;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/* Content container */
|
|
1163
|
+
.cg-item-content {
|
|
1164
|
+
flex: 1;
|
|
1165
|
+
min-width: 0;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/* Title styling */
|
|
1169
|
+
.cg-item-title {
|
|
1170
|
+
display: block;
|
|
1171
|
+
font-size: 0.9375rem;
|
|
1172
|
+
font-weight: 600;
|
|
1173
|
+
color: var(--cg-text);
|
|
1174
|
+
margin-bottom: 0.125rem;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/* Description styling */
|
|
1178
|
+
.cg-item-description {
|
|
1179
|
+
display: block;
|
|
1180
|
+
font-size: 0.875rem;
|
|
1181
|
+
color: var(--cg-text-secondary);
|
|
1182
|
+
line-height: 1.5;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
/* Quote Template */
|
|
1186
|
+
.cg-featured-card-summary blockquote {
|
|
1187
|
+
margin: 0;
|
|
1188
|
+
padding: 1.25rem 1.5rem;
|
|
1189
|
+
border-left: 3px solid var(--cg-primary);
|
|
1190
|
+
background: var(--cg-items-bg);
|
|
1191
|
+
border-radius: 0 8px 8px 0;
|
|
1192
|
+
font-style: italic;
|
|
1193
|
+
font-size: 1.0625rem;
|
|
1194
|
+
line-height: 1.7;
|
|
1195
|
+
color: var(--cg-text);
|
|
1153
1196
|
}
|
|
1154
1197
|
|
|
1155
|
-
/*
|
|
1198
|
+
/* Legacy markdown list support (for old content) */
|
|
1199
|
+
.cg-featured-card-summary ul,
|
|
1156
1200
|
.cg-featured-card-summary ol {
|
|
1201
|
+
margin: 0;
|
|
1202
|
+
padding: 1rem 1.25rem;
|
|
1203
|
+
list-style: none;
|
|
1204
|
+
background: var(--cg-items-bg);
|
|
1205
|
+
border-radius: 8px;
|
|
1157
1206
|
counter-reset: item;
|
|
1158
1207
|
}
|
|
1159
1208
|
|
|
1209
|
+
.cg-featured-card-summary ul li,
|
|
1210
|
+
.cg-featured-card-summary ol li {
|
|
1211
|
+
display: flex;
|
|
1212
|
+
gap: 0.75rem;
|
|
1213
|
+
margin-bottom: 1rem;
|
|
1214
|
+
line-height: 1.6;
|
|
1215
|
+
font-size: 0.875rem;
|
|
1216
|
+
color: var(--cg-text-secondary);
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
.cg-featured-card-summary ul li:last-child,
|
|
1220
|
+
.cg-featured-card-summary ol li:last-child {
|
|
1221
|
+
margin-bottom: 0;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
.cg-featured-card-summary ul li::before,
|
|
1160
1225
|
.cg-featured-card-summary ol li::before {
|
|
1161
1226
|
content: counter(item);
|
|
1162
1227
|
counter-increment: item;
|
|
1163
|
-
|
|
1164
|
-
left: 0;
|
|
1165
|
-
top: 0;
|
|
1228
|
+
flex-shrink: 0;
|
|
1166
1229
|
width: 1.5rem;
|
|
1167
1230
|
height: 1.5rem;
|
|
1168
1231
|
background: var(--cg-primary);
|
|
@@ -1173,76 +1236,119 @@ a.cg-card {
|
|
|
1173
1236
|
display: flex;
|
|
1174
1237
|
align-items: center;
|
|
1175
1238
|
justify-content: center;
|
|
1239
|
+
margin-top: 0.125rem;
|
|
1176
1240
|
}
|
|
1177
1241
|
|
|
1178
|
-
/* List item content: bold title + description on next line */
|
|
1179
1242
|
.cg-featured-card-summary li strong {
|
|
1180
|
-
display: block;
|
|
1181
1243
|
font-size: 0.9375rem;
|
|
1182
|
-
font-weight:
|
|
1244
|
+
font-weight: 600;
|
|
1183
1245
|
color: var(--cg-text);
|
|
1184
|
-
margin-bottom: 0.125rem;
|
|
1185
1246
|
}
|
|
1186
1247
|
|
|
1187
|
-
/*
|
|
1188
|
-
.cg-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1248
|
+
/* Fix double numbering - Hide the legacy counter ::before for new structure */
|
|
1249
|
+
.cg-summary-items li::before {
|
|
1250
|
+
content: none !important;
|
|
1251
|
+
display: none !important;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/* Primary/Secondary Panels (Vertical Default) */
|
|
1255
|
+
.cg-card-primary {
|
|
1256
|
+
display: flex;
|
|
1257
|
+
flex-direction: column;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
.cg-card-secondary {
|
|
1261
|
+
margin-top: 1.5rem;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
/* Global Quote Styling (Vertical & Horizontal) */
|
|
1265
|
+
.cg-card-secondary blockquote {
|
|
1266
|
+
font-size: 1.5rem;
|
|
1267
|
+
line-height: 1.4;
|
|
1268
|
+
font-weight: 500;
|
|
1194
1269
|
font-style: italic;
|
|
1195
|
-
|
|
1196
|
-
|
|
1270
|
+
color: #1f2937;
|
|
1271
|
+
border: none;
|
|
1272
|
+
position: relative;
|
|
1273
|
+
padding-left: 3.5rem;
|
|
1274
|
+
margin: 0;
|
|
1275
|
+
display: flex;
|
|
1276
|
+
flex-direction: column;
|
|
1277
|
+
justify-content: center;
|
|
1278
|
+
min-height: 120px;
|
|
1279
|
+
/* Ensure some height in vertical mode */
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
.cg-card-secondary blockquote::before {
|
|
1283
|
+
content: '“';
|
|
1284
|
+
position: absolute;
|
|
1285
|
+
left: -0.5rem;
|
|
1286
|
+
top: -1.5rem;
|
|
1287
|
+
font-size: 6rem;
|
|
1288
|
+
color: var(--cg-primary, #3b82f6);
|
|
1289
|
+
font-family: serif;
|
|
1290
|
+
line-height: 1;
|
|
1197
1291
|
}
|
|
1198
1292
|
|
|
1199
1293
|
/* ===== Horizontal Layout ===== */
|
|
1200
|
-
/* Horizontal layout: intro
|
|
1294
|
+
/* Horizontal layout: intro on left, bullets/quote on right */
|
|
1295
|
+
|
|
1296
|
+
/* CTA default spacing (Vertical) */
|
|
1297
|
+
.cg-featured-card-cta {
|
|
1298
|
+
margin-top: 1.5rem;
|
|
1299
|
+
}
|
|
1201
1300
|
|
|
1202
1301
|
@media (min-width: 768px) {
|
|
1203
1302
|
.cg-layout-horizontal .cg-featured-card-inner {
|
|
1204
|
-
|
|
1303
|
+
display: grid;
|
|
1304
|
+
grid-template-columns: 1fr 1fr;
|
|
1305
|
+
grid-template-rows: auto auto;
|
|
1306
|
+
/* Two rows: Content and CTA */
|
|
1307
|
+
gap: 1.5rem 3rem;
|
|
1308
|
+
/* Row gap, Col gap */
|
|
1309
|
+
padding: var(--cg-card-padding, 2.5rem 3rem);
|
|
1310
|
+
align-items: start;
|
|
1311
|
+
/* Align top by default, center handled by flex children */
|
|
1205
1312
|
}
|
|
1206
1313
|
|
|
1207
|
-
.cg-layout-horizontal .cg-
|
|
1208
|
-
|
|
1314
|
+
.cg-layout-horizontal .cg-card-primary {
|
|
1315
|
+
grid-column: 1;
|
|
1316
|
+
grid-row: 1;
|
|
1209
1317
|
}
|
|
1210
1318
|
|
|
1211
|
-
/*
|
|
1212
|
-
.cg-layout-horizontal .cg-featured-card-
|
|
1213
|
-
|
|
1214
|
-
grid-
|
|
1215
|
-
|
|
1216
|
-
align-
|
|
1217
|
-
/* Changed from start to stretch for balance */
|
|
1319
|
+
/* CTA moves to row 2, col 1 */
|
|
1320
|
+
.cg-layout-horizontal .cg-featured-card-cta {
|
|
1321
|
+
grid-column: 1;
|
|
1322
|
+
grid-row: 2;
|
|
1323
|
+
margin-top: 0;
|
|
1324
|
+
align-self: end;
|
|
1218
1325
|
}
|
|
1219
1326
|
|
|
1220
|
-
/*
|
|
1221
|
-
.cg-layout-horizontal .cg-
|
|
1222
|
-
grid-column:
|
|
1223
|
-
grid-row: 1;
|
|
1224
|
-
margin: 0;
|
|
1225
|
-
font-size: 1.0625rem;
|
|
1226
|
-
line-height: 1.8;
|
|
1227
|
-
color: var(--cg-text-secondary);
|
|
1327
|
+
/* Secondary (Quote/List) spans both rows */
|
|
1328
|
+
.cg-layout-horizontal .cg-card-secondary {
|
|
1329
|
+
grid-column: 2;
|
|
1330
|
+
grid-row: 1 / span 2;
|
|
1331
|
+
margin-top: 0;
|
|
1228
1332
|
display: flex;
|
|
1229
1333
|
flex-direction: column;
|
|
1230
1334
|
justify-content: center;
|
|
1231
|
-
|
|
1335
|
+
height: 100%;
|
|
1232
1336
|
}
|
|
1233
1337
|
|
|
1234
|
-
/*
|
|
1235
|
-
|
|
1236
|
-
.cg-layout-horizontal .cg-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
grid-row: 1;
|
|
1240
|
-
margin: 0;
|
|
1338
|
+
/* Specific Quote tweaks for Horizontal if needed */
|
|
1339
|
+
/* Specific Quote tweaks for Horizontal if needed */
|
|
1340
|
+
.cg-layout-horizontal .cg-card-secondary blockquote {
|
|
1341
|
+
height: auto;
|
|
1342
|
+
/* Let it wrap content so icon stays close */
|
|
1241
1343
|
}
|
|
1242
1344
|
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1345
|
+
.cg-layout-horizontal .cg-featured-card-title {
|
|
1346
|
+
font-size: 1.875rem;
|
|
1347
|
+
margin-bottom: 1rem;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
/* Reset margins for horizontal layout */
|
|
1351
|
+
.cg-layout-horizontal .cg-featured-card-summary {
|
|
1352
|
+
margin-bottom: 1.5rem;
|
|
1247
1353
|
}
|
|
1248
1354
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Content Growth Widget - Standalone Bundle
|
|
3
|
-
* Version: 1.3.
|
|
3
|
+
* Version: 1.3.7
|
|
4
4
|
* https://www.content-growth.com
|
|
5
5
|
*/
|
|
6
6
|
(function(window) {
|
|
@@ -3514,7 +3514,7 @@ class ContentViewer {
|
|
|
3514
3514
|
|
|
3515
3515
|
class ContentGrowthWidget {
|
|
3516
3516
|
// Version will be injected during build from package.json
|
|
3517
|
-
static version = '1.3.
|
|
3517
|
+
static version = '1.3.7';
|
|
3518
3518
|
|
|
3519
3519
|
constructor(container, config) {
|
|
3520
3520
|
|
|
@@ -3826,6 +3826,6 @@ window.ContentGrowthWidget = ContentGrowthWidget;
|
|
|
3826
3826
|
// ===== Expose to window =====
|
|
3827
3827
|
window.ContentGrowthWidget = ContentGrowthWidget;
|
|
3828
3828
|
|
|
3829
|
-
console.log('[ContentGrowthWidget] Loaded successfully v1.3.
|
|
3829
|
+
console.log('[ContentGrowthWidget] Loaded successfully v1.3.7');
|
|
3830
3830
|
|
|
3831
3831
|
})(window);
|