Skip to content

Commit

Permalink
font update
Browse files Browse the repository at this point in the history
  • Loading branch information
juliancoy committed Aug 5, 2023
1 parent d3efd59 commit 581b565
Show file tree
Hide file tree
Showing 9 changed files with 175 additions and 240 deletions.
4 changes: 4 additions & 0 deletions Book Of Julian/Cosmology/Afterlife.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
"In the absence of compelling evidence, we believe in Universal Annhialation": {},
"That is, the absence of life after death": {},
"When the brain stem ceases to function, there is no return": {},
"All go to the same place. All came from the dust and all return to the dust": {
"meta": {"reference": ["EC 3:20"], "type": "wisdom"}
},
"This place is Sheol, the grave": {},
},
}
26 changes: 26 additions & 0 deletions Book Of Julian/Cosmology/Scientific Creed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"Until the secrets of heaven are revealed to us, for our own stability, we make a statement of faith": {
"meta": {"type": "list"},
"I believe in the four forces": {
"Electromagnetism": {},
"Gravity": {},
"Nuclear strong": {},
"And weak force": {},
},
"I believe in the elementary particles": {
"Quarks": {},
"Leptons": {},
"Bosons": {},
"And their complements": {},
},
"I believe the earth to be": {
"Aged 5 billion years": {},
"Spherical": {},
"And orbiting the sun": {},
},
"I believe the big bang theory to be an accurate model of creation": {},
"I believe evolution to be an accurate model of mankind's origin": {},
"I believe the nature of God has not been revealed to mankind, therefore": {},
"The search continues": {},
}
}
28 changes: 0 additions & 28 deletions Book Of Julian/Cosmology/Substance.py

This file was deleted.

7 changes: 6 additions & 1 deletion BookOfJulian.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
"path": "../sinode"
}
],
"settings": {}
"settings": {
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none"
}
}
5 changes: 5 additions & 0 deletions export.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def copyDictUnique(indict, modifier):
with open("build/julian_flare.json", "w+") as f:
f.write(json.dumps(m.asFlare(), indent=2))

# for testing from the src folder
with open("src/julian_flare.json", "w+") as f:
f.write(json.dumps(m.asFlare(), indent=2))

with open("build/julian.json", "w+") as f:
f.write(json.dumps(m.asDict(), indent=2))

Expand All @@ -99,4 +103,5 @@ def copyDictUnique(indict, modifier):
with open("build/README.md", "w+") as f:
f.write(out["markdown"])

os.system("cp -r build/graphs src/graphs")
# m.toPDF()
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
graphs
19 changes: 16 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Book of Julian Sunburst</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<script src="https://d3js.org/d3.v6.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap" rel="stylesheet">
<style>
#chart {
width: 100%;
Expand All @@ -23,6 +24,11 @@
height: 100vh;
overflow: hidden;
}
.angled-text {
font-family: 'Raleway', sans-serif; /* Using Raleway */
font-weight: 500; /* Medium weight */
}


@media (orientation: landscape) {
.flex-container {
Expand Down Expand Up @@ -82,6 +88,7 @@
const svg = d3
.create("svg")
.attr("viewBox", [-width / 2, -height / 2, width, width])
.style("font-family", "'Raleway', sans-serif") // Apply the Raleway font
.style("font", "14px sans-serif"); // Set the font size to 14 pixels.

// Create root label here without text
Expand All @@ -90,6 +97,7 @@
.attr("text-anchor", "middle")
.style("font-size", "22px")
.style("font-weight", "bold")
.style("font-family", "'Raleway', sans-serif") // Apply the Raleway font
.attr("y", 0); // adjust position as needed

rootLabel.text(data.name); // root name
Expand Down Expand Up @@ -138,7 +146,9 @@
.attr("transform", (d) => labelTransform(d.current))
.text((d) => d.data.name)
.style("font-size", ((d) => d.depth === 1 ? "20px" : "12px"))
.style("font-weight", ((d) => d.depth === 1 ? "bold" : "bold"));
.style("font-weight", ((d) => d.depth === 1 ? "bold" : "bold"))
.style("text-shadow", "1px 1px 8px rgba(255, 255, 255, 1)") // Apply white text shadow with raised opacity
.style("font-family", "'Raleway', sans-serif"); // Apply the Raleway font

const parent = svg
.append("circle")
Expand All @@ -150,12 +160,15 @@

// Handle zoom on click.
function clicked(event, p) {
rootLabel = document.getElementById("root-label-id"); // Replace with the actual ID
rootLabel.className = "angled-text"; // Apply the class
rootLabel.text(p.data.name); // update the root label to the new root name
parent.datum(p.parent || root);

// display its text in the dedicated HTML element.
document.getElementById("selected-node-text").innerHTML =
p.data.text;
var selectedNodeTextElement = document.getElementById("selected-node-text");
selectedNodeTextElement.innerHTML = p.data.text;
selectedNodeTextElement.className = "angled-text"; // Apply the class

root.each(
(d) =>
Expand Down
Loading

0 comments on commit 581b565

Please sign in to comment.