Skip to content

Commit a8bc1a9

Browse files
Amey-Thakurmsatmod
andcommitted
Amey's Arc: Restoration & Critical Build Fix
- Fixed fatal build error: Removed leading space in partial path in Site_Head.html. - Restored scholarly headers and documentation to core partials: - layouts/partials/internal/Site_Head.html - layouts/partials/internal/Primary_Navigation.html - layouts/partials/internal/Primary_Footer.html - layouts/partials/scholarly/Citation_Trail.html - layouts/partials/scholarly/Reading_Metrics.html Co-authored-by: Mega Satish <mega.modha@gmail.com>
1 parent e78a499 commit a8bc1a9

5 files changed

Lines changed: 279 additions & 54 deletions

File tree

Source Code/layouts/partials/internal/Primary_Footer.html

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,42 @@
1+
<!-- ==============================================================================
2+
- File: Primary_Footer.html (Structural Closure & Interaction Hydration)
3+
- Author: Amey Thakur
4+
- Profile: https://github.com/Amey-Thakur
5+
- Repository: https://github.com/Amey-Thakur/Amey-Thakur.github.io
6+
- Release Date: December 16, 2025
7+
- License: MIT License
8+
- ==============================================================================
9+
-
10+
- DESCRIPTION:
11+
- This partial serves as the site's structural closure. It handles the
12+
- technical footer content, back-to-top navigational logic, and initializes
13+
- critical interactive scripts such as theme-switching and code-copying.
14+
-
15+
- HOW IT WORKS:
16+
- The component injects authorship metadata and dynamic copyright dates. It
17+
- utilizes native browser APIs (localStorage, matchMedia) to reconcile user
18+
- preferences and provides smooth-scroll behaviors for site-wide anchors.
19+
- It also integrates custom audio feedback for thematic transitions.
20+
-
21+
- TECH STACK:
22+
- - Hugo Template Logic
23+
- - Web APIs (Web Audio, View Transitions)
24+
- - Client-side Interaction Logic (Vanilla JS)
25+
-
26+
- ============================================================================== -->
27+
128
{{- if not (.Param "hideFooter") }}
229
<footer class="footer">
330
<span>
31+
{{- /* Technical Authorship & Repository Mapping */ -}}
432
&copy; 2025-{{ now.Year }} <a href="https://github.com/Amey-Thakur/Amey-Thakur.github.io"
533
rel="noopener noreferrer" target="_blank">Amey’s Arc</a>&nbsp;·&nbsp;Authored by <a
634
href="https://github.com/Amey-Thakur" rel="noopener noreferrer" target="_blank">Amey Thakur</a>
735
</span>
836
</footer>
937
{{- end }}
1038

39+
{{- /* Navigational Anchor: Return to root top. */ -}}
1140
{{- if (not site.Params.disableScrollToTop) }}
1241
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
1342
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
@@ -16,12 +45,16 @@
1645
</a>
1746
{{- end }}
1847

48+
{{- /* Technical Hooks: Site hooks for custom footer injections. */ -}}
1949
{{- partial "internal/Injected_Footer_Hooks.html" . }}
2050

2151
<script>
52+
/*
53+
* Navigation State Maintenance:
54+
* Synchronizing the scroll position of the primary menu across page loads.
55+
*/
2256
let menu = document.getElementById('menu');
2357
if (menu) {
24-
// Set the scroll position
2558
const scrollPosition = localStorage.getItem("menu-scroll-position");
2659
if (scrollPosition) {
2760
menu.scrollLeft = parseInt(scrollPosition, 10);
@@ -32,6 +65,10 @@
3265
}
3366
}
3467

68+
/*
69+
* Smooth Anchor Orchestration:
70+
* Providing fluid motion for internal site linkages.
71+
*/
3572
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
3673
anchor.addEventListener("click", function (e) {
3774
e.preventDefault();
@@ -50,9 +87,9 @@
5087
}
5188
});
5289
});
53-
5490
</script>
5591

92+
{{- /* Visibility logic for the back-to-top navigational hook. */ -}}
5693
{{- if (not site.Params.disableScrollToTop) }}
5794
<script>
5895
var mybutton = document.getElementById("top-link");
@@ -65,12 +102,16 @@
65102
mybutton.style.opacity = "0";
66103
}
67104
};
68-
69105
</script>
70106
{{- end }}
71107

108+
{{- /*
109+
* Thematic Interaction Logic:
110+
* Orchestrating theme transitions with visual and auditory feedback.
111+
*/ -}}
72112
{{- if (not site.Params.disableThemeToggle) }}
73113
<script>
114+
/* Audio Synthesis: Providing subtle feedback for modality shifts. */
74115
function playThemeSound() {
75116
try {
76117
const AudioContext = window.AudioContext || window.webkitAudioContext;
@@ -81,25 +122,23 @@
81122
osc.connect(gain);
82123
gain.connect(ctx.destination);
83124

84-
// Subtle "Soft Click"
85125
osc.type = 'sine';
86126
const t = ctx.currentTime;
87127

88-
// Quick, low frequency drop (400Hz -> 100Hz)
89128
osc.frequency.setValueAtTime(400, t);
90129
osc.frequency.exponentialRampToValueAtTime(100, t + 0.1);
91130

92-
// Short, soft envelope
93-
gain.gain.setValueAtTime(0.03, t); // Lower volume
131+
gain.gain.setValueAtTime(0.03, t);
94132
gain.gain.exponentialRampToValueAtTime(0.001, t + 0.1);
95133

96134
osc.start(t);
97135
osc.stop(t + 0.1);
98136
} catch (e) { }
99137
}
100138

139+
/* View Transition Integration: Elevating the aesthetic of modality changes. */
101140
document.getElementById("theme-toggle").addEventListener("click", (e) => {
102-
playThemeSound(); // Play sound on toggle
141+
playThemeSound();
103142

104143
const toggleTheme = () => {
105144
const html = document.querySelector("html");
@@ -145,10 +184,13 @@
145184
);
146185
});
147186
})
148-
149187
</script>
150188
{{- end }}
151189

190+
{{- /*
191+
* Content Utility:
192+
* Initializing the code-copying functionality for technical artifacts.
193+
*/ -}}
152194
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }}
153195
<script>
154196
document.querySelectorAll('pre > code').forEach((codeblock) => {
@@ -184,15 +226,16 @@
184226
selection.removeRange(range);
185227
});
186228

229+
/* Strategic button placement based on container nesting. */
187230
if (container.classList.contains("highlight")) {
188231
container.appendChild(copybutton);
189232
} else if (container.parentNode.firstChild == container) {
190-
// td containing LineNos
233+
/* td containing LineNos */
191234
} else if (codeblock.parentNode.parentNode.parentNode.parentNode.parentNode.nodeName == "TABLE") {
192-
// table containing LineNos and code
235+
/* table containing LineNos and code */
193236
codeblock.parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(copybutton);
194237
} else {
195-
// code blocks not having highlight as parent class
238+
/* code blocks not having highlight as parent class */
196239
codeblock.parentNode.appendChild(copybutton);
197240
}
198241
});

Source Code/layouts/partials/internal/Primary_Navigation.html

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,39 @@
1+
<!-- ==============================================================================
2+
- File: Primary_Navigation.html (Navigation Architecture & Interaction)
3+
- Author: Amey Thakur
4+
- Profile: https://github.com/Amey-Thakur
5+
- Repository: https://github.com/Amey-Thakur/Amey-Thakur.github.io
6+
- Release Date: December 16, 2025
7+
- License: MIT License
8+
- ==============================================================================
9+
-
10+
- DESCRIPTION:
11+
- This component manages the site's high-level navigation architecture. It
12+
- handles dynamic branding injection, thematic modality switching, and
13+
- responsive menu orchestration for cross-device accessibility.
14+
-
15+
- HOW IT WORKS:
16+
- The partial retrieves site labels and menu hierarchies from the project
17+
- manifest. It integrates a theme-toggle system and a mobile-responsive
18+
- hamburger interface, utilizing localized state management for a persistent
19+
- user experience.
20+
-
21+
- TECH STACK:
22+
- - Hugo Template Components
23+
- - Native SVG Iconography
24+
- - Client-side Interaction Logic (Vanilla JS)
25+
-
26+
- ============================================================================== -->
27+
128
<header class="header">
229
<nav class="nav">
330
<div class="logo">
31+
{{- /* Branding Initialization: Resolving site label or default title. */ -}}
432
{{- $label_text := (site.Params.label.text | default site.Title) }}
533
{{- if site.Title }}
634
<a href="{{ "" | absLangURL }}" accesskey="h" title="{{ $label_text | plainify }} (Alt + H)">
735

36+
{{- /* Iconography Logic: Processing branding assets via Hugo Pipes. */ -}}
837
{{- if site.Params.label.icon }}
938
{{- $img := resources.Get site.Params.label.icon }}
1039
{{- if $img }}
@@ -30,6 +59,7 @@
3059
end -}} {{- $label_text | safeHTML -}} </a>
3160
{{- end }}
3261

62+
{{- /* User Preference Switches: Theme Modality and Localization Toggles. */ -}}
3363
<div class="logo-switches">
3464
{{- if (not site.Params.disableThemeToggle) }}
3565
<button id="theme-toggle" accesskey="t" title="(Alt + T)" aria-label="Toggle theme">
@@ -79,19 +109,26 @@
79109
{{- end }}
80110
{{- end }}
81111
</div>
112+
113+
{{- /* Visual Divider: Geometric separation for branding and navigation. */ -}}
82114
<span style="margin: auto 2px; font-size: 20px;">|</span>
83115
</div>
116+
117+
{{- /*
118+
* Responsive Interaction:
119+
* Mobile menu trigger and full-screen navigation container.
120+
*/ -}}
84121
{{- $currentPage := . }}
85122
<button id="menu-trigger" aria-haspopup="menu" aria-label="Menu Button">
86123
<div class="hamburger">
87124
<span></span>
88125
<span></span>
89126
<span></span>
90127
</div>
91-
92-
93128
</button>
129+
94130
<ul id="menu">
131+
{{- /* Navigation Map: Iterating through primary menu definitions. */ -}}
95132
{{- range site.Menus.main }}
96133
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
97134
{{- $page_url:= $currentPage.Permalink | absLangURL }}
@@ -119,18 +156,20 @@
119156
</ul>
120157
</nav>
121158
</header>
159+
160+
{{- /* Client-Side Menu Animation Logic */ -}}
122161
<script>
162+
/* Orchestrating the responsive menu visibility and state. */
123163
document.getElementById("menu-trigger").addEventListener("click", function () {
124164
document.getElementById("menu").classList.toggle("show");
125165
document.getElementById("menu-trigger").classList.toggle("is-active");
126166
});
127167

128-
// Close menu when clicking on empty space
168+
/* Accessibility: Closing the active menu when clicking on structural dead space. */
129169
document.getElementById("menu").addEventListener("click", function (e) {
130170
if (e.target === this) {
131171
document.getElementById("menu").classList.remove("show");
132172
document.getElementById("menu-trigger").classList.remove("is-active");
133173
}
134174
});
135-
136175
</script>

0 commit comments

Comments
 (0)