-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de937f4
commit f0468a6
Showing
7 changed files
with
507 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
155 changes: 155 additions & 0 deletions
155
content/01_under_the_hood/cortical_column_structure.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>HNN Textbook</title> | ||
<base href="/website_redesign/"> | ||
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400&display=swap" rel="stylesheet"> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
|
||
<div id="mySidebar" class="sidebar"> | ||
<p style="color:#e5a734"> | ||
Human Neocortical Neurosolver | ||
</p> | ||
<br> | ||
<a href="content/00_preface.html">Preface</a> | ||
<div class="sidebar-list"> | ||
<a id="sidebar-header" onclick="toggleSubmenu(event)"> | ||
1. Under the Hood | ||
</a> | ||
<div class="submenu"> | ||
<a href="content/01_under_the_hood/01_cortical_column_structure.html">1.1 Cortical Column Structure</a> | ||
<a href="content/01_under_the_hood/02_primary_electric_currents.html">1.2 Calculation of Primary Electric Currents</a> | ||
</div> | ||
</div> | ||
<div class="sidebar-list"> | ||
<a id="sidebar-header" onclick="toggleSubmenu(event)"> | ||
2 Simulating ERPs | ||
</a> | ||
<div class="submenu"> | ||
<a href="content/02_simulating_erps/01_overview_of_erps.html">2.1 Review of ERPs</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div id="main"> | ||
<div class="topbar"> | ||
<button class="openbtn" onclick="toggleNav()">☰</button> | ||
<div class="dropdown"> | ||
<button id="dropdownButton" class="dropdown-button"> | ||
<span>A</span> | ||
</button> | ||
<div class="dropdown-content"> | ||
<button class="fontsize-btn" onclick="decreaseFontSize()">A-</button> | ||
<button class="fontsize-btn" onclick="increaseFontSize()">A+</button> | ||
</div> | ||
</div> | ||
<img src="https://hnn.brown.edu/wp-content/uploads/hnn-medium.png"></img> | ||
</div> | ||
|
||
<div id="content-wrapper"> | ||
<div id="content"> | ||
|
||
<!-- | ||
# Title: 1.1 Cortical Column Structure | ||
# Updated: 2024-11-14 | ||
# | ||
# Contributors: | ||
# Dylan Daniels | ||
--> | ||
</div> <!-- close content wrapper --> | ||
</div> <!-- close content --> | ||
</div> <!-- close main --> | ||
|
||
<script> | ||
let isSidebarOpen = true; // Sidebar is initially open | ||
|
||
function toggleNav() { | ||
const sidebar = document.getElementById("mySidebar"); | ||
const main = document.getElementById("main"); | ||
|
||
// Toggle sidebar state | ||
if (isSidebarOpen) { | ||
sidebar.style.width = "0"; | ||
main.style.marginLeft = "0"; | ||
} else { | ||
sidebar.style.width = "350px"; // Adjust width as needed | ||
main.style.marginLeft = "350px"; // Match margin to new width | ||
} | ||
|
||
// Toggle the sidebar state | ||
isSidebarOpen = !isSidebarOpen; | ||
} | ||
|
||
// Open the sidebar on page load | ||
window.onload = function() { | ||
// Set initial styles for open state without animation | ||
const sidebar = document.getElementById("mySidebar"); | ||
const main = document.getElementById("main"); | ||
|
||
sidebar.style.transition = "none"; | ||
main.style.transition = "none"; | ||
sidebar.style.width = "350px"; | ||
main.style.marginLeft = "350px"; | ||
|
||
// Re-enable transition for subsequent toggles | ||
setTimeout(() => { | ||
sidebar.style.transition = "width 0.5s"; | ||
main.style.transition = "margin-left 0.5s"; | ||
}, 10); | ||
} | ||
|
||
function increaseFontSize() { | ||
event.stopPropagation(); // Prevent dropdown from closing | ||
const content = document.getElementById("content"); | ||
const currentSize = window.getComputedStyle(content).fontSize; | ||
content.style.fontSize = (parseFloat(currentSize) + 2) + "px"; | ||
} | ||
|
||
function decreaseFontSize() { | ||
event.stopPropagation(); // Prevent dropdown from closing | ||
const content = document.getElementById("content"); | ||
const currentSize = window.getComputedStyle(content).fontSize; | ||
content.style.fontSize = (parseFloat(currentSize) - 2) + "px"; | ||
} | ||
|
||
// Dropdown for font buttons | ||
function toggleDropdown() { | ||
const dropdownContent = document.querySelector('.dropdown-content'); | ||
dropdownContent.style.display = dropdownContent.style.display === 'block' ? 'none' : 'block'; | ||
} | ||
|
||
// Open/close dropdown on click of the button | ||
document.getElementById('dropdownButton').onclick = function(event) { | ||
event.stopPropagation(); // Prevent the click from triggering the window.onclick event | ||
toggleDropdown(); | ||
}; | ||
|
||
// Close dropdown if clicking outside | ||
window.onclick = function(event) { | ||
const dropdownContent = document.querySelector('.dropdown-content'); | ||
if (!event.target.closest('.dropdown')) { // Close if click outside the dropdown | ||
dropdownContent.style.display = 'none'; | ||
} | ||
}; | ||
|
||
function toggleSubmenu(event) { | ||
const submenu = event.target.nextElementSibling; // Get the submenu for the clicked header | ||
|
||
// If the submenu exists, toggle it | ||
if (submenu && submenu.classList.contains('submenu')) { | ||
submenu.classList.toggle('open'); // Toggle the 'open' class to control visibility | ||
} | ||
}; | ||
|
||
// This function will add the full text to the title attribute for all anchor tags | ||
document.querySelectorAll('.sidebar a').forEach(anchor => { | ||
anchor.setAttribute('title', anchor.textContent); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>HNN Textbook</title> | ||
<base href="/website_redesign/"> | ||
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400&display=swap" rel="stylesheet"> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
|
||
<div id="mySidebar" class="sidebar"> | ||
<p style="color:#e5a734"> | ||
Human Neocortical Neurosolver | ||
</p> | ||
<br> | ||
<a href="content/00_preface.html">Preface</a> | ||
<div class="sidebar-list"> | ||
<a id="sidebar-header" onclick="toggleSubmenu(event)"> | ||
1. Under the Hood | ||
</a> | ||
<div class="submenu"> | ||
<a href="content/01_under_the_hood/01_cortical_column_structure.html">1.1 Cortical Column Structure</a> | ||
<a href="content/01_under_the_hood/02_primary_electric_currents.html">1.2 Calculation of Primary Electric Currents</a> | ||
</div> | ||
</div> | ||
<div class="sidebar-list"> | ||
<a id="sidebar-header" onclick="toggleSubmenu(event)"> | ||
2 Simulating ERPs | ||
</a> | ||
<div class="submenu"> | ||
<a href="content/02_simulating_erps/01_overview_of_erps.html">2.1 Review of ERPs</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div id="main"> | ||
<div class="topbar"> | ||
<button class="openbtn" onclick="toggleNav()">☰</button> | ||
<div class="dropdown"> | ||
<button id="dropdownButton" class="dropdown-button"> | ||
<span>A</span> | ||
</button> | ||
<div class="dropdown-content"> | ||
<button class="fontsize-btn" onclick="decreaseFontSize()">A-</button> | ||
<button class="fontsize-btn" onclick="increaseFontSize()">A+</button> | ||
</div> | ||
</div> | ||
<img src="https://hnn.brown.edu/wp-content/uploads/hnn-medium.png"></img> | ||
</div> | ||
|
||
<div id="content-wrapper"> | ||
<div id="content"> | ||
|
||
<!-- | ||
# Title: 2.1 Review of ERPs | ||
# Updated: 2024-11-14 | ||
# | ||
# Contributors: | ||
# Dylan Daniels | ||
--> | ||
</div> <!-- close content wrapper --> | ||
</div> <!-- close content --> | ||
</div> <!-- close main --> | ||
|
||
<script> | ||
let isSidebarOpen = true; // Sidebar is initially open | ||
|
||
function toggleNav() { | ||
const sidebar = document.getElementById("mySidebar"); | ||
const main = document.getElementById("main"); | ||
|
||
// Toggle sidebar state | ||
if (isSidebarOpen) { | ||
sidebar.style.width = "0"; | ||
main.style.marginLeft = "0"; | ||
} else { | ||
sidebar.style.width = "350px"; // Adjust width as needed | ||
main.style.marginLeft = "350px"; // Match margin to new width | ||
} | ||
|
||
// Toggle the sidebar state | ||
isSidebarOpen = !isSidebarOpen; | ||
} | ||
|
||
// Open the sidebar on page load | ||
window.onload = function() { | ||
// Set initial styles for open state without animation | ||
const sidebar = document.getElementById("mySidebar"); | ||
const main = document.getElementById("main"); | ||
|
||
sidebar.style.transition = "none"; | ||
main.style.transition = "none"; | ||
sidebar.style.width = "350px"; | ||
main.style.marginLeft = "350px"; | ||
|
||
// Re-enable transition for subsequent toggles | ||
setTimeout(() => { | ||
sidebar.style.transition = "width 0.5s"; | ||
main.style.transition = "margin-left 0.5s"; | ||
}, 10); | ||
} | ||
|
||
function increaseFontSize() { | ||
event.stopPropagation(); // Prevent dropdown from closing | ||
const content = document.getElementById("content"); | ||
const currentSize = window.getComputedStyle(content).fontSize; | ||
content.style.fontSize = (parseFloat(currentSize) + 2) + "px"; | ||
} | ||
|
||
function decreaseFontSize() { | ||
event.stopPropagation(); // Prevent dropdown from closing | ||
const content = document.getElementById("content"); | ||
const currentSize = window.getComputedStyle(content).fontSize; | ||
content.style.fontSize = (parseFloat(currentSize) - 2) + "px"; | ||
} | ||
|
||
// Dropdown for font buttons | ||
function toggleDropdown() { | ||
const dropdownContent = document.querySelector('.dropdown-content'); | ||
dropdownContent.style.display = dropdownContent.style.display === 'block' ? 'none' : 'block'; | ||
} | ||
|
||
// Open/close dropdown on click of the button | ||
document.getElementById('dropdownButton').onclick = function(event) { | ||
event.stopPropagation(); // Prevent the click from triggering the window.onclick event | ||
toggleDropdown(); | ||
}; | ||
|
||
// Close dropdown if clicking outside | ||
window.onclick = function(event) { | ||
const dropdownContent = document.querySelector('.dropdown-content'); | ||
if (!event.target.closest('.dropdown')) { // Close if click outside the dropdown | ||
dropdownContent.style.display = 'none'; | ||
} | ||
}; | ||
|
||
function toggleSubmenu(event) { | ||
const submenu = event.target.nextElementSibling; // Get the submenu for the clicked header | ||
|
||
// If the submenu exists, toggle it | ||
if (submenu && submenu.classList.contains('submenu')) { | ||
submenu.classList.toggle('open'); // Toggle the 'open' class to control visibility | ||
} | ||
}; | ||
|
||
// This function will add the full text to the title attribute for all anchor tags | ||
document.querySelectorAll('.sidebar a').forEach(anchor => { | ||
anchor.setAttribute('title', anchor.textContent); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.