Skip to content

Commit

Permalink
add some search instructions in examples panel
Browse files Browse the repository at this point in the history
  • Loading branch information
phtournier committed Dec 6, 2023
1 parent 42abac9 commit 4d5de97
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 74 deletions.
4 changes: 2 additions & 2 deletions source/_static/css/freefemtheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ body {
#content {
grid-row: 3;
grid-column: 2;
margin: 0 1rem;
margin: 19px 1rem;
margin-bottom: 65vh;
margin-top: 19px;
}

#content .headerlink {
Expand Down Expand Up @@ -113,6 +112,7 @@ body {

.up-button {
padding: .55rem;
margin-top: 19px;
display: none;
position: absolute;
top: 61px;
Expand Down
12 changes: 9 additions & 3 deletions source/_static/js/examples.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const subnav = document.getElementById('subnav')
const contentdoc = document.getElementById('content-doc')
const contentexamples = document.getElementById('content-examples')
const examplewelcome = document.getElementById('exampleWelcome')
const examplecode = document.getElementById('exampleCode')
const examplelinks = document.getElementById('exampleLinks')
const tocdoc = document.getElementById('toc-doc')
const searchToggle = document.getElementById('checkbox-search-toggle')
Expand Down Expand Up @@ -42,6 +44,8 @@ toggleExamples = (mode) => {

loadExamplefromGitHub = (name, dir, editor) => {
function load(data) {
examplecode.style.display = 'flex'
examplewelcome.style.display = 'none'
editor.setValue(data)
highlightKeyword(editor)
}
Expand Down Expand Up @@ -138,7 +142,6 @@ let treedata =
}
]
},
/*
{ "id": "0-2", "text": "Wave propagation", "children":
[
{ "id": "0-2-0", "text": "Frequency domain", "children":
Expand All @@ -147,13 +150,16 @@ let treedata =
{ "id": "Maxwell", "text": "Maxwell's equations" }
]
},
/*
{ "id": "0-2-1", "text": "Time domain"
}
*/
]
},
/*
{ "id": "diffusion", "text": "Diffusion"
},
*/
*/
]
},
{ "id": "1", "text": "Spatial dimension", "children":
Expand Down Expand Up @@ -225,7 +231,7 @@ fetch('/_static/json/all_examples.json')
updateList(editor)
let tree = new Tree('.tag-tree-container', {
data: treedata,
closeDepth: 3,
closeDepth: 4,
loaded: function () {
//this.values = ['0-0-0', '0-1-1'];
//console.log(this.selectedNodes);
Expand Down
Loading

0 comments on commit 4d5de97

Please sign in to comment.