Skip to content

Commit 68931d5

Browse files
authored
Add Type
1 parent 4582ffa commit 68931d5

1 file changed

Lines changed: 75 additions & 1 deletion

File tree

utils/theSystem.js

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,5 +430,79 @@ function generateSVG(
430430
return svg;
431431
}
432432

433+
function generateSVG2(
434+
image = "",
435+
name = "Not Found",
436+
desc = wrapSVGText("None", 50, 17)
437+
) {
438+
439+
const uid = Date.now().toString(36);
440+
const titleId = `title-${uid}`;
441+
const descId = `desc-${uid}`;
442+
443+
const svg = `
444+
<svg width="500" height="200" viewBox="0 0 500 200" xmlns="http://www.w3.org/2000/svg">
445+
<defs>
446+
<filter id="shadow" x="-50%" y="-50%" width="200%" height="200%">
447+
<feGaussianBlur in="SourceAlpha" stdDeviation="5" result="blur"/>
448+
<feOffset in="blur" dx="0" dy="0" result="offsetBlur"/>
449+
<feMerge>
450+
<feMergeNode in="offsetBlur"/>
451+
<feMergeNode in="SourceGraphic"/>
452+
</feMerge>
453+
</filter>
454+
455+
<style>
456+
@keyframes slideIn {
457+
0% { transform: translateX(-100px); opacity: 0; }
458+
100% { transform: translateX(0); opacity: 1; }
459+
}
460+
461+
@keyframes glowAnimation {
462+
0%, 100% { filter: drop-shadow(0 0 5px #00ff00); }
463+
50% { filter: drop-shadow(0 0 20px #00ff00); }
464+
}
465+
466+
.animated-img {
467+
animation: slideIn 1.5s ease-out forwards;
468+
}
469+
470+
.animated-frame {
471+
animation: slideIn 1.5s ease-out forwards, glowAnimation 2s infinite;
472+
}
473+
474+
.profile-text {
475+
font-family: Arial, sans-serif;
476+
font-size: 14px;
477+
font-weight: bold;
478+
fill: #ffffff;
479+
text-anchor: middle;
480+
opacity: 0;
481+
animation: slideIn 1.5s ease-out forwards;
482+
}
483+
</style>
484+
</defs>
485+
486+
<rect x="0" y="0" width="50%" height="100%" fill="#00a458ff" />
487+
<rect x="50%" y="0" width="50%" height="100%" fill="#216038" />
488+
<rect x="49%" y="0" width="2%" height="100%" fill="black" opacity="0.3" filter="url(#shadow)" />
489+
490+
<circle cx="125" cy="70" r="40" fill="url(#imgPattern)" class="animated-img" />
491+
<!-- Bingkai bulat -->
492+
<circle cx="125" cy="70" r="42" fill="none" stroke="#00ff00" stroke-width="4" class="animated-frame" />
493+
494+
<text x="125" y="135" class="profile-text">${name.toUpperCase()}</text>
495+
496+
<defs>
497+
<pattern id="imgPattern" patternUnits="userSpaceOnUse" width="80" height="80">
498+
<image href="https://via.placeholder.com/80" x="0" y="0" width="80" height="80" />
499+
</pattern>
500+
</defs>
501+
</svg>
502+
503+
`;
504+
505+
return svg;
506+
}
433507

434-
module.exports = { generateErrorSVG, generateSVG }
508+
module.exports = { generateErrorSVG, generateSVG, generateSVG2 }

0 commit comments

Comments
 (0)