@contentgrowth/content-widget 1.3.4 → 1.3.6
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 +90 -2
- package/dist/astro/ContentCard.astro +170 -0
- package/dist/astro/ContentList.astro +30 -47
- package/dist/astro/FeaturedCard.astro +171 -57
- package/dist/react/ContentCard.d.ts +59 -0
- package/dist/react/ContentCard.d.ts.map +1 -0
- package/dist/react/ContentCard.js +84 -0
- package/dist/react/ContentList.d.ts.map +1 -1
- package/dist/react/ContentList.js +12 -21
- package/dist/react/FeaturedCard.d.ts +23 -2
- package/dist/react/FeaturedCard.d.ts.map +1 -1
- package/dist/react/FeaturedCard.js +101 -32
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/styles.css +191 -68
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/vue/ContentCard.vue +148 -0
- package/dist/vue/ContentList.vue +35 -33
- package/dist/vue/FeaturedCard.vue +184 -62
- package/dist/widget/widget.css +1 -1
- package/dist/widget/widget.dev.css +191 -68
- package/dist/widget/widget.dev.js +3 -3
- package/dist/widget/widget.js +1 -1
- package/package.json +1 -1
|
@@ -720,10 +720,27 @@ a.cg-card {
|
|
|
720
720
|
margin-bottom: 2rem;
|
|
721
721
|
}
|
|
722
722
|
|
|
723
|
+
/* Featured Cards Grid for displayAs="featured-cards" */
|
|
724
|
+
.cg-articles-grid.cg-featured-cards-grid {
|
|
725
|
+
display: grid;
|
|
726
|
+
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
|
|
727
|
+
gap: 2rem;
|
|
728
|
+
margin-bottom: 2rem;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.cg-articles-grid.cg-featured-cards-grid .cg-featured-card {
|
|
732
|
+
height: 100%;
|
|
733
|
+
}
|
|
734
|
+
|
|
723
735
|
@media (max-width: 768px) {
|
|
724
736
|
.cg-articles-grid.cg-grid {
|
|
725
737
|
grid-template-columns: 1fr;
|
|
726
738
|
}
|
|
739
|
+
|
|
740
|
+
.cg-articles-grid.cg-featured-cards-grid {
|
|
741
|
+
grid-template-columns: 1fr;
|
|
742
|
+
gap: 1.5rem;
|
|
743
|
+
}
|
|
727
744
|
}
|
|
728
745
|
|
|
729
746
|
/* Article Card */
|
|
@@ -1002,7 +1019,7 @@ a.cg-card {
|
|
|
1002
1019
|
}
|
|
1003
1020
|
|
|
1004
1021
|
.cg-featured-card-inner {
|
|
1005
|
-
padding: 2rem 2.5rem;
|
|
1022
|
+
padding: var(--cg-card-padding, 2rem 2.5rem);
|
|
1006
1023
|
height: 100%;
|
|
1007
1024
|
display: flex;
|
|
1008
1025
|
flex-direction: column;
|
|
@@ -1101,51 +1118,114 @@ a.cg-card {
|
|
|
1101
1118
|
line-height: 1.7;
|
|
1102
1119
|
}
|
|
1103
1120
|
|
|
1104
|
-
/*
|
|
1105
|
-
.cg-
|
|
1106
|
-
.cg-featured-card-summary ol {
|
|
1121
|
+
/* ===== Structured Summary Items ===== */
|
|
1122
|
+
.cg-summary-items {
|
|
1107
1123
|
margin: 0;
|
|
1108
|
-
padding: 1.25rem
|
|
1109
|
-
padding-left: 1.5rem;
|
|
1124
|
+
padding: 1rem 1.25rem;
|
|
1110
1125
|
list-style: none;
|
|
1111
1126
|
background: var(--cg-items-bg);
|
|
1112
1127
|
border-radius: 8px;
|
|
1113
1128
|
}
|
|
1114
1129
|
|
|
1115
|
-
.cg-
|
|
1116
|
-
|
|
1117
|
-
|
|
1130
|
+
.cg-summary-items li {
|
|
1131
|
+
display: flex;
|
|
1132
|
+
gap: 0.75rem;
|
|
1133
|
+
margin-bottom: 1rem;
|
|
1118
1134
|
line-height: 1.5;
|
|
1119
|
-
position: relative;
|
|
1120
1135
|
}
|
|
1121
1136
|
|
|
1122
|
-
.cg-
|
|
1137
|
+
.cg-summary-items li:last-child {
|
|
1123
1138
|
margin-bottom: 0;
|
|
1124
1139
|
}
|
|
1125
1140
|
|
|
1126
|
-
/*
|
|
1127
|
-
.cg-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
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;
|
|
1134
1151
|
background: var(--cg-primary);
|
|
1135
|
-
|
|
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;
|
|
1136
1160
|
}
|
|
1137
1161
|
|
|
1138
|
-
/*
|
|
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);
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/* Legacy markdown list support (for old content) */
|
|
1199
|
+
.cg-featured-card-summary ul,
|
|
1139
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;
|
|
1140
1206
|
counter-reset: item;
|
|
1141
1207
|
}
|
|
1142
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,
|
|
1143
1225
|
.cg-featured-card-summary ol li::before {
|
|
1144
1226
|
content: counter(item);
|
|
1145
1227
|
counter-increment: item;
|
|
1146
|
-
|
|
1147
|
-
left: 0;
|
|
1148
|
-
top: 0;
|
|
1228
|
+
flex-shrink: 0;
|
|
1149
1229
|
width: 1.5rem;
|
|
1150
1230
|
height: 1.5rem;
|
|
1151
1231
|
background: var(--cg-primary);
|
|
@@ -1156,76 +1236,119 @@ a.cg-card {
|
|
|
1156
1236
|
display: flex;
|
|
1157
1237
|
align-items: center;
|
|
1158
1238
|
justify-content: center;
|
|
1239
|
+
margin-top: 0.125rem;
|
|
1159
1240
|
}
|
|
1160
1241
|
|
|
1161
|
-
/* List item content: bold title + description on next line */
|
|
1162
1242
|
.cg-featured-card-summary li strong {
|
|
1163
|
-
display: block;
|
|
1164
1243
|
font-size: 0.9375rem;
|
|
1165
|
-
font-weight:
|
|
1244
|
+
font-weight: 600;
|
|
1166
1245
|
color: var(--cg-text);
|
|
1167
|
-
margin-bottom: 0.125rem;
|
|
1168
1246
|
}
|
|
1169
1247
|
|
|
1170
|
-
/*
|
|
1171
|
-
.cg-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
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;
|
|
1177
1269
|
font-style: italic;
|
|
1178
|
-
|
|
1179
|
-
|
|
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;
|
|
1180
1291
|
}
|
|
1181
1292
|
|
|
1182
1293
|
/* ===== Horizontal Layout ===== */
|
|
1183
|
-
/* 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
|
+
}
|
|
1184
1300
|
|
|
1185
1301
|
@media (min-width: 768px) {
|
|
1186
1302
|
.cg-layout-horizontal .cg-featured-card-inner {
|
|
1187
|
-
|
|
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 */
|
|
1188
1312
|
}
|
|
1189
1313
|
|
|
1190
|
-
.cg-layout-horizontal .cg-
|
|
1191
|
-
|
|
1314
|
+
.cg-layout-horizontal .cg-card-primary {
|
|
1315
|
+
grid-column: 1;
|
|
1316
|
+
grid-row: 1;
|
|
1192
1317
|
}
|
|
1193
1318
|
|
|
1194
|
-
/*
|
|
1195
|
-
.cg-layout-horizontal .cg-featured-card-
|
|
1196
|
-
|
|
1197
|
-
grid-
|
|
1198
|
-
|
|
1199
|
-
align-
|
|
1200
|
-
/* 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;
|
|
1201
1325
|
}
|
|
1202
1326
|
|
|
1203
|
-
/*
|
|
1204
|
-
.cg-layout-horizontal .cg-
|
|
1205
|
-
grid-column:
|
|
1206
|
-
grid-row: 1;
|
|
1207
|
-
margin: 0;
|
|
1208
|
-
font-size: 1.0625rem;
|
|
1209
|
-
line-height: 1.8;
|
|
1210
|
-
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;
|
|
1211
1332
|
display: flex;
|
|
1212
1333
|
flex-direction: column;
|
|
1213
1334
|
justify-content: center;
|
|
1214
|
-
|
|
1335
|
+
height: 100%;
|
|
1215
1336
|
}
|
|
1216
1337
|
|
|
1217
|
-
/*
|
|
1218
|
-
|
|
1219
|
-
.cg-layout-horizontal .cg-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
grid-row: 1;
|
|
1223
|
-
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 */
|
|
1224
1343
|
}
|
|
1225
1344
|
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
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;
|
|
1230
1353
|
}
|
|
1231
1354
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Content Growth Widget - Standalone Bundle
|
|
3
|
-
* Version: 1.3.
|
|
3
|
+
* Version: 1.3.6
|
|
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.6';
|
|
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.6');
|
|
3830
3830
|
|
|
3831
3831
|
})(window);
|