Skip to content

Commit b5bb4c3

Browse files
committed
Build examples for production
1 parent efcd88e commit b5bb4c3

8 files changed

Lines changed: 197 additions & 117 deletions

docs/assets/BattleEntity-CWBiIsEU.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/assets/BattleLogger-k-D1IkQQ.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/assets/BattleSimulator-BnmtSMI-.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/assets/SimulationService-CEXqnKNY.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/assets/index-DcBCjvam.js

Lines changed: 0 additions & 78 deletions
This file was deleted.

docs/assets/index-DxrzuZBz.js

Lines changed: 104 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 92 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,46 @@
1717
transition: border-color 0.2s, box-shadow 0.2s;
1818
font-size: 0.8rem;
1919
}
20+
.config-label {
21+
color: var(--text-light);
22+
padding: 2px 6px;
23+
width: 60px;
24+
float: right;
25+
text-align: right;
26+
font-size: 0.8rem;
27+
}
28+
.config-slider {
29+
flex: 1;
30+
height: 6px;
31+
-webkit-appearance: none;
32+
appearance: none;
33+
background: rgba(0, 0, 0, 0.3);
34+
border-radius: 3px;
35+
outline: none;
36+
cursor: pointer;
37+
}
38+
.config-slider::-webkit-slider-thumb {
39+
-webkit-appearance: none;
40+
appearance: none;
41+
width: 16px;
42+
height: 16px;
43+
background: var(--accent-color);
44+
border-radius: 50%;
45+
cursor: pointer;
46+
transition: transform 0.2s, box-shadow 0.2s;
47+
}
48+
.config-slider::-webkit-slider-thumb:hover {
49+
transform: scale(1.2);
50+
box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
51+
}
52+
.config-slider::-moz-range-thumb {
53+
width: 16px;
54+
height: 16px;
55+
background: var(--accent-color);
56+
border-radius: 50%;
57+
cursor: pointer;
58+
border: none;
59+
}
2060
.config-input:focus {
2161
outline: none;
2262
border-color: var(--accent-color);
@@ -137,10 +177,15 @@
137177
position: relative;
138178
}
139179

140-
.lang-btn {
180+
.header-btns {
141181
position: absolute;
142182
top: 1rem;
143183
right: 1rem;
184+
display: flex;
185+
gap: 0.5rem;
186+
}
187+
188+
.lang-btn, .github-btn {
144189
background: rgba(255, 255, 255, 0.1);
145190
border: 1px solid var(--accent-color);
146191
color: var(--accent-color);
@@ -149,13 +194,23 @@
149194
cursor: pointer;
150195
font-size: 0.8rem;
151196
transition: all 0.3s;
197+
text-decoration: none;
198+
display: inline-flex;
199+
align-items: center;
200+
gap: 0.3rem;
152201
}
153202

154-
.lang-btn:hover {
203+
.lang-btn:hover, .github-btn:hover {
155204
background: var(--accent-color);
156205
color: var(--dark-bg);
157206
}
158207

208+
.github-btn svg {
209+
width: 16px;
210+
height: 16px;
211+
fill: currentColor;
212+
}
213+
159214
.header h1 {
160215
color: var(--accent-color);
161216
font-size: 1.5rem;
@@ -378,6 +433,12 @@
378433
border: 1px solid var(--danger-color);
379434
}
380435

436+
.status.warning {
437+
background: rgba(245, 158, 11, 0.2);
438+
color: var(--warning-color);
439+
border: 1px solid var(--warning-color);
440+
}
441+
381442
.detail-chart {
382443
background: rgba(0, 0, 0, 0.2);
383444
border-radius: 8px;
@@ -491,10 +552,14 @@
491552
height: 180px;
492553
}
493554

494-
.lang-btn {
555+
.header-btns {
495556
top: 0.5rem;
496557
right: 0.5rem;
497558
}
559+
560+
.github-btn span {
561+
display: none;
562+
}
498563
}
499564

500565
/* Story Mode Styles */
@@ -706,14 +771,20 @@
706771
}
707772
}
708773
</style>
709-
<script type="module" crossorigin src="./assets/index-DcBCjvam.js"></script>
774+
<script type="module" crossorigin src="./assets/index-DxrzuZBz.js"></script>
710775
<link rel="modulepreload" crossorigin href="./assets/echarts-Bn9PLWWT.js">
711776
</head>
712777
<body>
713778
<div class="container">
714779
<!-- Header -->
715780
<div class="header">
716-
<button id="langSwitch" class="lang-btn" data-i18n="header.langSwitch">中文</button>
781+
<div class="header-btns">
782+
<a href="https://github.com/soonfx-engine/core" target="_blank" class="github-btn" title="GitHub Repository">
783+
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>
784+
<span>GitHub</span>
785+
</a>
786+
<button id="langSwitch" class="lang-btn" data-i18n="header.langSwitch">中文</button>
787+
</div>
717788
<h1 data-i18n="header.title">⚔️ Interactive Battle Simulation</h1>
718789
<p data-i18n="header.subtitle">Real-time combat data visualization and analysis powered by SoonFx Engine</p>
719790
</div>
@@ -776,27 +847,30 @@ <h3 data-i18n="custom.title">⚙️ Battle Configuration</h3>
776847
<div class="config-section">
777848
<h4 style="margin-bottom: 0.3rem; color: var(--accent-color);" data-i18n="custom.hero">🦸 Hero</h4>
778849
<div style="display: grid; gap: 0.3rem;">
779-
<label><span data-i18n="custom.level">Level</span>: <input type="number" id="heroLevel" value="10" min="1" max="100" class="config-input"></label>
780-
<label><span data-i18n="custom.hp">HP</span>: <input type="number" id="heroHp" value="1000" min="1" max="999999" class="config-input"></label>
781-
<label><span data-i18n="custom.attack">Attack</span>: <input type="number" id="heroAtk" value="100" min="1" max="99999" class="config-input"></label>
782-
<label><span data-i18n="custom.defense">Defense</span>: <input type="number" id="heroDef" value="20" min="0" max="99999" class="config-input"></label>
850+
<label style="display: flex; align-items: center; gap: 0.5rem;">
851+
<span data-i18n="custom.level">Level</span>:
852+
<input type="range" id="heroLevel" value="10" min="1" max="100" class="config-slider">
853+
<span id="heroLevelValue" class="config-label" style="width: 30px;">10</span>
854+
</label>
855+
<label><span data-i18n="custom.hp">HP</span>: <span id="heroHp" class="config-label">--</span></label>
856+
<label><span data-i18n="custom.attack">Attack</span>: <span id="heroAtk" class="config-label">--</span></label>
783857
</div>
784858
</div>
785859
<div class="config-section">
786860
<h4 style="margin-bottom: 0.3rem; color: var(--danger-color);" data-i18n="custom.enemy">👹 Enemy</h4>
787861
<div style="display: grid; gap: 0.3rem;">
788-
<label><span data-i18n="custom.level">Level</span>: <input type="number" id="enemyLevel" value="10" min="1" max="100" class="config-input"></label>
789-
<label><span data-i18n="custom.hp">HP</span>: <input type="number" id="enemyHp" value="1000" min="1" max="999999" class="config-input"></label>
790-
<label><span data-i18n="custom.attack">Attack</span>: <input type="number" id="enemyAtk" value="90" min="1" max="99999" class="config-input"></label>
791-
<label><span data-i18n="custom.defense">Defense</span>: <input type="number" id="enemyDef" value="15" min="0" max="99999" class="config-input"></label>
862+
<label style="display: flex; align-items: center; gap: 0.5rem;">
863+
<span data-i18n="custom.level">Level</span>:
864+
<input type="range" id="enemyLevel" value="10" min="1" max="100" class="config-slider">
865+
<span id="enemyLevelValue" class="config-label" style="width: 30px;">10</span>
866+
</label>
867+
<label><span data-i18n="custom.hp">HP</span>: <span id="enemyHp" class="config-label">--</span></label>
868+
<label><span data-i18n="custom.attack">Attack</span>: <span id="enemyAtk" class="config-label">--</span></label>
792869
</div>
793870
</div>
794871
</div>
795-
<div style="margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;">
796-
<div style="display: flex; align-items: center; gap: 0.5rem;">
797-
<span data-i18n="custom.simCount">Simulations:</span>
798-
<input type="number" id="simCount" value="1" min="1" max="1000" class="config-input" style="float: none; width: 70px;">
799-
</div>
872+
<div style="margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: flex-end;">
873+
<input type="hidden" id="simCount" value="1">
800874
<button id="startCustomBattle" class="start-battle-btn" style="width: auto; padding: 0.6rem 1.5rem;">
801875
<span class="label" data-i18n="custom.start">⚔️ Start Battle</span>
802876
</button>

examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@
777777
<!-- Header -->
778778
<div class="header">
779779
<div class="header-btns">
780-
<a href="https://github.com/FelixChristian011226/SoonFxMain" target="_blank" class="github-btn" title="GitHub Repository">
780+
<a href="https://github.com/soonfx-engine/core" target="_blank" class="github-btn" title="GitHub Repository">
781781
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>
782782
<span>GitHub</span>
783783
</a>

0 commit comments

Comments
 (0)