@contentgrowth/content-widget 1.3.1 → 1.3.3

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.
@@ -19,7 +19,7 @@
19
19
  --cg-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
20
20
  --cg-radius: 12px;
21
21
  --cg-transition: all 0.2s ease;
22
-
22
+
23
23
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
24
24
  font-size: 16px;
25
25
  line-height: 1.5;
@@ -166,7 +166,7 @@
166
166
  grid-template-columns: 1fr;
167
167
  grid-template-rows: auto auto;
168
168
  }
169
-
169
+
170
170
  .cg-content-rows .cg-expand-btn {
171
171
  grid-column: 1;
172
172
  grid-row: 1;
@@ -635,7 +635,9 @@ a.cg-card {
635
635
  }
636
636
 
637
637
  @keyframes cg-spin {
638
- to { transform: rotate(360deg); }
638
+ to {
639
+ transform: rotate(360deg);
640
+ }
639
641
  }
640
642
 
641
643
  .cg-loading p,
@@ -968,3 +970,262 @@ a.cg-card {
968
970
  color: var(--cg-text-secondary);
969
971
  font-size: 1.125rem;
970
972
  }
973
+
974
+ /* ===== Featured Card Component ===== */
975
+ .cg-featured-card {
976
+ /* Custom property defaults */
977
+ --cg-card-border-color: #e5e7eb;
978
+ --cg-card-bg: transparent;
979
+ --cg-items-bg: #f3f4f6;
980
+
981
+ display: block;
982
+ text-decoration: none;
983
+ color: inherit;
984
+ border-radius: 12px;
985
+ background: var(--cg-card-bg);
986
+ border: none;
987
+ transition: all 0.2s ease;
988
+ overflow: hidden;
989
+ }
990
+
991
+ /* Border style variants */
992
+ .cg-featured-card.cg-border-line {
993
+ border: 1px solid var(--cg-card-border-color);
994
+ }
995
+
996
+ .cg-featured-card.cg-border-dashed {
997
+ border: 2px dashed var(--cg-card-border-color);
998
+ }
999
+
1000
+ .cg-featured-card:hover {
1001
+ border-color: var(--cg-primary);
1002
+ }
1003
+
1004
+ .cg-featured-card-inner {
1005
+ padding: 2rem 2.5rem;
1006
+ height: 100%;
1007
+ display: flex;
1008
+ flex-direction: column;
1009
+ }
1010
+
1011
+ .cg-featured-card-category {
1012
+ margin-bottom: 1.25rem;
1013
+ }
1014
+
1015
+ .cg-category-badge {
1016
+ display: inline-block;
1017
+ padding: 0.25rem 0.75rem;
1018
+ background: #eff6ff;
1019
+ color: var(--cg-primary);
1020
+ border-radius: 4px;
1021
+ font-size: 0.75rem;
1022
+ font-weight: 600;
1023
+ }
1024
+
1025
+ .cg-featured-card-title {
1026
+ margin: 0 0 1rem;
1027
+ font-size: 1.625rem;
1028
+ font-weight: 800;
1029
+ line-height: 1.25;
1030
+ color: var(--cg-text);
1031
+ letter-spacing: -0.02em;
1032
+ }
1033
+
1034
+ .cg-featured-card-summary {
1035
+ font-size: 1rem;
1036
+ line-height: 1.7;
1037
+ color: var(--cg-text-secondary);
1038
+ margin-bottom: 1.5rem;
1039
+ flex-grow: 1;
1040
+ }
1041
+
1042
+ .cg-featured-card-summary p {
1043
+ margin: 0 0 1rem;
1044
+ }
1045
+
1046
+ .cg-featured-card-summary p:last-child {
1047
+ margin: 0;
1048
+ }
1049
+
1050
+ .cg-featured-card-summary strong,
1051
+ .cg-featured-card-summary b {
1052
+ font-weight: 700;
1053
+ color: var(--cg-text);
1054
+ }
1055
+
1056
+ .cg-featured-card-footer {
1057
+ display: flex;
1058
+ align-items: center;
1059
+ font-size: 0.875rem;
1060
+ font-weight: 500;
1061
+ color: var(--cg-text-secondary);
1062
+ margin-bottom: 1rem;
1063
+ }
1064
+
1065
+ .cg-featured-card-separator {
1066
+ margin: 0 0.5rem;
1067
+ opacity: 0.4;
1068
+ }
1069
+
1070
+ /* CTA: Simple text link style */
1071
+ .cg-featured-card-cta {
1072
+ display: inline-flex;
1073
+ align-items: center;
1074
+ gap: 0.375rem;
1075
+ font-size: 1rem;
1076
+ font-weight: 600;
1077
+ color: var(--cg-primary);
1078
+ text-decoration: none;
1079
+ transition: all 0.2s ease;
1080
+ align-self: flex-start;
1081
+ }
1082
+
1083
+ .cg-featured-card:hover .cg-featured-card-cta {
1084
+ gap: 0.625rem;
1085
+ text-decoration: underline;
1086
+ }
1087
+
1088
+ .cg-featured-card-arrow {
1089
+ transition: transform 0.2s ease;
1090
+ }
1091
+
1092
+ .cg-featured-card:hover .cg-featured-card-arrow {
1093
+ transform: translateX(3px);
1094
+ }
1095
+
1096
+ /* ===== Featured Summary Template Styles ===== */
1097
+
1098
+ /* Intro paragraph styling */
1099
+ .cg-featured-card-summary>p:first-child {
1100
+ font-size: 1rem;
1101
+ line-height: 1.7;
1102
+ }
1103
+
1104
+ /* List & Steps Template - Styled like reference */
1105
+ .cg-featured-card-summary ul,
1106
+ .cg-featured-card-summary ol {
1107
+ margin: 0;
1108
+ padding: 1.25rem 1.5rem;
1109
+ padding-left: 1.5rem;
1110
+ list-style: none;
1111
+ background: var(--cg-items-bg);
1112
+ border-radius: 8px;
1113
+ }
1114
+
1115
+ .cg-featured-card-summary li {
1116
+ margin-bottom: 1.25rem;
1117
+ padding-left: 2.5rem;
1118
+ line-height: 1.5;
1119
+ position: relative;
1120
+ }
1121
+
1122
+ .cg-featured-card-summary li:last-child {
1123
+ margin-bottom: 0;
1124
+ }
1125
+
1126
+ /* Unordered list: simple bullets */
1127
+ .cg-featured-card-summary ul li::before {
1128
+ content: '';
1129
+ position: absolute;
1130
+ left: 0.5rem;
1131
+ top: 0.5rem;
1132
+ width: 6px;
1133
+ height: 6px;
1134
+ background: var(--cg-primary);
1135
+ border-radius: 50%;
1136
+ }
1137
+
1138
+ /* Ordered list: numbered circles like reference */
1139
+ .cg-featured-card-summary ol {
1140
+ counter-reset: item;
1141
+ }
1142
+
1143
+ .cg-featured-card-summary ol li::before {
1144
+ content: counter(item);
1145
+ counter-increment: item;
1146
+ position: absolute;
1147
+ left: 0;
1148
+ top: 0;
1149
+ width: 1.5rem;
1150
+ height: 1.5rem;
1151
+ background: var(--cg-primary);
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
+ }
1160
+
1161
+ /* List item content: bold title + description on next line */
1162
+ .cg-featured-card-summary li strong {
1163
+ display: block;
1164
+ font-size: 0.9375rem;
1165
+ font-weight: 700;
1166
+ color: var(--cg-text);
1167
+ margin-bottom: 0.125rem;
1168
+ }
1169
+
1170
+ /* Quote Template */
1171
+ .cg-featured-card-summary blockquote {
1172
+ margin: 0;
1173
+ padding: 1rem 1.25rem;
1174
+ border-left: 3px solid var(--cg-primary);
1175
+ background: var(--cg-bg-secondary);
1176
+ border-radius: 0 8px 8px 0;
1177
+ font-style: italic;
1178
+ font-size: 1rem;
1179
+ color: var(--cg-text);
1180
+ }
1181
+
1182
+ /* ===== Horizontal Layout ===== */
1183
+ /* Horizontal layout: intro paragraph on left, list/remaining content on right */
1184
+
1185
+ @media (min-width: 768px) {
1186
+ .cg-layout-horizontal .cg-featured-card-inner {
1187
+ padding: 2.5rem 3rem;
1188
+ }
1189
+
1190
+ .cg-layout-horizontal .cg-featured-card-title {
1191
+ font-size: 1.875rem;
1192
+ }
1193
+
1194
+ /* Only the summary content gets the horizontal grid */
1195
+ .cg-layout-horizontal .cg-featured-card-summary {
1196
+ display: grid;
1197
+ grid-template-columns: 1fr 1.25fr;
1198
+ gap: 2.5rem;
1199
+ align-items: stretch;
1200
+ /* Changed from start to stretch for balance */
1201
+ }
1202
+
1203
+ /* First paragraph (intro) stays on left - improved styling */
1204
+ .cg-layout-horizontal .cg-featured-card-summary>p:first-child {
1205
+ grid-column: 1;
1206
+ grid-row: 1;
1207
+ margin: 0;
1208
+ font-size: 1.0625rem;
1209
+ line-height: 1.8;
1210
+ color: var(--cg-text-secondary);
1211
+ display: flex;
1212
+ flex-direction: column;
1213
+ justify-content: center;
1214
+ /* Vertically center the text */
1215
+ }
1216
+
1217
+ /* List/quote goes on right */
1218
+ .cg-layout-horizontal .cg-featured-card-summary ul,
1219
+ .cg-layout-horizontal .cg-featured-card-summary ol,
1220
+ .cg-layout-horizontal .cg-featured-card-summary blockquote {
1221
+ grid-column: 2;
1222
+ grid-row: 1;
1223
+ margin: 0;
1224
+ }
1225
+
1226
+ /* If no list, additional paragraphs go on right */
1227
+ .cg-layout-horizontal .cg-featured-card-summary>p:not(:first-child) {
1228
+ grid-column: 2;
1229
+ margin: 0 0 0.75rem;
1230
+ }
1231
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Content Growth Widget - Standalone Bundle
3
- * Version: 1.3.1
3
+ * Version: 1.3.3
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.1';
3517
+ static version = '1.3.3';
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.1');
3829
+ console.log('[ContentGrowthWidget] Loaded successfully v1.3.3');
3830
3830
 
3831
3831
  })(window);