Skip to content

About

Source code for my personal website. Feel free to fork!

Resources

Stars

16 stars

Watchers

0 watching

Forks

Repository files navigation

Allen Tu’s Webpage

Source code for my personal website:
👉 https://tuallen.github.io

Welcome to my long-running pet project — a place where my web development experiments collide with my habit of polishing research papers, figures, and visualizations a little too carefully. What began as a simple academic homepage has gradually evolved into a playground for experimenting with UI details, interactive media, and small quality-of-life features that make research artifacts nicer to browse.

The guiding principle is simple: keep things lightweight, readable, and publication-friendly — while still supporting richer interaction where it genuinely improves understanding.


Credits

This site is built on top of the excellent academic website template by
Gowthami Somepalli
https://github.com/somepago/somepago.github.io/tree/50f518f52bb19d6d9b9ca65f76dc06bd01d429fb

Huge thanks to her for open-sourcing a clean, well-structured starting point.


Tech Stack

  • Pure HTML / CSS / JavaScript — No runtime framework or application build step; just vanilla web technologies
  • Font Awesome 6.5.1 — General-purpose icon library, self-hosted as a subset of only the glyphs in use (see tools/build-webfonts.sh)
  • Academicons — Academic-specific icons (ORCID, arXiv, DBLP, etc.), also self-hosted as a subset
  • Inter — Body typeface, self-hosted as a variable font (no Google Fonts request)
  • Custom SVG icon system — Inline SVG masks for institutional and organizational logos
  • Modern media formats — AVIF/WebP with PNG/JPG fallbacks, plus AV1 video with fast-start H.264 fallbacks
  • Google Analytics — Lightweight traffic monitoring

Custom Features & Extensions

On top of the original template, I’ve introduced a number of custom features and extensions.

Interactive Media

  • Image and video slideshows (slideshow.js) Swipable carousels with keyboard navigation, touch/mouse drag, and dot indicators. Image slides auto-advance on a timer only while visible. GOFish video slides advance when the active clip ends, pause off-screen, and loop the focused clip instead of advancing while hover zoom is active. Inactive video sources are hydrated only when selected, so they incur no media request up front. Used for research highlight teasers and the Conference Gallery page. The track is a true ring: stepping past the last slide moves the images left like any other forward step instead of rewinding the whole strip, and stepping back off the first moves them right. Dots take whichever way round is shorter, so the last dot is one step from the first — the transition is a fixed 0.4s whatever the distance, so a jump the long way round the 9-image gallery would sweep 8 slides in that time. Rather than clone slides — the video carousel's slides own <video> ids a comparison slider has already bound a canvas to — the slides about to be crossed are shifted a strip width to the far end for the length of the animation, which places them beside the current slide in ring order. That shift is a transform, so no flex item's box moves and the strip's layout is untouched; the offsets are swapped back for the equivalent in-bounds ones on transitionend, while only the on-screen slide is visible, making the swap unobservable. A move that stays inside the strip skips all of this and writes the one transform it always did, so the extra work — the shift and the single forced reflow that lands it — is paid only on a wrap.
  • Zoom containers (zoom-containers.js)
    Click-to-expand images and videos without leaving the page
  • Video comparison sliders (video_comparison.js)
    Interactive side-by-side video comparisons with draggable sliders for qualitative research demonstrations. On desktop the divider snaps back to its 50/50 default when the pointer leaves. On the 3D/4D page the sliders share one slot as a carousel (.video-slideshow) so they don't stack vertically, and only the visible comparison loads and plays. Navigation is arrows/dots/arrow keys only — drag-to-swipe would conflict with dragging the split itself. It wraps around the same way the image carousels do, sharing their ring logic.
  • Custom PDF Viewer (pdf-modal.js, pdfviewer.html)
    Full-screen in-page PDF viewer for any .pdf link site-wide. Powered by a self-hosted PDF.js instance, it avoids native browser limitations. It features a sleek Edge-style top toolbar with page shadows, custom controls (zoom, page navigation, fit width/page, rotate, print, and download), and comprehensive keyboard shortcut support. The viewer visually mirrors the Microsoft Edge PDF experience, including an automatic system-aware light/dark theme that adapts to OS preferences independently of the main site theme. It intelligently intercepts external links inside the PDF to open in new tabs and auto-zooms landscape posters.
  • Image viewer modal (image-modal.js)
    Lightweight modal for standalone image links (.jpg, .png, .webp, etc.). The modal shrink-wraps around the image up to 95% of the viewport while maintaining aspect ratio. Matches the theme of the PDF and BibTeX modals. Intercepts image links automatically site-wide; title is read from the title attribute, the wrapped <img>'s alt, or the filename as a fallback.
  • Lazy loading
    Images use loading="lazy". loading is a no-op on <video>, so thumbnail videos combine explicit dimensions, lightweight poster frames, and preload="none"; playback and downloading begin only when a card scrolls into view. Inactive carousel sources are not attached until selected.

Motion & Interaction Polish

A layer of lightweight, tasteful micro-interactions — all pure CSS, all theme-aware, and all respecting prefers-reduced-motion:

  • Staggered header & footer entrance
    On first visit or page refresh, the sidebar logo, portrait/icons, nav links, and footer fade and slide in with a 1s stagger. Internal link navigation skips the animation (detected via PerformanceNavigationTiming).
  • Section content fade-in
    The main content area fades in on every page navigation for a smooth transition feel.
  • Theme toggle rise/set
    The sun/moon theme icons animate with a rise/set transition on hover — the current icon drops down while the next one rises from above, previewing the theme switch before committing on click.
  • Animated sliding underlines
    Inline text links, sidebar navigation links, and the sidebar email grow an underline left-to-right on hover. The underline uses currentColor, so it fades in sync with the text color.
  • Slow color fades
    Navigation links and social icons ease into the accent-hover color over ~0.45s for a softer, more deliberate feel (icons keep their subtle scale pop).
  • Icon hover lift & glow
    Social icons in the header and footer lift upward with a subtle translateY on hover, plus an accent-colored drop-shadow glow.
  • Portrait & brandmark hover
    The portrait photo and logo brandmark have a soft shadow at rest and subtly lift with an accent glow on hover.
  • Solid active nav
    The selected/active navigation link uses a solid currentColor underline. Taps navigate immediately — delaying to play the underline animation first read as lag.
  • Pill-style buttons with accent fill
    All buttons (.button, plus the BibTeX modal and PDF toolbar action buttons) are fully rounded pills that fill with the accent color and lift with a soft themed shadow on hover. Close (×) buttons are circular and spin 90° on hover.
  • Heading accent bars
    Each .section-heading carries a short accent-colored bar underneath. Headings that pair a title with a button (.has-action) anchor the bar to the title text only, so it never runs under the button. The class is what carries the styling, so heading levels follow the document outline (one <h1> per page, sections as <h2>) without changing how anything looks.
  • Softer media surfaces
    Video/image thumbnails and the video-comparison sliders have rounded corners and a subtle, theme-aware drop shadow at rest (the shadow releases during the zoom-container hover so it doesn't magnify).
  • Touch-aware hover
    All hover effects are disabled on touch devices via @media (hover: none) to prevent sticky :hover states after tap.
  • Mobile bio toggle
    On mobile, the second paragraph of the About Me bio collapses behind a chevron button for a cleaner first impression.

Dynamic Content & Theming

  • Dark mode toggle (theme-switcher.js)
    Manual theme switcher with localStorage persistence, smooth transitions, and zero FOUC (flash of unstyled content)

  • Component-based architecture (components.js)
    Reusable header and footer components with dynamic navigation highlighting, automatic copyright year, sessionStorage caching for flash-free navigation, and entrance animations on first visit/refresh.

    The cached markup is injected while the document is still parsing, via a MutationObserver that fills each placeholder the moment it appears. The script runs in <head>, so it cannot simply query for placeholders that <body> has not produced yet — doing that matched nothing, and the header only appeared at DOMContentLoaded, which is the flash this avoids.

  • Automatic GitHub star counts (github-stars.js)
    Real-time repository star counts via the GitHub API

  • Semantic Scholar citation retrieval (semantic-scholar.js)
    Automatic citation counts for publications

  • News timeline toggle (news-toggle.js)
    Collapsible news timeline with animated expand/collapse. The vertical rail is measured from layout every frame while the list animates, so it grows at exactly the rate the dots move rather than easing toward a moving target (which left it lagging behind). Staggered entry reveals, with a gradient taper when collapsed. The third item shows a down-arrow indicator when collapsed; the last item shows an up-arrow when expanded. Clicking dates, dots, or the sidebar column toggles the state.

  • External link handling (new-tabs.js)
    External links automatically open in new tabs

  • BibTeX copy & download (bibtex.js, bibtex-modal.js)
    GitHub-style copy-to-clipboard and download functionality for BibTeX references, available both on a standalone page and as a responsive modal popup on research pages (e.g., Home, 3D Portfolio, Biometrics). Modal action buttons share the same unified pill-button style as the PDF toolbar.

  • Theme-aware styling tokens
    CSS variables drive consistent, theme-aware styling across all pages — including highlight-table borders and dedicated shadow tokens (--accent-shadow, --media-shadow) that keep hover shadows tuned for both light and dark themes.

Custom Icon System

A fully custom icon system extending Academicons and Font Awesome with inline SVG masks for consistent styling and scalability:

  • ai-allentu — Personal logo
  • ai-tu — Personal brandmark
  • ai-umd — University of Maryland
  • ai-umd-cs — UMD Computer Science
  • ai-str — Systems & Technology Research (STR)
  • ai-ncino — nCino
  • ai-iarpa — IARPA
  • ai-amazon — Amazon
  • ai-xhs — Xiaohongshu (RedNote)
  • Custom Semantic Scholar and Web of Science icons

Several logos also ship a full-color variant (e.g. ai-amazon-color, ai-str-color, ai-umd-cs-color, ai-iarpa-color, ai-ncino-color) that layers brand colors using multiple mask elements, while the base icons inherit text color for theming.

Monochrome icons are implemented using mask-image so they inherit text color, scale cleanly, and support dark mode automatically.

Design & UX

  • Modern typography — Inter as the primary typeface (with a system-font fallback stack), font antialiasing, and refined heading weight/letter-spacing for a cleaner, more contemporary feel. Body text is 16px/1.65 in a near-black #2f2f2f (12.6:1 contrast); prose runs the full column width so every block — paragraphs, lists, tables, media — shares the same right edge, trading a shorter measure for that alignment
  • Dark mode — Toggle between light and dark themes with moon/sun icon in footer; preference persists across sessions
  • Large-screen auto-zoom — The layout keeps its fixed width, but on wide monitors the content (.wrapper) progressively scales up via CSS zoom (1.1× at 1500px through 1.6× at 2800px) to fill a modern amount of the screen. Fonts, sidebar, media, and spacing all scale together, so the layout and line breaks stay identical — things just get bigger. zoom is applied to the content wrapper (not body) so full-screen modals stay sized to the real viewport and never require scrolling.
  • Responsive layout — Mobile-optimized design with proper viewport handling, video container alignment, and centered navigation
  • Icon grid navigation — Compact header linking to CV, profiles, and social platforms
  • Structured data — JSON-LD schema markup for better SEO and rich snippets: a Person and WebSite node that every page's WebPage references by @id, plus ScholarlyArticle entries for each publication (authors, venue, year)
  • Comprehensive meta tags — Open Graph, Twitter Cards, and canonical URLs
  • Multi-page structure — Home, Link Hub, 3D/4D Research Portfolio, Biometric Recognition Research, Conference Gallery, and BibTeX References
  • System-Aware Favicon — Intelligent favicon adaptation that prioritizes system dark mode (white icon for contrast) while respecting page theme in light mode (red/dark red).

Performance & SEO

  • No third-party origin on the critical path — every render-blocking stylesheet and font is served from this origin, so first paint never waits on a DNS lookup and TLS handshake elsewhere. cdnjs is still preconnected because PDF.js loads from there on demand.
  • Preconnect hints — DNS prefetching for the APIs and CDN that are fetched after load
  • Deferred JavaScript — every script is deferred except components.js, which must run during parse so the cached header lands in the first paint
  • Semantic HTML5 — one <h1> per page with sections as <h2> (the accent-bar styling lives on .section-heading, so heading level follows the document outline rather than the design), a main landmark on each page's content <section>, and an accessible name on every link, button and control
  • Keyboard access — a skip link as the first tab stop, since the header contributes 16 tab stops before the content begins, and a :focus-visible ring on the slideshows, which are tabindex="0" and arrow-key navigable but set outline: none
  • Styling in stylesheets — repeated inline styles live in classes instead (.section-heading/.has-action for headings, .teaser-cell for highlight-row media cells, .tight-under-heading for content pulled up under a heading), which is what let the heading levels change without touching a single visual rule
  • Optimized media — gallery photos use display-sized AVIF where it beats the original, videos are sized for their displayed and hover-zoomed dimensions, and AV1 is preferred over separately optimized fast-start H.264 compatibility copies
  • Cache busting — Automated versioning system for static assets to ensure browsers load latest versions

One deliberate non-change: components/header.html is a fragment that returns 200, so a crawler could in principle index it as a thin page. Adding Disallow: /components/ would be worse — robots.txt also blocks subresource fetches during rendering, and since the nav exists only after that fetch, Googlebot would render every page with no navigation at all. The right tool is an X-Robots-Tag: noindex response header on that path, which GitHub Pages cannot set per-file. Left crawlable on purpose.


Project Structure

├── index.html              # Main homepage
├── hub/                    # Link hub page
├── 3d/                     # 3D/4D research portfolio
├── biometrics/             # Biometric recognition research
├── gallery/                # Conference gallery with AVIF delivery copies and JPG originals
├── bibtex/                 # BibTeX references page
├── components/             # Reusable HTML components
│   ├── header.html         # Shared header with navigation
│   └── footer.html         # Shared footer with dynamic copyright
├── static/
│   ├── stylesheets/
│   │   ├── styles.css      # Main consolidated styles with CSS variables for theming
│   │   ├── icons.css       # Custom icon definitions
│   │   ├── fontawesome-subset.css # Generated: self-hosted Font Awesome subset
│   │   ├── academicons-subset.css  # Generated: self-hosted Academicons subset
│   │   ├── inter.css       # Generated: self-hosted Inter variable font
│   │   └── zoom_containers.css
│   ├── webfonts/           # Generated: subset icon-font woff2 files
│   ├── js/
│   │   ├── components.js   # Component loader with entrance animations
│   │   ├── theme-switcher.js # Dark mode toggle with rise/set animation
│   │   ├── slideshow.js    # Swipable image and end-driven video carousels
│   │   ├── pdf-modal.js    # Full-screen PDF viewer modal (auto-zooms posters; native passthrough on mobile)
│   │   ├── image-modal.js  # Image viewer modal (intercepts all image links; auto-loads .webp if available, downloads original)
│   │   ├── github-stars.js
│   │   ├── semantic-scholar.js
│   │   ├── new-tabs.js
│   │   ├── news-toggle.js  # Collapsible news timeline with animated rail
│   │   ├── video_comparison.js
│   │   ├── zoom-containers.js
│   │   └── bibtex.js       # Copy/download functionality for BibTeX
│   ├── icons/              # SVG logos and favicons
│   └── images/             # Photos and media
├── media/                  # AV1/H.264 research teasers and videos
│   └── posters/            # Lightweight first-frame stills for thumbnail videos
├── files/                  # CV, resume, etc.
├── tools/
│   └── build-webfonts.sh   # Regenerates the icon-font subsets and Inter
├── cache_bust.py           # Automated cache busting script
├── sitemap.xml             # SEO sitemap
└── robots.txt              # Crawler directives

Local Development

To run the site locally:

sh run_server.sh

Then navigate to http://localhost:8000 in your browser.

The server script uses Python's built-in HTTP server bound to 127.0.0.1 for local-only testing.


Features in Action

Want to see these features live? Check out:

  • 3D/4D Research Portfolio — Zoom containers, video demonstrations, BibTeX modal, and PDF viewer
  • Biometric Recognition Research — Custom icon system, BibTeX modal, and PDF viewer
  • Main Homepage — GitHub star counts, Semantic Scholar citations, slideshows, BibTeX modal, and PDF viewer
  • Conference Gallery — Full-width image slideshows for CVPR 2026, FG 2026, and CVPR 2025 with LinkedIn/RedNote post links
  • Link Hub — Custom icon system showcase and PDF viewer
  • BibTeX References — Standalone page with GitHub-style copy/download buttons and Google Scholar/Semantic Scholar links
  • Header navigation — Custom brandmark and icon grid on any page; CV link opens in the PDF viewer; staggered entrance animation on first visit

Browser Support

This site uses modern web standards and is optimized for:

  • Chrome/Edge (latest)
  • Firefox (latest)
  • Safari (latest)

Graceful degradation is implemented for older browsers:

  • AVIF/WebP images fall back to PNG/JPG
  • AV1 videos fall back to H.264
  • CSS mask-image icons degrade to standard text
  • JavaScript features are progressively enhanced
  • The large-screen zoom scaling is a pure enhancement — unsupported browsers simply render the page at its normal fixed width
  • Motion effects respect prefers-reduced-motion and fall back to instant state changes

Known Limitations

  • Video comparison sliders require JavaScript enabled
  • Some custom icons may not render correctly in very old browsers (pre-2020)
  • Citation counts and GitHub stars require API availability
  • Zoom containers work best on desktop; mobile uses native image viewing
  • On mobile (iOS/Android), the custom PDF viewer is bypassed to let the OS handle PDFs natively

Philosophy

The goal is to keep the site lightweight, readable, and publication-friendly, while still supporting richer interactive content when it meaningfully improves understanding. Every feature is added intentionally — no bloat, no unnecessary dependencies, just thoughtful enhancements to research presentation.


License & Reuse

Feel free to explore, borrow ideas, or adapt pieces for your own academic website. If you use significant portions of this code, please credit both the original template by Gowthami Somepalli and any custom features adapted from this repository.


Cache Busting

When you update CSS, JavaScript, or other static files, run the cache busting script to force browsers to reload the new versions:

# Preview changes
python3 cache_bust.py

# Apply changes
python3 cache_bust.py --apply

The script automatically:

  • Detects the current version (e.g., ?v=2026-02-15)
  • Increments if run multiple times per day (?v=2026-02-15-1, -2, etc.)
  • Updates href/src/srcset/poster/data-link in HTML, url() in our own stylesheets, and versioned page URLs built as strings in JS

Covering CSS and JS matters: a <link rel="preload"> and the url() it refers to must match byte-for-byte, query string included, or the browser treats them as two different resources and the preload is wasted. External URLs are left alone, so things like YouTube's ?v= video IDs are never rewritten.


Webfonts

Every font is self-hosted, so no third-party origin sits on the critical path.

The site uses ~36 of Font Awesome's ~2000 icons and 6 of Academicons' ~150. Font Awesome's CDN build costs 100 KB of render-blocking CSS plus 267 KB of webfonts from a third-party origin, and Academicons ships a 128 KB .woff with no .woff2. The self-hosted subsets total ~10 KB.

Inter comes from the same script. Google serves it as a variable font, so one 47 KB file covers every weight the site uses (400/500/600/700) where four static faces would be ~189 KB. The unicode-range split mirrors upstream, so latin-ext is only fetched by a page that needs a character outside Latin-1.

pip3 install --user fonttools brotli   # one-time
tools/build-webfonts.sh

The script scans the markup and JS for the icon classes actually in use — including classList calls and inline onclick handlers — plus raw codepoints referenced from our own CSS (content: "\f077" for the news toggle arrows, which never appear as a class). For Academicons it also skips any ai-* class that icons.css draws as an SVG mask, since those need no glyph. It then subsets both fonts, verifies every glyph survived with real outlines, and checks each generated stylesheet agrees with its font. Run it after adding or removing an icon; if a glyph is missing it fails rather than shipping a blank box.

The upstream static/stylesheets/css/academicons.min.css and static/stylesheets/fonts/academicons.* are kept as the subset's source — they are no longer served to visitors.


Related Project Websites

In addition to this personal site, I have also built or helped assemble several research project websites based on this codebase:

This template has also been used for other academic websites, some of which I helped their authors set up, including:


Last Updated: October 29, 2026

Built with care ☕
by Allen Tu, with help from AI tools

About

Source code for my personal website. Feel free to fork!

Resources

Stars

16 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages