naive-ui/index.html

60 lines
1.6 KiB
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"
/>
2021-11-25 03:21:54 +08:00
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@docsearch/css@alpha"
/>
<style>
:root {
--docsearch-primary-color: #18a058;
}
</style>
2021-04-19 23:05:20 +08:00
</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>
2021-11-25 03:21:54 +08:00
<div id="search" style="display: none"></div>
2021-04-19 23:05:20 +08:00
<script type="module" src="__INDEX__"></script>
2021-11-25 03:21:54 +08:00
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/@docsearch/js@alpha"
></script>
<script type="text/javascript">
docsearch({
appId: 'BH4D9OD16A',
apiKey: '692b92ecb31aac9ba46d0574b8f8ba81',
indexName: 'naiveui',
container: '#search',
debug: false // Set debug to true if you want to inspect the modal
})
</script>
2021-04-19 23:05:20 +08:00
</body>
</html>