github-widget 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/.gitignore +1 -0
  2. data/README.md +92 -0
  3. data/app/assets/images/github-widget/public.png +0 -0
  4. data/app/assets/images/github-widget/public_fork.png +0 -0
  5. data/app/assets/images/github-widget/repostat_forks.png +0 -0
  6. data/app/assets/images/github-widget/repostat_watchers.png +0 -0
  7. data/app/assets/javascripts/github-widget/projects.js.coffee +16 -0
  8. data/app/assets/stylesheets/github-widget/projects.css.sass.erb +95 -0
  9. data/app/views/github-widget/_projects.hbs +38 -0
  10. data/develop-example/.gitignore +5 -0
  11. data/develop-example/Gemfile +44 -0
  12. data/develop-example/Gemfile.lock +139 -0
  13. data/develop-example/README +261 -0
  14. data/develop-example/Rakefile +7 -0
  15. data/develop-example/app/assets/images/rails.png +0 -0
  16. data/develop-example/app/assets/javascripts/application.js +12 -0
  17. data/develop-example/app/assets/javascripts/github-widget/projects.js.coffee +16 -0
  18. data/develop-example/app/assets/javascripts/home.js.coffee +3 -0
  19. data/develop-example/app/assets/javascripts/plugins.js.coffee +20 -0
  20. data/develop-example/app/assets/stylesheets/application.css +292 -0
  21. data/develop-example/app/assets/stylesheets/home.css.scss +8 -0
  22. data/develop-example/app/controllers/application_controller.rb +3 -0
  23. data/develop-example/app/controllers/home_controller.rb +5 -0
  24. data/develop-example/app/helpers/application_helper.rb +2 -0
  25. data/develop-example/app/helpers/home_helper.rb +2 -0
  26. data/develop-example/app/mailers/.gitkeep +0 -0
  27. data/develop-example/app/models/.gitkeep +0 -0
  28. data/develop-example/app/views/github_widget/_projects.hbs +38 -0
  29. data/develop-example/app/views/home/index.html.erb +0 -0
  30. data/develop-example/app/views/layouts/application.html.erb +62 -0
  31. data/develop-example/config.ru +4 -0
  32. data/develop-example/config/application.rb +42 -0
  33. data/develop-example/config/boot.rb +6 -0
  34. data/develop-example/config/database.yml +25 -0
  35. data/develop-example/config/environment.rb +5 -0
  36. data/develop-example/config/environments/development.rb +27 -0
  37. data/develop-example/config/environments/production.rb +54 -0
  38. data/develop-example/config/environments/test.rb +39 -0
  39. data/develop-example/config/initializers/backtrace_silencers.rb +7 -0
  40. data/develop-example/config/initializers/inflections.rb +10 -0
  41. data/develop-example/config/initializers/mime_types.rb +5 -0
  42. data/develop-example/config/initializers/secret_token.rb +7 -0
  43. data/develop-example/config/initializers/session_store.rb +8 -0
  44. data/develop-example/config/initializers/wrap_parameters.rb +12 -0
  45. data/develop-example/config/locales/en.yml +5 -0
  46. data/develop-example/config/routes.rb +60 -0
  47. data/develop-example/db/seeds.rb +7 -0
  48. data/develop-example/doc/README_FOR_APP +2 -0
  49. data/develop-example/lib/tasks/.gitkeep +0 -0
  50. data/develop-example/log/.gitkeep +0 -0
  51. data/develop-example/public/.htaccess +522 -0
  52. data/develop-example/public/404.html +26 -0
  53. data/develop-example/public/422.html +26 -0
  54. data/develop-example/public/500.html +26 -0
  55. data/develop-example/public/apple-touch-icon-114x114-precomposed.png +0 -0
  56. data/develop-example/public/apple-touch-icon-57x57-precomposed.png +0 -0
  57. data/develop-example/public/apple-touch-icon-72x72-precomposed.png +0 -0
  58. data/develop-example/public/apple-touch-icon-precomposed.png +0 -0
  59. data/develop-example/public/apple-touch-icon.png +0 -0
  60. data/develop-example/public/crossdomain.xml +25 -0
  61. data/develop-example/public/favicon.ico +0 -0
  62. data/develop-example/public/humans.txt +43 -0
  63. data/develop-example/public/robots.txt +5 -0
  64. data/develop-example/script/rails +6 -0
  65. data/develop-example/test/fixtures/.gitkeep +0 -0
  66. data/develop-example/test/functional/.gitkeep +0 -0
  67. data/develop-example/test/functional/home_controller_test.rb +9 -0
  68. data/develop-example/test/integration/.gitkeep +0 -0
  69. data/develop-example/test/performance/browsing_test.rb +12 -0
  70. data/develop-example/test/test_helper.rb +13 -0
  71. data/develop-example/test/unit/.gitkeep +0 -0
  72. data/develop-example/test/unit/helpers/home_helper_test.rb +4 -0
  73. data/develop-example/vendor/assets/stylesheets/.gitkeep +0 -0
  74. data/develop-example/vendor/plugins/.gitkeep +0 -0
  75. data/github-widget.gemspec +21 -0
  76. data/lib/generators/github_widget/USAGE +11 -0
  77. data/lib/generators/github_widget/github_widget_generator.rb +10 -0
  78. data/lib/github-widget.rb +4 -0
  79. data/lib/github-widget/version.rb +9 -0
  80. data/snapshot.png +0 -0
  81. metadata +135 -0
@@ -0,0 +1,261 @@
1
+ == Welcome to Rails
2
+
3
+ Rails is a web-application framework that includes everything needed to create
4
+ database-backed web applications according to the Model-View-Control pattern.
5
+
6
+ This pattern splits the view (also called the presentation) into "dumb"
7
+ templates that are primarily responsible for inserting pre-built data in between
8
+ HTML tags. The model contains the "smart" domain objects (such as Account,
9
+ Product, Person, Post) that holds all the business logic and knows how to
10
+ persist themselves to a database. The controller handles the incoming requests
11
+ (such as Save New Account, Update Product, Show Post) by manipulating the model
12
+ and directing data to the view.
13
+
14
+ In Rails, the model is handled by what's called an object-relational mapping
15
+ layer entitled Active Record. This layer allows you to present the data from
16
+ database rows as objects and embellish these data objects with business logic
17
+ methods. You can read more about Active Record in
18
+ link:files/vendor/rails/activerecord/README.html.
19
+
20
+ The controller and view are handled by the Action Pack, which handles both
21
+ layers by its two parts: Action View and Action Controller. These two layers
22
+ are bundled in a single package due to their heavy interdependence. This is
23
+ unlike the relationship between the Active Record and Action Pack that is much
24
+ more separate. Each of these packages can be used independently outside of
25
+ Rails. You can read more about Action Pack in
26
+ link:files/vendor/rails/actionpack/README.html.
27
+
28
+
29
+ == Getting Started
30
+
31
+ 1. At the command prompt, create a new Rails application:
32
+ <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
33
+
34
+ 2. Change directory to <tt>myapp</tt> and start the web server:
35
+ <tt>cd myapp; rails server</tt> (run with --help for options)
36
+
37
+ 3. Go to http://localhost:3000/ and you'll see:
38
+ "Welcome aboard: You're riding Ruby on Rails!"
39
+
40
+ 4. Follow the guidelines to start developing your application. You can find
41
+ the following resources handy:
42
+
43
+ * The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
44
+ * Ruby on Rails Tutorial Book: http://www.railstutorial.org/
45
+
46
+
47
+ == Debugging Rails
48
+
49
+ Sometimes your application goes wrong. Fortunately there are a lot of tools that
50
+ will help you debug it and get it back on the rails.
51
+
52
+ First area to check is the application log files. Have "tail -f" commands
53
+ running on the server.log and development.log. Rails will automatically display
54
+ debugging and runtime information to these files. Debugging info will also be
55
+ shown in the browser on requests from 127.0.0.1.
56
+
57
+ You can also log your own messages directly into the log file from your code
58
+ using the Ruby logger class from inside your controllers. Example:
59
+
60
+ class WeblogController < ActionController::Base
61
+ def destroy
62
+ @weblog = Weblog.find(params[:id])
63
+ @weblog.destroy
64
+ logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
65
+ end
66
+ end
67
+
68
+ The result will be a message in your log file along the lines of:
69
+
70
+ Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
71
+
72
+ More information on how to use the logger is at http://www.ruby-doc.org/core/
73
+
74
+ Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
75
+ several books available online as well:
76
+
77
+ * Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
78
+ * Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
79
+
80
+ These two books will bring you up to speed on the Ruby language and also on
81
+ programming in general.
82
+
83
+
84
+ == Debugger
85
+
86
+ Debugger support is available through the debugger command when you start your
87
+ Mongrel or WEBrick server with --debugger. This means that you can break out of
88
+ execution at any point in the code, investigate and change the model, and then,
89
+ resume execution! You need to install ruby-debug to run the server in debugging
90
+ mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
91
+
92
+ class WeblogController < ActionController::Base
93
+ def index
94
+ @posts = Post.all
95
+ debugger
96
+ end
97
+ end
98
+
99
+ So the controller will accept the action, run the first line, then present you
100
+ with a IRB prompt in the server window. Here you can do things like:
101
+
102
+ >> @posts.inspect
103
+ => "[#<Post:0x14a6be8
104
+ @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
105
+ #<Post:0x14a6620
106
+ @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
107
+ >> @posts.first.title = "hello from a debugger"
108
+ => "hello from a debugger"
109
+
110
+ ...and even better, you can examine how your runtime objects actually work:
111
+
112
+ >> f = @posts.first
113
+ => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
114
+ >> f.
115
+ Display all 152 possibilities? (y or n)
116
+
117
+ Finally, when you're ready to resume execution, you can enter "cont".
118
+
119
+
120
+ == Console
121
+
122
+ The console is a Ruby shell, which allows you to interact with your
123
+ application's domain model. Here you'll have all parts of the application
124
+ configured, just like it is when the application is running. You can inspect
125
+ domain models, change values, and save to the database. Starting the script
126
+ without arguments will launch it in the development environment.
127
+
128
+ To start the console, run <tt>rails console</tt> from the application
129
+ directory.
130
+
131
+ Options:
132
+
133
+ * Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
134
+ made to the database.
135
+ * Passing an environment name as an argument will load the corresponding
136
+ environment. Example: <tt>rails console production</tt>.
137
+
138
+ To reload your controllers and models after launching the console run
139
+ <tt>reload!</tt>
140
+
141
+ More information about irb can be found at:
142
+ link:http://www.rubycentral.org/pickaxe/irb.html
143
+
144
+
145
+ == dbconsole
146
+
147
+ You can go to the command line of your database directly through <tt>rails
148
+ dbconsole</tt>. You would be connected to the database with the credentials
149
+ defined in database.yml. Starting the script without arguments will connect you
150
+ to the development database. Passing an argument will connect you to a different
151
+ database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
152
+ PostgreSQL and SQLite 3.
153
+
154
+ == Description of Contents
155
+
156
+ The default directory structure of a generated Ruby on Rails application:
157
+
158
+ |-- app
159
+ | |-- assets
160
+ | |-- images
161
+ | |-- javascripts
162
+ | `-- stylesheets
163
+ | |-- controllers
164
+ | |-- helpers
165
+ | |-- mailers
166
+ | |-- models
167
+ | `-- views
168
+ | `-- layouts
169
+ |-- config
170
+ | |-- environments
171
+ | |-- initializers
172
+ | `-- locales
173
+ |-- db
174
+ |-- doc
175
+ |-- lib
176
+ | `-- tasks
177
+ |-- log
178
+ |-- public
179
+ |-- script
180
+ |-- test
181
+ | |-- fixtures
182
+ | |-- functional
183
+ | |-- integration
184
+ | |-- performance
185
+ | `-- unit
186
+ |-- tmp
187
+ | |-- cache
188
+ | |-- pids
189
+ | |-- sessions
190
+ | `-- sockets
191
+ `-- vendor
192
+ |-- assets
193
+ `-- stylesheets
194
+ `-- plugins
195
+
196
+ app
197
+ Holds all the code that's specific to this particular application.
198
+
199
+ app/assets
200
+ Contains subdirectories for images, stylesheets, and JavaScript files.
201
+
202
+ app/controllers
203
+ Holds controllers that should be named like weblogs_controller.rb for
204
+ automated URL mapping. All controllers should descend from
205
+ ApplicationController which itself descends from ActionController::Base.
206
+
207
+ app/models
208
+ Holds models that should be named like post.rb. Models descend from
209
+ ActiveRecord::Base by default.
210
+
211
+ app/views
212
+ Holds the template files for the view that should be named like
213
+ weblogs/index.html.erb for the WeblogsController#index action. All views use
214
+ eRuby syntax by default.
215
+
216
+ app/views/layouts
217
+ Holds the template files for layouts to be used with views. This models the
218
+ common header/footer method of wrapping views. In your views, define a layout
219
+ using the <tt>layout :default</tt> and create a file named default.html.erb.
220
+ Inside default.html.erb, call <% yield %> to render the view using this
221
+ layout.
222
+
223
+ app/helpers
224
+ Holds view helpers that should be named like weblogs_helper.rb. These are
225
+ generated for you automatically when using generators for controllers.
226
+ Helpers can be used to wrap functionality for your views into methods.
227
+
228
+ config
229
+ Configuration files for the Rails environment, the routing map, the database,
230
+ and other dependencies.
231
+
232
+ db
233
+ Contains the database schema in schema.rb. db/migrate contains all the
234
+ sequence of Migrations for your schema.
235
+
236
+ doc
237
+ This directory is where your application documentation will be stored when
238
+ generated using <tt>rake doc:app</tt>
239
+
240
+ lib
241
+ Application specific libraries. Basically, any kind of custom code that
242
+ doesn't belong under controllers, models, or helpers. This directory is in
243
+ the load path.
244
+
245
+ public
246
+ The directory available for the web server. Also contains the dispatchers and the
247
+ default HTML files. This should be set as the DOCUMENT_ROOT of your web
248
+ server.
249
+
250
+ script
251
+ Helper scripts for automation and generation.
252
+
253
+ test
254
+ Unit and functional tests along with fixtures. When using the rails generate
255
+ command, template test files will be generated for you and placed in this
256
+ directory.
257
+
258
+ vendor
259
+ External libraries that the application depends on. Also includes the plugins
260
+ subdirectory. If the app has frozen rails, those gems also go here, under
261
+ vendor/rails/. This directory is in the load path.
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ GithubWidget::Application.load_tasks
@@ -0,0 +1,12 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require github-api
10
+ //= require sproutcore
11
+ //= require github-widget/projects
12
+ // require_tree .
@@ -0,0 +1,16 @@
1
+ window.GithubWidget = SC.Application.create()
2
+
3
+ GithubWidget.projectsController = SC.ArrayProxy.create
4
+ content: []
5
+
6
+ window.github_username ?= 'gutenye'
7
+
8
+ user = gh.user(window.github_username)
9
+
10
+ user.allRepos (data) ->
11
+ GithubWidget.projectsController.set 'content',data.repositories
12
+
13
+ GithubWidget.ProjectView = SC.View.extend
14
+ public: ( ->
15
+ ! this.get('private')
16
+ ).property('private')
@@ -0,0 +1,3 @@
1
+ # Place all the behaviors and hooks related to the matching controller here.
2
+ # All this logic will automatically be available in application.js.
3
+ # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
@@ -0,0 +1,20 @@
1
+ # usage: log('inside coolFunc', this, arguments);
2
+ # paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
3
+ window.log = ->
4
+ log.history = log.history or []
5
+ log.history.push arguments
6
+ if @console
7
+ arguments.callee = arguments.callee.caller
8
+ console.log Array::slice.call(arguments)
9
+
10
+ # make it safe to use console.log always
11
+ ((b) ->
12
+ c = ->
13
+ d = "assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(",")
14
+
15
+ while a = d.pop()
16
+ b[a] = b[a] or c
17
+ ) window.console = window.console or {}
18
+
19
+ # place any jQuery/helper plugins in here, instead of separate, slower script files.
20
+
@@ -0,0 +1,292 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require github-widget/projects
7
+ *= require_tree .
8
+ */
9
+
10
+ /*
11
+ * HTML5 ✰ Boilerplate
12
+ *
13
+ * What follows is the result of much research on cross-browser styling.
14
+ * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
15
+ * Kroc Camen, and the H5BP dev community and team.
16
+ */
17
+
18
+
19
+ /* =============================================================================
20
+ HTML5 element display
21
+ ========================================================================== */
22
+
23
+ article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
24
+ audio[controls], canvas, video { display: inline-block; *display: inline; *zoom: 1; }
25
+
26
+
27
+ /* =============================================================================
28
+ Base
29
+ ========================================================================== */
30
+
31
+ /*
32
+ * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
33
+ * http://clagnut.com/blog/348/#c790
34
+ * 2. Force vertical scrollbar in non-IE
35
+ * 3. Remove Android and iOS tap highlight color to prevent entire container being highlighted
36
+ * www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
37
+ * 4. Prevent iOS text size adjust on device orientation change, without disabling user zoom
38
+ * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
39
+ */
40
+
41
+ html { font-size: 100%; overflow-y: scroll; -webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
42
+
43
+ body { margin: 0; font-size: 13px; line-height: 1.231; }
44
+
45
+ body, button, input, select, textarea { font-family: sans-serif; color: #222; }
46
+
47
+ /*
48
+ * These selection declarations have to be separate
49
+ * No text-shadow: twitter.com/miketaylr/status/12228805301
50
+ * Also: hot pink!
51
+ */
52
+
53
+ ::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
54
+ ::selection { background: #fe57a1; color: #fff; text-shadow: none; }
55
+
56
+
57
+ /* =============================================================================
58
+ Links
59
+ ========================================================================== */
60
+
61
+ a { color: #00e; }
62
+ a:visited { color: #551a8b; }
63
+ a:focus { outline: thin dotted; }
64
+
65
+ /* Improve readability when focused and hovered in all browsers: people.opera.com/patrickl/experiments/keyboard/test */
66
+ a:hover, a:active { outline: 0; }
67
+
68
+
69
+ /* =============================================================================
70
+ Typography
71
+ ========================================================================== */
72
+
73
+ abbr[title] { border-bottom: 1px dotted; }
74
+
75
+ b, strong { font-weight: bold; }
76
+
77
+ blockquote { margin: 1em 40px; }
78
+
79
+ dfn { font-style: italic; }
80
+
81
+ hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
82
+
83
+ ins { background: #ff9; color: #000; text-decoration: none; }
84
+
85
+ mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
86
+
87
+ /* Redeclare monospace font family: en.wikipedia.org/wiki/User:Davidgothberg/Test59 */
88
+ pre, code, kbd, samp { font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 1em; }
89
+
90
+ /* Improve readability of pre-formatted text in all browsers */
91
+ pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
92
+
93
+ q { quotes: none; }
94
+ q:before, q:after { content: ""; content: none; }
95
+
96
+ small { font-size: 85%; }
97
+
98
+ /* Position subscript and superscript content without affecting line-height: gist.github.com/413930 */
99
+ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
100
+ sup { top: -0.5em; }
101
+ sub { bottom: -0.25em; }
102
+
103
+
104
+ /* =============================================================================
105
+ Lists
106
+ ========================================================================== */
107
+
108
+ ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
109
+ dd { margin: 0 0 0 40px; }
110
+ nav ul, nav ol { list-style: none; margin: 0; padding: 0; }
111
+
112
+
113
+ /* =============================================================================
114
+ Embedded content
115
+ ========================================================================== */
116
+
117
+ /*
118
+ * 1. Improve image quality when scaled in IE7 http://h5bp.com/d
119
+ * 2. Remove the gap between images and borders on image containers http://h5bp.com/e
120
+ */
121
+
122
+ img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
123
+
124
+ /*
125
+ * Correct overflow displayed oddly in IE9
126
+ */
127
+
128
+ svg:not(:root) { overflow: hidden; }
129
+
130
+
131
+ /* =============================================================================
132
+ Figures
133
+ ========================================================================== */
134
+
135
+ figure { margin: 0; }
136
+
137
+
138
+ /* =============================================================================
139
+ Forms
140
+ ========================================================================== */
141
+
142
+ form { margin: 0; }
143
+ fieldset { border: 0; margin: 0; padding: 0; }
144
+
145
+ /*
146
+ * 1. Correct color not inheriting in IE6/7/8/9
147
+ * 2. Correct alignment displayed oddly in IE6/7
148
+ */
149
+
150
+ legend { border: 0; *margin-left: -7px; padding: 0; }
151
+
152
+ /* Indicate that 'label' will shift focus to the associated form element */
153
+ label { cursor: pointer; }
154
+
155
+ /*
156
+ * 1. Correct font-size not inheriting in all browsers
157
+ * 2. Remove margins in FF3/4 S5 Chrome
158
+ * 3. Define consistent vertical alignment display in all browsers
159
+ */
160
+
161
+ button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
162
+
163
+ /*
164
+ * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
165
+ * 2. Correct inner spacing displayed oddly in IE6/7
166
+ */
167
+
168
+ button, input { line-height: normal; *overflow: visible; }
169
+
170
+ /*
171
+ * 1. Display hand cursor for clickable form elements
172
+ * 2. Allow styling of clickable form elements in iOS
173
+ */
174
+
175
+ button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }
176
+
177
+ /*
178
+ * Consistent box sizing and appearance
179
+ */
180
+
181
+ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }
182
+ input[type="search"] { -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
183
+
184
+ /*
185
+ * Remove inner padding and border in FF3/4
186
+ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
187
+ */
188
+
189
+ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
190
+
191
+ /* Remove default vertical scrollbar in IE6/7/8/9 */
192
+ textarea { overflow: auto; vertical-align: top; }
193
+
194
+ /* Colors for form validity */
195
+ input:valid, textarea:valid { }
196
+ input:invalid, textarea:invalid { background-color: #f0dddd; }
197
+
198
+
199
+ /* =============================================================================
200
+ Tables
201
+ ========================================================================== */
202
+
203
+ table { border-collapse: collapse; border-spacing: 0; }
204
+
205
+
206
+ /* =============================================================================
207
+ Primary styles
208
+ Author:
209
+ ========================================================================== */
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+ /* =============================================================================
227
+ Non-semantic helper classes
228
+ Please define your styles before this section.
229
+ ========================================================================== */
230
+
231
+ /* For image replacement */
232
+ .ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
233
+ .ir br { display: none; }
234
+
235
+ /* Hide for both screenreaders and browsers:
236
+ css-discuss.incutio.com/wiki/Screenreader_Visibility */
237
+ .hidden { display: none; visibility: hidden; }
238
+
239
+ /* Hide only visually, but have it available for screenreaders: by Jon Neal.
240
+ www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden */
241
+ .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
242
+
243
+ /* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: drupal.org/node/897638 */
244
+ .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
245
+
246
+ /* Hide visually and from screenreaders, but maintain layout */
247
+ .invisible { visibility: hidden; }
248
+
249
+ /* Contain floats: nicolasgallagher.com/micro-clearfix-hack/ */
250
+ .clearfix:before, .clearfix:after { content: ""; display: table; }
251
+ .clearfix:after { clear: both; }
252
+ .clearfix { zoom: 1; }
253
+
254
+
255
+
256
+ /* =============================================================================
257
+ PLACEHOLDER Media Queries for Responsive Design.
258
+ These override the primary ('mobile first') styles
259
+ Modify as content requires.
260
+ ========================================================================== */
261
+
262
+ @media only screen and (min-width: 480px) {
263
+ /* Style adjustments for viewports 480px and over go here */
264
+
265
+ }
266
+
267
+ @media only screen and (min-width: 768px) {
268
+ /* Style adjustments for viewports 768px and over go here */
269
+
270
+ }
271
+
272
+
273
+
274
+ /* =============================================================================
275
+ Print styles.
276
+ Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
277
+ ========================================================================== */
278
+
279
+ @media print {
280
+ * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */
281
+ a, a:visited { text-decoration: underline; }
282
+ a[href]:after { content: " (" attr(href) ")"; }
283
+ abbr[title]:after { content: " (" attr(title) ")"; }
284
+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
285
+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
286
+ thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
287
+ tr, img { page-break-inside: avoid; }
288
+ img { max-width: 100% !important; }
289
+ @page { margin: 0.5cm; }
290
+ p, h2, h3 { orphans: 3; widows: 3; }
291
+ h2, h3 { page-break-after: avoid; }
292
+ }