feat: Migrate project to TypeScript by adding configuration, dependencies, and converting preload script.

This commit is contained in:
2025-12-12 15:16:01 +01:00
parent 87e5f5a72c
commit 8b83428803
8 changed files with 155 additions and 78 deletions
+32 -19
View File
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -7,9 +8,12 @@
<!-- Premium Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=JetBrains+Mono:wght@400&display=swap" rel="stylesheet">
<link
href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=JetBrains+Mono:wght@400&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="wrapper">
<!-- Main Scroll Area -->
@@ -32,7 +36,9 @@
<button id="btn-open" class="icon-btn" title="Open File">
<!-- Folder Icon -->
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" class="icon">
<path d="M4 6C4 4.89543 4.89543 4 6 4H10L12 6H18C19.1046 6 20 6.89543 20 8V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path
d="M4 6C4 4.89543 4.89543 4 6 4H10L12 6H18C19.1046 6 20 6.89543 20 8V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6Z"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</button>
</div>
@@ -41,14 +47,18 @@
<div class="control-group">
<button id="btn-play" class="action-btn" title="Start/Stop Scrolling">
<!-- Play Icon -->
<!-- Play Icon -->
<svg id="icon-play" width="24" height="24" viewBox="0 0 24 24" fill="none" class="icon">
<path d="M5 3L19 12L5 21V3Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="currentColor"/>
<path d="M5 3L19 12L5 21V3Z" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" fill="currentColor" />
</svg>
<!-- Pause Icon (Initially hidden) -->
<svg id="icon-pause" width="24" height="24" viewBox="0 0 24 24" fill="none" class="icon" style="display: none;">
<path d="M10 4H6V20H10V4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="currentColor"/>
<path d="M18 4H14V20H18V4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="currentColor"/>
<svg id="icon-pause" width="24" height="24" viewBox="0 0 24 24" fill="none" class="icon"
style="display: none;">
<path d="M10 4H6V20H10V4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" fill="currentColor" />
<path d="M18 4H14V20H18V4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" fill="currentColor" />
</svg>
</button>
</div>
@@ -66,21 +76,24 @@
<span class="label">Size</span>
<input type="range" id="input-size" min="20" max="150" value="60">
</div>
<div class="divider"></div>
<div class="control-group">
<button id="btn-reset" class="icon-btn" title="Reset Position">
<div class="divider"></div>
<div class="control-group">
<button id="btn-reset" class="icon-btn" title="Reset Position">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" class="icon">
<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 3v5h5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
<path d="M3 3v5h5" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" />
</svg>
</button>
</div>
</button>
</div>
</div>
</div>
<script src="./node_modules/marked/marked.min.js"></script>
<script src="renderer.js"></script>
<script src="dist/renderer.js"></script>
</body>
</html>
</html>