CirrusKit 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MzllZDYyYzg2OWZhYTQ1OWU1ODgwMzUzMmM5NTI4ODU0YjJkYzVkNA==
5
+ data.tar.gz: !binary |-
6
+ MjdhMzBlNGRhNWNlM2FkY2Q3YWI5YzkyNGRkZmMzOTM1MDY5YmEyNw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MDQ0Yzg2OWUwNjlhYWM5OTBmN2Y1MGMxMjViYTc1ODI4Nzk5Y2I5MDViNGQz
10
+ ZDBmMjU1OTk3NTM5MTc0OGRlODZmMTAzZjQ5ZjVlNDcyZWFiMzAxNzVlOTQ5
11
+ MzE5Y2YwNTQwMWZiOGQwNTM0OTJlMjg5YWZjMmQzMjI4ZmE4YzA=
12
+ data.tar.gz: !binary |-
13
+ MDE2MmQ3MmQ4YzI1ZDRiOTBlN2M1N2IxOTFhOGRhYmUwODQ0ODU0OWQ3NWMy
14
+ MTNjYzU4ZDAxYzg5MzVhZDRlODBmYzM3MjFlYTU3Mjk3YWQxNDI1N2Q0YjRh
15
+ OGNkMmI3ZDBiYTliMzc2NmJiYjlhYzZmNzE0MzI1OTgzZTRkYzE=
@@ -0,0 +1,3 @@
1
+ *.DS_Store
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cirruskit.gemspec
4
+ gemspec
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ CirrusKit (0.0.1)
5
+ coffee-script
6
+ less
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ coffee-script (2.2.0)
12
+ coffee-script-source
13
+ execjs
14
+ coffee-script-source (1.6.3)
15
+ commonjs (0.2.7)
16
+ execjs (2.0.2)
17
+ less (2.4.0)
18
+ commonjs (~> 0.2.7)
19
+ rake (10.1.0)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ CirrusKit!
26
+ bundler (~> 1.3)
27
+ rake
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 nikolaiwarner
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,32 @@
1
+ # CirrusKit
2
+
3
+ A UI toolkit for html that unifies things the way I want to see them.
4
+
5
+ Love,
6
+ @nikolaiwarner
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 'cirruskit'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install cirruskit
21
+
22
+ ## Usage
23
+
24
+ TODO: Write usage instructions here
25
+
26
+ ## Contributing
27
+
28
+ 1. Fork it
29
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
30
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
31
+ 4. Push to the branch (`git push origin my-new-feature`)
32
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cirruskit/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "CirrusKit"
8
+ spec.version = Cirruskit::VERSION
9
+ spec.authors = ["nikolaiwarner"]
10
+ spec.email = ["n@nikolaiwarner.com"]
11
+ spec.description = "A UI and style toolkit for Cirrus-esque apps."
12
+ spec.summary = "A UI and style toolkit for Cirrus-esque apps."
13
+ spec.homepage = "https://github.com/CirrusMio/CirrusKit"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_runtime_dependency 'less'
24
+ spec.add_runtime_dependency 'coffee-script'
25
+ end
@@ -0,0 +1,20 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title Example
5
+ %link{href: "cirruskit.css", rel: "stylesheet"}
6
+ %script{src: "cirruskit.js", type: "text/javascript"}
7
+ %body.cirruskit
8
+ .nav-panel
9
+ .nav-item.active
10
+ %a.nav-icon{href: admin_path}
11
+ %span.nav-icon.glyphicon.glyphicon-cloud
12
+ %span.label
13
+ Dashboard
14
+ .nav-item
15
+ %a.nav-icon{href: admin_videos_path}
16
+ %span.nav-icon.glyphicon.glyphicon-facetime-video
17
+ %span.label
18
+ Manage Videos
19
+ .content-panel
20
+ = yield
@@ -0,0 +1,30 @@
1
+ class CirrusKit
2
+ constructor: ->
3
+ @container = $('.cirruskit')
4
+ @nav_panel = @container.find '.nav-panel'
5
+ @content_panel = @container.find '.content-panel'
6
+ @setup_events()
7
+
8
+ setup_events: =>
9
+ @nav_panel.hover @nav_panel_hover, @nav_panel_stop_hover
10
+
11
+ @content_panel.scroll (e) =>
12
+ @update_top_fixed(e)
13
+
14
+ nav_panel_hover: =>
15
+ @nav_panel.addClass 'hover'
16
+
17
+ nav_panel_stop_hover: =>
18
+ @nav_panel.removeClass 'hover'
19
+
20
+ update_top_fixed: (e) =>
21
+ # Let .cirruskit-top-fixed stick to top on scroll
22
+ $fixed = @container.find('.cirruskit-top-fixed')
23
+ if @content_panel.scrollTop() > $fixed.offset().top
24
+ $fixed.addClass 'fixed'
25
+ @content_panel.css 'padding-top', $fixed.height()
26
+ else
27
+ $fixed.removeClass 'fixed'
28
+ @content_panel.css 'padding-top', 0
29
+
30
+ (exports ? this).cirruskit = new CirrusKit()
@@ -0,0 +1,4 @@
1
+ /*
2
+ =require cirruskit/cirruskit
3
+ */
4
+
@@ -0,0 +1,106 @@
1
+ @cirruskit_color1: #000;
2
+ @cirruskit_color1_alt: #666;
3
+ @cirruskit_color2: #fff;
4
+ @cirruskit_color2_alt: #ffffd0;
5
+
6
+ body, html {
7
+ height: 100%;
8
+ }
9
+
10
+ .cirruskit {
11
+ .content-panel {
12
+ left: 0px;
13
+ padding: 0px;
14
+ padding-left: 70px;
15
+ position: absolute;
16
+ width: 100%;
17
+ height: 100%;
18
+ overflow: auto;
19
+ }
20
+
21
+ .nav-panel {
22
+ background-color: @cirruskit_color1;
23
+ width: 45px;
24
+ border-right: 1px solid @cirruskit_color1_alt;
25
+ height: 100%;
26
+ overflow: hidden;
27
+ float: left;
28
+ margin-right: 10px;
29
+ padding: 10px 0;
30
+ text-align: left;
31
+ font-size: 24px;
32
+ position: relative;
33
+ z-index: 1;
34
+ transition: all 0.5s;
35
+
36
+ a {
37
+ color: @cirruskit_color2;
38
+ }
39
+
40
+ .bottom {
41
+ position: absolute;
42
+ bottom: 10px;
43
+ width: 100%;
44
+ }
45
+
46
+ .nav-item {
47
+ padding-left: 10px;
48
+ margin-bottom: 5px;
49
+
50
+ &.active {
51
+ border-left: 3px solid @cirruskit_color2;
52
+ padding-left: 7px;
53
+ }
54
+
55
+ .nav-icon {
56
+ transition: all 0.3s;
57
+ }
58
+
59
+ .label {
60
+ text-align: left;
61
+ opacity: 0;
62
+ transition: all 0.7s;
63
+ position: absolute;
64
+ margin-left: -200px;
65
+ margin-top: 7px;
66
+ font-size: 14px;
67
+ color: @cirruskit_color2_alt;
68
+ background-color: transparent;
69
+
70
+ small {
71
+ font-size: 10px;
72
+ display: block;
73
+ }
74
+ }
75
+
76
+ &:hover {
77
+ background-color: @cirruskit_color1_alt;
78
+
79
+ .nav-icon {
80
+ -webkit-transform: scale(1.2);
81
+ transform: scale(1.2);
82
+ }
83
+ }
84
+ }
85
+
86
+ &.hover {
87
+ width: 200px;
88
+ box-shadow: 0 0 20px #000;
89
+
90
+ .label {
91
+ opacity: 1;
92
+ margin-left: 0;
93
+ }
94
+ }
95
+ }
96
+
97
+ .cirruskit-top-fixed {
98
+ &.fixed {
99
+ background-color: transparent;
100
+ position: fixed;
101
+ top: 0;
102
+ width: 100%;
103
+ z-index: 100;
104
+ }
105
+ }
106
+ }
@@ -0,0 +1 @@
1
+ @import "cirruskit/cirruskit";
@@ -0,0 +1,7 @@
1
+ require "cirruskit/version"
2
+
3
+ module Cirruskit
4
+ if defined?(Rails::Engine)
5
+ require "cirruskit/engine"
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ class Engine < Rails::Engine
2
+ initializer "cirruskit.update_asset_paths" do |app|
3
+ app.config.assets.paths << File.expand_path("../../../less", __FILE__)
4
+ app.config.assets.paths << File.expand_path("../../../js", __FILE__)
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module Cirruskit
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: CirrusKit
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - nikolaiwarner
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: less
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: coffee-script
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: A UI and style toolkit for Cirrus-esque apps.
70
+ email:
71
+ - n@nikolaiwarner.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - Gemfile
78
+ - Gemfile.lock
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - cirruskit.gemspec
83
+ - examples/index.haml
84
+ - js/cirruskit/cirruskit.coffee
85
+ - js/cirruskit/index.js
86
+ - less/cirruskit/cirruskit.less
87
+ - less/cirruskit/index.css
88
+ - lib/cirruskit.rb
89
+ - lib/cirruskit/engine.rb
90
+ - lib/cirruskit/version.rb
91
+ homepage: https://github.com/CirrusMio/CirrusKit
92
+ licenses:
93
+ - MIT
94
+ metadata: {}
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ! '>='
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ requirements: []
110
+ rubyforge_project:
111
+ rubygems_version: 2.1.9
112
+ signing_key:
113
+ specification_version: 4
114
+ summary: A UI and style toolkit for Cirrus-esque apps.
115
+ test_files: []
116
+ has_rdoc: