-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
90 lines (75 loc) · 3.22 KB
/
index.html
File metadata and controls
90 lines (75 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.ico" sizes="48x48" />
<!-- 语言路由 (早期重定向) -->
<script>
;(() => {
const LOCALE_KEY = 'buildingmomo_locale'
const safeGet = () => {
try {
return localStorage.getItem(LOCALE_KEY)
} catch {
return null
}
}
const safeSet = (val) => {
try {
localStorage.setItem(LOCALE_KEY, val)
} catch {
// ignore
}
}
const stored = safeGet() // 'zh' | 'en' | null
if (!stored && typeof window !== 'undefined' && window.__INITIAL_LANG__ === 'en') return
const inEn = /\/en(\/|$)/.test(window.location.pathname)
const here = new URL(window.location.href)
if (!here.pathname.endsWith('/')) here.pathname += '/'
const toEn = () => window.location.replace(new URL('en/', here).toString())
const toRoot = () => window.location.replace(new URL('../', here).toString())
if (stored === 'en' && !inEn) return toEn()
if (stored === 'zh' && inEn) return toRoot()
const isBot = /bot|google|baidu|bing|msn|duckduckgo|teoma|slurp|yandex/i.test(navigator.userAgent)
if (!isBot && !stored && !inEn) {
const lang = String(navigator.language || '').toLowerCase()
if (lang && !lang.startsWith('zh')) {
safeSet('en')
return toEn()
}
}
})()
</script>
<!-- SEO 核心标签 -->
<title>搬砖吧大喵 - 无限暖暖家园方案可视化编辑工具 | BuildingMomo</title>
<meta
name="description"
content="无限暖暖家园方案可视化编辑工具。支持快速移动、复制、删除大型建筑群,在不同方案间自由合并建筑群,所见即所得的坐标编辑体验。"
/>
<meta name="keywords" content="无限暖暖,家园编辑器,建筑工具,方案编辑,BuildingMomo,搬砖吧大喵" />
<meta name="author" content="ChanIok" />
<!-- Open Graph (社交分享) -->
<meta
property="og:title"
content="搬砖吧大喵 - 无限暖暖家园方案可视化编辑工具 | BuildingMomo"
/>
<meta
property="og:description"
content="无限暖暖家园方案可视化编辑工具。支持快速移动、复制、删除大型建筑群,在不同方案间自由合并建筑群。"
/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://build.infinitymomo.com/" />
<meta property="og:image" content="https://build.infinitymomo.com/logo.png" />
<!-- 搜索引擎 -->
<meta name="robots" content="index, follow" />
<link rel="canonical" href="https://build.infinitymomo.com/" />
<link rel="alternate" hreflang="zh" href="https://build.infinitymomo.com/" />
<link rel="alternate" hreflang="en" href="https://build.infinitymomo.com/en/" />
<link rel="alternate" hreflang="x-default" href="https://build.infinitymomo.com/" />
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>