Skip to content

Asset Handling

Kenneth Yang edited this page Dec 24, 2022 · 13 revisions
  • Text content and metas are stored in the src/assets folder
    • Fonts are also stored here for faster loading
    • Favicon (as SVG) is also stored here for faster loading
  • Graphical content is served via Cloudinary

What goes where?

src/assets/

  • Artifact text and info (does it have images etc.) (artifacts.tsv)
  • Artifact images metadata (images.tsv)
  • Artifact links metadata (links.tsv)
  • Artifact embedded content metadata (embeds.tsv)
  • Fonts (both font file and JSON conversions)
  • Website Favicon (favicon.svg)

Cloudinary

  • 3D models as ThreeJS JSON scene files
  • Artifact images
  • Artifact thumbnails
  • Artifact PDFs

TSV files

artifacts.tsv

  • Holds any textual information about the artifact (title, subtitle, year, quarter, text)
  • Has boolean flags for whether the artifact has images, links, or embedded content
  • parse-data.ts uses this file as a base and pull in additional non-textual content into a data structure that is used in the website.

images.tsv

  • Holds image dimensions, name, and description, thumbnail URL, and image URL
    • PhotoSwipe (image gallery extension used) requires image dimensions
  • The file and web-optimized images are generated using a macOS Shortcut

links.tsv

  • Holds link title, description, URL, and image URL
  • Data is created with the help of an iframely API call: http://iframely.server.crestify.com/iframely?url=

embeds.tsv

  • Holds the title and URL of the embedded content

Cloudinary organization (does not affect code)

  • Folders called Honors Portfolio/{name} hold any assets, arbitrarily organized
  • All files are then given a publicly accessible shared link