There is a newer version of Luda.

Let's go!

Installation

Luda can be easily installed through multiple ways.

Install Pre-built JavaScript and CSS

Step 1: Download Pre-built Files

Download v0.2.0

Step 2: Include Them in Your Template

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Hi Luda!</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
    <!-- Use default theme for example. The CSS of each theme is built seperately, don't include multiple themes toghther. -->
    <link rel="stylesheet" href="https://unpkg.com/luda@0.2.0/dist/css/luda-default.min.css">
  </head>
  <body>
    <h1>Hi Luda!</h1>
    <script src="https://unpkg.com/luda@0.2.0/dist/js/luda.min.js"></script>
  </body>
</html>

You can start with this template and modify it to your needs.

Install in Node.js Powered Apps

Step 1: Download With Yarn or Npm

Yarn

$ yarn add luda@0.2.0

Npm

$ npm install luda@0.2.0 --save

Step 2: Choose a Theme and Import It

// In your sass or scss entry file
// Import your custom variable overrides.
@import path_to_your_sass_variables
// Import default theme for example. Don't include multiple themes toghther.
@import 'path_to_node_modules/luda/src/sass/default/index'

Step 3: Import Luda’s JavaScript

// In your Javascript entry file
import 'luda'

Install in Ruby on Rails Apps

Step 1: Download With Bundler or Gem

Bundler is the recommand way to install Luda in Ruby on Rails Apps.

Add luda gem to your Gemfile first:

gem 'luda', '0.2.0'

then run bundle in command line.

$ bundle

You can also download Luda with gem.

$ gem install luda -v 0.2.0

Step 2: Choose a Theme and Import It in application.sa(c)ss

// In application.sass or application.scss
// Import your custom variable overrides.
@import path_to_your_sass_variables
// Import default theme for example. Don't include multiple themes toghther.
@import luda/default

If application.css exists in your project, rename it to .sass or .scss extension. And don’t use require statement to import files, use @import instead.

Step 3: Import JavaScript in application.js

// In application.js
//= require luda

Install in Other Ruby Apps

If your project is based on Sprokets or Hanami, Luda assets will be added to load path automatically, you just need require the assets in your project. Otherwise, you need manually register Luda assets, you can check Luda gem source code and your framework documentation to do that.