Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan3-14 authored Feb 6, 2024
2 parents 7d114c7 + 12a725f commit 6f55c94
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 23 deletions.
69 changes: 50 additions & 19 deletions mindmaps/electricity/index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,56 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Markmap</title>
<style>
* {
margin: 0;
padding: 0;
}
#mindmap {
display: block;
width: 100vw;
height: 100vh;
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/style.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Markmap</title>
<style>
body {
background-color: gray;
}
* {
margin: 0;
padding: 0;
color: white;
}

#mindmap {
display: block;
width: 100vw;
height: 100vh;
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/style.css">
</head>

<body>
<svg id="mindmap"></svg>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js"></script><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/browser/index.js"></script><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.js"></script><script>(()=>{setTimeout(()=>{const{markmap:W,mm:ne}=window,re=new W.Toolbar;re.attach(ne);const ke=re.render();ke.setAttribute("style","position:absolute;bottom:20px;right:20px"),document.body.append(ke)})})()</script><script>((_,I,L,O)=>{const B=_();window.mm=B.Markmap.create("svg#mindmap",(I||B.deriveOptions)(O),L)})(()=>window.markmap,null,{"content":"Electricity","children":[{"content":"Current and Charge","children":[{"content":"Current","children":[{"content":"Rate of flow of charge (rate of flow of electrons)","children":[],"payload":{"lines":"3,4"}}],"payload":{"lines":"2,3"}},{"content":"Charge Flow","children":[{"content":"The number of electrons","children":[],"payload":{"lines":"5,6"}}],"payload":{"lines":"4,5"}},{"content":"Equation","children":[{"content":"Q = I * t","children":[],"payload":{"lines":"7,8"}},{"content":"charge (C) = current (A) * time (s)","children":[],"payload":{"lines":"8,9"}},{"content":"current (A) = charge (C) / time (s)","children":[],"payload":{"lines":"9,10"}}],"payload":{"lines":"6,7"}}],"payload":{"lines":"1,2"}},{"content":"Circuit Symbols","children":[{"content":"<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/images/battery.png?raw=true\" alt=\"alt text\"> Battery","children":[],"payload":{"lines":"11,12"}},{"content":"<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/images/cell.png?raw=true\" alt=\"alt text\"> Cell","children":[],"payload":{"lines":"12,13"}},{"content":"<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/images/diode.png?raw=true\" alt=\"alt text\"> Diode","children":[],"payload":{"lines":"13,14"}},{"content":"<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/images/lamp.png?raw=true\" alt=\"alt text\"> Lamp","children":[],"payload":{"lines":"14,15"}},{"content":"<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/images/led.png?raw=true\" alt=\"alt text\"> LED","children":[],"payload":{"lines":"15,16"}},{"content":"<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/images/switch.png?raw=true\" alt=\"alt text\"> Switch","children":[],"payload":{"lines":"16,17"}}],"payload":{"lines":"10,11"}}],"payload":{"lines":"0,1"}},null)</script>
<svg id="mindmap"></svg>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/browser/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.js"></script>
<script>(r => {
setTimeout(r);
})(() => {
const {
markmap,
mm
} = window;
const {
el
} = markmap.Toolbar.create(mm);
el.setAttribute('style', 'position:absolute;bottom:20px;right:20px');
document.body.append(el);
})</script>
<script>((getMarkmap, getOptions, root2, jsonOptions) => {
const markmap = getMarkmap();
window.mm = markmap.Markmap.create(
"svg#mindmap",
(getOptions || markmap.deriveOptions)(jsonOptions),
root2
);
})(() => window.markmap, null, { "type": "heading", "depth": 0, "payload": { "lines": [0, 1] }, "content": "Electricity", "children": [{ "type": "heading", "depth": 1, "payload": { "lines": [1, 2] }, "content": "Current and Charge", "children": [{ "type": "heading", "depth": 2, "payload": { "lines": [2, 3] }, "content": "Current", "children": [{ "type": "heading", "depth": 3, "payload": { "lines": [3, 4] }, "content": "Rate of flow of charge (rate of flow of electrons)", "children": [] }] }, { "type": "heading", "depth": 2, "payload": { "lines": [4, 5] }, "content": "Charge Flow", "children": [{ "type": "heading", "depth": 3, "payload": { "lines": [5, 6] }, "content": "The number of electrons", "children": [] }] }, { "type": "heading", "depth": 2, "payload": { "lines": [6, 7] }, "content": "Equation", "children": [{ "type": "heading", "depth": 3, "payload": { "lines": [7, 8] }, "content": "Q = I * t", "children": [] }, { "type": "heading", "depth": 3, "payload": { "lines": [8, 9] }, "content": "charge (C) = current (A) * time (s)", "children": [] }, { "type": "heading", "depth": 3, "payload": { "lines": [9, 10] }, "content": "current (A) = charge (C) / time (s)", "children": [] }] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [10, 11] }, "content": "Circuit Symbols", "children": [{ "type": "heading", "depth": 2, "payload": { "lines": [11, 12] }, "content": "<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/test/images/battery.png?raw=true\" alt=\"alt text\"> Battery", "children": [] }, { "type": "heading", "depth": 2, "payload": { "lines": [12, 13] }, "content": "<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/test/images/cell.png?raw=true\" alt=\"alt text\"> Cell", "children": [] }, { "type": "heading", "depth": 2, "payload": { "lines": [13, 14] }, "content": "<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/test/images/diode.png?raw=true\" alt=\"alt text\"> Diode", "children": [] }, { "type": "heading", "depth": 2, "payload": { "lines": [14, 15] }, "content": "<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/test/images/lamp.png?raw=true\" alt=\"alt text\"> Lamp", "children": [] }, { "type": "heading", "depth": 2, "payload": { "lines": [15, 16] }, "content": "<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/test/images/led.png?raw=true\" alt=\"alt text\"> LED", "children": [] }, { "type": "heading", "depth": 2, "payload": { "lines": [16, 17] }, "content": "<img src=\"https://github.com/Nathan3-14/Science-Mindmap/blob/main/test/images/switch.png?raw=true\" alt=\"alt text\"> Switch", "children": [] }] }] }, {})</script>
</body>
</html>

</html>
8 changes: 4 additions & 4 deletions mindmaps/links.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var elements = document.getElementsByClassName("link")
for (i=0; i<elements.len()-1; i++) {
var element = elements[i]
element.onclick = () => location.assign(element.id)
var elements = document.getElementsByClassName("link");
for (i=0; i<elements.length; i++) {
var element = elements[i];
element.onclick = () => location.assign(element.id);
}

0 comments on commit 6f55c94

Please sign in to comment.