hyapp-h5/game/rocktips/index.html
2026-06-11 18:19:38 +08:00

373 lines
12 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, viewport-fit=cover"
/>
<title data-i18n="rockTips.pageTitle">Game Instructions</title>
<style>
:root {
color-scheme: dark;
--tips-frame-width: 375px;
--tips-frame-height: 812px;
--tips-scale: 1;
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
min-width: 100%;
height: 100%;
min-height: 100%;
margin: 0;
overflow: hidden;
background: #030623;
font-family:
'Source Han Sans SC', 'Helvetica Neue', Arial, sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: geometricprecision;
}
body {
display: flex;
align-items: flex-start;
justify-content: flex-start;
}
button {
padding: 0;
border: 0;
color: inherit;
font: inherit;
background: transparent;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.tips-stage {
position: relative;
width: calc(var(--tips-frame-width) * var(--tips-scale));
height: calc(var(--tips-frame-height) * var(--tips-scale));
overflow: hidden;
background: #030623;
}
.tips-frame {
position: absolute;
top: 0;
left: 0;
width: var(--tips-frame-width);
height: var(--tips-frame-height);
overflow: hidden;
background: #030623;
transform: scale(var(--tips-scale));
transform-origin: top left;
}
.tips-bg {
position: absolute;
top: 0;
left: -47px;
width: 470px;
height: 834px;
opacity: 0.2;
pointer-events: none;
user-select: none;
-webkit-mask-image: url('assets/figma/bg-mask.svg');
mask-image: url('assets/figma/bg-mask.svg');
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-position: 47px 0;
mask-position: 47px 0;
-webkit-mask-size: 375px 812px;
mask-size: 375px 812px;
}
.tips-bg img {
position: absolute;
inset: 0;
display: block;
width: 100%;
height: 100%;
max-width: none;
object-fit: cover;
pointer-events: none;
user-select: none;
}
.status-time {
position: absolute;
top: 13px;
left: 33.87px;
z-index: 4;
width: 54px;
height: 15px;
color: #fff;
font-family: Helvetica, Arial, sans-serif;
font-size: 15px;
font-weight: 400;
line-height: 15px;
text-align: center;
}
.status-icon {
position: absolute;
z-index: 4;
display: block;
max-width: none;
pointer-events: none;
user-select: none;
}
.status-cellular {
top: 15px;
left: 294.34px;
width: 17px;
height: 11.33px;
}
.status-wifi {
top: 16.33px;
left: 316.34px;
width: 15.33px;
height: 11.01px;
}
.status-battery {
top: 16.33px;
left: 336.67px;
width: 24.33px;
height: 11.33px;
}
.nav {
position: absolute;
top: 44px;
left: 0;
z-index: 5;
width: 375px;
height: 44px;
}
.back-button {
position: absolute;
top: 10px;
left: 16px;
width: 24px;
height: 24px;
}
.back-button img {
display: block;
width: 24px;
height: 24px;
pointer-events: none;
user-select: none;
}
.nav-title {
position: absolute;
top: 13px;
left: 187px;
margin: 0;
color: #fff;
font-family:
'Source Han Sans SC', 'Helvetica Neue', Arial, sans-serif;
font-size: 18px;
font-weight: 500;
line-height: 18px;
text-align: center;
text-transform: capitalize;
white-space: nowrap;
transform: translateX(-50%);
}
.rules {
position: absolute;
top: 104px;
left: 16px;
z-index: 3;
width: 343px;
margin: 0;
color: #fff;
font-family:
'Source Han Sans SC', 'Helvetica Neue', Arial, sans-serif;
font-size: 16px;
font-weight: 400;
line-height: 24px;
text-align: justify;
word-break: break-word;
}
.rules p {
margin: 0;
}
.rules p + p {
margin-top: 6px;
}
.rules-line {
display: block;
}
.rules-line-justify {
text-align: justify;
text-align-last: justify;
}
.home-indicator {
position: absolute;
left: 120px;
bottom: 9px;
z-index: 6;
width: 135px;
height: 5px;
border-radius: 3px;
background: #fff;
}
</style>
</head>
<body>
<main
class="tips-stage"
aria-label="Game Instructions"
data-i18n-aria="rockTips.pageTitle"
>
<section class="tips-frame" data-figma-node-id="491:391">
<div class="tips-bg" aria-hidden="true">
<img src="../rock/assets/figma/bg-arena.png" alt="" />
</div>
<div class="status-time" aria-hidden="true">9:41</div>
<img
class="status-icon status-cellular"
src="assets/figma/cellular.svg"
alt=""
aria-hidden="true"
/>
<img
class="status-icon status-wifi"
src="assets/figma/wifi.svg"
alt=""
aria-hidden="true"
/>
<img
class="status-icon status-battery"
src="assets/figma/battery.svg"
alt=""
aria-hidden="true"
/>
<nav class="nav" aria-label="Navigation">
<button
class="back-button"
type="button"
aria-label="Back"
data-back-button
>
<img src="assets/figma/back.svg" alt="" />
</button>
<h1 class="nav-title" data-i18n="rockTips.pageTitle">
Game Instructions
</h1>
</nav>
<div class="rules">
<p>
<span
class="rules-line rules-line-justify"
data-i18n="rockTips.ruleOneLineA"
>1. Players choose a rock-paper-scissors move,</span
>
<span
class="rules-line"
data-i18n="rockTips.ruleOneLineB"
>and the winner receives coins.</span
>
</p>
<p>
<span
class="rules-line rules-line-justify"
data-i18n="rockTips.ruleTwoLineA"
>2. The winner pays a 5% transaction fee for</span
>
<span
class="rules-line"
data-i18n="rockTips.ruleTwoLineB"
>each game.</span
>
</p>
<p>
<span
class="rules-line rules-line-justify"
data-i18n="rockTips.ruleThreeLineA"
>3. This game is provided by the Lalu Party</span
>
<span
class="rules-line rules-line-justify"
data-i18n="rockTips.ruleThreeLineB"
>app. Google Play is not a sponsor and is not</span
>
<span
class="rules-line"
data-i18n="rockTips.ruleThreeLineC"
>involved in this activity in any way.</span
>
</p>
</div>
<div class="home-indicator" aria-hidden="true"></div>
</section>
</main>
<script src="../../common/jsbridge.js"></script>
<script src="../../common/i18n.js?v=rocktips-20260611"></script>
<script>
(function () {
var DESIGN_WIDTH = 375;
var DESIGN_HEIGHT = 812;
var root = document.documentElement;
var backButton = document.querySelector('[data-back-button]');
function updateScale() {
var scale = Math.min(
window.innerWidth / DESIGN_WIDTH,
window.innerHeight / DESIGN_HEIGHT
);
root.style.setProperty(
'--tips-scale',
String(Math.max(scale, 0.1))
);
}
function goBack() {
if (window.HyAppBridge && window.HyAppBridge.back) {
window.HyAppBridge.back();
return;
}
window.history.back();
}
updateScale();
if (backButton) backButton.addEventListener('click', goBack);
window.addEventListener('resize', updateScale);
window.addEventListener('orientationchange', updateScale);
if (window.HyAppBridge && window.HyAppBridge.ready) {
window.HyAppBridge.ready({
page: 'game/rocktips',
figma_node_id: '491:391',
});
}
})();
</script>
</body>
</html>