Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
theme-apachecn
提交
2715442e
T
theme-apachecn
项目概览
OpenDocCN
/
theme-apachecn
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
theme-apachecn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2715442e
编写于
4月 19, 2016
作者:
S
Samy Pesse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve display of search and results
上级
7e88e499
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
73 addition
and
114 deletion
+73
-114
src/less/website/navigation.less
src/less/website/navigation.less
+42
-39
src/less/website/search.less
src/less/website/search.less
+29
-74
src/less/website/summary.less
src/less/website/summary.less
+1
-1
src/less/website/variables.less
src/less/website/variables.less
+1
-0
未找到文件。
src/less/website/navigation.less
浏览文件 @
2715442e
.book .book-body {
.navigation {
position: absolute;
top: @header-height;
bottom: 0px;
margin: 0;
max-width: 150px;
min-width: 90px;
/*
Right/Left buttons to change page
*/
display: flex;
justify-content: center;
align-content: center;
flex-direction: column;
.navigation {
position: absolute;
top: @header-height;
bottom: 0px;
margin: 0;
max-width: 150px;
min-width: 90px;
font-size: 40px;
color: @navigation-color;
display: flex;
justify-content: center;
align-content: center;
flex-direction: column;
text-align: center;
font-size: 40px;
color: @navigation-color;
.transition(all 350ms ease)
;
text-align: center
;
&:hover {
text-decoration: none;
color: @navigation-hover-color;
}
.transition(all 350ms ease);
&.navigation-next {
right: 0px;
}
&.navigation-prev {
left: 0px;
}
&:hover {
text-decoration: none;
color: @navigation-hover-color;
}
&.navigation-next {
right: 0px;
}
&.navigation-prev {
left: 0px;
}
}
@media (max-width: @mobileMaxWidth) {
.navigation {
position: static;
top: auto;
max-width: 50%;
width: 50%;
display: inline-block;
float: left;
&.navigation-unique {
max-width: 100%;
width: 100%;
}
@media (max-width: @mobileMaxWidth) {
.navigation {
position: static;
top: auto;
max-width: 50%;
width: 50%;
display: inline-block;
float: left;
&.navigation-unique {
max-width: 100%;
width: 100%;
}
}
}
src/less/website/search.less
浏览文件 @
2715442e
.book-search {
/*
Search input and results, works in sync with the "search" plugin
*/
#book-search-input {
padding: 6px;
background: transparent;
position: absolute;
top:
-5
0px;
top: 0px;
left: 0px;
right: 0px;
transition: top 0.5s ease;
...
...
@@ -22,89 +26,32 @@
}
}
body.with-search {
.book-summary {
.book-search {
top: 0px;
}
ul.summary {
top: 50px;
}
}
}
#book-search-results {
.search-results-title {
text-transform: uppercase;
text-align: center;
font-weight: 200;
margin-bottom: 35px;
opacity: 0.6;
}
opacity: 1;
.search-results {
display: none;
ul.search-results-list {
list-style-type: none;
padding-left: 0;
li {
margin-bottom: @search-padding-default;
padding-bottom: @search-padding-default/3;
a {
}
/* Highlight results */
p em {
background-color: @search-highlight-color;
font-style: normal;
}
}
}
.no-results {
display: none;
}
}
&.open {
.search-results {
display: block;
.search-results-title {
text-transform: uppercase;
text-align: center;
font-weight: 200;
margin-bottom: 35px;
opacity: 0.6;
}
.search-noresults {
display: none;
}
}
&.no-results {
.search-results {
.has-results {
display: none;
}
.no-results {
display: block;
}
}
}
}
#book-search-results {
opacity: 1;
.search-results {
.has-results {
.gitbook-markdown(@md-color: @content-color, @md-line-height: @content-line-height);
.search-results-item {
.gitbook-markdown(@md-color: @content-color, @md-line-height: @content-line-height);
}
.search-results-item h3 {
margin-top: 0px;
margin-bottom: 0px;
}
}
.no-results {
padding: 40px 0px;
}
}
}
...
...
@@ -112,4 +59,12 @@ body.search-loading {
#book-search-results {
opacity: 0.3;
}
}
\ No newline at end of file
}
// When search is enabled, we hide the navigation left/right
body.with-search {
.navigation {
display: none;
}
}
src/less/website/summary.less
浏览文件 @
2715442e
...
...
@@ -17,7 +17,7 @@
ul.summary {
position: absolute;
top:
0px
;
top:
@search-height
;
left: 0px;
right: 0px;
bottom: 0px;
...
...
src/less/website/variables.less
浏览文件 @
2715442e
...
...
@@ -51,6 +51,7 @@
@sidebar-link-completed-weight: normal;
// Search
@search-height: 50px;
@search-padding-default: 1.5rem;
@search-results-opacity: 0.95;
@search-highlight-color: rgba(255, 220, 0, 0.4);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录