Giter Club home page Giter Club logo

darwin's Introduction

darwin

AngularJS directives for Bootstrap fast prototyping

Installation

  • Git: git clone https://github.com/donaldmorton/darwin.js

Requirements

  • AngularJS
  • Bootstrap

Setup

First, include the main JavaScript file in the <head> of your HTML document:

<script src="darwin.js"></script>

Next, add the module:

var myAppModule = angular.module('MyApp', ['darwin']);

Usage

Container

<container></container>

Instead of

<div class="container"></div>

Container Fluid

<container-fluid></container-fluid>

Instead of

<div class="container-fluid"></div>

Row

<row></row>

Instead of

<div class="row"></div>

Columns

  • @xs
  • @sm
  • @md
  • @lg
  • @xs-of
  • @sm-of
  • @md-of
  • @lg-of
<cl sx="6" md="4"></cl>

Instead of

<div class="col-xs-6 col-md-4"></div>

offset

<cl xs="6" xs-of="1" md="4" md-of="2"></cl>

Instead of

<div class="col-xs-6 col-xs-offset-1 col-md-4 col-md-offset-2"></div>

Panel

  • @title (optional)
  • @footer (optional)
  • @type (optional)
<panel>Content</panel>

Instead of

<div class="panel"><div class="panel-body">Content</div></div>

With title and footer

<panel title="Heading" footer="foo" type="primary">Content</panel>

Instead of

<div class="panel panel-primary">
    <div class="panel-heading"><h3 class="panel-title">Heading</h3></div>
    <div class="panel-body">Content</div>
    <div class="panel-footer">foo</div>
</div>

Jumbotron

<jumbotron></jumbotron>

Instead of

<div class="jumbotron"></div>

Well

<well></well>

Instead of

<div class="well"></div>

Label

  • @type
<lbl type="primary"></lbl>

Instead of

<span class="label label-primary"></span>

List Group

<list-group>
  <li>Cras justo odio</li>
  <li class="active">Dapibus ac facilisis in</li>
  <li>Morbi leo risus</li>
</list-group>

Instead of

<ul class="list-group">
  <li class="list-group-item">Cras justo odio </li>
  <li class="list-group-item active">Dapibus ac facilisis in</li>
  <li class="list-group-item">Morbi leo risus</li>
</ul>

Icon

<icon name="star"></icon>

Instead of

<span class="glyphicon glyphicon-star"></span>

Input Group

<input-group>
    <addon>@</addon>
    <input type="text" class="form-control">
</input-group>

Instead of

<div class="input-group input-group-lg">
  <span class="input-group-addon">@</span>
  <input type="text" class="form-control">
</div>

Input Group Button

<input-group>
    <input type="text" class="form-control">
    <addon-button>
        <button class="btn btn-default" type="button">Go!</button>
    </addon-button>
</input-group>

Instead of

<div class="input-group">
    <input type="text" class="form-control">
    <span class="input-group-btn">
        <button class="btn btn-default" type="button">Go!</button>
    </span>
</div>

Button Group

<button-group>
  <button type="button" class="btn btn-default">Left</button>
  <button type="button" class="btn btn-default">Rigth</button>
</button-group>

Instead of

<div class="btn-group">
  <button type="button" class="btn btn-default">Left</button>
  <button type="button" class="btn btn-default">Rigth</button>
</div>

Button Group Vertical

<button-group-vertical>
  <button type="button" class="btn btn-default">Left</button>
  <button type="button" class="btn btn-default">Left</button>
</button-group/vertical>

Instead of

<div class="btn-group-vertical">
  <button type="button" class="btn btn-default">Left</button>
  <button type="button" class="btn btn-default">Left</button>
</div>

Button Group Vertical

<button-group-vertical>
  <button type="button" class="btn btn-default">Left</button>
  <button type="button" class="btn btn-default">Left</button>
</button-group/vertical>

Instead of

<div class="btn-group-vertical">
  <button type="button" class="btn btn-default">Left</button>
  <button type="button" class="btn btn-default">Left</button>
</div>

Alert

<alert type="success">Content</alert>

Instead of

<div class="alert alert-success">Content</div>

Page Header

<page-header>Content</page-header>

Instead of

<div class="page-header">
  <h1>Example page header <small>Subtext for header</small></h1>
</div>

Progress Bar

<progress-bar max="100" current="85" animate="true" striped="true"></progress-bar>

Instead of

<div class="progress progress-striped active">
  <div class="progress-bar"  role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
    <span class="sr-only">45% Complete</span>
  </div>
</div>

Modals

<modal myid="myDarwinModal" title="My Modal Title" buttontext="This is awesome!">This is my modals content.</modal>

Instead of

<div class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Modal title</h4>
      </div>
      <div class="modal-body">
        <p>One fine body&hellip;</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

darwin's People

Contributors

cvrebert avatar donaldmorton avatar garrettsyhampton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

darwin's Issues

"Alert" does not have proper padding.

When using the directive, the alert will no display properly. This is due to line 239, when the base alert css class is added to the element itself, vs the first child of the element.

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.