Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion help.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
gtag('config', 'G-6XRBBDPBJS');
</script>
<title>Petoi Web Coding Blocks - Help</title>
<link rel="icon" href="./assets/logo.svg" type="image/svg+xml" />
<link rel="icon" href="./assets/logo.svg" type="image/svg+xml" sizes="any" />
<link rel="shortcut icon" href="./assets/logo.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="./assets/logo.svg" />
<style>
* {
margin: 0;
Expand Down
26 changes: 24 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
gtag('config', 'G-6XRBBDPBJS');
</script>
<title>Petoi Coding Portal</title>
<link rel="icon" href="./assets/logo.svg" type="image/svg+xml" sizes="any" />
<link rel="shortcut icon" href="./assets/logo.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="./assets/logo.svg" />
<style>
:root {
color-scheme: light;
Expand Down Expand Up @@ -92,6 +95,12 @@
line-height: 1.6;
}

.links {
display: flex;
flex-direction: column;
gap: 10px;
}

.enter-link {
display: inline-block;
text-decoration: none;
Expand All @@ -100,6 +109,9 @@
background: var(--primary);
color: #fff;
font-weight: 600;
text-align: center;
line-height: 1.25;
width: 100%;
}

.enter-link:hover {
Expand Down Expand Up @@ -129,7 +141,10 @@ <h1 class="title" id="portalTitle">Petoi Coding Portal</h1>
Open the Blockly workspace and control your Petoi robot directly in your browser.
</p>

<a id="enterMainLink" class="enter-link" href="./main.html?lang=en">Petoi Web Coding Blocks</a>
<div class="links">
<a id="enterMainLink" class="enter-link" href="./main.html?lang=en">Petoi Web Coding Blocks</a>
<a id="enterRemoteLink" class="enter-link" href="./mobile_remote.html?lang=en">Petoi Web Controller (Under construction)</a>
</div>
<p class="footer-note" id="langHint">
The selected language will be used as the default language in the workspace.
</p>
Expand All @@ -143,18 +158,21 @@ <h1 class="title" id="portalTitle">Petoi Coding Portal</h1>
zh: {
appTitle: "Petoi编程门户",
enterButton: "Petoi陪拓网页编程积木",
portalDesc: "打开 Blockly 工作区,在浏览器中直接控制你的 Petoi 机器人。",
remoteButton: "Petoi Web Controller (Under construction)",
portalDesc: "在浏览器中直接控制你的 Petoi 机器人。",
langHint: "当前语言会自动传递给工作区,作为 main 页面默认语言。"
},
en: {
appTitle: "Petoi Coding Portal",
enterButton: "Petoi Web Coding Blocks",
remoteButton: "Petoi Web Controller (Under construction)",
portalDesc: "Open the Blockly workspace and control your Petoi robot directly in your browser.",
langHint: "The selected language will be used as the default language in the workspace."
},
ja: {
appTitle: "Petoiコーディングポータル",
enterButton: "Petoiウェブコーディングブロック",
remoteButton: "Petoi Web Controller (Under construction)",
portalDesc: "Blockly ワークスペースを開き、ブラウザから Petoi ロボットを直接操作できます。",
langHint: "選択した言語は自動的に main ページへ引き継がれ、初期言語として適用されます。"
}
Expand Down Expand Up @@ -231,6 +249,10 @@ <h1 class="title" id="portalTitle">Petoi Coding Portal</h1>
const mainLink = document.getElementById("enterMainLink");
mainLink.textContent = TEXTS[currentLang].enterButton || "Petoi Web Coding Blocks";
mainLink.href = "./main.html?lang=" + encodeURIComponent(currentLang);

const remoteLink = document.getElementById("enterRemoteLink");
remoteLink.textContent = TEXTS[currentLang].remoteButton || "Petoi Web Controller (Under construction)";
remoteLink.href = "./mobile_remote.html?lang=" + encodeURIComponent(currentLang);
}

function setLanguage(lang)
Expand Down
Loading
Loading