Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyAJohnston committed Nov 30, 2023
1 parent 2dbd632 commit 0c9abaa
Show file tree
Hide file tree
Showing 19 changed files with 698 additions and 216 deletions.
1 change: 1 addition & 0 deletions .nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
54bfb537
55 changes: 51 additions & 4 deletions examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.358">
<meta name="generator" content="quarto-1.4.449">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -81,7 +81,7 @@
"collapse-after": 3,
"panel-placement": "start",
"type": "textbox",
"limit": 20,
"limit": 50,
"keyboard-shortcut": [
"f",
"/",
Expand Down Expand Up @@ -235,6 +235,7 @@ <h1 class="title">Examples</h1>

</header>


<section id="animating-atp-synthase" class="level2" data-number="1">
<h2 data-number="1" class="anchored" data-anchor-id="animating-atp-synthase"><span class="header-section-number">1</span> Animating ATP Synthase</h2>
<p><img src="https://github.com/BradyAJohnston/MolecularNodes/raw/main/img/atp-animation-demo.gif" class="img-fluid"></p>
Expand Down Expand Up @@ -605,15 +606,38 @@ <h3 data-number="2.4" class="anchored" data-anchor-id="geometry-nodes"><span cla
}
}
stripColumnClz(note)
if (id.startsWith('sec-')) {
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
if (note.children && note.children.length > 2) {
for (let i = 0; i < 2; i++) {
container.appendChild(note.children[i].cloneNode(true));
}
typesetMath(container);
return container.innerHTML
} else {
typesetMath(note);
return note.innerHTML;
}
} else {
Expand All @@ -622,6 +646,7 @@ <h3 data-number="2.4" class="anchored" data-anchor-id="geometry-nodes"><span cla
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
}
}
Expand Down Expand Up @@ -664,6 +689,29 @@ <h3 data-number="2.4" class="anchored" data-anchor-id="geometry-nodes"><span cla
instance.show();
});
}
} else {
// See if we can fetch a full url (with no hash to target)
// This is a special case and we should probably do some content thinning / targeting
fetch(url)
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.querySelector('main.content');
if (note !== null) {
// This should only happen for chapter cross references
// (since there is no id in the URL)
// remove the first header
if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
note.children[0].remove();
}
const html = processXRef(null, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
}, function(instance) {
});
Expand Down Expand Up @@ -739,7 +787,6 @@ <h3 data-number="2.4" class="anchored" data-anchor-id="geometry-nodes"><span cla
window.addEventListener(
"resize",
throttle(() => {
console.log("RESIZE");
elRect = undefined;
if (selectedAnnoteEl) {
selectCodeLines(selectedAnnoteEl);
Expand Down
61 changes: 52 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.358">
<meta name="generator" content="quarto-1.4.449">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -47,7 +47,7 @@
"collapse-after": 3,
"panel-placement": "start",
"type": "textbox",
"limit": 20,
"limit": 50,
"keyboard-shortcut": [
"f",
"/",
Expand Down Expand Up @@ -192,6 +192,7 @@ <h1 class="title">About</h1>

</header>


<p>Molecular Nodes (MN) is an addon for the 3D modelling &amp; animation program <a href="https://blender.org">Blender</a>. MN enables easy import of molecular data such as <code>.pdb</code> &amp; <code>.mmCIF</code>, along with a variety of molecular dynamics trajectories and topologies from a variety of simulation sources. Other data formats including electron microscopy (EM) <code>.map</code>, EM tomography files such as <code>.map</code> and <code>.star</code>, with the potential to support more data formats as well.</p>
<p>Molecular Nodes provides the translation layer that allows importing of molecular data formats, while Blender provides the industry-leading animation and rendering tools to create visually stunning molecular graphics with ease.</p>
<p>The add-on runs on the <a href="https://docs.blender.org/manual/en/latest/modeling/geometry_nodes/introduction.html">Geometry Nodes</a> procedural modelling and animation system inside of Blender, which gives the add-on speed and robustness with minimal user input required.</p>
Expand Down Expand Up @@ -242,11 +243,7 @@ <h4 class="anchored" data-anchor-id="nano-rooms">Nano Rooms</h4>
</section>
<section id="st.-jude-childrens-research-hospital" class="level4">
<h4 class="anchored" data-anchor-id="st.-jude-childrens-research-hospital">St.&nbsp;Jude Children’s Research Hospital</h4>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://awards.ami.org/gallery/WOVQRGgD/LrVXNAor?search=848d592b94f65998-20"><img src="https://i.imgur.com/YpaJXEV.png" class="img-fluid figure-img" data-align="left"></a></p>
</figure>
</div>
<p><a href="https://awards.ami.org/gallery/WOVQRGgD/LrVXNAor?search=848d592b94f65998-20"><img src="https://i.imgur.com/YpaJXEV.png" class="img-fluid" data-align="left"></a></p>
</section>
</section>
<section id="getting-started" class="level2">
Expand Down Expand Up @@ -534,15 +531,38 @@ <h2 class="anchored" data-anchor-id="getting-started">Getting Started</h2>
}
}
stripColumnClz(note)
if (id.startsWith('sec-')) {
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
if (note.children && note.children.length > 2) {
for (let i = 0; i < 2; i++) {
container.appendChild(note.children[i].cloneNode(true));
}
typesetMath(container);
return container.innerHTML
} else {
typesetMath(note);
return note.innerHTML;
}
} else {
Expand All @@ -551,6 +571,7 @@ <h2 class="anchored" data-anchor-id="getting-started">Getting Started</h2>
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
}
}
Expand Down Expand Up @@ -593,6 +614,29 @@ <h2 class="anchored" data-anchor-id="getting-started">Getting Started</h2>
instance.show();
});
}
} else {
// See if we can fetch a full url (with no hash to target)
// This is a special case and we should probably do some content thinning / targeting
fetch(url)
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.querySelector('main.content');
if (note !== null) {
// This should only happen for chapter cross references
// (since there is no id in the URL)
// remove the first header
if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
note.children[0].remove();
}
const html = processXRef(null, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
}, function(instance) {
});
Expand Down Expand Up @@ -668,7 +712,6 @@ <h2 class="anchored" data-anchor-id="getting-started">Getting Started</h2>
window.addEventListener(
"resize",
throttle(() => {
console.log("RESIZE");
elRect = undefined;
if (selectedAnnoteEl) {
selectCodeLines(selectedAnnoteEl);
Expand Down
63 changes: 53 additions & 10 deletions installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.358">
<meta name="generator" content="quarto-1.4.449">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -81,7 +81,7 @@
"collapse-after": 3,
"panel-placement": "start",
"type": "textbox",
"limit": 20,
"limit": 50,
"keyboard-shortcut": [
"f",
"/",
Expand Down Expand Up @@ -238,13 +238,14 @@ <h1 class="title">Installation</h1>

</header>


<section id="downloading-blender" class="level2">
<h2 class="anchored" data-anchor-id="downloading-blender">Downloading Blender</h2>
<p>Molecular Nodes is an add-on for the 3D animation program Blender. It runs inside of Blender, so the first step for installation is to <a href="https://www.blender.org/download/">download and install</a> the latest version of blender.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="images/installation/blender_download.png" class="img-fluid figure-img" data-align="center" width="800"></p>
<figcaption class="figure-caption">The download page of Blender.</figcaption>
<figcaption>The download page of Blender.</figcaption>
</figure>
</div>
</section>
Expand All @@ -264,11 +265,7 @@ <h2 class="anchored" data-anchor-id="downloading-molecular-nodes">Downloading Mo
<p>When downloading on MacOS with Safari, it automatically unzips the file into a <code>MolecularNodes</code> folder. This is extremely unhelpful as Blender requires the <code>.zip</code> file to install the addon. Either download with a different browser, or compress the folder again to <code>MolecularNodes.zip</code>.</p>
</div>
</div>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://github.com/BradyAJohnston/MolecularNodes/releases/"><img src="images/installation/mn-download.png" class="img-fluid figure-img" alt="Screenshot of the Molecular Nodes releases page on Github, with the relevant download link circled in red."></a></p>
</figure>
</div>
<p><a href="https://github.com/BradyAJohnston/MolecularNodes/releases/"><img src="images/installation/mn-download.png" class="img-fluid" alt="Screenshot of the Molecular Nodes releases page on Github, with the relevant download link circled in red."></a></p>
</section>
<section id="installing-the-addon" class="level2">
<h2 class="anchored" data-anchor-id="installing-the-addon">Installing the Addon</h2>
Expand Down Expand Up @@ -633,15 +630,38 @@ <h1>Start Importing Structures!</h1>
}
}
stripColumnClz(note)
if (id.startsWith('sec-')) {
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
if (note.children && note.children.length > 2) {
for (let i = 0; i < 2; i++) {
container.appendChild(note.children[i].cloneNode(true));
}
typesetMath(container);
return container.innerHTML
} else {
typesetMath(note);
return note.innerHTML;
}
} else {
Expand All @@ -650,6 +670,7 @@ <h1>Start Importing Structures!</h1>
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
}
}
Expand Down Expand Up @@ -692,6 +713,29 @@ <h1>Start Importing Structures!</h1>
instance.show();
});
}
} else {
// See if we can fetch a full url (with no hash to target)
// This is a special case and we should probably do some content thinning / targeting
fetch(url)
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.querySelector('main.content');
if (note !== null) {
// This should only happen for chapter cross references
// (since there is no id in the URL)
// remove the first header
if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
note.children[0].remove();
}
const html = processXRef(null, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
}, function(instance) {
});
Expand Down Expand Up @@ -767,7 +811,6 @@ <h1>Start Importing Structures!</h1>
window.addEventListener(
"resize",
throttle(() => {
console.log("RESIZE");
elRect = undefined;
if (selectedAnnoteEl) {
selectCodeLines(selectedAnnoteEl);
Expand Down
1 change: 1 addition & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sitemap: https://BradyAJohnston.github.io/MolecularNodes/sitemap.xml
Loading

0 comments on commit 0c9abaa

Please sign in to comment.