Skip to content

Commit 0ffd4f0

Browse files
committedApr 28, 2019
Design update
1 parent fb5a092 commit 0ffd4f0

20 files changed

+363
-498
lines changed
 

‎docs/files/inconsolata.woff

-27.4 KB
Binary file not shown.

‎docs/index.css

-213
This file was deleted.

‎docs/index.html

+26-30
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@
44
<meta charset="utf-8">
55
<title>three.js / documentation</title>
66
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
7-
<link type="text/css" rel="stylesheet" href="index.css">
8-
<link rel="shortcut icon" href="../favicon.ico" />
7+
<link rel="shortcut icon" href="../files/favicon.ico" />
8+
<link rel="stylesheet" type="text/css" href="../files/main.css">
99
</head>
1010
<body>
1111

1212
<div id="panel" class="collapsed">
1313

14-
<h1><a href="http://threejs.org">three.js</a> / docs</h1>
14+
<div id="header">
1515

16-
<a id="expandButton" href="#">
17-
<span></span>
18-
<span></span>
19-
<span></span>
20-
</a>
16+
<h1><a href="http://threejs.org">three.js</a></h1>
2117

22-
<div class="filterBlock" >
23-
<input type="text" id="filterInput" placeholder="Type to filter" autocorrect="off" autocapitalize="off" spellcheck="false">
24-
<a href="#" id="clearFilterButton">x</a>
25-
</div>
18+
<img id="expandButton" src="../files/ic_menu_black_24dp.svg">
19+
20+
<div id="sections">
21+
<span class="selected">docs</span> <a href="../examples">examples</a>
22+
</div>
23+
24+
<input type="text" id="filter" autocorrect="off" autocapitalize="off" spellcheck="false">
25+
26+
<select id="language">
27+
<option value="en">en</option>
28+
<option value="zh">zh</option>
29+
</select>
2630

27-
<div style="text-align:center">
28-
<br />
29-
<a href="javascript:setLanguage('en')">en</a> |
30-
<a href="javascript:setLanguage('zh')">zh</a>
3131
</div>
3232

3333
<div id="content"></div>
@@ -66,9 +66,18 @@ <h1><a href="http://threejs.org">three.js</a> / docs</h1>
6666

6767
//
6868

69+
var languageSelect = document.getElementById( 'language' );
70+
languageSelect.value = language;
71+
languageSelect.addEventListener( 'change', function ( event ) {
72+
73+
setLanguage( this.value );
74+
75+
} );
76+
6977
function setLanguage( value ) {
7078

7179
language = value;
80+
7281
createNavigation();
7382
updateFilter();
7483
autoChangeUrlLanguage( language );
@@ -77,9 +86,8 @@ <h1><a href="http://threejs.org">three.js</a> / docs</h1>
7786

7887
var panel = document.getElementById( 'panel' );
7988
var content = document.getElementById( 'content' );
80-
var clearFilterButton = document.getElementById( 'clearFilterButton' );
8189
var expandButton = document.getElementById( 'expandButton' );
82-
var filterInput = document.getElementById( 'filterInput' );
90+
var filterInput = document.getElementById( 'filter' );
8391
var iframe = document.querySelector( 'iframe' );
8492

8593
var pageProperties = {};
@@ -107,18 +115,6 @@ <h1><a href="http://threejs.org">three.js</a> / docs</h1>
107115

108116
};
109117

110-
111-
// Functionality for filter clear button
112-
113-
clearFilterButton.onclick = function ( event ) {
114-
115-
event.preventDefault();
116-
117-
filterInput.value = '';
118-
updateFilter();
119-
120-
};
121-
122118
// Activate content and title change on browser navigation
123119

124120
window.onpopstate = createNewIframe;

0 commit comments

Comments
 (0)
Please sign in to comment.