Coder Social home page Coder Social logo

hansuxdev / foundation-docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from foundation/foundation-docs

0.0 2.0 0.0 60 KB

Common templates and utilities for the Foundation family documentation.

License: MIT License

JavaScript 33.17% CSS 50.96% HTML 15.86%

foundation-docs's Introduction

Foundation Docs

This is a set of HTML templates and JavaScript utilities shared by the documentation pages for the Foundation family of frameworks, including:

Installation

npm install foundation-docs --save-dev

JavaScript Usage

When you require() the foundation-docs library, you get access to a handful of JavaScript libraries, as well as file paths to HTML templates.

foundationDocs.buildSearch

Generates a JSON file for use with the docs search function. Best used with the component tree generated by Supercollider.

Parameters:

  • tree (Object): tree of components to build pages from.
  • cb (Function): callback to run once the finished JSON file has been written to disk.
var foundationDocs = require('foundation-docs');

foundationDocs.buildSearch(supercollider.tree, cb);

foundationDocs.handlebars

An instance of a custom Handlebars renderer with all the helpful functions we need to generate documentation.

foundationDocs.marked

An instance of a custom Marked renderer, which has two custom functions:

  • When headings are written, an anchor icon is added to the left of the heading text.
  • When code samples are written:
    • If the language is html_example, a live rendering of the HTML in the sample is added.
    • If the language is inky_example, a live rendering of the HTML in the sample—within an iframe that loads the Ink CSS—is added.

foundationDocs.componentTemplate

A String path to the HTML template used for component pages. The general structure is:

  • Title area
  • Main docs (converted Markdown)
  • Sass reference
  • JavaScript reference
  • Table of contents

The path is node_modules/foundation-docs/templates/component.html.

Sass Usage

The CSS used for the Foundation documentation is included as a series of Sass partials. Foundation and Motion UI must be loaded manually before it.

@import 'foundation';
@import 'motion-ui';

@include foundation-everything;
@include motion-ui-transitions;

@import 'foundation-docs';

foundation-docs's People

Contributors

gakimball avatar

Watchers

James Cloos avatar Hans 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.