@contentgrowth/content-widget 1.3.5 → 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 +14 -0
- package/dist/astro/FeaturedCard.astro +110 -36
- package/dist/react/FeaturedCard.d.ts +9 -0
- package/dist/react/FeaturedCard.d.ts.map +1 -1
- package/dist/react/FeaturedCard.js +66 -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
package/dist/styles.css
CHANGED
|
@@ -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,9 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref, onMounted, computed, watch } from 'vue';
|
|
3
|
-
import { marked } from 'marked';
|
|
4
3
|
import { ContentGrowthClient } from '../core/client';
|
|
5
4
|
import type { ArticleWithContent, Article } from '../types';
|
|
6
5
|
|
|
6
|
+
// Summary data interface for structured JSON format
|
|
7
|
+
interface SummaryData {
|
|
8
|
+
type: 'classic' | 'list' | 'steps' | 'quote' | 'legacy';
|
|
9
|
+
text?: string;
|
|
10
|
+
intro?: string;
|
|
11
|
+
items?: Array<{ title: string; description: string }>;
|
|
12
|
+
quote?: string;
|
|
13
|
+
highlight?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
7
16
|
const props = withDefaults(defineProps<{
|
|
8
17
|
// Pre-loaded article data (bypasses API fetch)
|
|
9
18
|
article?: Article | ArticleWithContent;
|
|
@@ -24,6 +33,11 @@ const props = withDefaults(defineProps<{
|
|
|
24
33
|
linkTarget?: string;
|
|
25
34
|
ctaText?: string;
|
|
26
35
|
layout?: 'vertical' | 'horizontal';
|
|
36
|
+
borderStyle?: 'none' | 'line' | 'dashed';
|
|
37
|
+
borderColor?: string;
|
|
38
|
+
cardBackground?: string;
|
|
39
|
+
itemsBackground?: string;
|
|
40
|
+
padding?: string;
|
|
27
41
|
className?: string;
|
|
28
42
|
}>(), {
|
|
29
43
|
tags: () => [],
|
|
@@ -32,6 +46,10 @@ const props = withDefaults(defineProps<{
|
|
|
32
46
|
showReadingTime: false,
|
|
33
47
|
showAuthor: false,
|
|
34
48
|
linkPattern: '/articles/{slug}',
|
|
49
|
+
borderStyle: 'none',
|
|
50
|
+
borderColor: '#e5e7eb',
|
|
51
|
+
cardBackground: 'none',
|
|
52
|
+
itemsBackground: '#f3f4f6',
|
|
35
53
|
className: ''
|
|
36
54
|
});
|
|
37
55
|
|
|
@@ -56,12 +74,27 @@ const articleUrl = computed(() => {
|
|
|
56
74
|
.replace('{category}', loadedArticle.value.category || 'uncategorized');
|
|
57
75
|
});
|
|
58
76
|
|
|
59
|
-
//
|
|
60
|
-
const
|
|
61
|
-
if (!loadedArticle.value) return
|
|
77
|
+
// Parse featured summary - supports both JSON (new) and plain text (legacy)
|
|
78
|
+
const summaryData = computed((): SummaryData | null => {
|
|
79
|
+
if (!loadedArticle.value) return null;
|
|
62
80
|
const summaryText = (loadedArticle.value as any).featuredSummary || loadedArticle.value.summary;
|
|
63
|
-
if (!summaryText) return
|
|
64
|
-
|
|
81
|
+
if (!summaryText) return null;
|
|
82
|
+
|
|
83
|
+
// Try to parse as JSON
|
|
84
|
+
try {
|
|
85
|
+
const parsed = JSON.parse(summaryText);
|
|
86
|
+
if (parsed.type) {
|
|
87
|
+
return parsed as SummaryData;
|
|
88
|
+
}
|
|
89
|
+
} catch (e) {
|
|
90
|
+
// Not JSON, treat as legacy markdown/plain text
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Legacy fallback - render as plain text
|
|
94
|
+
return {
|
|
95
|
+
type: 'legacy',
|
|
96
|
+
text: summaryText
|
|
97
|
+
};
|
|
65
98
|
});
|
|
66
99
|
|
|
67
100
|
const readingTime = computed(() => {
|
|
@@ -76,11 +109,25 @@ const layoutClass = computed(() => {
|
|
|
76
109
|
return layout !== 'vertical' ? `cg-layout-${layout}` : '';
|
|
77
110
|
});
|
|
78
111
|
|
|
112
|
+
const borderClass = computed(() => {
|
|
113
|
+
return props.borderStyle !== 'none' ? `cg-border-${props.borderStyle}` : '';
|
|
114
|
+
});
|
|
115
|
+
|
|
79
116
|
// Compute CTA text from prop or article data
|
|
80
117
|
const ctaText = computed(() => {
|
|
81
118
|
return props.ctaText || (loadedArticle.value as any)?.featuredCtaText || 'Read full story';
|
|
82
119
|
});
|
|
83
120
|
|
|
121
|
+
// Custom CSS properties
|
|
122
|
+
const customStyles = computed(() => {
|
|
123
|
+
const styles: Record<string, string> = {};
|
|
124
|
+
if (props.borderColor !== '#e5e7eb') styles['--cg-card-border-color'] = props.borderColor;
|
|
125
|
+
if (props.cardBackground !== 'none') styles['--cg-card-bg'] = props.cardBackground;
|
|
126
|
+
if (props.itemsBackground !== '#f3f4f6') styles['--cg-items-bg'] = props.itemsBackground;
|
|
127
|
+
if (props.padding) styles['--cg-card-padding'] = props.padding;
|
|
128
|
+
return styles;
|
|
129
|
+
});
|
|
130
|
+
|
|
84
131
|
onMounted(async () => {
|
|
85
132
|
// If article is already provided, no need to fetch
|
|
86
133
|
if (props.article) {
|
|
@@ -141,37 +188,66 @@ onMounted(async () => {
|
|
|
141
188
|
v-else
|
|
142
189
|
:href="articleUrl"
|
|
143
190
|
class="cg-widget cg-featured-card"
|
|
144
|
-
:class="[className, layoutClass]"
|
|
191
|
+
:class="[className, layoutClass, borderClass]"
|
|
192
|
+
:style="customStyles"
|
|
145
193
|
data-cg-widget="featured-card"
|
|
146
194
|
:target="linkTarget"
|
|
147
195
|
:rel="linkTarget === '_blank' ? 'noopener noreferrer' : undefined"
|
|
148
196
|
>
|
|
149
197
|
<article class="cg-featured-card-inner">
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<
|
|
198
|
+
<div class="cg-card-primary">
|
|
199
|
+
<!-- Header with category badge -->
|
|
200
|
+
<div v-if="showCategory && loadedArticle.category" class="cg-featured-card-category">
|
|
201
|
+
<span class="cg-category-badge">{{ loadedArticle.category }}</span>
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
<!-- Title -->
|
|
205
|
+
<h3 class="cg-featured-card-title">{{ loadedArticle.title }}</h3>
|
|
206
|
+
|
|
207
|
+
<!-- Featured Summary - Intro Part -->
|
|
208
|
+
<div v-if="summaryData" class="cg-featured-card-summary">
|
|
209
|
+
<!-- Structured Intro -->
|
|
210
|
+
<p v-if="(summaryData.type === 'list' || summaryData.type === 'steps' || summaryData.type === 'quote') && summaryData.intro">
|
|
211
|
+
{{ summaryData.intro }}
|
|
212
|
+
</p>
|
|
213
|
+
|
|
214
|
+
<!-- Classic type -->
|
|
215
|
+
<p v-else-if="summaryData.type === 'classic'">{{ summaryData.text }}</p>
|
|
216
|
+
|
|
217
|
+
<!-- Legacy type -->
|
|
218
|
+
<p v-else-if="summaryData.type === 'legacy'">{{ summaryData.text }}</p>
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
<!-- Footer with meta info -->
|
|
222
|
+
<div v-if="showAuthor || showReadingTime" class="cg-featured-card-footer">
|
|
223
|
+
<span v-if="showAuthor" class="cg-featured-card-author">{{ loadedArticle.authorName }}</span>
|
|
224
|
+
<template v-if="showAuthor && showReadingTime">
|
|
225
|
+
<span class="cg-featured-card-separator">•</span>
|
|
226
|
+
</template>
|
|
227
|
+
<span v-if="showReadingTime" class="cg-featured-card-reading-time">{{ readingTime }} min read</span>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<!-- Right Panel - Structured Visual Items -->
|
|
234
|
+
<div v-if="summaryData && (summaryData.type === 'list' || summaryData.type === 'steps')" class="cg-card-secondary">
|
|
235
|
+
<ul class="cg-summary-items">
|
|
236
|
+
<li v-for="(item, index) in summaryData.items" :key="index">
|
|
237
|
+
<span class="cg-item-number">{{ index + 1 }}</span>
|
|
238
|
+
<div class="cg-item-content">
|
|
239
|
+
<strong class="cg-item-title">{{ item.title }}</strong>
|
|
240
|
+
<span class="cg-item-description">{{ item.description }}</span>
|
|
241
|
+
</div>
|
|
242
|
+
</li>
|
|
243
|
+
</ul>
|
|
153
244
|
</div>
|
|
154
245
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<!-- Featured Summary -->
|
|
159
|
-
<div
|
|
160
|
-
v-if="summaryHtml"
|
|
161
|
-
class="cg-featured-card-summary"
|
|
162
|
-
v-html="summaryHtml"
|
|
163
|
-
></div>
|
|
164
|
-
|
|
165
|
-
<!-- Footer with meta info -->
|
|
166
|
-
<div v-if="showAuthor || showReadingTime" class="cg-featured-card-footer">
|
|
167
|
-
<span v-if="showAuthor" class="cg-featured-card-author">{{ loadedArticle.authorName }}</span>
|
|
168
|
-
<template v-if="showAuthor && showReadingTime">
|
|
169
|
-
<span class="cg-featured-card-separator">•</span>
|
|
170
|
-
</template>
|
|
171
|
-
<span v-if="showReadingTime" class="cg-featured-card-reading-time">{{ readingTime }} min read</span>
|
|
246
|
+
<div v-else-if="summaryData && summaryData.type === 'quote'" class="cg-card-secondary">
|
|
247
|
+
<blockquote>{{ summaryData.quote }}</blockquote>
|
|
172
248
|
</div>
|
|
173
249
|
|
|
174
|
-
<!--
|
|
250
|
+
<!-- CTA (Bottom) -->
|
|
175
251
|
<div class="cg-featured-card-cta">
|
|
176
252
|
<span>{{ ctaText }}</span>
|
|
177
253
|
<svg class="cg-featured-card-arrow" fill="none" stroke="currentColor" viewBox="0 0 24 24" width="16" height="16">
|
package/dist/widget/widget.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.cg-content-list,.cg-content-viewer,.cg-widget{--cg-primary:#3b82f6;--cg-primary-hover:#2563eb;--cg-bg:#ffffff;--cg-bg-secondary:#f9fafb;--cg-text:#1f2937;--cg-text-secondary:#6b7280;--cg-border:#e5e7eb;--cg-shadow:0 1px 3px rgba(0,0,0,0.1);--cg-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.1);--cg-radius:12px;--cg-transition:all 0.2s ease;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size:16px;line-height:1.5;color:var(--cg-text)}.cg-content-list.cg-theme-dark,.cg-content-viewer.cg-theme-dark,.cg-widget[data-theme="dark"]{--cg-primary:#60a5fa;--cg-primary-hover:#3b82f6;--cg-bg:#1f2937;--cg-bg-secondary:#111827;--cg-text:#f9fafb;--cg-text-secondary:#9ca3af;--cg-border:#374151;--cg-shadow:0 1px 3px rgba(0,0,0,0.3);--cg-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.5)}.cg-content-list *,.cg-content-viewer *,.cg-widget *{box-sizing:border-box;margin:0;padding:0}.cg-content-list,.cg-content-viewer,.cg-widget{width:100%;max-width:100%}.cg-content-list{width:100%}.cg-list-header{display:flex;justify-content:flex-end;margin-bottom:1.5rem}.cg-display-toggle{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:var(--cg-radius);color:var(--cg-text);cursor:pointer;transition:var(--cg-transition);font-size:0.875rem}.cg-display-toggle:hover{background:var(--cg-bg);border-color:var(--cg-primary)}.cg-display-toggle svg{width:20px;height:20px}.cg-content-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.5rem;margin-bottom:2rem}@media (max-width:768px){.cg-content-grid{grid-template-columns:1fr}}.cg-content-rows{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}.cg-content-rows .cg-card{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:0.75rem 1.5rem;align-items:start}.cg-content-rows .cg-card-header{grid-column:1 / 2;grid-row:1;display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:0}.cg-content-rows .cg-card-meta{grid-column:1 / 2;grid-row:2;margin-top:0}.cg-content-rows .cg-expand-btn{grid-column:2 / 3;grid-row:1;flex-shrink:0}.cg-content-rows .cg-card-title{margin:0;flex:1}.cg-content-rows .cg-card--compact,.cg-content-rows .cg-card--comfortable,.cg-content-rows .cg-card--spacious{width:100%}@media (max-width:768px){.cg-content-rows .cg-card{grid-template-columns:1fr;grid-template-rows:auto auto}.cg-content-rows .cg-expand-btn{grid-column:1;grid-row:1;justify-self:end}}.cg-card{background:var(--cg-bg);border:1px solid var(--cg-border);border-radius:var(--cg-radius);padding:1.5rem;cursor:pointer;transition:var(--cg-transition);display:block}a.cg-card{text-decoration:none;color:inherit}.cg-card--compact{padding:1rem}.cg-card--compact .cg-card-title{font-size:1rem;line-height:1.4}.cg-card--compact .cg-card-meta{font-size:0.75rem}.cg-card--comfortable{padding:1.5rem}.cg-card--comfortable .cg-card-title{font-size:1.125rem;line-height:1.5}.cg-card--comfortable .cg-card-meta{font-size:0.875rem}.cg-card--spacious{padding:2rem}.cg-card--spacious .cg-card-title{font-size:1.25rem;line-height:1.6}.cg-card--spacious .cg-card-meta{font-size:0.875rem;margin-top:0.75rem}.cg-card:hover{box-shadow:var(--cg-shadow-lg);border-color:var(--cg-primary)}.cg-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}.cg-card-title{font-size:1.25rem;font-weight:600;color:var(--cg-text);line-height:1.4;flex:1}.cg-expand-btn{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:8px;color:var(--cg-text-secondary);cursor:pointer;transition:var(--cg-transition)}.cg-expand-btn:hover{background:var(--cg-primary);color:white;border-color:var(--cg-primary)}.cg-card-summary{margin-bottom:1rem;padding:1rem;background:var(--cg-bg-secondary);border-radius:8px}.cg-card-summary p{color:var(--cg-text-secondary);font-size:0.9375rem;line-height:1.6}.cg-card-tags{display:flex;flex-wrap:wrap;gap:0.5rem;margin-bottom:1rem}.cg-tag{display:inline-block;padding:0.25rem 0.75rem;background:var(--cg-primary);color:white;border-radius:999px;font-size:0.75rem;font-weight:500}.cg-card-meta{display:flex;flex-wrap:wrap;gap:1rem;font-size:0.875rem;color:var(--cg-text-secondary)}.cg-meta-item{display:flex;align-items:center;gap:0.375rem}.cg-meta-item svg{width:14px;height:14px;flex-shrink:0}.cg-pagination{display:flex;align-items:center;justify-content:center;gap:1rem;padding:1.5rem 0}.cg-btn-prev,.cg-btn-next{display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1.5rem;background:var(--cg-primary);color:white;border:none;border-radius:var(--cg-radius);font-weight:500;cursor:pointer;transition:var(--cg-transition)}.cg-btn-prev:hover:not(:disabled),.cg-btn-next:hover:not(:disabled){background:var(--cg-primary-hover);box-shadow:var(--cg-shadow-lg)}.cg-btn-prev:disabled,.cg-btn-next:disabled{opacity:0.5;cursor:not-allowed}.cg-page-info{color:var(--cg-text-secondary);font-size:0.875rem}.cg-content-viewer{width:100%;background:var(--cg-bg);min-height:400px}.cg-viewer-header{margin-bottom:2rem;background:var(--cg-bg)}.cg-back-btn{display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1.5rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:var(--cg-radius);color:var(--cg-text);font-weight:500;cursor:pointer;transition:var(--cg-transition)}.cg-back-btn:hover{background:var(--cg-bg);border-color:var(--cg-primary);color:var(--cg-primary)}.cg-viewer-content{max-width:800px;margin:0 auto;background:var(--cg-bg);padding:1rem}.cg-content-header{margin-bottom:2rem;padding-bottom:2rem;border-bottom:1px solid var(--cg-border)}.cg-content-title{font-size:2.5rem;font-weight:700;line-height:1.2;margin-bottom:1.5rem;color:var(--cg-text)}@media (max-width:768px){.cg-content-title{font-size:2rem}}.cg-content-meta{display:flex;flex-wrap:wrap;gap:1.5rem;color:var(--cg-text-secondary);font-size:0.9375rem}.cg-content-body{color:var(--cg-text);line-height:1.75}.cg-content-body h2{font-size:1.875rem;font-weight:700;margin:2rem 0 1rem;color:var(--cg-text)}.cg-content-body h3{font-size:1.5rem;font-weight:600;margin:1.5rem 0 0.75rem;color:var(--cg-text)}.cg-content-body p{margin-bottom:1.25rem}.cg-content-body ul,.cg-content-body ol{margin-bottom:1.25rem;padding-left:1.5rem}.cg-content-body li{margin-bottom:0.5rem}.cg-content-body a{color:var(--cg-primary);text-decoration:underline}.cg-content-body a:hover{color:var(--cg-primary-hover)}.cg-content-body code{padding:0.125rem 0.375rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:4px;font-size:0.875em;font-family:'Courier New',monospace}.cg-content-body pre{padding:1rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:8px;overflow-x:auto;margin-bottom:1.25rem}.cg-content-body pre code{padding:0;background:none;border:none}.cg-content-body blockquote{padding-left:1rem;border-left:4px solid var(--cg-primary);margin:1.25rem 0;font-style:italic;color:var(--cg-text-secondary)}.cg-content-body img{max-width:100%;height:auto;border-radius:8px;margin:1.25rem 0}.cg-modal{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999;opacity:0;pointer-events:none;transition:opacity 0.3s ease;--cg-primary:#3b82f6;--cg-primary-hover:#2563eb;--cg-bg:#ffffff;--cg-bg-secondary:#f9fafb;--cg-text:#1f2937;--cg-text-secondary:#6b7280;--cg-border:#e5e7eb;--cg-shadow:0 1px 3px rgba(0,0,0,0.1);--cg-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.1);--cg-radius:12px;--cg-transition:all 0.2s ease;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif}.cg-modal--active{opacity:1;pointer-events:auto}.cg-modal[data-theme="dark"]{--cg-primary:#60a5fa;--cg-primary-hover:#3b82f6;--cg-bg:#1f2937;--cg-bg-secondary:#111827;--cg-text:#f9fafb;--cg-text-secondary:#9ca3af;--cg-border:#374151;--cg-shadow:0 1px 3px rgba(0,0,0,0.3);--cg-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.5)}.cg-modal-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.8);cursor:pointer}.cg-modal-content{position:relative;max-width:900px;max-height:90vh;margin:5vh auto;background:var(--cg-bg);border-radius:var(--cg-radius);overflow-y:auto;box-shadow:0 25px 50px -12px rgba(0,0,0,0.5);z-index:10;opacity:1 !important}.cg-modal-close{position:sticky;top:1rem;right:1rem;float:right;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:var(--cg-bg);border:1px solid var(--cg-border);border-radius:50%;color:var(--cg-text);cursor:pointer;transition:var(--cg-transition);z-index:10}.cg-modal-close:hover{background:var(--cg-primary);color:white;border-color:var(--cg-primary)}.cg-modal-body{padding:2rem;background:var(--cg-bg);min-height:200px}.cg-loading,.cg-viewer-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;text-align:center}.cg-spinner{width:48px;height:48px;border:4px solid var(--cg-border);border-top-color:var(--cg-primary);border-radius:50%;animation:cg-spin 0.8s linear infinite;margin-bottom:1rem}@keyframes cg-spin{to{transform:rotate(360deg)}}.cg-loading p,.cg-viewer-loading p{color:var(--cg-text-secondary)}.cg-error,.cg-viewer-error{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;text-align:center}.cg-error svg,.cg-viewer-error svg{color:#ef4444;margin-bottom:1rem}.cg-error p,.cg-viewer-error p{color:var(--cg-text);margin-bottom:1.5rem}.cg-retry-btn{padding:0.75rem 1.5rem;background:var(--cg-primary);color:white;border:none;border-radius:var(--cg-radius);font-weight:500;cursor:pointer;transition:var(--cg-transition)}.cg-retry-btn:hover{background:var(--cg-primary-hover)}.cg-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;text-align:center}.cg-empty-state svg{color:var(--cg-text-secondary);margin-bottom:1rem}.cg-empty-state p{color:var(--cg-text-secondary);margin-top:1rem}.cg-articles-grid.cg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.5rem;margin-bottom:2rem}.cg-articles-grid.cg-list{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}.cg-articles-grid.cg-featured-cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr));gap:2rem;margin-bottom:2rem}.cg-articles-grid.cg-featured-cards-grid .cg-featured-card{height:100%}@media (max-width:768px){.cg-articles-grid.cg-grid{grid-template-columns:1fr}.cg-articles-grid.cg-featured-cards-grid{grid-template-columns:1fr;gap:1.5rem}}.cg-article-card{background:var(--cg-bg);border:1px solid var(--cg-border);border-radius:var(--cg-radius);overflow:hidden;transition:var(--cg-transition)}.cg-article-card:hover{box-shadow:var(--cg-shadow-lg);transform:translateY(-2px)}.cg-card-link{display:block;text-decoration:none;color:inherit}.cg-card-content{padding:1.5rem}.cg-display-compact .cg-card-content{padding:1rem}.cg-display-spacious .cg-card-content{padding:2rem}.cg-card-category{margin-bottom:0.75rem}.cg-category-badge{display:inline-block;padding:0.25rem 0.75rem;background:var(--cg-primary);color:white;border-radius:9999px;font-size:0.75rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em}.cg-card-title{font-size:1.25rem;font-weight:600;line-height:1.4;margin-bottom:0.75rem;color:var(--cg-text)}.cg-display-compact .cg-card-title{font-size:1.1rem}.cg-display-spacious .cg-card-title{font-size:1.5rem}.cg-card-summary{color:var(--cg-text-secondary);line-height:1.6;margin-bottom:1rem;font-size:0.95rem}.cg-card-meta{display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;color:var(--cg-text-secondary);margin-bottom:1rem}.cg-meta-separator{color:var(--cg-border)}.cg-card-tags{display:flex;flex-wrap:wrap;gap:0.5rem}.cg-tag{padding:0.25rem 0.75rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:9999px;font-size:0.75rem;color:var(--cg-text-secondary)}.cg-content-header-back{margin-bottom:2rem}.cg-back-btn{display:inline-flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:var(--cg-radius);color:var(--cg-text);text-decoration:none;font-size:0.875rem;transition:var(--cg-transition)}.cg-back-btn:hover{background:var(--cg-bg);border-color:var(--cg-primary);color:var(--cg-primary)}.cg-back-btn svg{width:20px;height:20px}.cg-content-header{margin-bottom:3rem;padding-bottom:2rem;border-bottom:1px solid var(--cg-border)}.cg-content-category{margin-bottom:1rem}.cg-content-title{font-size:2.5rem;font-weight:700;line-height:1.2;margin-bottom:1rem;color:var(--cg-text)}@media (max-width:768px){.cg-content-title{font-size:2rem}}.cg-content-summary{font-size:1.125rem;line-height:1.6;color:var(--cg-text-secondary);margin-bottom:1.5rem}.cg-ai-summary{background:linear-gradient(to right,#eff6ff,#dbeafe);border-left:4px solid #3b82f6;border-radius:0 var(--cg-radius) var(--cg-radius) 0;padding:1rem 1.25rem;margin-bottom:1.5rem}.cg-theme-dark .cg-ai-summary{background:linear-gradient(to right,#1e3a5f,#1e40af);border-left-color:#60a5fa}.cg-ai-summary-header{display:flex;align-items:center;gap:0.5rem;margin-bottom:0.5rem}.cg-ai-summary-icon{width:1rem;height:1rem;color:#2563eb}.cg-theme-dark .cg-ai-summary-icon{color:#60a5fa}.cg-ai-summary-label{font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#1d4ed8}.cg-theme-dark .cg-ai-summary-label{color:#93c5fd}.cg-ai-summary-text{font-size:0.875rem;font-style:italic;line-height:1.6;color:#374151}.cg-theme-dark .cg-ai-summary-text{color:#d1d5db}.cg-content-meta{display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap;font-size:0.875rem;color:var(--cg-text-secondary)}.cg-info-separator{color:var(--cg-border)}.cg-content-tags{display:flex;flex-wrap:wrap;gap:0.5rem;margin-top:1rem}.cg-content-body{max-width:100%;color:var(--cg-text)}.cg-empty-state p{color:var(--cg-text-secondary);font-size:1.125rem}.cg-featured-card{--cg-card-border-color:#e5e7eb;--cg-card-bg:transparent;--cg-items-bg:#f3f4f6;display:block;text-decoration:none;color:inherit;border-radius:12px;background:var(--cg-card-bg);border:none;transition:all 0.2s ease;overflow:hidden}.cg-featured-card.cg-border-line{border:1px solid var(--cg-card-border-color)}.cg-featured-card.cg-border-dashed{border:2px dashed var(--cg-card-border-color)}.cg-featured-card:hover{border-color:var(--cg-primary)}.cg-featured-card-inner{padding:2rem 2.5rem;height:100%;display:flex;flex-direction:column}.cg-featured-card-category{margin-bottom:1.25rem}.cg-category-badge{display:inline-block;padding:0.25rem 0.75rem;background:#eff6ff;color:var(--cg-primary);border-radius:4px;font-size:0.75rem;font-weight:600}.cg-featured-card-title{margin:0 0 1rem;font-size:1.625rem;font-weight:800;line-height:1.25;color:var(--cg-text);letter-spacing:-0.02em}.cg-featured-card-summary{font-size:1rem;line-height:1.7;color:var(--cg-text-secondary);margin-bottom:1.5rem;flex-grow:1}.cg-featured-card-summary p{margin:0 0 1rem}.cg-featured-card-summary p:last-child{margin:0}.cg-featured-card-summary strong,.cg-featured-card-summary b{font-weight:700;color:var(--cg-text)}.cg-featured-card-footer{display:flex;align-items:center;font-size:0.875rem;font-weight:500;color:var(--cg-text-secondary);margin-bottom:1rem}.cg-featured-card-separator{margin:0 0.5rem;opacity:0.4}.cg-featured-card-cta{display:inline-flex;align-items:center;gap:0.375rem;font-size:1rem;font-weight:600;color:var(--cg-primary);text-decoration:none;transition:all 0.2s ease;align-self:flex-start}.cg-featured-card:hover .cg-featured-card-cta{gap:0.625rem;text-decoration:underline}.cg-featured-card-arrow{transition:transform 0.2s ease}.cg-featured-card:hover .cg-featured-card-arrow{transform:translateX(3px)}.cg-featured-card-summary>p:first-child{font-size:1rem;line-height:1.7}.cg-featured-card-summary ul,.cg-featured-card-summary ol{margin:0;padding:1.25rem 1.5rem;padding-left:1.5rem;list-style:none;background:var(--cg-items-bg);border-radius:8px}.cg-featured-card-summary li{margin-bottom:1.25rem;padding-left:2.5rem;line-height:1.5;position:relative}.cg-featured-card-summary li:last-child{margin-bottom:0}.cg-featured-card-summary ul li::before{content:'';position:absolute;left:0.5rem;top:0.5rem;width:6px;height:6px;background:var(--cg-primary);border-radius:50%}.cg-featured-card-summary ol{counter-reset:item}.cg-featured-card-summary ol li::before{content:counter(item);counter-increment:item;position:absolute;left:0;top:0;width:1.5rem;height:1.5rem;background:var(--cg-primary);color:white;border-radius:4px;font-size:0.75rem;font-weight:700;display:flex;align-items:center;justify-content:center}.cg-featured-card-summary li strong{display:block;font-size:0.9375rem;font-weight:700;color:var(--cg-text);margin-bottom:0.125rem}.cg-featured-card-summary blockquote{margin:0;padding:1rem 1.25rem;border-left:3px solid var(--cg-primary);background:var(--cg-bg-secondary);border-radius:0 8px 8px 0;font-style:italic;font-size:1rem;color:var(--cg-text)}@media (min-width:768px){.cg-layout-horizontal .cg-featured-card-inner{padding:2.5rem 3rem}.cg-layout-horizontal .cg-featured-card-title{font-size:1.875rem}.cg-layout-horizontal .cg-featured-card-summary{display:grid;grid-template-columns:1fr 1.25fr;gap:2.5rem;align-items:stretch}.cg-layout-horizontal .cg-featured-card-summary>p:first-child{grid-column:1;grid-row:1;margin:0;font-size:1.0625rem;line-height:1.8;color:var(--cg-text-secondary);display:flex;flex-direction:column;justify-content:center}.cg-layout-horizontal .cg-featured-card-summary ul,.cg-layout-horizontal .cg-featured-card-summary ol,.cg-layout-horizontal .cg-featured-card-summary blockquote{grid-column:2;grid-row:1;margin:0}.cg-layout-horizontal .cg-featured-card-summary>p:not(:first-child){grid-column:2;margin:0 0 0.75rem}}
|
|
1
|
+
.cg-content-list,.cg-content-viewer,.cg-widget{--cg-primary:#3b82f6;--cg-primary-hover:#2563eb;--cg-bg:#ffffff;--cg-bg-secondary:#f9fafb;--cg-text:#1f2937;--cg-text-secondary:#6b7280;--cg-border:#e5e7eb;--cg-shadow:0 1px 3px rgba(0,0,0,0.1);--cg-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.1);--cg-radius:12px;--cg-transition:all 0.2s ease;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size:16px;line-height:1.5;color:var(--cg-text)}.cg-content-list.cg-theme-dark,.cg-content-viewer.cg-theme-dark,.cg-widget[data-theme="dark"]{--cg-primary:#60a5fa;--cg-primary-hover:#3b82f6;--cg-bg:#1f2937;--cg-bg-secondary:#111827;--cg-text:#f9fafb;--cg-text-secondary:#9ca3af;--cg-border:#374151;--cg-shadow:0 1px 3px rgba(0,0,0,0.3);--cg-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.5)}.cg-content-list *,.cg-content-viewer *,.cg-widget *{box-sizing:border-box;margin:0;padding:0}.cg-content-list,.cg-content-viewer,.cg-widget{width:100%;max-width:100%}.cg-content-list{width:100%}.cg-list-header{display:flex;justify-content:flex-end;margin-bottom:1.5rem}.cg-display-toggle{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:var(--cg-radius);color:var(--cg-text);cursor:pointer;transition:var(--cg-transition);font-size:0.875rem}.cg-display-toggle:hover{background:var(--cg-bg);border-color:var(--cg-primary)}.cg-display-toggle svg{width:20px;height:20px}.cg-content-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.5rem;margin-bottom:2rem}@media (max-width:768px){.cg-content-grid{grid-template-columns:1fr}}.cg-content-rows{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}.cg-content-rows .cg-card{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:0.75rem 1.5rem;align-items:start}.cg-content-rows .cg-card-header{grid-column:1 / 2;grid-row:1;display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:0}.cg-content-rows .cg-card-meta{grid-column:1 / 2;grid-row:2;margin-top:0}.cg-content-rows .cg-expand-btn{grid-column:2 / 3;grid-row:1;flex-shrink:0}.cg-content-rows .cg-card-title{margin:0;flex:1}.cg-content-rows .cg-card--compact,.cg-content-rows .cg-card--comfortable,.cg-content-rows .cg-card--spacious{width:100%}@media (max-width:768px){.cg-content-rows .cg-card{grid-template-columns:1fr;grid-template-rows:auto auto}.cg-content-rows .cg-expand-btn{grid-column:1;grid-row:1;justify-self:end}}.cg-card{background:var(--cg-bg);border:1px solid var(--cg-border);border-radius:var(--cg-radius);padding:1.5rem;cursor:pointer;transition:var(--cg-transition);display:block}a.cg-card{text-decoration:none;color:inherit}.cg-card--compact{padding:1rem}.cg-card--compact .cg-card-title{font-size:1rem;line-height:1.4}.cg-card--compact .cg-card-meta{font-size:0.75rem}.cg-card--comfortable{padding:1.5rem}.cg-card--comfortable .cg-card-title{font-size:1.125rem;line-height:1.5}.cg-card--comfortable .cg-card-meta{font-size:0.875rem}.cg-card--spacious{padding:2rem}.cg-card--spacious .cg-card-title{font-size:1.25rem;line-height:1.6}.cg-card--spacious .cg-card-meta{font-size:0.875rem;margin-top:0.75rem}.cg-card:hover{box-shadow:var(--cg-shadow-lg);border-color:var(--cg-primary)}.cg-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}.cg-card-title{font-size:1.25rem;font-weight:600;color:var(--cg-text);line-height:1.4;flex:1}.cg-expand-btn{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:8px;color:var(--cg-text-secondary);cursor:pointer;transition:var(--cg-transition)}.cg-expand-btn:hover{background:var(--cg-primary);color:white;border-color:var(--cg-primary)}.cg-card-summary{margin-bottom:1rem;padding:1rem;background:var(--cg-bg-secondary);border-radius:8px}.cg-card-summary p{color:var(--cg-text-secondary);font-size:0.9375rem;line-height:1.6}.cg-card-tags{display:flex;flex-wrap:wrap;gap:0.5rem;margin-bottom:1rem}.cg-tag{display:inline-block;padding:0.25rem 0.75rem;background:var(--cg-primary);color:white;border-radius:999px;font-size:0.75rem;font-weight:500}.cg-card-meta{display:flex;flex-wrap:wrap;gap:1rem;font-size:0.875rem;color:var(--cg-text-secondary)}.cg-meta-item{display:flex;align-items:center;gap:0.375rem}.cg-meta-item svg{width:14px;height:14px;flex-shrink:0}.cg-pagination{display:flex;align-items:center;justify-content:center;gap:1rem;padding:1.5rem 0}.cg-btn-prev,.cg-btn-next{display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1.5rem;background:var(--cg-primary);color:white;border:none;border-radius:var(--cg-radius);font-weight:500;cursor:pointer;transition:var(--cg-transition)}.cg-btn-prev:hover:not(:disabled),.cg-btn-next:hover:not(:disabled){background:var(--cg-primary-hover);box-shadow:var(--cg-shadow-lg)}.cg-btn-prev:disabled,.cg-btn-next:disabled{opacity:0.5;cursor:not-allowed}.cg-page-info{color:var(--cg-text-secondary);font-size:0.875rem}.cg-content-viewer{width:100%;background:var(--cg-bg);min-height:400px}.cg-viewer-header{margin-bottom:2rem;background:var(--cg-bg)}.cg-back-btn{display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1.5rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:var(--cg-radius);color:var(--cg-text);font-weight:500;cursor:pointer;transition:var(--cg-transition)}.cg-back-btn:hover{background:var(--cg-bg);border-color:var(--cg-primary);color:var(--cg-primary)}.cg-viewer-content{max-width:800px;margin:0 auto;background:var(--cg-bg);padding:1rem}.cg-content-header{margin-bottom:2rem;padding-bottom:2rem;border-bottom:1px solid var(--cg-border)}.cg-content-title{font-size:2.5rem;font-weight:700;line-height:1.2;margin-bottom:1.5rem;color:var(--cg-text)}@media (max-width:768px){.cg-content-title{font-size:2rem}}.cg-content-meta{display:flex;flex-wrap:wrap;gap:1.5rem;color:var(--cg-text-secondary);font-size:0.9375rem}.cg-content-body{color:var(--cg-text);line-height:1.75}.cg-content-body h2{font-size:1.875rem;font-weight:700;margin:2rem 0 1rem;color:var(--cg-text)}.cg-content-body h3{font-size:1.5rem;font-weight:600;margin:1.5rem 0 0.75rem;color:var(--cg-text)}.cg-content-body p{margin-bottom:1.25rem}.cg-content-body ul,.cg-content-body ol{margin-bottom:1.25rem;padding-left:1.5rem}.cg-content-body li{margin-bottom:0.5rem}.cg-content-body a{color:var(--cg-primary);text-decoration:underline}.cg-content-body a:hover{color:var(--cg-primary-hover)}.cg-content-body code{padding:0.125rem 0.375rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:4px;font-size:0.875em;font-family:'Courier New',monospace}.cg-content-body pre{padding:1rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:8px;overflow-x:auto;margin-bottom:1.25rem}.cg-content-body pre code{padding:0;background:none;border:none}.cg-content-body blockquote{padding-left:1rem;border-left:4px solid var(--cg-primary);margin:1.25rem 0;font-style:italic;color:var(--cg-text-secondary)}.cg-content-body img{max-width:100%;height:auto;border-radius:8px;margin:1.25rem 0}.cg-modal{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999;opacity:0;pointer-events:none;transition:opacity 0.3s ease;--cg-primary:#3b82f6;--cg-primary-hover:#2563eb;--cg-bg:#ffffff;--cg-bg-secondary:#f9fafb;--cg-text:#1f2937;--cg-text-secondary:#6b7280;--cg-border:#e5e7eb;--cg-shadow:0 1px 3px rgba(0,0,0,0.1);--cg-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.1);--cg-radius:12px;--cg-transition:all 0.2s ease;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif}.cg-modal--active{opacity:1;pointer-events:auto}.cg-modal[data-theme="dark"]{--cg-primary:#60a5fa;--cg-primary-hover:#3b82f6;--cg-bg:#1f2937;--cg-bg-secondary:#111827;--cg-text:#f9fafb;--cg-text-secondary:#9ca3af;--cg-border:#374151;--cg-shadow:0 1px 3px rgba(0,0,0,0.3);--cg-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.5)}.cg-modal-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.8);cursor:pointer}.cg-modal-content{position:relative;max-width:900px;max-height:90vh;margin:5vh auto;background:var(--cg-bg);border-radius:var(--cg-radius);overflow-y:auto;box-shadow:0 25px 50px -12px rgba(0,0,0,0.5);z-index:10;opacity:1 !important}.cg-modal-close{position:sticky;top:1rem;right:1rem;float:right;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:var(--cg-bg);border:1px solid var(--cg-border);border-radius:50%;color:var(--cg-text);cursor:pointer;transition:var(--cg-transition);z-index:10}.cg-modal-close:hover{background:var(--cg-primary);color:white;border-color:var(--cg-primary)}.cg-modal-body{padding:2rem;background:var(--cg-bg);min-height:200px}.cg-loading,.cg-viewer-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;text-align:center}.cg-spinner{width:48px;height:48px;border:4px solid var(--cg-border);border-top-color:var(--cg-primary);border-radius:50%;animation:cg-spin 0.8s linear infinite;margin-bottom:1rem}@keyframes cg-spin{to{transform:rotate(360deg)}}.cg-loading p,.cg-viewer-loading p{color:var(--cg-text-secondary)}.cg-error,.cg-viewer-error{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;text-align:center}.cg-error svg,.cg-viewer-error svg{color:#ef4444;margin-bottom:1rem}.cg-error p,.cg-viewer-error p{color:var(--cg-text);margin-bottom:1.5rem}.cg-retry-btn{padding:0.75rem 1.5rem;background:var(--cg-primary);color:white;border:none;border-radius:var(--cg-radius);font-weight:500;cursor:pointer;transition:var(--cg-transition)}.cg-retry-btn:hover{background:var(--cg-primary-hover)}.cg-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;text-align:center}.cg-empty-state svg{color:var(--cg-text-secondary);margin-bottom:1rem}.cg-empty-state p{color:var(--cg-text-secondary);margin-top:1rem}.cg-articles-grid.cg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.5rem;margin-bottom:2rem}.cg-articles-grid.cg-list{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}.cg-articles-grid.cg-featured-cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr));gap:2rem;margin-bottom:2rem}.cg-articles-grid.cg-featured-cards-grid .cg-featured-card{height:100%}@media (max-width:768px){.cg-articles-grid.cg-grid{grid-template-columns:1fr}.cg-articles-grid.cg-featured-cards-grid{grid-template-columns:1fr;gap:1.5rem}}.cg-article-card{background:var(--cg-bg);border:1px solid var(--cg-border);border-radius:var(--cg-radius);overflow:hidden;transition:var(--cg-transition)}.cg-article-card:hover{box-shadow:var(--cg-shadow-lg);transform:translateY(-2px)}.cg-card-link{display:block;text-decoration:none;color:inherit}.cg-card-content{padding:1.5rem}.cg-display-compact .cg-card-content{padding:1rem}.cg-display-spacious .cg-card-content{padding:2rem}.cg-card-category{margin-bottom:0.75rem}.cg-category-badge{display:inline-block;padding:0.25rem 0.75rem;background:var(--cg-primary);color:white;border-radius:9999px;font-size:0.75rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em}.cg-card-title{font-size:1.25rem;font-weight:600;line-height:1.4;margin-bottom:0.75rem;color:var(--cg-text)}.cg-display-compact .cg-card-title{font-size:1.1rem}.cg-display-spacious .cg-card-title{font-size:1.5rem}.cg-card-summary{color:var(--cg-text-secondary);line-height:1.6;margin-bottom:1rem;font-size:0.95rem}.cg-card-meta{display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;color:var(--cg-text-secondary);margin-bottom:1rem}.cg-meta-separator{color:var(--cg-border)}.cg-card-tags{display:flex;flex-wrap:wrap;gap:0.5rem}.cg-tag{padding:0.25rem 0.75rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:9999px;font-size:0.75rem;color:var(--cg-text-secondary)}.cg-content-header-back{margin-bottom:2rem}.cg-back-btn{display:inline-flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;background:var(--cg-bg-secondary);border:1px solid var(--cg-border);border-radius:var(--cg-radius);color:var(--cg-text);text-decoration:none;font-size:0.875rem;transition:var(--cg-transition)}.cg-back-btn:hover{background:var(--cg-bg);border-color:var(--cg-primary);color:var(--cg-primary)}.cg-back-btn svg{width:20px;height:20px}.cg-content-header{margin-bottom:3rem;padding-bottom:2rem;border-bottom:1px solid var(--cg-border)}.cg-content-category{margin-bottom:1rem}.cg-content-title{font-size:2.5rem;font-weight:700;line-height:1.2;margin-bottom:1rem;color:var(--cg-text)}@media (max-width:768px){.cg-content-title{font-size:2rem}}.cg-content-summary{font-size:1.125rem;line-height:1.6;color:var(--cg-text-secondary);margin-bottom:1.5rem}.cg-ai-summary{background:linear-gradient(to right,#eff6ff,#dbeafe);border-left:4px solid #3b82f6;border-radius:0 var(--cg-radius) var(--cg-radius) 0;padding:1rem 1.25rem;margin-bottom:1.5rem}.cg-theme-dark .cg-ai-summary{background:linear-gradient(to right,#1e3a5f,#1e40af);border-left-color:#60a5fa}.cg-ai-summary-header{display:flex;align-items:center;gap:0.5rem;margin-bottom:0.5rem}.cg-ai-summary-icon{width:1rem;height:1rem;color:#2563eb}.cg-theme-dark .cg-ai-summary-icon{color:#60a5fa}.cg-ai-summary-label{font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#1d4ed8}.cg-theme-dark .cg-ai-summary-label{color:#93c5fd}.cg-ai-summary-text{font-size:0.875rem;font-style:italic;line-height:1.6;color:#374151}.cg-theme-dark .cg-ai-summary-text{color:#d1d5db}.cg-content-meta{display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap;font-size:0.875rem;color:var(--cg-text-secondary)}.cg-info-separator{color:var(--cg-border)}.cg-content-tags{display:flex;flex-wrap:wrap;gap:0.5rem;margin-top:1rem}.cg-content-body{max-width:100%;color:var(--cg-text)}.cg-empty-state p{color:var(--cg-text-secondary);font-size:1.125rem}.cg-featured-card{--cg-card-border-color:#e5e7eb;--cg-card-bg:transparent;--cg-items-bg:#f3f4f6;display:block;text-decoration:none;color:inherit;border-radius:12px;background:var(--cg-card-bg);border:none;transition:all 0.2s ease;overflow:hidden}.cg-featured-card.cg-border-line{border:1px solid var(--cg-card-border-color)}.cg-featured-card.cg-border-dashed{border:2px dashed var(--cg-card-border-color)}.cg-featured-card:hover{border-color:var(--cg-primary)}.cg-featured-card-inner{padding:var(--cg-card-padding,2rem 2.5rem);height:100%;display:flex;flex-direction:column}.cg-featured-card-category{margin-bottom:1.25rem}.cg-category-badge{display:inline-block;padding:0.25rem 0.75rem;background:#eff6ff;color:var(--cg-primary);border-radius:4px;font-size:0.75rem;font-weight:600}.cg-featured-card-title{margin:0 0 1rem;font-size:1.625rem;font-weight:800;line-height:1.25;color:var(--cg-text);letter-spacing:-0.02em}.cg-featured-card-summary{font-size:1rem;line-height:1.7;color:var(--cg-text-secondary);margin-bottom:1.5rem;flex-grow:1}.cg-featured-card-summary p{margin:0 0 1rem}.cg-featured-card-summary p:last-child{margin:0}.cg-featured-card-summary strong,.cg-featured-card-summary b{font-weight:700;color:var(--cg-text)}.cg-featured-card-footer{display:flex;align-items:center;font-size:0.875rem;font-weight:500;color:var(--cg-text-secondary);margin-bottom:1rem}.cg-featured-card-separator{margin:0 0.5rem;opacity:0.4}.cg-featured-card-cta{display:inline-flex;align-items:center;gap:0.375rem;font-size:1rem;font-weight:600;color:var(--cg-primary);text-decoration:none;transition:all 0.2s ease;align-self:flex-start}.cg-featured-card:hover .cg-featured-card-cta{gap:0.625rem;text-decoration:underline}.cg-featured-card-arrow{transition:transform 0.2s ease}.cg-featured-card:hover .cg-featured-card-arrow{transform:translateX(3px)}.cg-featured-card-summary>p:first-child{font-size:1rem;line-height:1.7}.cg-summary-items{margin:0;padding:1rem 1.25rem;list-style:none;background:var(--cg-items-bg);border-radius:8px}.cg-summary-items li{display:flex;gap:0.75rem;margin-bottom:1rem;line-height:1.5}.cg-summary-items li:last-child{margin-bottom:0}.cg-summary-items li::before{display:none}.cg-item-number{flex-shrink:0;width:1.5rem;height:1.5rem;background:var(--cg-primary);color:white;border-radius:4px;font-size:0.75rem;font-weight:700;display:flex;align-items:center;justify-content:center;margin-top:0.125rem}.cg-item-content{flex:1;min-width:0}.cg-item-title{display:block;font-size:0.9375rem;font-weight:600;color:var(--cg-text);margin-bottom:0.125rem}.cg-item-description{display:block;font-size:0.875rem;color:var(--cg-text-secondary);line-height:1.5}.cg-featured-card-summary blockquote{margin:0;padding:1.25rem 1.5rem;border-left:3px solid var(--cg-primary);background:var(--cg-items-bg);border-radius:0 8px 8px 0;font-style:italic;font-size:1.0625rem;line-height:1.7;color:var(--cg-text)}.cg-featured-card-summary ul,.cg-featured-card-summary ol{margin:0;padding:1rem 1.25rem;list-style:none;background:var(--cg-items-bg);border-radius:8px;counter-reset:item}.cg-featured-card-summary ul li,.cg-featured-card-summary ol li{display:flex;gap:0.75rem;margin-bottom:1rem;line-height:1.6;font-size:0.875rem;color:var(--cg-text-secondary)}.cg-featured-card-summary ul li:last-child,.cg-featured-card-summary ol li:last-child{margin-bottom:0}.cg-featured-card-summary ul li::before,.cg-featured-card-summary ol li::before{content:counter(item);counter-increment:item;flex-shrink:0;width:1.5rem;height:1.5rem;background:var(--cg-primary);color:white;border-radius:4px;font-size:0.75rem;font-weight:700;display:flex;align-items:center;justify-content:center;margin-top:0.125rem}.cg-featured-card-summary li strong{font-size:0.9375rem;font-weight:600;color:var(--cg-text)}.cg-summary-items li::before{content:none !important;display:none !important}.cg-card-primary{display:flex;flex-direction:column}.cg-card-secondary{margin-top:1.5rem}.cg-card-secondary blockquote{font-size:1.5rem;line-height:1.4;font-weight:500;font-style:italic;color:#1f2937;border:none;position:relative;padding-left:3.5rem;margin:0;display:flex;flex-direction:column;justify-content:center;min-height:120px}.cg-card-secondary blockquote::before{content:'“';position:absolute;left:-0.5rem;top:-1.5rem;font-size:6rem;color:var(--cg-primary,#3b82f6);font-family:serif;line-height:1}.cg-featured-card-cta{margin-top:1.5rem}@media (min-width:768px){.cg-layout-horizontal .cg-featured-card-inner{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;gap:1.5rem 3rem;padding:var(--cg-card-padding,2.5rem 3rem);align-items:start}.cg-layout-horizontal .cg-card-primary{grid-column:1;grid-row:1}.cg-layout-horizontal .cg-featured-card-cta{grid-column:1;grid-row:2;margin-top:0;align-self:end}.cg-layout-horizontal .cg-card-secondary{grid-column:2;grid-row:1 / span 2;margin-top:0;display:flex;flex-direction:column;justify-content:center;height:100%}.cg-layout-horizontal .cg-card-secondary blockquote{height:auto}.cg-layout-horizontal .cg-featured-card-title{font-size:1.875rem;margin-bottom:1rem}.cg-layout-horizontal .cg-featured-card-summary{margin-bottom:1.5rem}}
|