Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Texas Aerial Robotics — website

The public website for Texas Aerial Robotics at UT Austin.

It is deliberately built with plain HTML, CSS, and JavaScript. There is no React and no Tailwind. The only tool involved is Eleventy, a small static site generator whose entire job here is to let the header, the footer, and the <head> block live in one file instead of being copy-pasted into all eight pages. It turns the templates in src/ into ordinary HTML files in _site/. What ships is still plain HTML.

If you can edit a text file, you can edit this site.


Quick start

npm install          # once
npm run dev          # http://localhost:4173, reloads as you save

Leave that running while you work. Editing anything in src/ or assets/ refreshes the browser.

To build the finished site once, without the preview server:

npm run build        # writes _site/

_site/ is generated. Never edit it by hand — it is deleted and rebuilt every time. It is also not committed to git.

To run it the way Netlify does, including the contact function:

npm run netlify      # http://localhost:8888 via the Netlify CLI

Use this one whenever you are working on the contact form. npm run dev is Eleventy on its own, and Eleventy does not run serverless functions, so the Discord notification 404s there. That 404 is harmless — the message still reaches Formspark — but Discord will stay quiet until you either use npm run netlify or deploy.


What is where

src/                    Everything you edit to change a page
  index.njk             Home
  about.njk             About  (history, skills, sub-teams, officer list)
  projects.njk          Projects  (current teams + archived IARC missions)
  ravg.njk              RAVG  (the RTX Autonomous Vehicle Competition team)
  partners.njk          Partners  (sponsor logos + partnership tiers)
  contact.njk           Contact  (the contact form)
  donate.njk            Donate
  404.njk               Shown for any URL that does not exist

  _includes/
    base.njk            The <head>, and the wrapper every page sits inside
    partials/header.njk The top bar. Written once, appears on every page.
    partials/footer.njk The footer. Written once, appears on every page.

  content/              The bits that get rewritten every year, as plain text
    about-officer-team.txt   The officer team
    projects-current.txt     This year's project teams
    projects-past.txt        The archive carousel
    ravg-competition.txt     The RTX task, mission sequence, and vehicles

  _data/
    site.js             Links, email address, contact form destination
    nav.js              Every link in the top bar and in the footer
    officers.js         Readers for the files in content/. You should not
    projects.js         need to open these: edit the .txt instead.
    ravg.js

  src.11tydata.js       Defaults shared by all pages (rarely touched)

assets/                 Copied to the finished site untouched
  brand/
    logos/              The TAR logo kit. See "Which logo do I use?" below.
    favicon*.png        Browser tab icons, generated from the logo
    og-image.jpg        The image that shows up when the site is linked in
                        Slack, iMessage, LinkedIn, etc.
  icons/                Interface icons and company logos.
                        See assets/icons/README.md for how to add one.
  css/site.css          Every style on the site, in one commented file
  js/site.js            Mobile menu, scroll animations, footer year
  js/contact-form.js    Contact page only: sends the form
  js/carousel.js        Projects page only: the "Past missions" carousel

netlify/functions/
  contact.js            An alternative contact backend: receives the form and
                        forwards it by SMTP and/or to a webhook. Not used by
                        default — see "The contact form" below.

eleventy.config.js      Build settings (rarely touched)
netlify.toml            Netlify settings (nothing to change for a normal deploy)
sitemap.xml             List of pages for search engines
robots.txt              Search engine instructions
_site/                  Generated. Do not edit.

What a page file looks like

Each file in src/ starts with a small settings block between --- lines, followed by ordinary HTML:

---
title: "About | Texas Aerial Robotics"
description: "Founded in 2017 at UT Austin..."
navKey: "about"
---

<section class="page-hero">
  ...
</section>

The available settings are listed in a comment at the top of src/_includes/base.njk. Everything after the second --- is dropped into <main> on the finished page, with the header and footer added around it.


The yearly rewrite

Four sections of the site get replaced every year. None of them is written in HTML. They live as plain text in src/content/, and the pages build themselves from whatever is in there:

File Where it shows up
about-officer-team.txt "Who runs TAR." on the About page
projects-current.txt The project cards on the Home page and the full write-ups on the Projects page
projects-past.txt The "Past missions" carousel
ravg-competition.txt "This year's task", the mission sequence, and the vehicles on the RAVG page; the RTX section on the Projects page; the "This year's mission" panel on the Home page

Every file explains its own layout in a comment block at the top, so open the one you need and follow what is already there. The shape is the same in all four: a blank line separates one entry from the next, and lines starting with # are notes that never appear on the site.

Nothing else has to change when you edit them. Add a fourth project and the Projects page stripes its bands to suit; add a seventh archive card and the carousel dots count themselves; add an officer and the grid grows a row.

Handing over at the end of a year usually means:

  1. Move each finished team from projects-current.txt to projects-past.txt, adding a When: line with the school year.
  2. Write the new teams into projects-current.txt.
  3. Replace the officer list in about-officer-team.txt.
  4. Rewrite ravg-competition.txt with whatever task RTX has set.
  5. Change season in src/_data/site.js to the new school year. That is the "2026 – 2027" heading above the projects and the officer team.

Run npm run dev while you do it and the page updates as you save.


Common edits

Change wording on a page

Open the matching .njk file in src/ and edit the text between the tags. It is plain HTML; the .njk extension only means Eleventy is allowed to fill in the shared pieces.

Change a colour, font, or spacing

Open assets/css/site.css and look at the block at the very top called 1. THEME. Every colour and font on the site comes from there. Change --orange once and it updates across all eight pages.

Add or rename a navigation tab

One edit, in src/_data/nav.js. Add a line to the primary list:

{ key: "outreach", label: "Outreach", url: "/outreach.html" },

Then create src/outreach.njk with navKey: "outreach" in its settings block. The tab highlights itself on the page whose navKey matches.

Change the footer links

Also src/_data/nav.js, in the footer list. Each column has a heading and a list of links. A link can carry an icon (any name from the icon list at the bottom of assets/css/site.css) and external: true to open in a new tab.

Add a partner logo

  1. Drop the image into assets/brand/partners/ (create the folder the first time).
  2. In src/partners.njk, find a <div class="logo-slot">Partner logo</div> and replace the text with:
    <img src="/assets/brand/partners/acme.png" alt="Acme Robotics" />
  3. Delete any leftover empty slots.

The home page also has a smaller set of slots near the bottom.

Update the officer list

src/content/about-officer-team.txt. Four lines per person — role, name, major, year — with a blank line between them. See "The yearly rewrite" above.

Add a project

src/content/projects-current.txt. Copy an existing block and change the values. It appears on both the Home page and the Projects page automatically.

Add a card to the "Past missions" carousel

src/content/projects-past.txt. Copy an existing block and change the values. The dots underneath count themselves, so there is nothing to keep in sync.

To change how fast the carousel moves, edit data-carousel-interval on the <div class="carousel"> in src/projects.njk — it is milliseconds, so 5000 is five seconds.

Update the RTX competition task

src/content/ravg-competition.txt. One Headline: block for the task itself, one Step: block per line of the mission sequence, and one Vehicle: block per card. It feeds the RAVG page, the Projects page, and the Home page.

Change the reasons in the contact form dropdown

src/contact.njk, in the <select id="reason">. Add or reword the <option> lines. Whatever is chosen is passed through to Formspark, so no other file needs changing. Leave the first, empty option in place: it is what keeps the message box locked until a reason is picked.

Update links and the contact email

All in one place: src/_data/site.js.

The email currently in that file, texasaerialrobotics@gmail.com, is a placeholder. Replace it with the real inbox. It is used in the "Contact details" panel and in the fallback mailto: link, both of which read it from site.js.

Link to something outside this site

Add target="_blank" rel="noopener" so it opens in a new tab and leaves the site open behind it:

<a href="https://example.com" target="_blank" rel="noopener">Example</a>

Links in the footer get this automatically from external: true in src/_data/nav.js.


The contact form

Every message goes to two places:

Where What it is Set in
Formspark The message's real home. It stores the submission and emails you. This is what decides whether the visitor sees "sent" or an error. contactEndpoint in src/_data/site.js
Discord A notification embed in your server channel. Best effort — if it fails the visitor is not told, because the message is already safe in Formspark. notifyEndpoint in src/_data/site.js, plus DISCORD_WEBHOOK_URL in Netlify
contactEndpoint: "https://submit-form.com/VxqZQNAmW",
notifyEndpoint:  "/.netlify/functions/contact",

Manage notification addresses, spam filtering, and the submission archive at https://formspark.io. Set notifyEndpoint to "" to switch the Discord notification off.

Discord notifications

The Netlify function posts an embed that looks like this:

Sponsorship -- Ada Lovelace
Company Sponsorship
We would love to sponsor the team this season. Who do we talk to?

The title is the subject (or the reason, if the subject was left blank) followed by the sender's name; then the reason they picked; then what they wrote. Their email address sits in the footer of the embed so you can reply. To change the layout, edit sendToDiscord in netlify/functions/contact.js.

Setting it up. In Discord: Server Settings → Integrations → Webhooks → New Webhook, pick the channel, and copy the URL. In Netlify: Site configuration → Environment variables, add DISCORD_WEBHOOK_URL with that value, and redeploy.

Do not put the webhook URL in this repository or in any file under assets/. This repo is public and everything under assets/ is served to visitors. Anyone holding that URL can post anything they like to your channel. It belongs in the Netlify environment variables and nowhere else. If a URL does leak, delete the webhook in Discord and make a new one.

The embed is sent with allowed_mentions: { parse: [] }, so a visitor cannot make the bot ping @everyone by typing it into the form.

Trying it locally. Copy .env.example to .env, put the webhook URL in it, and start the Netlify CLI. .env is git-ignored, so the URL stays on your machine.

cp .env.example .env     # then fill in DISCORD_WEBHOOK_URL
npm run netlify          # http://localhost:8888/contact.html

Plain npm run dev will not work for this: it serves the site but not the function, so you get 404 /.netlify/functions/contact in the console and no Discord message.

Two things to know when editing the form:

  • Every field needs a name. That is the label the submission is filed under. A field without a name is simply not recorded. Add a field and it shows up in Formspark on the next submission; nothing else has to change.
  • The submit button must be type="submit", otherwise the form does not send when JavaScript is off.

The form works both ways round. With JavaScript on, assets/js/contact-form.js intercepts the submit and posts this JSON in the background, so the visitor stays on the page:

{
  "name": "Ada Lovelace",
  "email": "ada@example.com",
  "subject": "Sponsorship",
  "reason": "Company Sponsorship",
  "message": "Hello!",
  "page": "https://.../contact.html"
}

With JavaScript off, the browser submits the form normally to the same URL and Formspark shows its own confirmation page. To send visitors to a page of your own instead, add a hidden field inside the form:

<input type="hidden" name="_redirect" value="https://yoursite.com/thanks.html" />

(Formspark ignores _redirect on the JavaScript path, which already keeps the visitor on the page.)

If the request fails for any reason, the page offers a mailto: link so a message is never silently lost.

Spam and validation

Light checks, meant to turn away drive-by bots and catch honest typos without locking out a real person. They run in assets/js/contact-form.js before the message is sent, and again in netlify/functions/contact.js, because anything checked only in the browser can be skipped by posting straight to the URL.

Check Rule
Honeypot A hidden field named _honeypot. Real visitors never see it; bots fill in everything. Formspark drops these too.
Time trap A form submitted less than 3 seconds after the page loaded was not filled in by a person.
Cooldown The same visitor cannot send twice within 30 seconds.
Name 2–80 characters, must contain letters, no links.
Email Must look like an address.
Subject Up to 120 characters, no links.
Reason Must be one of the options in the dropdown.
Message 15–4000 characters, at most 2 links.

Anything caught this way is flagged under the field it belongs to. A bot that trips the honeypot or the time trap is shown the same thank-you as everyone else, so it gets no signal that it was caught.

The numbers all live in one block at the top of assets/js/contact-form.js (and mirrored near the top of the Netlify function), so they are easy to loosen if a real message ever gets turned away.

Other things the Netlify function can do

Besides Discord, netlify/functions/contact.js can send messages over SMTP and to any other webhook. Each route turns itself on when its environment variables are present, and every configured route gets a copy.

You can also drop Formspark entirely and let the function be the mailbox, by setting contactEndpoint: "/.netlify/functions/contact" in src/_data/site.js.

Option A — send email over SMTP

Variable Example Notes
SMTP_HOST smtp.gmail.com Required to enable SMTP
SMTP_PORT 465 Defaults to 587
SMTP_SECURE true Defaults to true when the port is 465
SMTP_USER tar@example.com Mailbox or API username
SMTP_PASS app-password Use an app password, never a personal password
CONTACT_TO tar@utexas.edu Required — where messages land
CONTACT_FROM noreply@example.com Defaults to SMTP_USER

The email's Reply-To is set to the visitor, so hitting reply in your inbox answers them directly.

Option B — POST to a webhook

Variable Example Notes
CONTACT_WEBHOOK_URL https://hooks.slack.com/services/... Any endpoint that accepts a JSON POST
CONTACT_WEBHOOK_SECRET some-long-random-string Optional; sent as the X-TAR-Signature header

Sends the raw JSON rather than a formatted embed. Works with Slack, Zapier, Make, n8n, Airtable, or your own server.

Every configured route gets a copy of each message. If one fails the others still deliver.

Testing it locally

CONTACT_WEBHOOK_URL="https://webhook.site/your-id" npm run netlify

Then submit the form at http://localhost:8888/contact.html.

Any other destination

contactEndpoint can be any URL that accepts a JSON POST — Zapier, Make, a Slack webhook, your own server:

contactEndpoint: "https://hooks.zapier.com/hooks/catch/123456/abcdef/",

Set it to "" and the form falls back to opening the visitor's email app with the message pre-filled.


Deploying to Netlify

  1. Push this repository to GitHub.
  2. In Netlify: Add new site → Import an existing project and pick the repo.
  3. Accept the defaults. Netlify reads netlify.toml, so the build command (npm run build), the publish directory (_site), and the functions directory are already correct.
  4. Deploy.

Every push to the default branch redeploys automatically. Pull requests get their own preview URL.

After the real domain is attached, update the URLs in sitemap.xml and robots.txt.


Which logo do I use?

assets/brand/logos/ holds the full kit. The names follow a pattern:

  • tar-logo-… — the drone mark with "TAR" underneath
  • tar-wordmark-… — just the word "TAR"
  • …-orange / …-paper / …-black — the colour of the artwork
  • …-on-black / …-on-paper / …-on-orange — the artwork has that colour baked in as a solid background. Files without an -on-… suffix are transparent.
  • …-primary-dark — the full-colour logo intended for dark backgrounds
  • …-primary-light — the full-colour logo intended for light backgrounds
  • …-tight — cropped close to the artwork, with no surrounding padding
  • tar-mark-drone-paper.png — just the drone, no lettering. Used in the header, where the words "Texas Aerial Robotics" already sit beside it.

The site uses tar-mark-drone-paper.png in the header, tar-logo-primary-dark-tight.png in the hero, and tar-wordmark-paper-tight.png in the footer, because all three sit on a dark background.


Browser support

Current versions of Chrome, Edge, Firefox, and Safari, on desktop and mobile. The site still reads and navigates correctly with JavaScript disabled; only the mobile menu, the scroll animations, and the background form submission need it.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages