global: add formatter
This commit is contained in:
parent
eb6819bb76
commit
6c87abd4fc
19 changed files with 3925 additions and 288 deletions
|
|
@ -6,20 +6,20 @@
|
|||
</music>
|
||||
<script>
|
||||
const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
const container = document.getElementById('bg-text');
|
||||
const container = document.getElementById("bg-text");
|
||||
const colWidth = 20;
|
||||
const rowHeight = 24;
|
||||
const cols = Math.ceil(window.innerWidth / colWidth);
|
||||
const rows = Math.ceil(window.innerHeight / rowHeight);
|
||||
|
||||
for (let c = 0; c < cols; c++) {
|
||||
const col = document.createElement('vertical-marquee-inner');
|
||||
col.style.left = (c * colWidth) + 'px';
|
||||
const col = document.createElement("vertical-marquee-inner");
|
||||
col.style.left = c * colWidth + "px";
|
||||
for (let r = 0; r < rows; r++) {
|
||||
const span = document.createElement('text');
|
||||
const span = document.createElement("text");
|
||||
span.textContent = chars[Math.floor(Math.random() * chars.length)];
|
||||
col.appendChild(span);
|
||||
}
|
||||
container.appendChild(col);
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue