Skip to content

Commit

Permalink
Merge branch 'version-two'
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin S committed Nov 5, 2014
2 parents c364414 + dc58946 commit 0219fcc
Show file tree
Hide file tree
Showing 40 changed files with 1,686 additions and 1,967 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
[![Code Climate](https://codeclimate.com/github/ConciseCSS/concise.css-gem.png)](https://codeclimate.com/github/ConciseCSS/concise.css-gem)
[![Gem Version](https://badge.fury.io/rb/concisecss.svg)](http://badge.fury.io/rb/concisecss)

Concise is a lightweight, front-end framework that provides a number of great features without the bloat. Concise is built based on Object-Oriented CSS principles and keeps semantics in mind to provide a small learning curve, but a high level of customization.
Concise is a lightweight, front-end framework that provides a number of great features without the bloat. Concise is built based on Object-Oriented CSS principles and keeps semantics in mind to provide a small learning curve, and a high level of customization.

## Installation Instructions

Add this line to your application's Gemfile:

gem 'concisecss', '~> 0.0.5'
gem 'concisecss', '~> 2.0.0'

And then execute:

Expand All @@ -30,9 +30,9 @@ Not every single project you are working needs all of the Concise JavaScript fi
//= require concisecss/dropdown
//= require concisecss/close
```
To add the CSS just require
To add the CSS just require
```css
*= require concise
*= require concise
```
If you intend to extend or override Concise, you might want to create an override file. For example: `app/assets/stylesheets/custom.scss` and then import concise
```css
Expand All @@ -50,9 +50,13 @@ Check out our documentation here: [http://concisecss.com/documentation](http://c
You can keep up-to-date with the changes that we have made via our [releases page](https://github.com/ConciseCSS/concise.css-gem/releases).

## Versioning

Concise is currently maintained under the [Semantic Versioning guidelines](http://semver.org/).

## Acknowledgments

There are acknowledgements spread throughout the source code if you look around, and you can also view a list of credits [here](http://concisecss.com/credits/).

## Elsewhere

[![Like Concise on Facebook](http://i.imgur.com/4dy5UUK.png)](https://facebook.com/ConciseCSS)
Expand Down
25 changes: 17 additions & 8 deletions app/assets/javascripts/concisecss/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,34 @@
this.dd = el;
this.initEvents();
}

DropDown.prototype = {
initEvents : function() {
initEvents : function() {
// Toggle .dropdown-active on click
this.dd.on('click', function(event){
$(this).toggleClass('dropdown-active');
event.stopPropagation();
});

// Toggle .dropdown-active on hover
$(".dropdown-hover").mouseenter(function(event) {
$(this).addClass("dropdown-active");
event.stopPropagation();
});
}
}
};

$(function(){
var dropdown = $('.dropdown');

new DropDown(dropdown);

$(document).click(function() {
// Remove class from all dropdowns
dropdown.removeClass('dropdown-active');
});

$(".dropdown-menu").mouseleave(function() {
dropdown.removeClass("dropdown-active");
});
});
}(jQuery));
}(jQuery));
16 changes: 8 additions & 8 deletions app/assets/javascripts/concisecss/naver.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* Naver v3.0.8 - 2014-05-06
* A jQuery plugin for responsive navigation. Part of the Formstone Library.
* http://formstone.it/naver/
*
* Copyright 2014 Ben Plum; MIT Licensed
*/
/*
* Naver v3.0.8 - 2014-05-06
* A jQuery plugin for responsive navigation. Part of the Formstone Library.
* http://formstone.it/naver/
*
* Copyright 2014 Ben Plum; MIT Licensed
*/

;(function ($, window) {
"use strict";
Expand Down Expand Up @@ -355,4 +355,4 @@
pub.defaults.apply(this, Array.prototype.slice.call(arguments, 1));
}
};
})(jQuery, window);
})(jQuery, window);
10 changes: 5 additions & 5 deletions app/assets/javascripts/concisecss/navigation.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
(function($){
(function($){
/**
* Determine if responsive navigation text needs to be added.
*
* @method responsiveNav
* @return {Object} naver A naver plugin instantiation
*/
$.fn.responsiveNav = function() {
$.fn.responsiveNav = function() {
// Loop through each instance of responsive navigation
this.each(function(index) {
var labelState = $(this).hasClass( "nav-responsive-text" );

return $(this).naver({
maxWidth: "768px",
label: labelState
Expand All @@ -18,6 +18,6 @@
};
}(jQuery));

jQuery(document).ready(function() {
jQuery(document).ready(function() {
jQuery(".nav-responsive, .nav-responsive-left, .nav-responsive-center").responsiveNav();
});
});
16 changes: 8 additions & 8 deletions app/assets/javascripts/concisecss/non-responsive.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
(function($){
(function($){
/**
* Calculate object width
*
*/
$.fn.calculateWidth = function() {
$.fn.calculateWidth = function() {
return $(this).width();
};

Expand All @@ -14,19 +14,19 @@
* @note Only necessary for non-responsive websites.
*/
$.fn.nonResponsive = function() {

// Loop through each instance of the `.non-responsive` class
this.each(function(index) {
if ($(this).hasClass("non-responsive")) {
// Get container width
var containerWidth = $(".container").width(),
i = 1,
max = 24;

// Set pixel-based alternatives for grid styles
// But first we need to know if our row has class `gutters`
if($(this).hasClass("gutters")) {
for (; i <= max; i++ ) {
for (; i <= max; i++ ) {
// Column width for row with gutters
var columnWidth = ($('.column-'+i).calculateWidth()),
gutterWidth = columnWidth * 0.02;
Expand All @@ -37,7 +37,7 @@
for (; i <= max ; i++ ) {
// Column width for normal row
var columnWidth = ($('.column-'+i).calculateWidth() - 1);

$('.column-'+i).css("width", columnWidth + "px");
}
}
Expand All @@ -46,6 +46,6 @@
};
}(jQuery));

jQuery(document).ready(function() {
jQuery(document).ready(function() {
jQuery("body, .row").nonResponsive();
});
});
Loading

0 comments on commit 0219fcc

Please sign in to comment.