Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lindexi_gd
Uno
提交
4d550c16
U
Uno
项目概览
lindexi_gd
/
Uno
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
Uno
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4d550c16
编写于
6月 09, 2023
作者:
J
Jérôme Laban
提交者:
GitHub
6月 09, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #12587 from jbonnier/dev/jubo/docsearch-by-algolia
chore(docsearch): Implement DocSearch by Algolia
上级
1e99acd3
6ebb0b52
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
2068 addition
and
84 deletion
+2068
-84
doc/docfx.json
doc/docfx.json
+1
-1
doc/gulpfile.js
doc/gulpfile.js
+0
-4
doc/package.json
doc/package.json
+0
-1
doc/templates/uno/partials/scripts.tmpl.partial
doc/templates/uno/partials/scripts.tmpl.partial
+16
-1
doc/templates/uno/service/search.scss
doc/templates/uno/service/search.scss
+32
-62
doc/templates/uno/styles/docfx.js
doc/templates/uno/styles/docfx.js
+1462
-1
doc/templates/uno/styles/main.css
doc/templates/uno/styles/main.css
+529
-5
doc/templates/uno/styles/main.js
doc/templates/uno/styles/main.js
+26
-1
doc/templates/uno/toc.html.tmpl
doc/templates/uno/toc.html.tmpl
+2
-8
未找到文件。
doc/docfx.json
浏览文件 @
4d550c16
...
...
@@ -41,7 +41,7 @@
"disableGitFeatures"
:
false
,
"globalMetadata"
:
{
"_appLogoPath"
:
"images/uno-logo.png"
,
"_enableSearch"
:
"true"
,
"_enableSearch"
:
false
,
"_appFaviconPath"
:
"images/UnoLogoSmall.png"
,
"_disableContribution"
:
false
,
"_gitContribute"
:
{
...
...
doc/gulpfile.js
浏览文件 @
4d550c16
...
...
@@ -7,7 +7,6 @@ const concat = require('gulp-concat');
const
postcss
=
require
(
'
gulp-postcss
'
);
const
gulpif
=
require
(
'
gulp-if
'
);
const
del
=
require
(
'
del
'
);
const
sassLint
=
require
(
'
gulp-sass-lint
'
);
const
sourcemaps
=
require
(
'
gulp-sourcemaps
'
);
const
stripImportExport
=
require
(
'
gulp-strip-import-export
'
);
const
browserSync
=
require
(
'
browser-sync
'
).
create
();
...
...
@@ -26,9 +25,6 @@ function styles(done) {
src
([
`
${
assets
}
/**/*.scss`
,
`
${
assets
}
/**/*.sass`
])
.
pipe
(
gulpif
(
isDebug
,
sourcemaps
.
init
()))
.
pipe
(
gulpif
(
isDebug
,
sassLint
()))
.
pipe
(
gulpif
(
isDebug
,
sassLint
.
format
()))
.
pipe
(
gulpif
(
isDebug
,
sassLint
.
failOnError
()))
.
pipe
(
sass
({
includePaths
:
[
'
./node_modules/
'
],
outputStyle
:
output
}).
on
(
'
error
'
,
...
...
doc/package.json
浏览文件 @
4d550c16
...
...
@@ -19,7 +19,6 @@
"gulp-postcss"
:
"^9.0.0"
,
"gulp-rename"
:
"^2.0.0"
,
"gulp-sass"
:
"^4.1.0"
,
"gulp-sass-lint"
:
"^1.3.4"
,
"gulp-sourcemaps"
:
"^2.6.4"
,
"gulp-strip-import-export"
:
"^1.0.0"
,
"gulp-uglify"
:
"^3.0.2"
,
...
...
doc/templates/uno/partials/scripts.tmpl.partial
浏览文件 @
4d550c16
...
...
@@ -14,4 +14,19 @@ mermaid.initialize({
startOnLoad: false
});
mermaid.init(undefined, ".lang-mermaid");
</script>
\ No newline at end of file
</script>
<!-- Algolia DocSearch -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" />
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
<script>
window.addEventListener('DOMContentLoaded', function() {
docsearch({
container: '#docsearch',
appId: 'PHB9D8WS99',
indexName: 'platform',
apiKey: '7877394996f96cde1a9b795dce3f7787',
placeholder: 'Search Docs...'
});
console.log(docsearch);
});
</script>
doc/templates/uno/service/search.scss
浏览文件 @
4d550c16
@import
"../variables"
;
:root
{
--docsearch-primary-color
:
#{
$blue
}
!
important
;
--docsearch-logo-color
:
#{
$blue
}
!
important
;
}
.sidefilter
{
top
:
116px
;
z-index
:
2
;
padding
:
10px
;
background-color
:
transparent
!
important
;
#search
{
display
:
block
;
border-radius
:
10px
;
input
:focus
{
outline
:
none
;
border
:
2px
solid
#159bff
;
}
}
background-color
:
transparent
;
height
:
60px
;
padding
:
10px
;
#search-query
{
.DocSearch-Button
{
background
:
transparent
;
border
:
2px
inset
$darkgray
;
border-radius
:
6px
;
height
:
45px
;
width
:
100%
;
margin
:
0
;
min-height
:
45px
;
padding
:
10px
;
width
:
100%
;
}
#search-results
{
background
:
white
;
position
:
absolute
;
margin
:
5px
0
0
0
;
width
:
560px
;
max-height
:
calc
(
100vh
-
250px
);
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.15
);
border-radius
:
10px
;
box-shadow
:
0
5px
10px
0
rgba
(
0
,
0
,
0
,
0
.2
);
z-index
:
1
;
overflow-y
:
auto
;
.sr-items
{
a
{
color
:
black
;
&
:last-child
{
margin-bottom
:
0
;
}
}
p
{
margin
:
10px
;
}
.sr-item
{
display
:
block
;
padding
:
15px
;
margin-bottom
:
10px
;
&
:hover
{
background-image
:linear-gradient
(
to
bottom
,
rgba
(
21
,
155
,
255
,
0
.11
)
0
%
,
rgba
(
21
,
155
,
255
,
0
.11
)
100
%
),
linear-gradient
(
to
bottom
,
rgba
(
21
,
155
,
255
,
0
.11
)
0
%
,
rgba
(
21
,
155
,
255
,
0
.11
)
100
%
)
;
}
}
.item-title
{
font-size
:
16px
;
font-weight
:
bold
;
}
.DocSearch-Button
:active
,
.DocSearch-Button
:focus
,
.DocSearch-Button
:hover
{
border
:
2px
solid
$blue
;
box-shadow
:
none
;
}
.item-brief
{
font-size
:
16px
;
color
:
black
;
}
}
.DocSearch-Button
.DocSearch-Search-Icon
{
display
:
none
;
}
@media
(
max-width
:
767px
)
{
width
:
95%
;
overflow-y
:
scroll
;
max-height
:
400px
;
}
.DocSearch-Button-Placeholder
{
color
:
rgb
(
117
,
117
,
117
);
font-family
:
"Open Sans"
,
sans-serif
;
font-size
:
14px
;
line-height
:
20px
;
padding
:
10px
;
display
:
block
;
}
}
.DocSearch.DocSearch-Container
{
z-index
:
9999
;
}
doc/templates/uno/styles/docfx.js
浏览文件 @
4d550c16
此差异已折叠。
点击以展开。
doc/templates/uno/styles/main.css
浏览文件 @
4d550c16
此差异已折叠。
点击以展开。
doc/templates/uno/styles/main.js
浏览文件 @
4d550c16
document
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(){
initializeNavbar
(),
document
.
addEventListener
(
"
click
"
,
function
(
e
){
var
n
=
e
.
target
;
980
<=
window
.
innerWidth
||!
n
.
matches
(
"
#navbar .has-children a
"
)
||
(
e
.
stopImmediatePropagation
(),
n
.
parentElement
.
classList
.
toggle
(
"
open
"
))},
!
0
)},
!
1
);
\ No newline at end of file
// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.
document
.
addEventListener
(
"
DOMContentLoaded
"
,
function
()
{
initializeNavbar
();
document
.
addEventListener
(
"
click
"
,
function
(
e
)
{
const
t
=
e
.
target
;
if
(
window
.
innerWidth
>=
980
||
!
t
.
matches
(
"
#navbar .has-children a
"
)
)
return
;
e
.
stopImmediatePropagation
();
t
.
parentElement
.
classList
.
toggle
(
"
open
"
);
},
true
);
},
false
);
doc/templates/uno/toc.html.tmpl
浏览文件 @
4d550c16
...
...
@@ -3,18 +3,12 @@
<div id="sidetoggle">
<div>
<div class="sidefilter">
<form role="search" id="search">
<input type="text" id="search-query" aria-label="search box" autocomplete="off"
placeholder="Search Docs..." onsubmit="if(e.key === 'Enter') {return false;}">
</form>
<div id="search-results">
<div class="sr-items"></div>
</div>
<div id="docsearch"></div>
</div>
<div class="sidetoc">
<div class="toc" id="toc">
{{^leaf}}
{{>partials/li}}
{{>partials/li}}
{{/leaf}}
</div>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录