added redacted backeground
All checks were successful
Rebuild signaller for deprived.dev to rebuild site / test_service (push) Successful in 15s

This commit is contained in:
BOTAlex 2025-10-09 07:19:08 +02:00
parent ba9cf8073a
commit 7524eb3fe5
2 changed files with 126 additions and 109 deletions

View file

@ -1,62 +1,63 @@
<script lang="ts">
// Width of num chars and height nom of chars
export let targetTextWidth: number;
export let targetTextHeight: number;
// Width of num chars and height nom of chars
export let targetTextWidth: number;
export let targetTextHeight: number;
export let textRowPadding: string = "";
export let applyRotation: boolean = true;
export let applyRotation: boolean = true;
export let textOverride: string[] | undefined = undefined;
export let textOverride: string[] | undefined = undefined;
// Assign default value if textOverride is undefined
let repeatingText : string[] = textOverride ?? [
"C++",
"C#",
"ARDUINO",
"PYTHON",
"JAVA",
"JAVASCRIPT",
"TYPESCRIPT",
"HTML",
"CSS",
];
// Assign default value if textOverride is undefined
let repeatingText: string[] = textOverride ?? [
"C++",
"C#",
"ARDUINO",
"PYTHON",
"JAVA",
"JAVASCRIPT",
"TYPESCRIPT",
"HTML",
"CSS",
];
function getRandomInt(max: number) {
return Math.floor(Math.random() * max);
function getRandomInt(max: number) {
return Math.floor(Math.random() * max);
}
function GrabRandomString() {
let outString: string = "";
while (outString.length < targetTextWidth) {
outString += repeatingText[getRandomInt(repeatingText.length)] + " ";
}
function GrabRandomString() {
let outString: string = "";
while (outString.length < targetTextWidth) {
outString +=
repeatingText[
getRandomInt(repeatingText.length)
] + " ";
}
return outString; // At about target size
}
return outString; // At about target size
}
</script>
<div {...$$restProps}>
{#each { length: targetTextHeight } as _, i}
<span class="{applyRotation ? "rotate45" : ""} SkillsText">
{GrabRandomString()}
</span>
{/each}
{#each { length: targetTextHeight } as _, i}
<span
class="{applyRotation ? 'rotate45' : ''} SkillsText"
style="padding: {textRowPadding};"
>
{GrabRandomString()}
</span>
{/each}
</div>
<style>
.SkillsText {
text-align: start;
display: flex;
justify-content: center;
align-items: center;
white-space: nowrap;
.SkillsText {
text-align: start;
display: flex;
justify-content: center;
align-items: center;
white-space: nowrap;
width: 2rem;
}
width: 2rem;
}
.rotate45 {
transform: rotate(-45deg);
}
</style>
.rotate45 {
transform: rotate(-45deg);
}
</style>