@sp-days-framework/docusaurus-frontpage-collection 1.0.2
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/LICENSE +21 -0
- package/README.md +339 -0
- package/lib/components/Block/index.d.ts +22 -0
- package/lib/components/Block/index.d.ts.map +1 -0
- package/lib/components/Block/index.js +32 -0
- package/lib/components/Block/index.js.map +1 -0
- package/lib/components/Block/styles.module.css +26 -0
- package/lib/components/Columns/index.d.ts +68 -0
- package/lib/components/Columns/index.d.ts.map +1 -0
- package/lib/components/Columns/index.js +119 -0
- package/lib/components/Columns/index.js.map +1 -0
- package/lib/components/Columns/styles.module.css +196 -0
- package/lib/components/CourseFeature/index.d.ts +99 -0
- package/lib/components/CourseFeature/index.d.ts.map +1 -0
- package/lib/components/CourseFeature/index.js +188 -0
- package/lib/components/CourseFeature/index.js.map +1 -0
- package/lib/components/CourseFeature/styles.module.css +204 -0
- package/lib/components/FancyHeader/index.d.ts +24 -0
- package/lib/components/FancyHeader/index.d.ts.map +1 -0
- package/lib/components/FancyHeader/index.js +32 -0
- package/lib/components/FancyHeader/index.js.map +1 -0
- package/lib/components/FancyHeader/styles.module.css +23 -0
- package/lib/components/GetStarted/index.d.ts +99 -0
- package/lib/components/GetStarted/index.d.ts.map +1 -0
- package/lib/components/GetStarted/index.js +127 -0
- package/lib/components/GetStarted/index.js.map +1 -0
- package/lib/components/GetStarted/styles.module.css +174 -0
- package/lib/components/HeroBanner/DotCrossGrid.d.ts +25 -0
- package/lib/components/HeroBanner/DotCrossGrid.d.ts.map +1 -0
- package/lib/components/HeroBanner/DotCrossGrid.js +283 -0
- package/lib/components/HeroBanner/DotCrossGrid.js.map +1 -0
- package/lib/components/HeroBanner/DotCrossGrid.module.css +9 -0
- package/lib/components/HeroBanner/index.d.ts +42 -0
- package/lib/components/HeroBanner/index.d.ts.map +1 -0
- package/lib/components/HeroBanner/index.js +116 -0
- package/lib/components/HeroBanner/index.js.map +1 -0
- package/lib/components/HeroBanner/styles.module.css +204 -0
- package/lib/components/IconContainer/index.d.ts +76 -0
- package/lib/components/IconContainer/index.d.ts.map +1 -0
- package/lib/components/IconContainer/index.js +119 -0
- package/lib/components/IconContainer/index.js.map +1 -0
- package/lib/components/IconContainer/styles.module.css +147 -0
- package/lib/components/Iconify/index.d.ts +56 -0
- package/lib/components/Iconify/index.d.ts.map +1 -0
- package/lib/components/Iconify/index.js +88 -0
- package/lib/components/Iconify/index.js.map +1 -0
- package/lib/components/Iconify/styles.module.css +30 -0
- package/lib/index.d.ts +36 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +73 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/IconifyIcon.d.ts +17 -0
- package/lib/utils/IconifyIcon.d.ts.map +1 -0
- package/lib/utils/IconifyIcon.js +26 -0
- package/lib/utils/IconifyIcon.js.map +1 -0
- package/lib/utils/InlineSvg.d.ts +29 -0
- package/lib/utils/InlineSvg.d.ts.map +1 -0
- package/lib/utils/InlineSvg.js +90 -0
- package/lib/utils/InlineSvg.js.map +1 -0
- package/lib/utils/ThemedIcon.d.ts +61 -0
- package/lib/utils/ThemedIcon.d.ts.map +1 -0
- package/lib/utils/ThemedIcon.js +128 -0
- package/lib/utils/ThemedIcon.js.map +1 -0
- package/lib/utils/constants.d.ts +23 -0
- package/lib/utils/constants.d.ts.map +1 -0
- package/lib/utils/constants.js +36 -0
- package/lib/utils/constants.js.map +1 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +19 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/logger.d.ts +21 -0
- package/lib/utils/logger.d.ts.map +1 -0
- package/lib/utils/logger.js +38 -0
- package/lib/utils/logger.js.map +1 -0
- package/lib/utils/types.d.ts +129 -0
- package/lib/utils/types.d.ts.map +1 -0
- package/lib/utils/types.js +6 -0
- package/lib/utils/types.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.DotCrossGrid = void 0;
|
|
40
|
+
const react_1 = __importStar(require("react"));
|
|
41
|
+
const gsap_1 = require("gsap");
|
|
42
|
+
const DotCrossGrid_module_css_1 = __importDefault(require("./DotCrossGrid.module.css"));
|
|
43
|
+
/**
|
|
44
|
+
* DotCrossGrid - Simple implementation
|
|
45
|
+
*
|
|
46
|
+
* User interaction: Mouse creates crosses that auto-fade after 500ms
|
|
47
|
+
* Idle animation: Crosses appear in edges, fade after 2500ms
|
|
48
|
+
*/
|
|
49
|
+
const DotCrossGrid = ({ dotSize = 6, gap = 5, color = '#ffffff', pointerRadius = 80, pointerInnerIntensity = 0.008, pointerOuterIntensity = 0.002, maxOpacity = 0.7, minOpacity = 0.1, randomOpacity = true, idleEnabled = true, idleAreaWidth = 220, idleInterval = 2500, idleIntensity = 42, }) => {
|
|
50
|
+
const canvasRef = (0, react_1.useRef)(null);
|
|
51
|
+
const dotsMapRef = (0, react_1.useRef)(new Map());
|
|
52
|
+
const rafRef = (0, react_1.useRef)();
|
|
53
|
+
const idleIntervalRef = (0, react_1.useRef)();
|
|
54
|
+
const idleTimeoutsRef = (0, react_1.useRef)([]);
|
|
55
|
+
const gridSpacing = dotSize + gap;
|
|
56
|
+
/**
|
|
57
|
+
* Get or create dot at grid position
|
|
58
|
+
*/
|
|
59
|
+
const getOrCreateDot = (gridX, gridY) => {
|
|
60
|
+
const key = `${gridX},${gridY}`;
|
|
61
|
+
let dot = dotsMapRef.current.get(key);
|
|
62
|
+
if (!dot) {
|
|
63
|
+
dot = {
|
|
64
|
+
x: gridX * gridSpacing,
|
|
65
|
+
y: gridY * gridSpacing,
|
|
66
|
+
gridX,
|
|
67
|
+
gridY,
|
|
68
|
+
opacity: 0,
|
|
69
|
+
};
|
|
70
|
+
dotsMapRef.current.set(key, dot);
|
|
71
|
+
}
|
|
72
|
+
return dot;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Create a cross pattern (5 dots) at grid position
|
|
76
|
+
*/
|
|
77
|
+
const createCross = (gridX, gridY, isIdle) => {
|
|
78
|
+
const dots = [
|
|
79
|
+
getOrCreateDot(gridX, gridY),
|
|
80
|
+
getOrCreateDot(gridX, gridY - 1),
|
|
81
|
+
getOrCreateDot(gridX, gridY + 1),
|
|
82
|
+
getOrCreateDot(gridX - 1, gridY),
|
|
83
|
+
getOrCreateDot(gridX + 1, gridY),
|
|
84
|
+
];
|
|
85
|
+
// Calculate target opacity ONCE for the entire cross
|
|
86
|
+
let targetOpacity;
|
|
87
|
+
if (randomOpacity) {
|
|
88
|
+
// Random opacity between min and max for this cross
|
|
89
|
+
targetOpacity = minOpacity + Math.random() * (maxOpacity - minOpacity);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
targetOpacity = isIdle ? minOpacity : maxOpacity;
|
|
93
|
+
}
|
|
94
|
+
const fadeDelay = isIdle ? 2500 : 500;
|
|
95
|
+
// Apply the same opacity to all 5 dots in this cross
|
|
96
|
+
dots.forEach(dot => {
|
|
97
|
+
// Clear existing fade timeout
|
|
98
|
+
if (dot.fadeTimeout) {
|
|
99
|
+
clearTimeout(dot.fadeTimeout);
|
|
100
|
+
}
|
|
101
|
+
// Fade in to the SAME target opacity for all dots
|
|
102
|
+
gsap_1.gsap.to(dot, {
|
|
103
|
+
opacity: targetOpacity,
|
|
104
|
+
duration: 0.3,
|
|
105
|
+
ease: 'power2.out',
|
|
106
|
+
overwrite: true,
|
|
107
|
+
});
|
|
108
|
+
// Schedule fade out (store the target for reference)
|
|
109
|
+
const finalTarget = targetOpacity;
|
|
110
|
+
dot.fadeTimeout = setTimeout(() => {
|
|
111
|
+
gsap_1.gsap.to(dot, {
|
|
112
|
+
opacity: 0,
|
|
113
|
+
duration: 0.6,
|
|
114
|
+
ease: 'power2.out',
|
|
115
|
+
overwrite: true,
|
|
116
|
+
});
|
|
117
|
+
}, fadeDelay);
|
|
118
|
+
});
|
|
119
|
+
}; /**
|
|
120
|
+
* Handle mouse move - create crosses around mouse with intensity falloff
|
|
121
|
+
*/
|
|
122
|
+
const handleMouseMove = (e) => {
|
|
123
|
+
const canvas = canvasRef.current;
|
|
124
|
+
if (!canvas)
|
|
125
|
+
return;
|
|
126
|
+
const rect = canvas.getBoundingClientRect();
|
|
127
|
+
const mouseX = e.clientX - rect.left;
|
|
128
|
+
const mouseY = e.clientY - rect.top;
|
|
129
|
+
const centerGridX = Math.floor(mouseX / gridSpacing);
|
|
130
|
+
const centerGridY = Math.floor(mouseY / gridSpacing);
|
|
131
|
+
// Create crosses probabilistically based on distance from mouse (including center)
|
|
132
|
+
const searchRadius = Math.ceil(pointerRadius / gridSpacing);
|
|
133
|
+
for (let dx = -searchRadius; dx <= searchRadius; dx++) {
|
|
134
|
+
for (let dy = -searchRadius; dy <= searchRadius; dy++) {
|
|
135
|
+
const distance = Math.sqrt(dx * dx + dy * dy) * gridSpacing;
|
|
136
|
+
if (distance <= pointerRadius) {
|
|
137
|
+
// Calculate intensity based on distance (linear falloff)
|
|
138
|
+
const normalizedDistance = distance / pointerRadius;
|
|
139
|
+
const intensity = pointerInnerIntensity +
|
|
140
|
+
(pointerOuterIntensity - pointerInnerIntensity) * normalizedDistance;
|
|
141
|
+
// Random chance based on intensity (including center position)
|
|
142
|
+
if (Math.random() < intensity) {
|
|
143
|
+
createCross(centerGridX + dx, centerGridY + dy, false);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Idle animation - create random crosses at edges sequentially
|
|
151
|
+
*/
|
|
152
|
+
const idlePulse = () => {
|
|
153
|
+
if (!idleEnabled)
|
|
154
|
+
return;
|
|
155
|
+
const canvas = canvasRef.current;
|
|
156
|
+
if (!canvas)
|
|
157
|
+
return;
|
|
158
|
+
const rect = canvas.getBoundingClientRect();
|
|
159
|
+
// Clear any existing scheduled timeouts
|
|
160
|
+
idleTimeoutsRef.current.forEach(timeout => clearTimeout(timeout));
|
|
161
|
+
idleTimeoutsRef.current = [];
|
|
162
|
+
// Calculate delay between each cross
|
|
163
|
+
const delayBetweenCrosses = idleInterval / idleIntensity;
|
|
164
|
+
// Create crosses one-by-one with calculated delays
|
|
165
|
+
for (let i = 0; i < idleIntensity; i++) {
|
|
166
|
+
const timeout = setTimeout(() => {
|
|
167
|
+
const isLeft = Math.random() < 0.5;
|
|
168
|
+
const maxAreaWidth = Math.min(idleAreaWidth, rect.width * 0.2);
|
|
169
|
+
// Generate a weighted random position within the idle area
|
|
170
|
+
// Use power distribution to favor edges (far from center)
|
|
171
|
+
// Higher values = more edge-weighted (2.5 gives roughly 80/20 distribution)
|
|
172
|
+
const randomFactor = Math.pow(Math.random(), 2.5);
|
|
173
|
+
const distanceFromEdge = randomFactor * maxAreaWidth;
|
|
174
|
+
const x = isLeft
|
|
175
|
+
? distanceFromEdge
|
|
176
|
+
: rect.width - distanceFromEdge;
|
|
177
|
+
const y = Math.random() * rect.height;
|
|
178
|
+
const gridX = Math.floor(x / gridSpacing);
|
|
179
|
+
const gridY = Math.floor(y / gridSpacing);
|
|
180
|
+
createCross(gridX, gridY, true);
|
|
181
|
+
}, i * delayBetweenCrosses);
|
|
182
|
+
idleTimeoutsRef.current.push(timeout);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Render loop
|
|
187
|
+
*/
|
|
188
|
+
const render = () => {
|
|
189
|
+
const canvas = canvasRef.current;
|
|
190
|
+
if (!canvas)
|
|
191
|
+
return;
|
|
192
|
+
const ctx = canvas.getContext('2d');
|
|
193
|
+
if (!ctx)
|
|
194
|
+
return;
|
|
195
|
+
// Clear using CSS pixel dimensions (context is already scaled by DPR)
|
|
196
|
+
const parent = canvas.parentElement;
|
|
197
|
+
if (!parent)
|
|
198
|
+
return;
|
|
199
|
+
const rect = parent.getBoundingClientRect();
|
|
200
|
+
ctx.clearRect(0, 0, rect.width, rect.height);
|
|
201
|
+
// Draw all dots
|
|
202
|
+
dotsMapRef.current.forEach(dot => {
|
|
203
|
+
if (dot.opacity > 0.01) {
|
|
204
|
+
ctx.fillStyle = color;
|
|
205
|
+
ctx.globalAlpha = dot.opacity;
|
|
206
|
+
ctx.beginPath();
|
|
207
|
+
ctx.arc(dot.x, dot.y, dotSize / 2, 0, Math.PI * 2);
|
|
208
|
+
ctx.fill();
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
ctx.globalAlpha = 1;
|
|
212
|
+
rafRef.current = requestAnimationFrame(render);
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Setup
|
|
216
|
+
*/
|
|
217
|
+
(0, react_1.useEffect)(() => {
|
|
218
|
+
const canvas = canvasRef.current;
|
|
219
|
+
if (!canvas)
|
|
220
|
+
return;
|
|
221
|
+
// Size canvas
|
|
222
|
+
const resizeCanvas = () => {
|
|
223
|
+
const parent = canvas.parentElement;
|
|
224
|
+
if (!parent)
|
|
225
|
+
return;
|
|
226
|
+
// Clear all existing dots and animations before resize
|
|
227
|
+
dotsMapRef.current.forEach(dot => {
|
|
228
|
+
if (dot.fadeTimeout) {
|
|
229
|
+
clearTimeout(dot.fadeTimeout);
|
|
230
|
+
}
|
|
231
|
+
gsap_1.gsap.killTweensOf(dot);
|
|
232
|
+
});
|
|
233
|
+
dotsMapRef.current.clear();
|
|
234
|
+
const rect = parent.getBoundingClientRect();
|
|
235
|
+
const dpr = window.devicePixelRatio || 1;
|
|
236
|
+
canvas.width = rect.width * dpr;
|
|
237
|
+
canvas.height = rect.height * dpr;
|
|
238
|
+
canvas.style.width = `${rect.width}px`;
|
|
239
|
+
canvas.style.height = `${rect.height}px`;
|
|
240
|
+
const ctx = canvas.getContext('2d');
|
|
241
|
+
if (ctx) {
|
|
242
|
+
ctx.scale(dpr, dpr);
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
resizeCanvas();
|
|
246
|
+
window.addEventListener('resize', resizeCanvas);
|
|
247
|
+
// Event listeners
|
|
248
|
+
canvas.addEventListener('mousemove', handleMouseMove);
|
|
249
|
+
// Start render loop
|
|
250
|
+
rafRef.current = requestAnimationFrame(render);
|
|
251
|
+
// Start idle animation
|
|
252
|
+
if (idleEnabled) {
|
|
253
|
+
idleIntervalRef.current = setInterval(idlePulse, idleInterval);
|
|
254
|
+
}
|
|
255
|
+
return () => {
|
|
256
|
+
window.removeEventListener('resize', resizeCanvas);
|
|
257
|
+
canvas.removeEventListener('mousemove', handleMouseMove);
|
|
258
|
+
if (rafRef.current) {
|
|
259
|
+
cancelAnimationFrame(rafRef.current);
|
|
260
|
+
}
|
|
261
|
+
if (idleIntervalRef.current) {
|
|
262
|
+
clearInterval(idleIntervalRef.current);
|
|
263
|
+
}
|
|
264
|
+
// Clear all scheduled idle timeouts
|
|
265
|
+
idleTimeoutsRef.current.forEach(timeout => clearTimeout(timeout));
|
|
266
|
+
idleTimeoutsRef.current = [];
|
|
267
|
+
// Clear all timeouts
|
|
268
|
+
dotsMapRef.current.forEach(dot => {
|
|
269
|
+
if (dot.fadeTimeout) {
|
|
270
|
+
clearTimeout(dot.fadeTimeout);
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
// Kill all GSAP animations
|
|
274
|
+
dotsMapRef.current.forEach(dot => {
|
|
275
|
+
gsap_1.gsap.killTweensOf(dot);
|
|
276
|
+
});
|
|
277
|
+
};
|
|
278
|
+
}, [idleEnabled, idleInterval, idleIntensity, gridSpacing, pointerRadius, pointerInnerIntensity, pointerOuterIntensity, maxOpacity, minOpacity, randomOpacity]);
|
|
279
|
+
return react_1.default.createElement("canvas", { ref: canvasRef, className: DotCrossGrid_module_css_1.default.dotCrossGrid });
|
|
280
|
+
};
|
|
281
|
+
exports.DotCrossGrid = DotCrossGrid;
|
|
282
|
+
exports.default = exports.DotCrossGrid;
|
|
283
|
+
//# sourceMappingURL=DotCrossGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DotCrossGrid.js","sourceRoot":"","sources":["../../../src/components/HeroBanner/DotCrossGr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IAAI,eAAe,CAAC,OAAO,EAAE,CAAC;gBAC5B,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YACzC,CAAC;YAED,oCAAoC;YACpC,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;YAClE,eAAe,CAAC,OAAO,GAAG,EAAE,CAAC;YAE7B,qBAAqB;YACrB,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAC/B,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;oBACpB,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC,CAAC,CAAC;YAEH,2BAA2B;YAC3B,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAC/B,WAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IAEhK,OAAO,0CAAQ,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,iCAAM,CAAC,YAAY,GAAI,CAAC;AACpE,CAAC,CAAC;AA9RW,QAAA,YAAY,gBA8RvB;AAEF,kBAAe,oBAAY,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconifyConfig, CustomSvgConfig, CustomImageConfig, IconColorConfig } from '../../utils/types';
|
|
3
|
+
export interface HeroBannerProps {
|
|
4
|
+
bannerText?: string;
|
|
5
|
+
bannerFullWidth?: boolean;
|
|
6
|
+
iconify?: IconifyConfig | string;
|
|
7
|
+
customSvg?: CustomSvgConfig;
|
|
8
|
+
customImage?: CustomImageConfig;
|
|
9
|
+
iconColors?: IconColorConfig;
|
|
10
|
+
enableDotCrossEffect?: boolean;
|
|
11
|
+
dotCrossColor?: string;
|
|
12
|
+
dotCrossSize?: number;
|
|
13
|
+
dotCrossGap?: number;
|
|
14
|
+
pointerRadius?: number;
|
|
15
|
+
pointerInnerIntensity?: number;
|
|
16
|
+
pointerOuterIntensity?: number;
|
|
17
|
+
maxOpacity?: number;
|
|
18
|
+
minOpacity?: number;
|
|
19
|
+
randomOpacity?: boolean;
|
|
20
|
+
idleEnabled?: boolean;
|
|
21
|
+
idleAreaWidth?: number;
|
|
22
|
+
idleInterval?: number;
|
|
23
|
+
idleIntensity?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* HeroBanner Component
|
|
27
|
+
*
|
|
28
|
+
* A full-width banner component with animated dot cross grid background.
|
|
29
|
+
* Automatically uses site title and tagline from Docusaurus config.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <HeroBanner
|
|
34
|
+
* bannerText="Build amazing documentation sites"
|
|
35
|
+
* iconify="mdi:rocket-launch"
|
|
36
|
+
* enableDotCrossEffect={true}
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare const HeroBanner: React.FC<HeroBannerProps>;
|
|
41
|
+
export default HeroBanner;
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/HeroBanner/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAG5G,MAAM,WAAW,eAAe;IAE9B,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAG1B,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,UAAU,CAAC,EAAE,eAAe,CAAC;IAG7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAG/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsHhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.HeroBanner = void 0;
|
|
40
|
+
const react_1 = __importStar(require("react"));
|
|
41
|
+
const useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext"));
|
|
42
|
+
const ThemedIcon_1 = require("../../utils/ThemedIcon");
|
|
43
|
+
const DotCrossGrid_1 = require("./DotCrossGrid");
|
|
44
|
+
const styles_module_css_1 = __importDefault(require("./styles.module.css"));
|
|
45
|
+
/**
|
|
46
|
+
* HeroBanner Component
|
|
47
|
+
*
|
|
48
|
+
* A full-width banner component with animated dot cross grid background.
|
|
49
|
+
* Automatically uses site title and tagline from Docusaurus config.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <HeroBanner
|
|
54
|
+
* bannerText="Build amazing documentation sites"
|
|
55
|
+
* iconify="mdi:rocket-launch"
|
|
56
|
+
* enableDotCrossEffect={true}
|
|
57
|
+
* />
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
const HeroBanner = ({ bannerText, bannerFullWidth = true, iconify, customSvg, customImage, iconColors, enableDotCrossEffect = true, dotCrossColor, dotCrossSize, dotCrossGap, pointerRadius, pointerInnerIntensity, pointerOuterIntensity, maxOpacity, minOpacity, randomOpacity, idleEnabled, idleAreaWidth, idleInterval, idleIntensity, }) => {
|
|
61
|
+
const { siteConfig } = (0, useDocusaurusContext_1.default)();
|
|
62
|
+
const { title, tagline } = siteConfig;
|
|
63
|
+
const bannerRef = (0, react_1.useRef)(null);
|
|
64
|
+
// Set banner width to window width (only for full-width mode)
|
|
65
|
+
(0, react_1.useEffect)(() => {
|
|
66
|
+
if (!bannerFullWidth)
|
|
67
|
+
return;
|
|
68
|
+
const updateWidth = () => {
|
|
69
|
+
if (bannerRef.current) {
|
|
70
|
+
// Set width to window width minus 4px
|
|
71
|
+
bannerRef.current.style.width = `${window.innerWidth - 4}px`;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
updateWidth();
|
|
75
|
+
window.addEventListener('resize', updateWidth);
|
|
76
|
+
return () => {
|
|
77
|
+
window.removeEventListener('resize', updateWidth);
|
|
78
|
+
};
|
|
79
|
+
}, [bannerFullWidth]);
|
|
80
|
+
// Build iconify config with colors if provided
|
|
81
|
+
const iconifyWithColors = iconify && iconColors
|
|
82
|
+
? (typeof iconify === 'string'
|
|
83
|
+
? { icon: iconify, colors: iconColors }
|
|
84
|
+
: { ...iconify, colors: { ...iconify.colors, ...iconColors } })
|
|
85
|
+
: iconify
|
|
86
|
+
? (typeof iconify === 'string'
|
|
87
|
+
? { icon: iconify, colors: { light: '#ffffff', dark: '#ffffff' } }
|
|
88
|
+
: { ...iconify, colors: { light: '#ffffff', dark: '#ffffff', ...iconify.colors } })
|
|
89
|
+
: iconify;
|
|
90
|
+
// For Iconify icons, ensure they fill the container if no explicit size is set
|
|
91
|
+
const iconifyWithSize = iconifyWithColors
|
|
92
|
+
? (typeof iconifyWithColors === 'string'
|
|
93
|
+
? { icon: iconifyWithColors, width: '100%', height: '100%' }
|
|
94
|
+
: {
|
|
95
|
+
...iconifyWithColors,
|
|
96
|
+
width: iconifyWithColors.width || '100%',
|
|
97
|
+
height: iconifyWithColors.height || '100%',
|
|
98
|
+
})
|
|
99
|
+
: iconifyWithColors;
|
|
100
|
+
// Check if we have any icon to render
|
|
101
|
+
const hasIcon = iconify || customSvg || customImage;
|
|
102
|
+
// Determine which CSS class to use based on icon type
|
|
103
|
+
const logoClassName = customImage ? styles_module_css_1.default.heroLogoImage : styles_module_css_1.default.heroLogo;
|
|
104
|
+
return (react_1.default.createElement("div", { ref: bannerRef, className: `${styles_module_css_1.default.heroBanner} ${!bannerFullWidth ? styles_module_css_1.default.heroBannerContained : ''}` },
|
|
105
|
+
enableDotCrossEffect && (react_1.default.createElement(DotCrossGrid_1.DotCrossGrid, { dotSize: dotCrossSize, gap: dotCrossGap, color: dotCrossColor, pointerRadius: pointerRadius, pointerInnerIntensity: pointerInnerIntensity, pointerOuterIntensity: pointerOuterIntensity, maxOpacity: maxOpacity, minOpacity: minOpacity, randomOpacity: randomOpacity, idleEnabled: idleEnabled, idleAreaWidth: idleAreaWidth, idleInterval: idleInterval, idleIntensity: idleIntensity })),
|
|
106
|
+
react_1.default.createElement("div", { className: styles_module_css_1.default.heroContent },
|
|
107
|
+
react_1.default.createElement("div", { className: styles_module_css_1.default.heroTextContainer },
|
|
108
|
+
react_1.default.createElement("h1", { className: styles_module_css_1.default.heroTitle }, title),
|
|
109
|
+
bannerText && react_1.default.createElement("p", { className: styles_module_css_1.default.heroBannerText }, bannerText),
|
|
110
|
+
tagline && react_1.default.createElement("p", { className: styles_module_css_1.default.heroTagline }, tagline)),
|
|
111
|
+
hasIcon && (react_1.default.createElement("div", { className: styles_module_css_1.default.heroLogoContainer },
|
|
112
|
+
react_1.default.createElement(ThemedIcon_1.ThemedIcon, { iconify: iconifyWithSize, customSvg: customSvg, customImage: customImage, alt: `${title} icon`, className: logoClassName, supportsHover: false }))))));
|
|
113
|
+
};
|
|
114
|
+
exports.HeroBanner = HeroBanner;
|
|
115
|
+
exports.default = exports.HeroBanner;
|
|
116
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/HeroBanner/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiD;AACjD,4FAAoE;AACpE,uDAAoD;AACpD,iDAA8C;AAE9C,4EAAyC;AAsCzC;;;;;;;;;;;;;;GAcG;AACI,MAAM,UAAU,GAA8B,CAAC,EACpD,UAAU,EACV,eAAe,GAAG,IAAI,EACtB,OAAO,EACP,SAAS,EACT,WAAW,EACX,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,EACV,UAAU,EACV,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAa,GACd,EAAE,EAAE;IACH,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,8BAAoB,GAAE,CAAC;IAC9C,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;IACtC,MAAM,SAAS,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAE/C,8DAA8D;IAC9D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,eAAe;YAAE,OAAO;QAE7B,MAAM,WAAW,GAAG,GAAG,EAAE;YACvB,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC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AAI,qCAAG,SAAS,EAAE,2BAAM,CAAC,WAAW,IAAG,OAAO,CAAK,CACvD;YAEL,OAAO,IAAI,CACV,uCAAK,SAAS,EAAE,2BAAM,CAAC,iBAAiB;gBACtC,8BAAC,uBAAU,IACT,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,GAAG,KAAK,OAAO,EACpB,SAAS,EAAE,aAAa,EACxB,aAAa,EAAE,KAAK,GACpB,CACE,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAtHW,QAAA,UAAU,cAsHrB;AAEF,kBAAe,kBAAU,CAAC"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
.heroBanner {
|
|
2
|
+
position: relative;
|
|
3
|
+
/* Width set dynamically via JavaScript */
|
|
4
|
+
margin-left: calc(-50vw + 50%);
|
|
5
|
+
margin-right: calc(-50vw + 50%);
|
|
6
|
+
margin-top: -32px;
|
|
7
|
+
min-height: 280px;
|
|
8
|
+
background: var(--hero-background-color, var(--ifm-color-primary));
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
padding: 3rem 2rem;
|
|
11
|
+
--hero-background-color: var(--ifm-color-primary);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Contained mode - stays within document flow */
|
|
15
|
+
.heroBannerContained {
|
|
16
|
+
margin-left: 0;
|
|
17
|
+
margin-right: 0;
|
|
18
|
+
margin-top: 0;
|
|
19
|
+
width: 100% !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Dark theme adjustments */
|
|
23
|
+
[data-theme="dark"] .heroBanner {
|
|
24
|
+
--hero-background-color: var(--ifm-color-primary-darker);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.heroContent {
|
|
28
|
+
position: relative;
|
|
29
|
+
z-index: 4;
|
|
30
|
+
max-width: 1000px;
|
|
31
|
+
margin: 0 auto;
|
|
32
|
+
display: grid;
|
|
33
|
+
grid-template-columns: 70% 30%;
|
|
34
|
+
gap: 2rem;
|
|
35
|
+
align-items: center;
|
|
36
|
+
height: 100%;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Text container */
|
|
41
|
+
.heroTextContainer {
|
|
42
|
+
position: relative;
|
|
43
|
+
color: var(--ifm-font-color-base-inverse);
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.heroTitle {
|
|
48
|
+
position: relative;
|
|
49
|
+
font-size: 3rem;
|
|
50
|
+
font-weight: 800;
|
|
51
|
+
line-height: 1.2;
|
|
52
|
+
margin: 0 0 1rem 0;
|
|
53
|
+
color: #ffffff;
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
z-index: 4;
|
|
56
|
+
filter: drop-shadow(0 0 20px var(--hero-background-color))
|
|
57
|
+
drop-shadow(0 0 40px var(--hero-background-color))
|
|
58
|
+
drop-shadow(0 0 60px var(--hero-background-color))
|
|
59
|
+
drop-shadow(2px 2px 2px #00000063);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.heroBannerText {
|
|
63
|
+
position: relative;
|
|
64
|
+
font-size: 1.5rem;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
line-height: 1.4;
|
|
67
|
+
margin: 0 0 1.5rem 0;
|
|
68
|
+
color: rgba(255, 255, 255, 0.95);
|
|
69
|
+
display: -webkit-box;
|
|
70
|
+
-webkit-line-clamp: 3;
|
|
71
|
+
line-clamp: 3;
|
|
72
|
+
-webkit-box-orient: vertical;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
z-index: 4;
|
|
75
|
+
filter: drop-shadow(0 0 20px var(--hero-background-color))
|
|
76
|
+
drop-shadow(0 0 40px var(--hero-background-color))
|
|
77
|
+
drop-shadow(0 0 60px var(--hero-background-color))
|
|
78
|
+
drop-shadow(2px 2px 2px #00000063);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.heroTagline {
|
|
82
|
+
position: relative;
|
|
83
|
+
font-size: 1.125rem;
|
|
84
|
+
font-style: italic;
|
|
85
|
+
line-height: 1.6;
|
|
86
|
+
margin: 0;
|
|
87
|
+
color: rgba(255, 255, 255, 0.9);
|
|
88
|
+
|
|
89
|
+
/* Truncate with ellipsis after 3 lines */
|
|
90
|
+
display: -webkit-box;
|
|
91
|
+
-webkit-line-clamp: 2;
|
|
92
|
+
line-clamp: 2;
|
|
93
|
+
-webkit-box-orient: vertical;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
text-overflow: ellipsis;
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
z-index: 4;
|
|
98
|
+
filter: drop-shadow(0 0 20px var(--hero-background-color))
|
|
99
|
+
drop-shadow(0 0 40px var(--hero-background-color))
|
|
100
|
+
drop-shadow(0 0 60px var(--hero-background-color))
|
|
101
|
+
drop-shadow(2px 2px 2px #00000063);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Logo container */
|
|
105
|
+
.heroLogoContainer {
|
|
106
|
+
position: relative;
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
height: 100%;
|
|
111
|
+
min-height: 200px;
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.heroLogo {
|
|
116
|
+
position: relative;
|
|
117
|
+
width: 100%;
|
|
118
|
+
height: 100%;
|
|
119
|
+
max-width: 200px;
|
|
120
|
+
object-fit: contain;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
z-index: 4;
|
|
123
|
+
filter: drop-shadow(0 0 20px var(--hero-background-color))
|
|
124
|
+
drop-shadow(0 0 40px var(--hero-background-color))
|
|
125
|
+
drop-shadow(0 0 60px var(--hero-background-color))
|
|
126
|
+
drop-shadow(2px 2px 2px #00000063);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Logo for custom images (PNG/JPEG) - no shadow, optimized sizing */
|
|
130
|
+
.heroLogoImage {
|
|
131
|
+
position: relative;
|
|
132
|
+
max-width: 100%;
|
|
133
|
+
max-height: 200px;
|
|
134
|
+
width: auto;
|
|
135
|
+
height: auto;
|
|
136
|
+
object-fit: contain;
|
|
137
|
+
pointer-events: none;
|
|
138
|
+
z-index: 4;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Tablet (768px - 996px) */
|
|
142
|
+
@media (max-width: 996px) {
|
|
143
|
+
.heroTitle {
|
|
144
|
+
font-size: 2.5rem;
|
|
145
|
+
}
|
|
146
|
+
.heroBannerText {
|
|
147
|
+
font-size: 1.25rem;
|
|
148
|
+
-webkit-line-clamp: 2; /* Truncate after 2 lines on tablet */
|
|
149
|
+
line-clamp: 2;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.heroTagline {
|
|
153
|
+
font-size: 1rem;
|
|
154
|
+
-webkit-line-clamp: 2; /* Truncate after 2 lines on tablet */
|
|
155
|
+
line-clamp: 2;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Mobile (<576px) */
|
|
160
|
+
@media (max-width: 576px) {
|
|
161
|
+
.heroBanner {
|
|
162
|
+
min-height: auto;
|
|
163
|
+
padding: 2rem 1rem;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.heroContent {
|
|
167
|
+
grid-template-columns: 1fr;
|
|
168
|
+
gap: 1rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.heroTextContainer {
|
|
172
|
+
text-align: center;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.heroTitle {
|
|
176
|
+
font-size: 2rem;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.heroBannerText {
|
|
180
|
+
font-size: 0.95rem;
|
|
181
|
+
-webkit-line-clamp: 2;
|
|
182
|
+
line-clamp: 2;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.heroTagline {
|
|
186
|
+
font-size: 1.125rem;
|
|
187
|
+
-webkit-line-clamp: 1;
|
|
188
|
+
line-clamp: 1;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* Show logo on mobile at smaller size, centered at top */
|
|
192
|
+
.heroLogoContainer {
|
|
193
|
+
order: -1;
|
|
194
|
+
min-height: 80px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.heroLogo {
|
|
198
|
+
max-width: 80px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.heroLogoImage {
|
|
202
|
+
max-width: 80px;
|
|
203
|
+
}
|
|
204
|
+
}
|