Observatory Template

£10

A complete one-page site for a public observatory or planetarium, built around scroll-drawn constellations: hand-plotted star maps that DrawSVG connects line by line as each section arrives, over a three-layer parallax starfield.

ScrollTriggerDrawSVG Lenis intermediate
6 more details
svg-line-drawparallaxscroll-revealscrubstaggercanvas
Observatory Template - website template preview

This template reads better at your own screen size than in the frame below:

About this template

A production-ready one-pager for a public observatory, planetarium or science centre. The fictional brand is Hollowfell Observatory, a charity-run public observatory on the North Pennines moor, and the page sells a real evening: a stargazing-night programme laid out as a timeline of tonight's sky, telescope hire priced by the fortnight, visit information with dark-sky etiquette, and membership tiers that fund the dark-sky covenant. The ground is a deep blue-violet night, the type is star-white with one moonlight gold, and there is not a single photograph - the sky itself is the imagery.

Read the full template overview

The signature is the constellations. Each section carries a hand-plotted SVG star map of a real constellation - Cassiopeia over the hero, Cygnus beside tonight's programme, Lyra with the telescope ledger, Ursa Minor with the directions, the Plough with membership - recognisable to anyone who knows the sky. As a section arrives its stars pop in one by one and DrawSVG draws the connecting lines between them, so every illustration is sketched in front of the reader. Behind everything sits a three-layer parallax starfield: three canvases painted once each, never per frame, moved at different depths by scrubbed tweens.

Everything degrades on purpose. The SVGs ship fully drawn in the markup and are only wound back when motion is allowed, so with JavaScript off or reduced motion on every constellation is simply visible; a CSS star texture keeps the night sky when the canvases never arrive. To make it yours, rename the observatory, rewrite the programme times, repoint the mailto links, and - if your sky differs - plot your own constellations: each one is a handful of SVG line and circle elements with coordinates you can copy from any star chart. Deploy it as static files; there is no build step.

What's included

12 items
  • Complete deployable one-page site: nav, full-viewport sky hero, tonight's programme timeline, telescope hire ledger, visit information, membership tiers, footer
  • Signature scroll-drawn constellations: five hand-plotted SVG star maps with correct-ish patterns, stars popping in on a stagger before DrawSVG connects them line by line
  • Each constellation is that section's illustration - Cygnus flies beside tonight's sky, Ursa Minor navigates the directions, the Plough points members home
  • Three-layer parallax starfield: canvases painted once per resize (capped point counts, no per-frame drawing), moved at three depths by scrubbed tweens, with a whisper of pointer drift on fine pointers only
  • The programme is a timeline down a drawn spine that grows with the scroll - no card grids anywhere on the page
  • Zero photography: the starfield, the constellations and the ledgers are the whole visual identity, so there is nothing to source or license
  • Constellations ship fully drawn in the markup and are only wound back when motion is allowed, so no-JS and reduced-motion readers see every star map complete
  • Reduced motion keeps the painted starfield but freezes it: no parallax, no drift, no breathing, via both the CSS media query and the script's own motion branch
  • Michroma's wide instrument-panel caps do the display work at deliberately small sizes; Nunito Sans does all the reading - a pairing used nowhere else
  • Five-colour token block with RGB triples and a measured contrast table in the stylesheet header - a reskin is a five-value edit
  • Sections are independent: every selector is guarded, so hire, visit or membership can be deleted and the rest keeps working
  • Lenis smooth scrolling wired in and fully optional, sharing one clock with ScrollTrigger

Perfect for

5 use cases
  • Public observatories, planetariums and science centres with an evening programme
  • Dark-sky parks, reserves and stargazing event organisers
  • Astronomy societies and clubs that hire out instruments to members
  • Any venue whose programme is a timetable of timed sessions rather than a product grid
  • Learning DrawSVG: five real staggered line-draw builds driven by ScrollTrigger

How it works

5 sections

Structure

One script initialises everything with a single setup and teardown path, and one motion branch keyed on reduced motion so exactly one branch runs on every device. Every querySelector is guarded, so any section - the programme, the hire ledger, the whole membership block - can be deleted and the rest keeps working. Reveal start states are double-gated behind a has-js class and the motion media query, so a blocked CDN or a reduced-motion preference both leave a complete static page.

The constellation draw

Each constellation is a hand-plotted SVG: line elements for the joins, circles for the stars, plotted from real star charts. The SVGs ship fully drawn; the motion branch winds them back - stars to scale zero, lines to drawSVG 0% - and replays them as the section arrives: stars pop in on a back-eased stagger, then DrawSVG draws each connecting line in sequence, then the star names settle. If the DrawSVG script is missing the lines fade in instead, so nothing depends on it.

The starfield

Three canvases sit in a fixed layer behind the page, each painted exactly once per resize with a capped point count - there is no per-frame canvas work anywhere. Parallax is one scrubbed tween per layer, travelling further the nearer the layer, and a single yoyo opacity tween on the middle layer stands in for twinkle. Fine pointers add a whisper of horizontal drift; touch devices skip it entirely.

The programme spine

Tonight's timetable runs down a vertical rule that grows with the scroll, so the evening literally draws itself down the page as you read it. The rule is a plain div with no CSS start state, which means the no-JS page keeps a complete spine, and each timed stop is a gold star dot placed by the row itself.

Without JavaScript

The page is designed to be complete before the script arrives: constellations render fully drawn, the spine is full height, every reveal target is visible, and a CSS star texture on the sky layer keeps the night ground. JavaScript only adds depth - the parallax canvases, the draws, the glide - and reduced motion gets the painted sky held perfectly still.

Plugins ScrollTrigger, DrawSVG
Difficulty Intermediate
Smooth scroll Lenis integration
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Questions about this template

Do I need any photography?

None at all. The starfield, the hand-plotted constellations and the ledgers are the entire visual identity, so there is nothing to source, license or grade. For a venue that mostly photographs badly in the dark, that is the practical argument for this one.

Are the constellations accurate?

They are hand-plotted and correct-ish rather than survey-accurate, chosen so each one suits its section: Cygnus beside tonight's sky, Ursa Minor by the directions, the Plough pointing members home. If you need precise star positions you would replot the SVGs, and the draw still works.

Can visitors book a session or buy tickets?

No. The programme is a timeline of timed sessions and the membership tiers are priced, but nothing takes payment. Point them at your existing ticketing, which most venues with an evening programme already have.

Will a canvas starfield drain phone batteries?

No. The three parallax layers are painted once per resize with capped point counts rather than redrawn every frame, and they move by scrubbed tweens. Pointer drift is applied only on fine pointers. Under reduced motion the starfield stays painted but freezes completely.

What do the star maps look like if the animation never runs?

Complete. The constellations ship fully drawn in the markup and are only wound back when motion is actually allowed, so no-JS and reduced-motion readers see every star map finished rather than a scatter of unconnected dots.

Paid template

Purchase to unlock the code.

Buying Observatory Template opens the HTML, CSS and JavaScript source, the full documentation, an AI setup prompt for your editor, and every update we ship to it. Standard license: unlimited personal and commercial projects.

£10 Standard license, unlimited projects

Browse free effects

Documentation

Quick Start

  1. Copy the whole folder to your web server (or any static host). There is no build step.

  2. The page works as-is. Open index.html and check the script tags before </body>:

Code snippet omitted: it ships with the download.

Lenis is optional (delete its tag and scrolling goes native). DrawSVG is also guarded: without it, constellation lines fade in instead of drawing.

  1. Make it yours:

    • Rename the observatory in the nav wordmark, hero, footer, and <title>.
    • Rewrite tonight's programme in the #tonight timeline (each stop is one li.tl-row).
    • Update the hire ledger and membership tiers (li.ledger-row).
    • Point the three mailto: links (nights@, hire@, friends@) at your addresses, or swap them for your booking system's URLs.
    • Update the conditions strip in the hero (sunset, darkness, moon, sky meter), or delete it.
  2. For production, swap assets/script.js for assets/script.min.js.

Sections

Every section is independent: the script guards each selector, so you can delete any of these wholesale and the rest keeps working.

Section id What to edit
Hero - Headline, lede, conditions dl, both CTA targets
Tonight's programme #tonight Timeline rows (time + title + description), cloud policy note, ticket prices
Telescope hire #telescopes Ledger rows (instrument, description, price), deck note
Visit #visit Opening hours, directions, the etiquette list
Membership #membership Tier rows, charity number
Footer - Address, contact, small nav

Adding a programme stop is copying one li.tl-row and changing the time; the spine and its star dots come from the rows themselves.

The constellations

Each constellation is a plain inline SVG marked with data-constellation:

Code snippet omitted: it ships with the download.

  • Stars are circle.c-star; the radius is the star's brightness (bright stars ~4–5.5, faint ~2.6).
  • Joins are line.c-line; each line is one stroke of the draw, and they animate in document order, so order them the way a finger would trace the figure.
  • Names are optional text.c-name labels that fade in last.

To plot your own, open any star chart, pick the constellation, and copy its star positions into circle coordinates by eye; the five shipped maps (Cassiopeia, Cygnus, Lyra, Ursa Minor, the Plough) were plotted exactly this way. Keep the aria-label honest: it is what a screen reader gets instead of the figure.

The draw itself is in script.js under "Scroll-drawn constellations": stars pop in on a stagger, then each line draws with drawSVG: '0%' → '100%', triggered once at top 78%. The SVGs ship fully drawn in the markup and are only wound back when motion is allowed. Do not add CSS that hides them, or the no-JS page loses its illustrations.

The starfield

Three canvases are appended into .sky by the script and painted once each (and once per resize). Point counts and parallax travel are the two dials, at the top of the starfield block in script.js:

Code snippet omitted: it ships with the download.

More points cost only a slightly slower one-off paint; there is no per-frame canvas work. The CSS star texture on .sky in style.css is the no-JS sky; if you want a denser or sparser night without JavaScript, edit those radial-gradient layers.

Palette

The whole scheme is five colours in the :root block of assets/style.css, each with an RGB triple beside it:

Code snippet omitted: it ships with the download.

Change a hex, change its triple, and the site reskins; every translucent value (rules, constellation strokes, the nav scrim) derives from the triples, so nothing is left half-repainted.

Two constraints, both measured (the full table is in the stylesheet header):

  • Gold buttons carry --night ink, never light type: star-white on gold is 1.38:1.
  • --faint is the small-print floor at 6.48:1 on the ground; if you lighten --night, re-check --faint and --dim first.

Type

  • Michroma (one weight) does all display work: wordmark, headings, times, captions. It is a very wide face: sizes are deliberately small, and the hero caps at 3.9rem. If you swap it, revisit every letter-spacing.
  • Nunito Sans does all reading text.

Both load from Google Fonts in the <head> of index.html and thumbnail.html.

Accessibility

  • Respects prefers-reduced-motion via both the CSS media query and a gsap.matchMedia branch: constellations render fully drawn, the starfield is painted but perfectly still, reveals never hide, and Lenis is never created.
  • Fully readable with JavaScript disabled; the script only adds depth (parallax, draws, glide); it never gates content.
  • Every constellation SVG has role="img" and a descriptive aria-label.
  • All interactive elements are real links with visible :focus-visible rings; hover states have keyboard equivalents.
  • The pointer-drift on the starfield runs on fine pointers only; touch devices get the same sky without it.

Browser Support

Modern browsers (ES5-compatible script, CSS grid, custom properties). Not compatible with IE11.

Dependencies

  • GSAP 3.12+
  • ScrollTrigger plugin
  • DrawSVGPlugin (optional; constellation lines fade in without it)
  • Lenis (optional; smooth scrolling, and the site works without it)

Worked examples, the events and programmatic API, and the class reference ship with the download, alongside the full source.

Your cart

Your cart is empty

The Vault £99

Every effect, template and UI element: 165 today, plus everything we release next.