jetpack-rails 0.6.4 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,10 @@
1
1
  Changelog:
2
+ 0.7.0:
3
+ - Added `nav_link_to` helper for creating navigation links.
4
+ - Added `viewing?` helper to match for view names.
5
+ - Added `$responsive` flag to toggle responsive grid throughout an application.
6
+ - Changed Fractionalize to use `respond-to` mixin.
7
+ - Adjusted typography settings to make H1s not so crazy.
2
8
  0.6.4:
3
9
  - Fixed an accidental regression in 0.6.3.
4
10
  - Added `respond-to` mixin.
@@ -7,6 +7,20 @@ module Jetpack
7
7
  [controller.controller_name,controller.action_name,params[:id]].compact.join(' ')
8
8
  end
9
9
 
10
+ # Checks whether the user is looking at a particular view.
11
+ # Helpful for cases like a unique home page design element: - if viewing? 'home'
12
+ def viewing?(string)
13
+ view_name.include?(string)
14
+ end
15
+
16
+ # Creates a nav link, ie. one that links to nothing ("#") if it is the current page
17
+ # and in that case the link has the class "current"
18
+ def nav_link_to(text, path)
19
+ link_to_unless_current text, path do
20
+ link_to text, '#', :class => 'current'
21
+ end
22
+ end
23
+
10
24
  # Outputs a standard flash message.
11
25
  def flash_messages
12
26
  str = ""
@@ -1,3 +1,3 @@
1
1
  module Jetpack
2
- VERSION = "0.6.4"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -52,8 +52,10 @@ $margin: 20px;
52
52
 
53
53
  @mixin container {
54
54
  width: $desktop;
55
- @media screen and (device-width: 768px), screen and (min-width: 768px) and (max-width: 1023px) { width: $tablet; }
56
- @media screen and (device-width: 480px), screen and (max-width: 767px) { width: $mobile; }
55
+ @if $responsive {
56
+ @include respond-to(tablet) { width: $tablet; }
57
+ @include respond-to(mobile) { width: $mobile; }
58
+ }
57
59
  margin: 0 auto;
58
60
  clear: both;
59
61
  @include clearfix;
@@ -97,10 +99,9 @@ $margin: 20px;
97
99
  margin-left: $margin;
98
100
  width: col_span( $num, $denom );
99
101
  &:first-child { margin-left: 0; }
100
- @media only screen and (min-width: 768px) and (max-width: 1023px) { width: col_span( $num, $denom, $tablet ); }
101
- @media only screen and (max-width: 767px) {
102
- width: $mobile;
103
- margin-left: 0;
102
+ @if $responsive {
103
+ @include respond-to(tablet) { width: col_span( $num, $denom, $tablet ); }
104
+ @include respond-to(mobile) { width: $mobile; margin-left: 0; }
104
105
  }
105
106
  img { max-width: 100%; }
106
107
  }
@@ -1,6 +1,7 @@
1
1
  /* Twitter Typography +
2
- * Largely taken from Twitter Bootstrap v1.3,
3
- * with customizations and adaptations to make it more "sassy".
2
+ * Inspired by Twitter Bootstrap v1.3,
3
+ * with customizations and adaptations to make it more "sassy",
4
+ * and adjustments for personal taste.
4
5
  * ---------------------------------------------------------------------------------------- */
5
6
 
6
7
  // BODY TEXT
@@ -15,10 +16,10 @@ p {
15
16
  font-weight: 700; color: inherit; line-height: 1.2; margin-bottom: $baseline / 2;
16
17
  small { color: $light2; }
17
18
  @if $level == 1 {
18
- font-size: 30px;
19
- small { font-size: 18px; font-weight: 500; }
20
- } @else if $level == 2 {
21
19
  font-size: 24px;
20
+ small { font-size: 16px; font-weight: 500; }
21
+ } @else if $level == 2 {
22
+ font-size: 20px;
22
23
  small { font-size: 14px; font-weight: 500; }
23
24
  } @else if $level == 3 {
24
25
  font-size: 18px;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jetpack-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-14 00:00:00.000000000 Z
12
+ date: 2013-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass-rails