Starter theme for Astro (https://astro.build/) that's more than a blog, and uses no other frameworks.
- Accessible, extensible, and responsive navigation system, with optional dropdown system.
- Fluid typography system that uses the Manrope (https://manropefont.com) variable font.
- Globally defined meta information, which can be overridden at the page level.
- Animations that respect reduced-motion preferences.
- Template files for
favicon.ico
,favicon.svg
,apple-touch-icon.png
, andshare-image.png
(for social sharing). - See the Guides & Demos for details about components: https://cognition-theme.netlify.app/guides-and-demos/
https://cognition-theme.netlify.app/
- Tested in desktop and iOS Chrome, Edge, Firefox, and Safari.
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.
Note that Card images are based on 16:9 ratio, and Author images are based on 1:1 ratio of 225x225.
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
.
/
βββ 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
Command | Action |
---|---|
yarn install |
Installs dependencies |
yarn dev |
Starts local dev server at localhost:3000 |
yarn build |
Build your production site to ./dist/ |
- Announcement scroll effect jitters on Chrome some, if you scroll too fast or change direction fast. This despite using hardware acceleration and throttling.
- Dynamically generated navigation