Skip to content

Commit 4d5de97

Browse files
committed
add some search instructions in examples panel
1 parent 42abac9 commit 4d5de97

File tree

4 files changed

+88
-74
lines changed

4 files changed

+88
-74
lines changed

source/_static/css/freefemtheme.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ body {
4848
#content {
4949
grid-row: 3;
5050
grid-column: 2;
51-
margin: 0 1rem;
51+
margin: 19px 1rem;
5252
margin-bottom: 65vh;
53-
margin-top: 19px;
5453
}
5554

5655
#content .headerlink {
@@ -113,6 +112,7 @@ body {
113112

114113
.up-button {
115114
padding: .55rem;
115+
margin-top: 19px;
116116
display: none;
117117
position: absolute;
118118
top: 61px;

source/_static/js/examples.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
const subnav = document.getElementById('subnav')
22
const contentdoc = document.getElementById('content-doc')
33
const contentexamples = document.getElementById('content-examples')
4+
const examplewelcome = document.getElementById('exampleWelcome')
5+
const examplecode = document.getElementById('exampleCode')
46
const examplelinks = document.getElementById('exampleLinks')
57
const tocdoc = document.getElementById('toc-doc')
68
const searchToggle = document.getElementById('checkbox-search-toggle')
@@ -42,6 +44,8 @@ toggleExamples = (mode) => {
4244

4345
loadExamplefromGitHub = (name, dir, editor) => {
4446
function load(data) {
47+
examplecode.style.display = 'flex'
48+
examplewelcome.style.display = 'none'
4549
editor.setValue(data)
4650
highlightKeyword(editor)
4751
}
@@ -138,7 +142,6 @@ let treedata =
138142
}
139143
]
140144
},
141-
/*
142145
{ "id": "0-2", "text": "Wave propagation", "children":
143146
[
144147
{ "id": "0-2-0", "text": "Frequency domain", "children":
@@ -147,13 +150,16 @@ let treedata =
147150
{ "id": "Maxwell", "text": "Maxwell's equations" }
148151
]
149152
},
153+
/*
150154
{ "id": "0-2-1", "text": "Time domain"
151155
}
156+
*/
152157
]
153158
},
159+
/*
154160
{ "id": "diffusion", "text": "Diffusion"
155161
},
156-
*/
162+
*/
157163
]
158164
},
159165
{ "id": "1", "text": "Spatial dimension", "children":
@@ -225,7 +231,7 @@ fetch('/_static/json/all_examples.json')
225231
updateList(editor)
226232
let tree = new Tree('.tag-tree-container', {
227233
data: treedata,
228-
closeDepth: 3,
234+
closeDepth: 4,
229235
loaded: function () {
230236
//this.values = ['0-0-0', '0-1-1'];
231237
//console.log(this.selectedNodes);

0 commit comments

Comments
 (0)