fuji 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fuji (0.0.1)
4
+ fuji (0.0.2)
5
5
  compass
6
6
  sass
7
7
 
data/README.md CHANGED
@@ -24,15 +24,22 @@ The render method accepts the following options:
24
24
 
25
25
  ```ruby
26
26
  {
27
- gravatar_default: "http://assets.heroku.com.s3.amazonaws.com/addons.heroku.com/gravatar_default.png",
27
+ user: nil,
28
28
  logo_text: "heroku",
29
+ logo_subtext: nil
29
30
  logo_url: "https://www.heroku.com",
30
- user: nil,
31
31
  login_path: nil,
32
32
  logout_path: nil,
33
+ gravatar_fallback_url: "http://assets.heroku.com.s3.amazonaws.com/addons.heroku.com/gravatar_default.png",
33
34
  }
34
35
  ```
35
36
 
37
+ Here's how it looks in addons:
38
+
39
+ ```haml
40
+ = Fuji::Header.render(user: current_user, logo_subtext: "addons", login_path: login_path, logout_path: logout_path)
41
+ ```
42
+
36
43
  Style it up by importing the fuji partial into your main sass/scss stylesheet
37
44
 
38
45
  ```sass
data/lib/fuji.rb CHANGED
@@ -20,7 +20,7 @@ module Fuji
20
20
  ::Header.render
21
21
  end
22
22
 
23
- # This makes an _fuji.sass partial available to your app.
23
+ # This makes a sass partial available to your app: @import "fuji"
24
24
  class Style
25
25
  base_directory = File.join(File.dirname(__FILE__), '..')
26
26
  Compass::Frameworks.register('fuji', :path => base_directory)
@@ -32,6 +32,7 @@ module Fuji
32
32
  # Options
33
33
  options[:gravatar_fallback_url] ||= "http://assets.heroku.com.s3.amazonaws.com/addons.heroku.com/gravatar_default.png"
34
34
  options[:logo_text] ||= "heroku"
35
+ options[:logo_subtext] ||= nil
35
36
  options[:logo_url] ||= "https://www.heroku.com"
36
37
  options[:user] ||= nil
37
38
  options[:login_path] ||= nil
@@ -51,7 +52,7 @@ module Fuji
51
52
  links << {id: :support, name: 'Support', url: 'https://help.heroku.com'}
52
53
 
53
54
  if options[:user] && options[:logout_path]
54
- links << {id: :logout, name: 'Logout', url: options[:logout_path]}
55
+ links << {id: :logout, name: 'Log out', url: options[:logout_path]}
55
56
  end
56
57
 
57
58
  # Gravatar
@@ -69,8 +70,8 @@ module Fuji
69
70
  }
70
71
  end
71
72
 
72
- if options[:login_path] && options[:current_user].nil?
73
- links << {id: :login, name: 'Login', url: options[:login_path]}
73
+ if options[:login_path] && options[:user].nil?
74
+ links << {id: :login, name: 'Log in', url: options[:login_path]}
74
75
  end
75
76
 
76
77
  # Join links together
@@ -83,7 +84,9 @@ module Fuji
83
84
  <div id='fuji' class='fuji'>
84
85
  <div class='container'>
85
86
  <h1>
86
- <a href='#{options[:logo_url]}'>#{options[:logo_text]}</a>
87
+ <a href='#{options[:logo_url]}'>
88
+ #{options[:logo_text]}<span>#{options[:logo_subtext]}</span>
89
+ </a>
87
90
  </h1>
88
91
  <ul>#{links}</ul>
89
92
  </div>
data/lib/fuji/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fuji
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,11 +1,15 @@
1
- // Config
1
+ // Configurable Config
2
2
  $fuji-foreground-color: #FFF !default
3
3
  $fuji-text-color: rgba(#FFF, 1) !default
4
4
  $fuji-highlight-color: #aed582 !default
5
5
  $fuji-max-width: 960px !default
6
- $fuji-line-edge-color: rgba($fuji-foreground-color, 0) !default
7
- $fuji-line-middle-color: rgba($fuji-foreground-color, 0.1) !default
8
- $fuji-line-size: 40% !default
6
+ $fuji-logo-text-color: rgba($fuji-highlight_color, 0.4) !default
7
+ $fuji-logo-subtext-color: rgba($fuji-highlight_color, 0.7) !default
8
+
9
+ // Immutable Config
10
+ $fuji-line-edge-color: rgba($fuji-foreground-color, 0)
11
+ $fuji-line-middle-color: rgba($fuji-foreground-color, 0.1)
12
+ $fuji-line-size: 40%
9
13
 
10
14
  #fuji
11
15
  +transition(all 0.5s false 0s)
@@ -29,8 +33,17 @@ $fuji-line-size: 40% !default
29
33
  +transition(all 0.3s false 0s)
30
34
  max-width: 300px
31
35
  overflow: hidden
36
+ font:
37
+ family: hybrea, corbel, 'helvetica neue', helvetica, arial
38
+ size: 20px
39
+ weight: normal
40
+ color: $fuji-logo-text-color
41
+ line-height: 36px
32
42
  span
33
- display: none
43
+ display: inline-block
44
+ color: $fuji-logo-subtext-color
45
+ padding-left: 4px
46
+
34
47
 
35
48
  ul
36
49
  list-style: none
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -96,8 +96,6 @@ files:
96
96
  - spec/spec.opts
97
97
  - spec/spec_helper.rb
98
98
  - stylesheets/_fuji.sass
99
- - tmtags
100
- - tmtagsHistory
101
99
  homepage: https://github.com/heroku/fuji
102
100
  licenses: []
103
101
  post_install_message:
@@ -112,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
110
  version: '0'
113
111
  segments:
114
112
  - 0
115
- hash: -2441385227944830096
113
+ hash: 1591934698573842779
116
114
  required_rubygems_version: !ruby/object:Gem::Requirement
117
115
  none: false
118
116
  requirements:
@@ -121,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
119
  version: '0'
122
120
  segments:
123
121
  - 0
124
- hash: -2441385227944830096
122
+ hash: 1591934698573842779
125
123
  requirements: []
126
124
  rubyforge_project:
127
125
  rubygems_version: 1.8.24
data/tmtags DELETED
@@ -1,24 +0,0 @@
1
- !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
2
- !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
3
- !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
4
- !_TAG_PROGRAM_NAME Exuberant Ctags //
5
- !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
6
- !_TAG_PROGRAM_VERSION Development //
7
- "Fuji /Users/zeke/Projects/hero/fuji/spec/fuji_spec.rb /^ describe "Fuji::Helper.current_site_matches?" do$/;" describe line:24
8
- "fuji" do /Users/zeke/Projects/hero/fuji/spec/fuji_spec.rb /^ describe "fuji" do$/;" describe line:6
9
- "extract_domain" do /Users/zeke/Projects/hero/fuji/spec/fuji_spec.rb /^ describe "extract_domain" do$/;" describe line:79
10
- "in any kind of ruby app" do /Users/zeke/Projects/hero/fuji/spec/fuji_spec.rb /^ describe "in any kind of ruby app" do$/;" describe line:57
11
- "inside a rails app" do /Users/zeke/Projects/hero/fuji/spec/fuji_spec.rb /^ describe "inside a rails app" do$/;" describe line:26
12
- "inside a sinatra app" do /Users/zeke/Projects/hero/fuji/spec/fuji_spec.rb /^ describe "inside a sinatra app" do$/;" describe line:41
13
- Fuji /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^module Fuji$/;" module line:17
14
- Fuji /Users/zeke/Projects/hero/fuji/lib/fuji/version.rb /^module Fuji$/;" module line:1
15
- Fuji /Users/zeke/Projects/hero/fuji/spec/fuji_spec.rb /^describe Fuji::Header do$/;" describe line:4
16
- Header /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^ class Header$/;" class line:29
17
- Helper /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^ class Helper$/;" class line:102
18
- Style /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^ class Style$/;" class line:24
19
- current_site_matches /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^ def self.current_site_matches?(search_string_or_url, request_object=nil)$/;" singleton method line:104
20
- extract_domain /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^ def self.extract_domain(string)$/;" singleton method line:117
21
- image_tag /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^ def self.image_tag(url)$/;" singleton method line:126
22
- link_to /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^ def self.link_to(name, url, css="")$/;" singleton method line:121
23
- render /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^ def self.render(options={})$/;" singleton method line:30
24
- render /Users/zeke/Projects/hero/fuji/lib/fuji.rb /^ def self.render$/;" singleton method line:19
data/tmtagsHistory DELETED
@@ -1 +0,0 @@
1
- <dt><span class="filename"><a href="txmt://open?url=file:///Users/zeke/Projects/hero/fuji/lib/fuji.rb&line=98">fuji.rb:98 -- /Users/zeke/Projects/hero/fuji/lib</a></span><br><div class="code"> # end</div></dt>