Git Product home page Git Product logo

bulmajs-rails's Introduction

Bulmajs::Rails

Bulmajs-rails is the implementation of BulmaJS

BulmaJS is an unofficial javascript extension to the awesome Bulma CSS framework

Source: https://github.com/VizuaaLOG/BulmaJS

Ruby Gem: https://rubygems.org/gems/bulmajs-rails

Installation

Add this line to your application's Gemfile:

gem 'bulmajs-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bulmajs-rails

Now you need to edit your app/assets/javascripts/application.js file and add the following line:

//= require bulma

Turbolinks is now required for this wrapper.

Usage Examples

Basic Tabs

    <div id="tabs-example" data-bulma="tabs">
    <div class="tabs" data-links>
        <ul>
            <li class="is-active">
                <a>Pictures</a>
            </li>
            <li>
                <a>Music</a>
            </li>
            <li>
                <a>Videos</a>
            </li>
            <li>
                <a>Documents</a>
            </li>
        </ul>
    </div>

    <div class="tabs-content" data-content>
        <ul>
            <li class="is-active">
                <h1>Pictures</h1>
            </li>
            <li>
                <h1>Music</h1>
            </li>
            <li>
                <h1>Videos</h1>
            </li>
            <li>
                <h1>Documents</h1>
            </li>
        </ul>
    </div>
</div>

Navbar Mobile Toggle

All you need to do is add data-bulma="navbar" to the main navbar div, and then add data-trigger and data-target="navID" to the navbar burger

<nav class="navbar" data-bulma="navbar">
    <div class="navbar-brand">
        <!-- Your other HTML here -->
        <div class="navbar-burger burger" data-trigger data-target="navMenuExample">
            <span></span>
            <span></span>
            <span></span>
        </div>
    </div>
    <div id="navMenuExample" class="navbar-menu">
        <!-- Your navbar HTML here -->
    </div>
</nav>

Filename Updating

<div class="file has-name is-boxed" data-bulma="file">
    <label class="file-label">
        <input class="file-input" type="file" name="resume" multiple>
        <span class="file-cta">
            <span class="file-icon">
                <i class="fa fa-upload"></i>
            </span>
            <span class="file-label">
                Choose a file…
            </span>
        </span>
        <span class="file-name"></span>
    </label>
</div>

More examples and explanation are on available https://vizuaalog.github.io/BulmaJS

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/theeomm/bulmajs-rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Special Thanks

Thomas - Creator of BulmaJS

License

The gem is available as open source under the terms of the MIT License.

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.