Save isdaviddong/36046c2a398cb8e943fc520f79c28c4c to your computer and use it in GitHub Desktop.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | | | <html> | | | <head> | | | <title></title> | | | <meta charset="utf-8" /> | | | <script> | | | function Auth() { | | | var URL = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?'; | | | URL += 'response_type=code'; | | | URL += '&client_id={請換成您的Client id}'; //請換成您的App Client id | | | URL += '&redirect_uri=http://localhost:13555/index.html'; //請換成您的URL | | | URL += '&scope=openid https://graph.microsoft.com/user.read'; //請換成您要索取的權限 | | | URL += '&response_mode=query'; | | | URL += '&state=12345'; | | | URL += '&nonce=678910'; | | | window.location.href = URL; | | | } | | | </script> | | | </head> | | | <body> | | | <button onclick="Auth();">點選這裡連結AAD 2.0 Login</button> | | | </body> | | | </html> |
<div class="container">
<h1>歡迎來到 EB7 體育平台</h1>
<a href="https://example.com/match" class="button">查看比賽資訊</a>
<a href="https://example.com/news" class="button">最新體育新聞</a>
<a href="https://example.com/live" class="button">即時比分</a>
<a href="https://example.com/login" class="button">會員登入</a>
</div>
得分:0
难度:历史积分: 0
.container {
text-align: center;
}
#gameCanvas {
border: 2px solid #000;
margin-bottom: 20px;
}
button {
padding: 10px 20px;
font-size: 16px;
margin: 10px;
}
#difficulty {
width: 200px;
}
#controls {
margin-top: 20px;
}
let canvas = document.getElementById("gameCanvas");
let ctx = canvas.getContext("2d");
let score = 0;
let highScore = localStorage.getItem("highScore") || 0;
let snake = [{ x: 200, y: 200 }];
let food = { x: 0, y: 0 };
let direction = "RIGHT";
let gameInterval;
let gameSpeed = 100; // 默认速度
let isGameRunning = false;
document.getElementById("startButton").addEventListener("click", startGame);
document.getElementById("Button").addEventListener("click", toggle);
document.getElementById("difficulty").addEventListener("input", changeDifficulty);
function startGame() {
score = 0;
snake = [{ x: 200, y: 200 }];
direction = "RIGHT";
isGameRunning = true;
document.getElementById("Button").disabled = false;
document.getElementById("startButton").disabled = true;
generateFood();
gameInterval = setInterval(gameLoop, gameSpeed);
}
function toggle() {
if (isGameRunning) {
clearInterval(gameInterval);
document.getElementById("Button").innerText = "继续游戏";
} else {
gameInterval = setInterval(gameLoop, gameSpeed);
document.getElementById("Button").innerText = "暂停游戏";
}
isGameRunning = !isGameRunning;
}
function changeDifficulty(event) {
gameSpeed = 200 - event.target.value * 20; // 难度范围
if (isGameRunning) {
clearInterval(gameInterval);
gameInterval = setInterval(gameLoop, gameSpeed);
}
}
function gameLoop() {
moveSnake();
if (checkCollision()) {
endGame();
}
if (checkFoodCollision()) {
score++;
if (score > highScore) {
highScore = score;
localStorage.setItem("highScore", highScore);
}
document.getElementById("score").innerText = score;
document.getElementById("highScore").innerText = highScore;
generateFood();
}
clearCanvas();
drawSnake();
drawFood();
}
function clearCanvas() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
}
function drawSnake() {
snake.forEach(segment => {
ctx.fillStyle = "#00FF00";
ctx.fillRect(segment.x, segment.y, 20, 20);
});
}
function drawFood() {
ctx.fillStyle = "#FF0000";
ctx.fillRect(food.x, food.y, 20, 20);
}
function moveSnake() {
let head = { ...snake[0] };
if (direction === "RIGHT") head.x += 20;
if (direction === "LEFT") head.x -= 20;
if (direction === "UP") head.y -= 20;
if (direction === "DOWN") head.y += 20;
snake.unshift(head);
snake.pop();
}
function generateFood() {
food.x = Math.floor(Math.random() * 20) * 20;
food.y = Math.floor(Math.random() * 20) * 20;
}
function checkCollision() {
let head = snake[0];
// 检查是否撞到墙壁
if (head.x < 0 || head.x >= canvas.width || head.y < 0 || head.y >= canvas.height) return true;
// 检查是否撞到自己
for (let i = 1; i < snake.length; i++) {
if (head.x === snake[i].x && head.y === snake[i].y) return true;
}
return false;
}
function checkFoodCollision() {
let head = snake[0];
return head.x === food.x && head.y === food.y;
}
function endGame() {
clearInterval(gameInterval);
alert(游戏结束!您的得分为:${score}
);
if (score > highScore) {
highScore = score;
localStorage.setItem("highScore", highScore);
}
document.getElementById("highScore").innerText = highScore;
document.getElementById("score").innerText = score;
document.getElementById("startButton").disabled = false;
document.getElementById("Button").disabled = true;
document.getElementById("Button").innerText = "暂停游戏";
isGameRunning = false;
}
document.addEventListener("keydown", function (event) {
if (event.key === "ArrowUp" && direction !== "DOWN") direction = "UP";
if (event.key === "ArrowDown" && direction !== "UP") direction = "DOWN";
if (event.key === "ArrowLeft" && direction !== "RIGHT") direction = "LEFT";
if (event.key === "ArrowRight" && direction !== "LEFT") direction = "RIGHT";
});
welcome to google #1 search result for index.html
<!doctype html>
<title>Sky Dodge</title> <style> :root{ --bg:#0b1020; --fg:#e8f1ff; --accent:#4cc9f0; --good:#80ffdb; --bad:#ff4d6d; --muted:#95a1b3; } *{box-sizing:border-box} html,body{height:100%;margin:0;background:radial-gradient(1200px 800px at 50% -200px,#111a33,var(--bg));color:var(--fg);font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Noto Sans TC",sans-serif} .wrap{max-width:720px;margin:0 auto;padding:16px;display:flex;flex-direction:column;gap:12px} header{display:flex;align-items:center;justify-content:space-between;gap:12px} h1{font-size:20px;margin:0;letter-spacing:.5px} .btnbar{display:flex;gap:8px;flex-wrap:wrap} button{ appearance:none;border:1px solid #2b3550;background:#111a33;color:var(--fg); padding:8px 12px;border-radius:10px;font-weight:600;cursor:pointer;transition:.15s transform,.2s opacity; } button:active{transform:scale(.98)} button[aria-pressed="true"]{outline:2px solid var(--accent);box-shadow:0 0 0 3px #00000040 inset} #gamebox{position:relative;border:1px solid #223; border-radius:14px;overflow:hidden} canvas{display:block;width:100%;height:auto;background:linear-gradient(#0b1533 0%, #0b1020 60%, #090c1a 100%)} .hud{ position:absolute;inset:0;pointer-events:none;padding:10px;display:flex;flex-direction:column; } .hud .row{display:flex;justify-content:space-between;align-items:center;font-weight:700;font-variant-numeric:tabular-nums} .centerOverlay{ position:absolute;inset:0;display:flex;align-items:center;justify-content:center; backdrop-filter:blur(4px) saturate(120%); background:#0b102088; text-align:center; padding:20px; } .panel{background:#0d1328;border:1px solid #223;border-radius:16px;padding:18px;max-width:480px} .title{font-size:22px;margin:0 0 6px} .muted{color:var(--muted);font-size:14px;line-height:1.4} .kbd{display:inline-block;border:1px solid #3a4466;border-bottom-width:3px;padding:0 6px;border-radius:6px;margin:0 2px;font-weight:700} .tip{margin-top:10px;font-size:13px;color:#b8c4d9} .link{color:var(--accent);text-decoration:none} footer{opacity:.75;font-size:12px;text-align:center;padding-bottom:8px} </style># 🌌 Sky Dodge
<div id="overlay" class="centerOverlay" hidden>
<div class="panel">
<h2 class="title" id="overlayTitle">Sky Dodge</h2>
<p id="overlayMsg" class="muted">左右移動小飛球,避開障礙、吃星星加分。</p>
<div class="tip">
電腦:<span class="kbd">←</span> <span class="kbd">→</span> 或 <span class="kbd">A</span>/<span class="kbd">D</span>,<span class="kbd">P</span> 暫停。<br>
手機:左右半邊螢幕觸控/長按連續移動。
</div>
<div style="margin-top:14px;display:flex;gap:8px;justify-content:center">
<button id="overlayStart">開始</button>
</div>
</div>
</div>
我們的特色 #
優秀師資
我們擁有多年經驗的專業教師團隊。
舒適環境
明亮整潔的教室,提供最佳的學習氛圍。
成果亮眼
學生在各類比賽與考試中屢創佳績。
最新消息 #
- 2025/08/10 - 暑期結業式圓滿落幕
- 2025/07/15 - 英語朗讀比賽榮獲第一名
- 2025/06/30 - 暑期課程開課
活動成果 #
地址:台中市西區公益路56號2樓|電話:(04) 2319-7118|LINE:23197118
© 2025 華格納補習班. All rights reserved.
我們的特色 #
優秀師資
我們擁有多年經驗的專業教師團隊。
舒適環境
明亮整潔的教室,提供最佳的學習氛圍。
成果亮眼
學生在各類比賽與考試中屢創佳績。
最新消息 #
- 2025/08/10 - 暑期結業式圓滿落幕
- 2025/07/15 - 英語朗讀比賽榮獲第一名
- 2025/06/30 - 暑期課程開課
活動成果 #
地址:台中市西區公益路56號2樓|電話:(04) 2319-7118|LINE:23197118
© 2025 華格納補習班. All rights reserved.
<a class="link" href="https://instagram.com/your_instagram_here" target="_blank" ...>Instagram
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
header {
background: url('https://images.unsplash.com/photo-1522312346375-d1a52e2b99b3?auto=format&fit=crop&w=1500&q=80') no-repeat center/cover;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: white;
position: relative;
}
header::after {
content: "";
position: absolute;
top:0; left:0;
width:100%; height:100%;
background: rgba(0,0,0,0.5);
}
header .content {
position: relative;
z-index: 1;
}
header h1 {
font-size: 3rem;
margin-bottom: 1rem;
}
header p {
font-size: 1.2rem;
margin-bottom: 2rem;
}
.btn {
display: inline-block;
padding: 12px 24px;
background: #ff6b6b;
color: white;
text-decoration: none;
font-weight: bold;
border-radius: 5px;
transition: background 0.3s;
}
.btn:hover {
background: #ff4040;
}
section {
padding: 60px 20px;
max-width: 1100px;
margin: auto;
}
.products {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
.product {
border: 1px solid #ddd;
border-radius: 8px;
overflow: hidden;
text-align: center;
background: #fff;
transition: transform 0.3s;
}
.product:hover {
transform: translateY(-5px);
}
.product img {
width: 100%;
height: 250px;
object-fit: cover;
}
.product h3 {
margin: 15px 0 5px;
}
.product p {
margin-bottom: 15px;
color: #555;
}
.about {
text-align: center;
}
.testimonials {
background: #f9f9f9;
border-radius: 10px;
padding: 30px;
}
.testimonial {
margin-bottom: 20px;
font-style: italic;
}
footer {
background: #333;
color: white;
text-align: center;
padding: 20px;
}
footer a {
color: #ff6b6b;
text-decoration: none;
}
</style>## Featured Accessories
Why Choose Us? #
We design timeless accessories that combine elegance with durability. Every piece is crafted with care to elevate your everyday look.
What Our Customers Say #
© 2025 Accessories Store | Contact Us
function gameLoop() {
snake.x += velocity.x;
snake.y += velocity.y;
// 撞牆
if (snake.x < 0 || snake.x >= tileCount || snake.y < 0 || snake.y >= tileCount) {
resetGame();
}
// 吃到自己
for (let t of snakeTrail) {
if (t.x === snake.x && t.y === snake.y) resetGame();
}
// 畫面
ctx.fillStyle = "#111";
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = "lime";
for (let t of snakeTrail) ctx.fillRect(t.x * gridSize, t.y * gridSize, gridSize - 2, gridSize - 2);
ctx.fillStyle = "yellow";
ctx.fillRect(snake.x * gridSize, snake.y * gridSize, gridSize - 2, gridSize - 2);
ctx.fillStyle = "red";
ctx.fillRect(fruit.x * gridSize, fruit.y * gridSize, gridSize - 2, gridSize - 2);
snakeTrail.push({ x: snake.x, y: snake.y });
while (snakeTrail.length > tail) snakeTrail.shift();
// 吃到果實
if (snake.x === fruit.x && snake.y === fruit.y) {
tail++;
fruit.x = Math.floor(Math.random() * tileCount);
fruit.y = Math.floor(Math.random() * tileCount);
}
}
function resetGame() {
tail = 5;
snakeTrail = [];
snake = { x: 10, y: 10 };
velocity = { x: 0, y: 0 };
}
document.addEventListener('keydown', e => {
switch (e.key) {
case 'ArrowLeft': velocity = { x: -1, y: 0 }; break;
case 'ArrowUp': velocity = { x: 0, y: -1 }; break;
case 'ArrowRight': velocity = { x: 1, y: 0 }; break;
case 'ArrowDown': velocity = { x: 0, y: 1 }; break;
}
});
setInterval(gameLoop, 100);
// --- AI 聊天區 ---
const apiKey = '你的API Key'; // ←←←這裡貼上你的API Key!
async function chatWithGPT(prompt) {
const endpoint = 'https://api.openai.com/v1/chat/completions';
const response = await fetch(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
},
body: JSON.stringify({
model: 'gpt-3.5-turbo',
messages: [{ role: 'user', content: prompt }],
max_tokens: 300
})
});
const data = await response.json();
return data.choices?.[0]?.message?.content || "AI 沒有回應";
}
async function askAI() {
const question = document.getElementById('userInput').value;
if (!question) return;
document.getElementById('aiResponse').innerText = "AI 正在思考...";
try {
const answer = await chatWithGPT(question);
document.getElementById('aiResponse').innerText = answer;
} catch (err) {
document.getElementById('aiResponse').innerText = "AI 請求失敗,請檢查 API Key 或網路";
}
}
</script>
<div class="max-w-md mx-auto bg-card-bg shadow-2xl rounded-xl overflow-hidden">
<header class="bg-primary text-white p-6">
<h1 class="text-2xl font-bold text-center">💸 智慧分帳計算機</h1>
</header>
<main class="p-6 space-y-6">
<div class="space-y-4">
<h2 class="text-lg font-semibold text-gray-700 border-b pb-2">輸入資訊</h2>
<div>
<label for="totalBill" class="block text-sm font-medium text-gray-600 mb-1">總金額 (Total Bill)</label>
<div class="relative rounded-lg shadow-sm">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<span class="text-gray-500">NT$</span>
</div>
<input type="number" id="totalBill" value="500" min="0" placeholder="0.00"
class="block w-full pl-12 pr-4 py-3 border border-gray-300 rounded-lg text-lg focus:ring-primary focus:border-primary">
</div>
</div>
<div>
<div class="flex justify-between items-center mb-1">
<label class="text-sm font-medium text-gray-600">小費百分比 (Tip %)</label>
<span id="tipPercentageValue" class="text-lg font-bold text-primary">10%</span>
</div>
<input type="range" id="tipPercentage" value="10" min="0" max="30" step="1"
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer range-lg focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2">
</div>
<div>
<label class="block text-sm font-medium text-gray-600 mb-2">人數 (People)</label>
<div class="flex items-center justify-center space-x-4 bg-gray-100 p-3 rounded-lg">
<button id="decrementPeople" class="text-3xl font-bold text-primary hover:text-primary-dark transition duration-150 p-1.5 rounded-full hover:bg-white">-</button>
<span id="peopleValue" class="text-3xl font-extrabold text-gray-800 w-16 text-center">2</span>
<button id="incrementPeople" class="text-3xl font-bold text-primary hover:text-primary-dark transition duration-150 p-1.5 rounded-full hover:bg-white">+</button>
</div>
</div>
</div>
<div class="bg-dark-bg text-dark-text p-5 rounded-xl shadow-lg space-y-5">
<h2 class="text-xl font-bold border-b border-gray-700 pb-3 mb-4">✨ 即時運算結果</h2>
<div class="flex justify-between items-center">
<span class="text-base font-medium text-gray-400">總金額 (含小費):</span>
<span id="totalAmountDisplay" class="text-2xl font-bold text-secondary">NT$ 0.00</span>
</div>
<div class="text-center pt-4 border-t border-gray-700">
<p class="text-lg font-medium text-gray-400 mb-1">每人應付金額 (Per Person)</p>
<p id="perPersonDisplay" class="text-5xl font-extrabold text-white">NT$ 0.00</p>
</div>
</div>
</main>
</div>
<script>
// 取得所有 DOM 元素
const totalBillInput = document.getElementById('totalBill');
const tipPercentageSlider = document.getElementById('tipPercentage');
const tipPercentageValue = document.getElementById('tipPercentageValue');
const peopleValueSpan = document.getElementById('peopleValue');
const incrementPeopleBtn = document.getElementById('incrementPeople');
const decrementPeopleBtn = document.getElementById('decrementPeople');
const totalAmountDisplay = document.getElementById('totalAmountDisplay');
const perPersonDisplay = document.getElementById('perPersonDisplay');
let totalBill = parseFloat(totalBillInput.value) || 0;
let tipPercentage = parseInt(tipPercentageSlider.value) || 0;
let people = parseInt(peopleValueSpan.textContent) || 1; // 確保人數至少為 1
/**
* 主計算函式:計算總金額與每人應付金額
*/
function calculateSplit() {
// 1. 取得最新數值
totalBill = parseFloat(totalBillInput.value) || 0;
tipPercentage = parseInt(tipPercentageSlider.value) || 0;
people = parseInt(peopleValueSpan.textContent) || 1;
// 處理小費計算
const tipAmount = totalBill * (tipPercentage / 100);
// 計算總金額 (含小費)
const totalAmountWithTip = totalBill + tipAmount;
// 計算每人應付金額
const perPersonAmount = people > 0 ? totalAmountWithTip / people : 0;
// 2. 更新介面顯示
// 更新小費百分比顯示
tipPercentageValue.textContent = `${tipPercentage}%`;
// 更新總金額 (含小費) 顯示,四捨五入到小數點第二位
totalAmountDisplay.textContent = `NT$ ${totalAmountWithTip.toFixed(2)}`;
// 更新每人應付金額顯示,四捨五入到小數點第二位
perPersonDisplay.textContent = `NT$ ${perPersonAmount.toFixed(2)}`;
}
// --- 事件監聽器 ---
// 1. 總金額輸入變更
totalBillInput.addEventListener('input', calculateSplit);
// 2. 小費滑桿變更
tipPercentageSlider.addEventListener('input', calculateSplit);
// 3. 人數增加按鈕
incrementPeopleBtn.addEventListener('click', () => {
people = parseInt(peopleValueSpan.textContent) + 1;
peopleValueSpan.textContent = people;
calculateSplit();
});
// 4. 人數減少按鈕
decrementPeopleBtn.addEventListener('click', () => {
people = parseInt(peopleValueSpan.textContent);
if (people > 1) { // 確保人數至少為 1
people -= 1;
peopleValueSpan.textContent = people;
calculateSplit();
}
});
// 頁面載入時先執行一次計算,顯示初始值
window.onload = calculateSplit;
</script>
نقل سريع، آمن وموثوق عبر Volkswagen Crafter عالية السعة.
<!-- ★ ضع صورتك هنا بعد تسميتها: crafter-real.jpg -->
<img src="crafter-real.jpg" alt="SwiftCargo Volkswagen Crafter">
لماذا SwiftCargo؟ #
<div class="feature-box">✔ نقل لوجستي احترافي للشركات والمطارات والموانئ باستخدام Volkswagen Crafter</div>
<div class="feature-box">✔ تتبع مباشر لكل شحنة لضمان وصولها في الوقت المحدد</div>
<div class="feature-box">✔ حلول شحن آمنة، سريعة وفعالة</div>
<div class="feature-box">✔ فريق متخصص، عمليات دقيقة، وانسيابية كاملة في الخدمة</div>
ابدأ شحنتك الآن
تواصل معنا #
<input type="text" name="name" placeholder="الاسم الكامل" required>
<input type="email" name="email" placeholder="البريد الإلكتروني" required>
<input type="text" name="phone" placeholder="رقم الهاتف" required>
<textarea name="message" placeholder="اكتب رسالتك..." rows="5" required></textarea>
<button type="submit">إرسال</button>
</form>
📧 raaq605@gmail.com
📞 0666116722
© 2025 SwiftCargo
<!doctype html>
<title>簡易旅遊規劃器 • Travel Planner</title> <style> :root{ --bg:#0f1720; --card:#111827; --muted:#9ca3af; --accent:#06b6d4; --glass: rgba(255,255,255,0.03); --max-width:1100px; font-family: system-ui,-apple-system, "Segoe UI", Roboto, "Noto Sans CJK TC", "Helvetica Neue", Arial; } body{margin:0;background:linear-gradient(180deg,#071029 0%, #0b1722 60%);color:#e6eef6;display:flex;justify-content:center;padding:28px 16px;} .app{width:100%;max-width:var(--max-width);display:grid;grid-template-columns:320px 1fr 320px;gap:18px;} .panel{background:linear-gradient(180deg,var(--card), #071022);border-radius:12px;padding:16px;box-shadow:0 6px 20px rgba(2,6,23,0.6);} header.app-head{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;margin-bottom:4px;} header.app-head h1{font-size:18px;margin:0;color:white;} header.app-head p{margin:0;color:var(--muted);font-size:13px;} .left{display:flex;flex-direction:column;gap:10px} .search{display:flex;gap:8px} input[type=text], textarea, select{width:100%;padding:10px;border-radius:8px;border:1px solid rgba(255,255,255,0.04);background:var(--glass);color:inherit} button{background:var(--accent);border:0;padding:8px 10px;border-radius:8px;color:#02303a;font-weight:700;cursor:pointer} button.ghost{background:transparent;border:1px solid rgba(255,255,255,0.06);color:var(--muted);font-weight:600} .dest-list{max-height:220px;overflow:auto;padding:6px;border-radius:8px;background:rgba(255,255,255,0.02)} .dest-item{padding:8px;border-radius:8px;display:flex;justify-content:space-between;align-items:center;margin-bottom:6px} .dest-item strong{font-size:14px} .center{display:flex;flex-direction:column;gap:12px} .days{display:flex;gap:8px;overflow:auto;padding-bottom:6px} .day-tab{padding:8px 10px;border-radius:10px;background:rgba(255,255,255,0.02);cursor:pointer;min-width:90px;text-align:center} .day-tab.active{background:linear-gradient(90deg,var(--accent),#7ee1e9);color:#022b30;font-weight:700} .itinerary{min-height:320px;display:flex;flex-direction:column;gap:10px} .activity{background:rgba(255,255,255,0.025);padding:10px;border-radius:10px;display:flex;justify-content:space-between;gap:8px} .activity .meta{font-size:13px;color:var(--muted)} .right .map{height:180px;background:linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--muted)} .controls{display:flex;gap:8px;flex-wrap:wrap} .tools{display:flex;gap:8px;align-items:center} footer.note{grid-column:1/-1;margin-top:6px;color:var(--muted);font-size:13px;text-align:center}@media(max-width:980px){ .app{grid-template-columns:1fr; padding-bottom:48px} .right{order:3} } .small{font-size:13px;color:var(--muted)} .btn-danger{background:#ef4444;color:white} .pill{background:rgba(255,255,255,0.03);padding:6px 8px;border-radius:999px;color:var(--muted);font-size:13px} /* Print */
@mediaprint{ body{background:white;color:black} .app{max-width:100%;grid-template-columns:1fr} .panel{box-shadow:none;background:transparent;padding:0} .right, .left, header.app-head .tools{display:none} } </style>
快速建立你的行程、匯出、及分享
<!-- left: destination & quick add -->
<aside class="panel left">
<h3 style="margin:0 0 8px 0">搜尋目的地</h3>
<div class="search">
<input type="text" id="destInput" placeholder="輸入城市或景點(示範:巴黎、東京)" />
<button id="btnAddDest">新增</button>
</div>
<div class="small" style="margin-top:8px;color:var(--muted)">建議(示範):台北、東京、首爾、巴黎、布達佩斯、紐約</div>
<div class="dest-list" id="destList" aria-live="polite"></div>
<hr style="opacity:.06;margin:12px 0;border:none;height:1px;background:rgba(255,255,255,0.03)">
<h3 style="margin:0 0 8px 0">快速加入活動</h3>
<input type="text" id="quickTitle" placeholder="活動名稱(例如:艾菲爾鐵塔)" />
<input type="text" id="quickTime" placeholder="時間(例如:09:30)" />
<textarea id="quickNote" placeholder="備註或地址(例如:Champ de Mars)" rows="3"></textarea>
<div style="display:flex;gap:8px;margin-top:8px">
<button id="btnQuickAdd">加入目前天</button>
<button id="btnAddDay" class="ghost">新增一天</button>
</div>
</aside>
<!-- center: itinerary -->
<main class="panel center">
<div>
<div style="display:flex;justify-content:space-between;align-items:center">
<div class="days" id="dayTabs"></div>
<div class="pill" id="itSummary">0 天 • 0 活動</div>
</div>
</div>
<div class="itinerary" id="itineraryArea">
<div class="small" id="emptyHint">還沒有天數,請按「新增一天」。</div>
</div>
</main>
<!-- right: map & details -->
<aside class="panel right">
<h3 style="margin:0 0 8px 0">地圖 & 詳細</h3>
<div class="map" id="map">地圖預留區(可接 Google Maps 或 Leaflet)</div>
<hr style="opacity:.06;margin:12px 0;border:none;height:1px;background:rgba(255,255,255,0.03)">
<h4 style="margin:6px 0">當前被選活動</h4>
<div id="activeDetail" class="small">尚未選取活動</div>
<div style="margin-top:12px;display:flex;gap:8px;flex-wrap:wrap">
<button id="btnClear" class="ghost">清除本機資料</button>
<button id="btnLoadSample" class="ghost">載入範例</button>
</div>
<div style="margin-top:12px;color:var(--muted);font-size:13px">
說明:這是靜態前端範例。若要加入地圖搜尋、航班/飯店整合,請使用外部 API。
</div>
</aside>
<footer class="note">製作:Travel Planner • 範例前端(離線可用)</footer>
${escapeHtml(name)}
${day.name}
${escapeHtml(a.title||'未命名活動')}${a.time||''}
h1 {
margin-top: 20px;
}
#score {
font-size: 20px;
margin-bottom: 10px;
}
#box {
width: 80px;
height: 80px;
background: #ff5252;
position: absolute;
border-radius: 12px;
cursor: pointer;
box-shadow: 0 0 20px rgba(255,82,82,0.7);
}
</style># Catch the Box 🎯
Phone Location Tracker #
Show My Location <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script> <script> var map = L.map('map').setView([0,0],2); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{ maxZoom:19 }).addTo(map); function getLocation(){ if(navigator.geolocation){ navigator.geolocation.getCurrentPosition(function(position){ var lat = position.coords.latitude; var lon = position.coords.longitude; map.setView([lat,lon],15); L.marker([lat,lon]).addTo(map) .bindPopup("Your phone location") .openPopup(); }); }else{ alert("Location not supported"); } } </script>## Track Phone Location
Click the button to get your location
Get Location
<script> function getLocation(){ if(navigator.geolocation){ navigator.geolocation.getCurrentPosition(showPosition); }else{ document.getElementById("location").innerHTML="Geolocation not supported"; } } function showPosition(position){ let lat = position.coords.latitude; let lon = position.coords.longitude; document.getElementById("location").innerHTML = "Latitude: " + lat + "Longitude: " + lon + "
Open in Google Maps"; } </script>
``
Your Turn
"; } // 更新畫面 function update(){ document.getElementById("hp").innerText = hp; document.getElementById("mhp").innerText = mhp; } // 玩家行動 function play(type){ if(phase !== "player") return; if(type === "attack"){ mhp -= (2 + charge); charge = 0; log("You attack!"); } if(type === "defend"){ hp += 1; log("You defend!"); } if(type === "charge"){ charge += 1; log("Charge!"); } update(); startMonster(); } // 怪物回合 function startMonster(){ phase = "monster"; document.getElementById("status").innerText = "Monster Turn - DON'T MOVE MOUSE!"; startTime = Date.now(); monsterTimer = setInterval(()=>{ let t = Date.now() - startTime; let p = Math.min(t/3000*100,100); document.getElementById("bar").style.width = p + "%"; if(t > 3000){ clearInterval(monsterTimer); monsterAction(); startPlayer(); } },50); } // 怪物行動 function monsterAction(){ let dmg = Math.floor(Math.random()*3)+1; hp -= dmg; log("Monster attacks " + dmg); update(); } // 玩家回合 function startPlayer(){ phase = "player"; document.getElementById("status").innerText = "Your Turn"; document.getElementById("bar").style.width = "0%"; } // ❗ 魔咒系統(核心) document.addEventListener("mousemove",()=>{ if(phase === "monster"){ hp -= 1; impulse++; log("⚠ Curse activated! -1 HP"); update(); } }); document.addEventListener("click",()=>{ if(phase === "monster"){ hp -= 1; impulse++; log("⚠ Curse activated! -1 HP"); update(); } }); update(); </script>
@Keyframesshake{ 0%{transform:translate(0,0);} 25%{transform:translate(-6px,4px);} 50%{transform:translate(6px,-4px);} 75%{transform:translate(-6px,4px);} 100%{transform:translate(0,0);} } /* 卡牌 / .card{ width:100px; height:70px; background:#4a6cf7; border-radius:8px; display:inline-block; margin:5px; line-height:70px; cursor:pointer; } #hand{ position:absolute; bottom:10px; width:100%; } / UI */ #ui{ margin-top:10px; } .bar{ width:300px; height:15px; background:gray; margin:5px auto; } .fill{ height:15px; background:yellow; width:100%; } </style>
Charge: 0 | Shield: 0
Impulse: 0
@Keyframespop{ 0%{transform:scale(0.5);} 100%{transform:scale(1);} } </style> TKD LEGEND - Web AR 跆拳道對戰
🥋 模式選擇 #
AR 對戰
Boss 挑戰
動作挑戰
📷 AR 戰鬥畫面 #
Combo:0
開始戰鬥!
👊 普通踢擊 🔥 旋踢 🛡️ 防禦 🔄 重置## 🤖 AI 教練
🥋 腰帶養成系統 #
目前等級:白帶
<title>TKD LEGEND Web AR</title> <style> body{ margin:0; font-family:Arial; background:#0b1220; color:white; overflow-x:hidden; } header{ background:#111c34; padding:20px; text-align:center; font-size:32px; font-weight:bold; color:#ffd54a; } .container{ padding:20px; max-width:1000px; margin:auto; } .card{ background:#16233f; padding:20px; border-radius:20px; margin-bottom:20px; box-shadow:0 0 20px rgba(0,0,0,0.3); } button{ background:#ffb300; border:none; padding:12px 18px; border-radius:10px; font-size:16px; font-weight:bold; cursor:pointer; margin:5px; } button:hover{ transform:scale(1.05); } .enemy{ font-size:120px; text-align:center; transition:0.2s; } .hpbar{ height:25px; background:#333; border-radius:10px; overflow:hidden; margin:15px 0; } .hp{ height:100%; width:100%; background:#43a047; transition:0.3s; } .camera{ background:#000; height:240px; border-radius:20px; display:flex; justify-content:center; align-items:center; font-size:24px; margin-bottom:20px; } .chat{ background:#1f335f; padding:12px; border-radius:12px; margin-top:10px; } .belts{ display:flex; gap:10px; flex-wrap:wrap; margin-top:15px; } .belt{ width:70px; height:22px; border-radius:5px; border:1px solid #fff; } .score{ font-size:22px; font-weight:bold; color:#ffd54a; } #battle{ display:none; } .combo-effect{ font-size:28px; color:#ff5252; animation:pop 0.5s ease; }[@Keyframes]pop{ 0%{transform:scale(0.5);} 100%{transform:scale(1);} } </style> TKD LEGEND - Web AR 跆拳道對戰 ## 🥋 模式選擇 AR 對戰Boss 挑戰
動作挑戰
📷 AR 戰鬥畫面 #
AR 相機啟動中(模擬)
🥋
Combo:0開始戰鬥!
👊 普通踢擊 🔥 旋踢 🛡️ 防禦 🔄 重置
🤖 AI 教練 #
今天建議進行高踢訓練 20 分鐘。
取得 AI 建議## 🥋 腰帶養成系統
目前等級:白帶
<script> let hp = 100; let combo = 0; let level = 0; const belts = [ "白帶", "黃帶", "綠帶", "藍帶", "紅帶", "黑帶" ]; function startBattle(){ document.getElementById("battle").style.display="block"; document.getElementById("status").innerHTML = "AR 對戰開始!"; } function bossMode(){ startBattle(); document.getElementById("enemy").innerHTML = "👹"; document.getElementById("status").innerHTML = "Boss 出現了!"; } function challengeMode(){ alert("⚡ 30 秒旋踢挑戰開始!"); } function updateUI(){ document.getElementById("hp").style.width = hp + "%"; document.getElementById("combo").innerHTML = combo; if(hp <= 0){ document.getElementById("enemy").innerHTML = "💥"; document.getElementById("status").innerHTML = "🎉 Victory!Boss 被擊敗!"; if(level < belts.length - 1){ level++; document.getElementById("beltText").innerHTML = "目前等級:" + belts[level]; } } } function showEffect(text){ document.getElementById("effect").innerHTML = ' ' + text + ' '; setTimeout(() => { document.getElementById("effect").innerHTML = ""; }, 500); } function kick(){ if(hp <= 0) return; hp -= 15; combo += 1; document.getElementById("status").innerHTML = "命中成功!"; showEffect("COMBO +1"); updateUI(); } function spinKick(){ if(hp <= 0) return; hp -= 30; combo += 2; document.getElementById("status").innerHTML = "🔥 旋踢爆擊!"; showEffect("CRITICAL HIT!"); updateUI(); } function block(){ document.getElementById("status").innerHTML = "成功防禦敵人攻擊!"; } function resetGame(){ hp = 100; combo = 0; document.getElementById("enemy").innerHTML = "🥋"; document.getElementById("status").innerHTML = "重新開始戰鬥!"; updateUI(); } function coachTip(){ const tips = [ "今天建議訓練旋踢速度。", "記得補充蛋白質與水分。", "你的反應速度進步了!", "高踢角度還能再提高。" ]; const randomTip = tips[Math.floor(Math.random()*tips.length)]; document.getElementById("coach").innerHTML = randomTip; } </script>