Code Monkey home page Code Monkey logo

bigborealis's Introduction

Genius Immersive Experience

Eleventy with Forestry CMS, published on Clouflare Pages.


Terminal commands

Serve the site locally

npm start

Build a production version of the site

npm run production

Compile Sass

npm run sass:process

Re-generate design tokens for Sass

npm run sass:tokens

Getting started with the CMS

Once the site is imported in Forestry, go to settings/previews to start the preview server.

You'll be able to create drafts and preview the final rendering before publishing.

Sass

Configuration

The whole Sass system is powered by central config file, which lives here: _src/scss/_config.scss.

Before Sass is compiled, a _tokens.scss file is generated from the design tokens config which is required.

Key elements:

  • $stalfos-size-scale: A token driven size scale which by default, is a “Major Third” scale
  • $stalfos-colors: A token driven map of colours
  • $stalfos-util-prefix: All pre-built, framework utilities will have this prefix. Example: the wrapper utility is '.sf-wrapper' because the default prefix is 'sf-'
  • $metrics: Various misc metrics to use around the site
  • $stalfos-config: This powers everything from utility class generation to breakpoints to enabling/disabling pre-built components/utilities

How to create a new utility class with the generator

The utility class generator lets you generate whatever you want, with no opinions on class name or properties affected.

To add a new class, add another item to the exists $stalfos-config map. This example adds a utility for floating elements.

'float':('items':('left':'left','right': 'right'
  ),
  'output': 'responsive',
  'property': 'float'
);

The output is set to responsive which means every breakpoint will generate a prefixed class for itself. If you only wanted elements to float left in the md breakpoint, you’d now be able to add a class of md:float-left to your HTML elements.

If you only want standard utility classes generating, set the output to standard.

Functions

get-color($key)

Function tries to match the passed $key with the $stalfos-colors map. Returns null if it can’t find a match.

get-config-value($key, $group)

Returns back a 1 dimensional (key value pair) config value if available.

get-size($ratio-key)

Function tries to match the passed $ratio-key with the $stalfos-size-scale. Returns null if it can’t find a match.

Mixins

apply-utility($key, $value-key)

Grabs the property and value of one of the $stalfos-config utilities that the generator will generate a class for.

media-query($key)

Pass in the key of one of your breakpoints set in $stalfos-config['breakpoints'] and this mixin will generate the @media query with your configured value.

CMS

Genius has Forestry CMS pre-configured. You can customise the configuration by editing .forestry/settings.yml.

bigborealis's People

Contributors

andy-set-studio avatar dontliem1 avatar aarongustafson avatar erquhart avatar jamesforan avatar dirtyf avatar d2s avatar marcusrelacion avatar equivalentideas avatar dberesford avatar brandonaaron avatar yaaax avatar thomasmassmann avatar remy avatar autosponge avatar 36degrees avatar madebymike avatar mikacaldera avatar jolg42 avatar chrisburnell avatar charlesroper avatar brendansparrow avatar acarlson0000 avatar

Watchers

 avatar

Forkers

samoylenkvi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.