naive-ui/index.html

37 lines
947 B
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
2021-04-19 23:05:20 +08:00
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"
/>
<title>Naive UI</title>
<link
rel="icon"
type="image/svg+xml"
href="/demo/assets/images/naivelogo.svg"
/>
</head>
<body>
<script>
const path = window.location.pathname
const pathLocale = path.startsWith('/en-US')
? 'en-US'
: path.startsWith('/zh-CN')
? 'zh-CN'
: undefined
2021-04-19 23:05:20 +08:00
function deriveTitleFromLocale(locale = navigator.language) {
if (locale === 'zh-CN') {
2021-05-25 13:21:43 +08:00
document.title = 'Naive UI: 一个 Vue 3 组件库'
2021-04-19 23:05:20 +08:00
} else {
2021-05-25 13:21:43 +08:00
document.title = 'Naive UI: A Vue 3 Component Library'
2021-04-19 23:05:20 +08:00
}
}
deriveTitleFromLocale(pathLocale)
2021-04-19 23:05:20 +08:00
</script>
<div id="app"></div>
<script type="module" src="__INDEX__"></script>
</body>
</html>