GithubHelp home page GithubHelp logo

roneo's Introduction

Roneo

Roneo is a somewhat flexible but pretty opinionated admin area. It does some things for you by default, but also leaves it up to you to conform to the HTML it expects to exist.

Usage

There are multiple parts to Roneo.

HTML structure

The general structure of the admin should conform to the content in ./html/shell.html. There’s also a slim version at ./html/shell.slim.

Breakpoints

We use metaQuery for gaining access to media queries in JavaScript and CSS. The admin expects the breakpoints in ./html/breakpoints.html to be included in the page.

JavaScript

General JavaScript for the admin shell. This will handle any document onready bindings for setup. Simple import and call it:

import roneo from 'roneo'
roneo()

There are also two separate components for bootstrapping the page. These are intended to be inlined in the <head> and just inside the </body> respectively.

inline-header sets up metaQuery and asynchronously loads some custom fonts for the admin from Google Fonts. It also checks a localStorage value to see if the fonts should already be cached, for example on subsequent page loads, and adds a .fonts-loaded class to the document:

import inlineHeader from 'roneo/lib/inline-header'
let options = {}
inlineHeader(options)

inline-footer is there to perform any additional (non speed-critical) tasks. At the moment it checks the set of fonts that are expected to be loaded have actually loaded, and then sets the localStorage value used in inline-header so we can assume the fonts are cached.

import inlineFooter from 'roneo/lib/inline-footer'
let options = {}
inlineFooter(options)

Components

CSS

@import 'roneo/lib/index.css'

roneo's People

Contributors

makenosound avatar andrewcroome avatar timriley avatar

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.