Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
f95b2cf1
T
three.js
项目概览
车家大少爷
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f95b2cf1
编写于
7月 20, 2020
作者:
A
Alexander Jose Flores
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added toggle for example previews
上级
a02e5b1e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
77 addition
and
1 deletion
+77
-1
examples/index.html
examples/index.html
+32
-0
files/main.css
files/main.css
+45
-1
未找到文件。
examples/index.html
浏览文件 @
f95b2cf1
...
...
@@ -31,6 +31,14 @@
<div
id=
"exitSearchButton"
></div>
</div>
<div
id=
"previewToggle"
>
<h2>
Previews
</h2>
<div
id=
"toggles"
>
<h3
id=
"toggleOn"
class=
"selected"
>
On
</h3>
<h3
id=
"toggleOff"
>
Off
</h3>
</div>
</div>
<div
id=
"content"
></div>
</div>
...
...
@@ -52,6 +60,9 @@
var
expandButton
=
document
.
getElementById
(
'
expandButton
'
);
var
viewSrcButton
=
document
.
getElementById
(
'
button
'
);
var
panelScrim
=
document
.
getElementById
(
'
panelScrim
'
);
var
toggleOn
=
document
.
getElementById
(
'
toggleOn
'
);
var
toggleOff
=
document
.
getElementById
(
'
toggleOff
'
);
var
previews
=
document
.
getElementsByClassName
(
'
cover
'
);
var
links
=
{};
var
selected
=
null
;
...
...
@@ -150,6 +161,27 @@
};
toggleOn
.
onclick
=
function
(
event
)
{
event
.
preventDefault
();
toggleOff
.
classList
.
remove
(
'
selected
'
);
toggleOn
.
classList
.
add
(
'
selected
'
);
for
(
i
=
0
;
i
<
previews
.
length
;
i
++
){
previews
[
i
].
style
.
display
=
'
block
'
;
}
};
toggleOff
.
onclick
=
function
(
event
)
{
event
.
preventDefault
();
toggleOn
.
classList
.
remove
(
'
selected
'
);
toggleOff
.
classList
.
add
(
'
selected
'
);
for
(
i
=
0
;
i
<
previews
.
length
;
i
++
){
previews
[
i
].
style
.
display
=
'
none
'
;
}
};
// iOS iframe auto-resize workaround
if
(
/
(
iPad|iPhone|iPod
)
/g
.
test
(
navigator
.
userAgent
)
)
{
...
...
files/main.css
浏览文件 @
f95b2cf1
...
...
@@ -121,7 +121,19 @@ h1 a {
margin-left
:
6px
;
font-size
:
.9rem
;
}
#previewToggle
{
display
:
flex
;
height
:
var
(
--header-height
);
border-bottom
:
var
(
--border-style
);
align-items
:
center
;
}
#previewToggle
h2
{
padding-left
:
var
(
--panel-padding
);
flex
:
1
;
display
:
flex
;
align-items
:
center
;
color
:
var
(
--color-blue
);
}
#panel
{
position
:
fixed
;
z-index
:
100
;
...
...
@@ -217,6 +229,7 @@ h1 a {
display
:
none
;
}
#panel
#inputWrapper
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -339,6 +352,37 @@ h1 a {
padding-top
:
6px
;
}
#panel
#toggles
{
display
:
flex
;
justify-content
:
center
;
z-index
:
1000
;
position
:
relative
;
height
:
100%
;
align-items
:
center
;
font-weight
:
500
;
}
#panel
#toggles
*
{
padding
:
0
var
(
--panel-padding
);
height
:
100%
;
position
:
relative
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
#panel
#toggles
.selected
:after
{
content
:
""
;
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
-1px
;
border-bottom
:
1px
solid
var
(
--text-color
);
}
#panel
#toggles
:hover
,
#panel
#toggles
.selected
{
color
:
var
(
--color-blue
);
}
.spacer
{
color
:
var
(
--secondary-text-color
);
margin-left
:
2px
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录