Skip to content

Commit f79e999

Browse files
authored
Merge pull request #1 from stevertaylor/claude/code-review-EkPTO
Improve performance, accessibility, SEO, and content
2 parents f0600ab + b0e8d52 commit f79e999

7 files changed

Lines changed: 81 additions & 7 deletions

File tree

.github/workflows/hugo.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ jobs:
3737
- name: Setup Pages
3838
id: pages
3939
uses: actions/configure-pages@v5
40+
- name: Cache Hugo resources
41+
uses: actions/cache@v4
42+
with:
43+
path: |
44+
${{ runner.temp }}/hugo_cache
45+
resources/_gen
46+
key: ${{ runner.os }}-hugo-${{ hashFiles('**/*.md', 'hugo.yaml') }}
47+
restore-keys: |
48+
${{ runner.os }}-hugo-
4049
- name: Build with Hugo
4150
env:
4251
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache

assets/css/extended/custom.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ body.home-page::before {
3737
}
3838

3939
/* Make main content readable over dark background */
40-
body.home-page .main {
41-
background: transparent;
42-
}
43-
40+
body.home-page .main,
4441
body.home-page .profile {
4542
background: transparent;
4643
}
@@ -124,4 +121,11 @@ body.home-page footer a {
124121
/* Remove the small circular background (we have full page now) */
125122
.profile-gw-background {
126123
display: none;
124+
}
125+
126+
/* Disable animation for users who prefer reduced motion */
127+
@media (prefers-reduced-motion: reduce) {
128+
#gw-canvas {
129+
display: none;
130+
}
127131
}

content/publications.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ draft: false
55
description: "Links to my publication profiles"
66
---
77

8+
## Selected Highlights
9+
10+
- **Agazie, G. et al. (NANOGrav)**, "The NANOGrav 15 yr Data Set: Evidence for a Gravitational-wave Background," *The Astrophysical Journal Letters*, 951, L8 (2023). [arXiv:2306.16213](https://arxiv.org/abs/2306.16213)
11+
12+
- **Agazie, G. et al. (NANOGrav)**, "The NANOGrav 15 yr Data Set: Constraints on Supermassive Black Hole Binaries from the Gravitational-wave Background," *The Astrophysical Journal Letters*, 952, L37 (2023). [arXiv:2306.16220](https://arxiv.org/abs/2306.16220)
13+
14+
- **Taylor, S. R.**, *Nanohertz Gravitational Wave Astronomy*, CRC Press (2021). [ISBN: 9780367768621](https://www.routledge.com/Nanohertz-Gravitational-Wave-Astronomy/Taylor/p/book/9780367768621)
15+
16+
- **Taylor, S. R. et al.**, "Are We There Yet? Time to Detection of Nanohertz Gravitational Waves Based on Pulsar-timing Array Limits," *The Astrophysical Journal Letters*, 819, L6 (2016). [arXiv:1511.05564](https://arxiv.org/abs/1511.05564)
17+
18+
- **Taylor, S. R. et al.**, "Limits on Anisotropy in the Nanohertz Stochastic Gravitational Wave Background," *Physical Review Letters*, 115, 041101 (2015). [arXiv:1506.08817](https://arxiv.org/abs/1506.08817)
19+
20+
---
21+
822
## Publication Databases
923

1024
Find my complete publication record on the following platforms:

hugo.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ theme: "PaperMod"
77
params:
88
env: production
99
author: "Stephen R. Taylor"
10-
description: "Assistant Professor at Vanderbilt University | Gravitational Wave Astrophysicist | Chair, NANOGrav Collaboration"
10+
description: "Associate Professor at Vanderbilt University | Gravitational Wave Astrophysicist | Chair, NANOGrav Collaboration"
11+
images:
12+
- "images/bio_pic.jpg"
1113

1214
# Profile section on homepage
1315
profileMode:

layouts/404.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{ define "main" }}
2+
<article class="post-single">
3+
<header class="post-header">
4+
<h1 class="post-title">Page Not Found</h1>
5+
</header>
6+
<div class="post-content">
7+
<p>Sorry, the page you're looking for doesn't exist or has been moved.</p>
8+
<p><a href="/">Return to the homepage</a></p>
9+
</div>
10+
</article>
11+
{{ end }}

layouts/_default/baseof.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{{- end }}
2727
{{- if $isHome }}
2828
<!-- Full-page animated gravitational wave canvas -->
29-
<canvas id="gw-canvas"></canvas>
29+
<canvas id="gw-canvas" aria-hidden="true" role="presentation"></canvas>
3030
{{- end }}
3131
{{ partialCached "header.html" . .Page -}}
3232
<main class="main">

static/js/gw-animation.js

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@
55
// Only run on home page
66
if (!document.body.classList.contains('home-page')) return;
77

8+
// Respect prefers-reduced-motion
9+
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
10+
if (prefersReducedMotion.matches) return;
11+
812
const canvas = document.getElementById('gw-canvas');
913
if (!canvas) return;
1014

1115
const ctx = canvas.getContext('2d');
1216
let width, height;
17+
let animationId = null;
18+
let paused = false;
1319

1420
// Animation state
1521
let time = 0;
@@ -139,6 +145,8 @@
139145
}
140146

141147
function animate() {
148+
if (paused) return;
149+
142150
// Clear canvas
143151
ctx.fillStyle = 'rgba(5, 5, 20, 1)';
144152
ctx.fillRect(0, 0, width, height);
@@ -150,9 +158,35 @@
150158
drawWaves();
151159

152160
time++;
153-
requestAnimationFrame(animate);
161+
animationId = requestAnimationFrame(animate);
154162
}
155163

164+
// Pause when tab is hidden to save CPU/battery
165+
document.addEventListener('visibilitychange', function () {
166+
if (document.hidden) {
167+
paused = true;
168+
if (animationId) {
169+
cancelAnimationFrame(animationId);
170+
animationId = null;
171+
}
172+
} else {
173+
paused = false;
174+
animate();
175+
}
176+
});
177+
178+
// Stop animation if user enables reduced motion mid-session
179+
prefersReducedMotion.addEventListener('change', function (e) {
180+
if (e.matches) {
181+
paused = true;
182+
if (animationId) {
183+
cancelAnimationFrame(animationId);
184+
animationId = null;
185+
}
186+
canvas.style.display = 'none';
187+
}
188+
});
189+
156190
// Initialize
157191
window.addEventListener('resize', resize);
158192
resize();

0 commit comments

Comments
 (0)