• This repository has been archived on 08/Jan/2023
  • Stars
    star
    488
  • Rank 90,182 (Top 2 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 12 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bootswatches converted to SCSS ready to use in Rails asset pipeline.

Looking for contributors

If you'd like to try your hand at maintaining this project, I'm happy to give you commit access.

bootswatch-rails

Gem Version

This gem is meant to be used with bootstrap-sass. It gives you complete scss versions of bootswatches for use in your Rails asset pipeline, just like bootstrap-sass gives you scss version of bootstrap itself.

Installation

Add this line to your application's Gemfile, in assets group:

gem 'bootswatch-rails'

And then execute:

$ bundle

Usage

When using bootstrap-sass, it's recommended to avoid sprockets in your stylesheets. In order to do that you simply rename your application.css file to application.css.scss, remove all sprockets comments, and instead use sass @import commands. These commands are smart enough to fully support asset pipeline load paths, thanks to sass-rails gem.

Here's approximately how your application.css.scss file should look like, considering that you're using bootstrap-sass.

// Example using 'Cerulean' bootswatch

//Import bootstrap-sprockets
@import "bootstrap-sprockets";

// Import cerulean variables
@import "bootswatch/cerulean/variables";

// Then bootstrap itself
@import "bootstrap";

// Bootstrap body padding for fixed navbar
body { padding-top: 60px; }

// And finally bootswatch style itself
@import "bootswatch/cerulean/bootswatch";

// Whatever application styles you have go last
@import "base";

Overriding bootswatch variables

Since version 3.1 it's possible to override variables.

// First set or import your overrides
$textColor: #000;

// Then load variables
@import "bootswatch/journal/variables";

// Then the rest as shown above...

Bootswatches

Included bootswatches

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Please see CONTRIBUTING for more detail. (Dont change the scss files by hand, use the converter and rearranger first, and make your changes in those if possible)

Note about converter

I am trying to automate this project as much as possible, so I wrote a script that does most of the work converting less to scss. If you want to contribute a fix that's easily automatable and you know ruby, please add a processor to the converter.

Credits

Big thanks to these guys.

More Repositories

1

skeptick

Better ImageMagick for Ruby
Ruby
317
star
2

smart_resize_image

(Written in 2007-08) PHP function for image resizing that does what you think it should, the right way.
PHP
77
star
3

portrayal

A minimal builder for struct-like classes in Ruby
Ruby
74
star
4

sexy_pg_constraints

Adds migration methods to manage constraints in PostgreSQL.
Ruby
48
star
5

has_price

Provides a convenient DSL for organizing a price breakdown in a class.
Ruby
44
star
6

shmacros

A pack of shoulda macros for testing Rails apps.
Ruby
33
star
7

cx_leaderboard

Elixir library for fast, customizable leaderboards
Elixir
21
star
8

yui_compressor_fu

Minify your js/css using the best compressor out there
JavaScript
21
star
9

maxim.github.com

The Resume of Maxim Chernyak
HTML
20
star
10

kwstruct

Struct with keyword arguments support
Ruby
18
star
11

authoraise

Authorize without false negatives
Ruby
18
star
12

elixir-exercises

My solutions for exercises in Programming Elixir book
Elixir
17
star
13

wordmap

Wordmap is a simple way to lookup data directly from disk, bypassing RAM. It uses pread (no buffering), and takes advantage of SSD's constant seek time. The data is stored in equal size "cells" making it easy to calculate where things are located based on vectors.
Ruby
15
star
14

hamlify

HTML to HAML conversion tool which wraps around standard html2haml and fixes issues with its output.
13
star
15

html_press

API and Rack middleware for HTML compression with caching support.
Ruby
11
star
16

takeup

Starts and stops daemons for your projects in development.
Ruby
10
star
17

dotfiles-former

My (former) personal dotfiles featuring easily-updatable dependencies (oh-my-zsh, vim plugins). The new ones, with logicless maintenance, are at https://github.com/maxim/dotfiles
Ruby
8
star
18

enum_utils

Functions for mixing and matching lazy, potentially infinite enumerables.
Ruby
8
star
19

stalker

Rails micro-plugin which allows models to observe each other.
Ruby
7
star
20

off_github

Utility to help you migrate installed gems from github to gemcutter.
Ruby
7
star
21

doer

Run tasks and shell commands across multiple subdirectories.
7
star
22

blogue

If it wasn't in BLOGUE, it wasn't in blogue
Ruby
7
star
23

menu_txt

Build url menu trees in plain text with simple syntax.
Ruby
6
star
24

sprinkle-cheatsheet

A convenient reference for sprinkle.
5
star
25

should_pass_w3c_validation

Shoulda macros for validating your views with W3C service.
Ruby
5
star
26

jira_adf

Builder-like syntax for Atlassian Document Format (ADF).
Ruby
5
star
27

narrative

Rails template promoting narrative-centric (rather than model-centric) architectural approach.
Ruby
4
star
28

integer_fu

Store many boolean values in a single integer column in the database with convenience.
Ruby
4
star
29

js-fun

Just having fun learning javascript
HTML
4
star
30

trachouse

Trac to Lighthouse ticket importer.
Ruby
4
star
31

transformable_list

Determine steps to transform a list into another list
Ruby
4
star
32

wpxml_parser

Convenient WordPress XML dump parser.
Ruby
4
star
33

dotfiles

Simple $HOME-in-git style dotfiles, no extra logic (as opposed to my old dotfiles: https://github.com/maxim/dotfiles-former)
Shell
4
star
34

loadout

Rails configuration helpers
Ruby
3
star
35

lighthouse_cli

A quick command line interface to lighthouse.
Ruby
3
star
36

kitchen-sshgzip

Speeds up test-kitchen scp uploads by gzipping directories
Ruby
2
star
37

checkout_ru

Ruby API client for checkout.ru
Ruby
2
star
38

changelogg

Changelog generator
Ruby
2
star
39

sogger

Stack Overflow growler.
Ruby
2
star
40

imagemagick-source

ImageMagick cookbook for compiling from source
Ruby
1
star
41

redis_collection

Sync a ruby enumerable with a redis namespace
Ruby
1
star
42

lsrules-gen

Generators for Little Snitch rules that try to scrape authoritative firewall info sources, and auto-deploy lsrules to gist files.
Ruby
1
star