Coder Social home page Coder Social logo

web5design / livingstyleguide Goto Github PK

View Code? Open in Web Editor NEW

This project forked from livingstyleguide/livingstyleguide

0.0 3.0 0.0 502 KB

Easily create living style guides with Markdown, Sass/SCSS and Compass.

Home Page: http://livingstyleguide.org/

License: Other

livingstyleguide's Introduction

Living Style Guide

Easily create living style guides by adding Markdown documentation to your Sass.

Build Status Images

Rails Integration

  1. Create app/assets/stylesheets/styleguide.html.lsg with:

    source: application.css.scss # replace with your default Sass/SCSS file name
    title: "My Living Style Guide"
  2. Write documentation for each module app/assets/stylesheets/partials/_buttons.md (to describe _buttons.sass in the same folder):

    Buttons
    =======
    
    ~~~ example
    <button class="button">Example button</button>
    ~~~ 
    
    ~~~ example
    <button class="button -is-primary">Example button</button>
    ~~~ 
    
  3. Open http://localhost:3000/assets/styleguide.html. This will automatically:

    • Combine all Markdown files and convert them to HTML
    • Create a beautyful style guide
    • Show the HTML source syntax highlighted close to each example

More

Haml Examples

This will output the code as HTML but display the syntax highlighted source as Haml:

~~~
@haml
%button.button Example button
~~~

JavaScript example

This will show and execute the JavaScript, e. g. you designed tabs and need few lines of jQuery to bring them alive.

~~~ example
@javascript
$('.button').click(function() {
  alert('Hello World!');
});
~~~

CoffeeScript example

Same example but using CoffeeScript. It will be executed as JavaScript and displayed as CoffeeScript:

~~~ example
@javascript
$('.button').click ->
  alert 'Hello World!'
~~~

Font example

Show which fonts should be used on your website—this will output and example text block (A—Z, a—z, 0—9, and some special characters) of the given font. It accepts valid CSS like for font: 32px Comic Sans;.

~~~ example
@font-example 32px Comic Sans
~~~

Installation

Add this line to your application's Gemfile:

gem 'livingstyleguide'

And then execute:

$ bundle

Or install it yourself as:

$ gem install livingstyleguide

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2012 – 2014 Nico Hagenburger. See MIT-LICENSE.md for details. Get in touch with @hagenburger on Twitter.

livingstyleguide's People

Contributors

hagenburger avatar jhilden avatar

Watchers

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