GithubHelp home page GithubHelp logo

thaolt / dbootstrap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from atoha/dbootstrap

0.0 2.0 0.0 5.99 MB

Bootstrap theme for Dojo

Home Page: http://thesociable.github.com/dbootstrap/

License: Apache License 2.0

dbootstrap's Introduction

Dojo Bootstrap

Bootstrap theme for Dojo.

https://raw.github.com/thesociable/dbootstrap/master/resource/preview.png

Get The Code

$ git clone --recursive git://github.com/thesociable/dbootstrap.git

Build Requirements

To build the project locally you will need the following installed:

All other requirements are bundled as git submodules so make sure you have initialised them (the default when using --recursive with git clone)

Demo

For a live preview of the theme using Dojo's Theme Tester, see http://thesociable.github.com/dbootstrap/

To build the demo locally:

  1. Navigate to your clone of the repo:

    $ cd /path/to/dbootstrap
    
  2. Build it:

    $ python build.py demo
    

    Note

    If you like to see what is going on under the hood, run with a lower logging level:

    $ python build.py -v debug demo
    
  3. Fire up a server:

    $ cd build/demo
    $ python -m SimpleHTTPServer 8000
    
  4. Take a look:

    Point your browser at http://localhost:8000/
    

Integration

Want to use the theme in your own project? Here's a short guide to integrating it successfully.

Standalone Package

Useful if you just want a quick play of the theme with your project. For a better solution see the integrated build below.

  1. Navigate to your clone of the repo:

    $ cd /path/to/dbootstrap
    
  2. Build just the theme:

    $ python build.py theme
    

    Note

    If you like to see what is going on under the hood, run with a lower logging level:

    $ python build.py -v debug theme
    
  3. Copy (or link) the resulting package dbootstrap/build/theme/dbootstrap into the appropriate location in your project and ensure you notify Dojo about the location. One way to do this is through the Dojo config:

    'packages': [
        ...,
        {
            location: '/path/to/dbootstrap',
            name: 'dbootstrap'
        }
    ]
    
  4. Add a require call for dbootstrap. You must require dbootstrap before any Dijit widgets are loaded for the icons to work correctly:

    require(['dbootstrap', ...], function(dbootstrap) {
        // Start application.
    });
    
  5. Add dbootstrap as a css class to your <body> element:

    <body class='dbootstrap'>
    
  6. View your project as normal.

Integrated Build

  1. Copy or link the dbootstrap/source/dbootstrap folder into your project (typically so that it is a sibling to your Dojo and Dijit packages). You will also need to link the xstyle and nib packages if you don't already have them.

    Note

    Only tested with Dojo 1.8+

  2. Add the following to your build profile.js to include dbootstrap as a package and separate build layer:

    packages: [
        ...
        'dbootstrap',
        'xstyle'
    ],
    
    layers: {
        ...
        'dbootstrap/main': {
            include: [
                'dbootstrap/main',
                'xstyle/load-css'
            ],
        }
    }
    

    Note

    If you have placed your dbootstrap package somewhere that isn't directly accessible as a child directory of your basePath then you must use the fuller package syntax in the packages list:

    {
        location: '/path/to/dbootstrap',
        name: 'dbootstrap'
    }
    
  3. In your main application entry point (or index.html) require the dbootstrap package before any Dijit widgets are loaded:

    require(['dbootstrap', ...], function(dbootstrap) {
        // Start application.
    });
    
  4. Add dbootstrap as a css class to your <body> element:

    <body class='dbootstrap'>
    
  5. Add to your build process relevant calls to Stylus to compile the CSS files into one dbootstrap.css file:

    $ stylus --include path/to/dbootstrap/nib/lib \
             --include path/to/dbootstrap/theme/dbootstrap \
             path/to/dbootstrap/theme/dbootstrap/index.styl
    
    $ mv path/to/dbootstrap/theme/dbootstrap/index.css \
         path/to/dbootstrap/theme/dbootstrap/dbootstrap.css
    

    Note

    The CSS build must happen before the Dojo build is performed as the generated css file is required as part of the build. Therefore, the css file is built in the source tree to be copied to the build directory during the Dojo build step.

  6. Build your project and view as normal.

Bug tracker

Found a bug? Report it at https://github.com/thesociable/dbootstrap/issues

Copyright and license

Copyright (c) 2012 Martin Pengelly-Phillips

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE.txt file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Font-Awesome

The icons are provided by the excellent Font-Awesome team at http://fortawesome.github.com/Font-Awesome/

dbootstrap's People

Contributors

martinpengellyphillips avatar hdd avatar allencblee avatar allencblee1 avatar

Watchers

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