Astro Hackathon Showcase

Cognition

Status

Sizable and extensive rework from the initial release, much more of an out-of-the-box starter now.

What It Is

Starter theme for Astro (https://astro.build/) that’s more than a blog, and uses no other frameworks.

Demo Site

https://cognition-theme.netlify.app/

Browser Support

CSS Architecture

It’s opinionated, but opinions based on experience. πŸ‘

Shared styles are imported into /src/styles/global.scss. This file is managed via SASS as a public asset, prevnting it from being bundled with component CSS and allowing the browser to cache it.

Deploy Note: Use yarn build or yarn scss & astro build as the Build Command.

Images

Note that Card images are based on 16:9 ratio, and Author images are based on 1:1 ratio of 225x225.

Typography

In /src/styles/_variables.scss, define the --min-viewport and --max-viewport variables, currently set to 320 and 1440. This is the range within the font will scale. Font sizes are then defined with --min-font-size and --max-font-size.

File Structure

/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ fonts/
β”‚   β”œβ”€β”€ img/
β”‚   β”‚   └── generic
β”‚   β”‚   └── global
β”‚   β”‚   └── social
β”‚   β”‚   └── ui
β”‚   └── favicon.ico
β”‚   └── favicon.svg
β”‚   β”œβ”€β”€ robots.txt
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   └── *.astro
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   └── *.js
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   └── *.astro
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   └── *.astro
β”‚   └── styles/
β”‚       └── *.scss
└── package.json
CommandAction
yarn installInstalls dependencies
yarn devStarts local dev server at localhost:3000
yarn buildBuild your production site to ./dist/

Known Issues

What Comes Next…Ideally