Giter Club home page Giter Club logo

bloc-standalone's Introduction

Synopsis

A collection of files that make it easy to rapidly prototype front-end components using JavaScript, Sass and CSStyle's implementation of the BEM methodology.

Code Example

HTML to make a component called "my fancy component" with two pieces of text in, one with a fancy option and one without.

File: components/my-fancy-component.php

<div class="my-fancy-component">
    <span class="my-fancy-component__my-fancy-part">Hello</span>
    <span class="my-fancy-component__my-fancy-part --inactive">Hello</span>
</div>

The sass below sets up the component: "my-fancy-component", the parts of the component: "my-fancy-part" and an option that can be applied to the parts: "inactive".

File: assets/styles/scss/components/_my-fancy-component.scss

@include component('my-fancy-component') {
  
  @include part('my-fancy-part') {
    color: green;
    
    @include option('inactive') {
      color: #444;
    }
  }
}

Installation

You will need the following:

Get the appropriate version for your operating system and install both of the above. If prompted, restart your machine.

Clone/download the repo into a folder somewhere on your machine. Open a command window, Git Bash is recommended if you're using windows.

At the command line, type: vagrant box update && vagrant up after that command finishes running, type: vagrant ssh

You will now be inside a ubuntu virtual machine. Type: cd /var/www && npm install.

Open gulpfile.js and check that the "appUrl" variable on line 4 is set to where you access the project in your browser.

At the command line inside the virtual machine, type gulp and visit http://localhost:3000 in your browser.

License

Do what you want.

bloc-standalone's People

Contributors

opr avatar

Watchers

 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.