enjoy_cms 0.1.0.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/.rspec +1 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/Gemfile +5 -0
  7. data/Gemfile.lock +249 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +137 -0
  10. data/Rakefile +1 -0
  11. data/app/assets/javascripts/enjoy_cms.coffee +6 -0
  12. data/app/assets/javascripts/enjoy_cms/flash.js.coffee +3 -0
  13. data/app/assets/javascripts/enjoy_cms/map.js.coffee +22 -0
  14. data/app/assets/javascripts/head.load.js +707 -0
  15. data/app/assets/javascripts/jquery.placeholder.js +157 -0
  16. data/app/assets/stylesheets/enjoy_cms.sass +5 -0
  17. data/app/assets/stylesheets/enjoy_cms/flash.sass +63 -0
  18. data/app/assets/stylesheets/enjoy_cms/normalize.scss +406 -0
  19. data/app/assets/stylesheets/enjoy_cms/powered.sass +18 -0
  20. data/app/controllers/concerns/enjoy/errors.rb +93 -0
  21. data/app/controllers/concerns/enjoy/fancybox.rb +14 -0
  22. data/app/controllers/concerns/enjoy/localizeable.rb +33 -0
  23. data/app/controllers/concerns/enjoy/nav_menu.rb +64 -0
  24. data/app/controllers/concerns/enjoy/no_cache.rb +12 -0
  25. data/app/controllers/concerns/enjoy/seo_pages.rb +83 -0
  26. data/app/controllers/enjoy/contacts_controller.rb +5 -0
  27. data/app/controllers/enjoy/home_controller.rb +6 -0
  28. data/app/controllers/enjoy/news_controller.rb +5 -0
  29. data/app/controllers/enjoy/pages_controller.rb +5 -0
  30. data/app/controllers/enjoy/search_controller.rb +6 -0
  31. data/app/helpers/enjoy/gzip_helper.rb +27 -0
  32. data/app/helpers/enjoy/powered_helper.rb +12 -0
  33. data/app/mailers/enjoy/contact_mailer.rb +17 -0
  34. data/app/models/concerns/enjoy/boolean_field.rb +17 -0
  35. data/app/models/concerns/enjoy/enableable.rb +8 -0
  36. data/app/models/concerns/enjoy/geocodeable.rb +4 -0
  37. data/app/models/concerns/enjoy/mappable.rb +95 -0
  38. data/app/models/concerns/enjoy/mongoid_paperclip.rb +37 -0
  39. data/app/models/concerns/enjoy/seoable.rb +36 -0
  40. data/app/models/concerns/enjoy/sitemap_data.rb +23 -0
  41. data/app/models/concerns/enjoy/sort_field.rb +20 -0
  42. data/app/models/concerns/enjoy/sortable.rb +8 -0
  43. data/app/models/enjoy/contact_message.rb +12 -0
  44. data/app/models/enjoy/embedded_element.rb +15 -0
  45. data/app/models/enjoy/embedded_gallery_image.rb +15 -0
  46. data/app/models/enjoy/gallery.rb +10 -0
  47. data/app/models/enjoy/gallery_image.rb +10 -0
  48. data/app/models/enjoy/menu.rb +12 -0
  49. data/app/models/enjoy/news.rb +12 -0
  50. data/app/models/enjoy/page.rb +12 -0
  51. data/app/models/enjoy/seo.rb +13 -0
  52. data/app/views/blocks/_favicon.html.slim +21 -0
  53. data/app/views/blocks/_footer.html.slim +1 -0
  54. data/app/views/blocks/_seo_block.html.slim +18 -0
  55. data/app/views/blocks/_seo_block_with_obj.html.slim +27 -0
  56. data/app/views/devise/registrations/edit.html.slim +21 -0
  57. data/app/views/devise/registrations/new.html.slim +21 -0
  58. data/app/views/devise/sessions/new.html.slim +22 -0
  59. data/app/views/devise/shared/_links.html.slim +11 -0
  60. data/app/views/enjoy/contact_mailer/new_message_email.html.slim +15 -0
  61. data/app/views/enjoy/contacts/index.html.slim +10 -0
  62. data/app/views/enjoy/contacts/new.html.slim +10 -0
  63. data/app/views/enjoy/contacts/sent.html.slim +4 -0
  64. data/app/views/enjoy/home/index.html.slim +1 -0
  65. data/app/views/enjoy/news/index.html.slim +9 -0
  66. data/app/views/enjoy/news/show.html.slim +8 -0
  67. data/app/views/enjoy/pages/show.html.slim +1 -0
  68. data/app/views/enjoy/search/index.html.slim +19 -0
  69. data/app/views/errors/_base.html.slim +3 -0
  70. data/app/views/errors/error_403.html.slim +1 -0
  71. data/app/views/errors/error_404.html.slim +1 -0
  72. data/app/views/errors/error_500.html.slim +1 -0
  73. data/app/views/layouts/application.html.slim +25 -0
  74. data/app/views/rails_admin/main/_check_boxes.html.slim +27 -0
  75. data/app/views/rails_admin/main/_enum_check_boxes.html.slim +5 -0
  76. data/app/views/rails_admin/main/_enum_radio_buttons.html.slim +5 -0
  77. data/app/views/rails_admin/main/_form_raw.html.slim +1 -0
  78. data/app/views/shared/_admin_link.html.slim +3 -0
  79. data/app/views/shared/_messages.html.slim +7 -0
  80. data/app/views/shared/_meta.html.slim +19 -0
  81. data/app/views/shared/_obj.html.slim +21 -0
  82. data/app/views/shared/_og.html.slim +4 -0
  83. data/app/views/simple_captcha/_simple_captcha.html.slim +12 -0
  84. data/config/initializers/simple_captcha.rb +29 -0
  85. data/config/locales/en.enjoy.yml +29 -0
  86. data/config/locales/en.enjoy_admin.yml +6 -0
  87. data/config/locales/ru.cancan.yml +4 -0
  88. data/config/locales/ru.devise.yml +65 -0
  89. data/config/locales/ru.enjoy.yml +39 -0
  90. data/config/locales/ru.enjoy_admin.yml +6 -0
  91. data/config/locales/ru.kaminari.yml +17 -0
  92. data/config/locales/ru.models.yml +103 -0
  93. data/config/locales/ru.mongoid.yml +450 -0
  94. data/config/locales/ru.rails_admin.yml +148 -0
  95. data/config/locales/ru.simple_captcha.yml +3 -0
  96. data/config/locales/ru.simple_form.yml +9 -0
  97. data/config/routes.rb +14 -0
  98. data/enjoy_cms.gemspec +53 -0
  99. data/lib/enjoy/admin.rb +350 -0
  100. data/lib/enjoy/admin/contact_message.rb +36 -0
  101. data/lib/enjoy/admin/embedded_element.rb +11 -0
  102. data/lib/enjoy/admin/embedded_gallery_image.rb +15 -0
  103. data/lib/enjoy/admin/gallery.rb +20 -0
  104. data/lib/enjoy/admin/gallery_image.rb +18 -0
  105. data/lib/enjoy/admin/menu.rb +27 -0
  106. data/lib/enjoy/admin/news.rb +57 -0
  107. data/lib/enjoy/admin/page.rb +81 -0
  108. data/lib/enjoy/admin/seo.rb +17 -0
  109. data/lib/enjoy/configuration.rb +73 -0
  110. data/lib/enjoy/controller.rb +31 -0
  111. data/lib/enjoy/controllers/contacts.rb +70 -0
  112. data/lib/enjoy/controllers/news.rb +36 -0
  113. data/lib/enjoy/controllers/pages.rb +22 -0
  114. data/lib/enjoy/controllers/search.rb +62 -0
  115. data/lib/enjoy/elastic_search.rb +31 -0
  116. data/lib/enjoy/engine.rb +46 -0
  117. data/lib/enjoy/migration.rb +34 -0
  118. data/lib/enjoy/model.rb +22 -0
  119. data/lib/enjoy/models/active_record/contact_message.rb +14 -0
  120. data/lib/enjoy/models/active_record/menu.rb +17 -0
  121. data/lib/enjoy/models/active_record/news.rb +26 -0
  122. data/lib/enjoy/models/active_record/page.rb +20 -0
  123. data/lib/enjoy/models/active_record/seo.rb +17 -0
  124. data/lib/enjoy/models/contact_message.rb +37 -0
  125. data/lib/enjoy/models/embedded_element.rb +12 -0
  126. data/lib/enjoy/models/embedded_gallery_image.rb +16 -0
  127. data/lib/enjoy/models/gallery.rb +29 -0
  128. data/lib/enjoy/models/gallery_image.rb +23 -0
  129. data/lib/enjoy/models/menu.rb +28 -0
  130. data/lib/enjoy/models/mongoid/contact_message.rb +20 -0
  131. data/lib/enjoy/models/mongoid/embedded_element.rb +13 -0
  132. data/lib/enjoy/models/mongoid/embedded_gallery_image.rb +19 -0
  133. data/lib/enjoy/models/mongoid/gallery.rb +23 -0
  134. data/lib/enjoy/models/mongoid/gallery_image.rb +21 -0
  135. data/lib/enjoy/models/mongoid/menu.rb +15 -0
  136. data/lib/enjoy/models/mongoid/news.rb +29 -0
  137. data/lib/enjoy/models/mongoid/page.rb +25 -0
  138. data/lib/enjoy/models/mongoid/seo.rb +28 -0
  139. data/lib/enjoy/models/news.rb +58 -0
  140. data/lib/enjoy/models/page.rb +90 -0
  141. data/lib/enjoy/models/seo.rb +22 -0
  142. data/lib/enjoy/patch.rb +58 -0
  143. data/lib/enjoy/rails_admin_menu.rb +145 -0
  144. data/lib/enjoy/simple_form_patch.rb +12 -0
  145. data/lib/enjoy/tasks.rb +13 -0
  146. data/lib/enjoy/version.rb +3 -0
  147. data/lib/enjoy_cms.rb +109 -0
  148. data/lib/filename_to_slug.rb +34 -0
  149. data/lib/generators/enjoy/ability_generator.rb +14 -0
  150. data/lib/generators/enjoy/admin_generator.rb +21 -0
  151. data/lib/generators/enjoy/capify_generator.rb +39 -0
  152. data/lib/generators/enjoy/layout_generator.rb +14 -0
  153. data/lib/generators/enjoy/migration_generator.rb +18 -0
  154. data/lib/generators/enjoy/templates/Capfile +17 -0
  155. data/lib/generators/enjoy/templates/ability.erb +26 -0
  156. data/lib/generators/enjoy/templates/admin.erb +89 -0
  157. data/lib/generators/enjoy/templates/deploy.erb +47 -0
  158. data/lib/generators/enjoy/templates/dl.erb +30 -0
  159. data/lib/generators/enjoy/templates/migration_contact_messages.rb +15 -0
  160. data/lib/generators/enjoy/templates/migration_news.rb +26 -0
  161. data/lib/generators/enjoy/templates/migration_pages.rb +45 -0
  162. data/lib/generators/enjoy/templates/migration_seos.rb +14 -0
  163. data/lib/generators/enjoy/templates/production.erb +8 -0
  164. data/lib/generators/enjoy/templates/unicorn.erb +66 -0
  165. data/lib/generators/enjoy/utils.rb +21 -0
  166. data/lib/manual_slug.rb +10 -0
  167. data/lib/manual_slug/active_record.rb +32 -0
  168. data/lib/manual_slug/mongoid.rb +36 -0
  169. data/lib/rails_admin/custom_show_in_app.rb +43 -0
  170. data/release.sh +13 -0
  171. data/template.rb +824 -0
  172. metadata +579 -0
@@ -0,0 +1,157 @@
1
+ /*! http://mths.be/placeholder v2.0.7 by @mathias */
2
+ ;(function(window, document, $) {
3
+
4
+ var isInputSupported = 'placeholder' in document.createElement('input'),
5
+ isTextareaSupported = 'placeholder' in document.createElement('textarea'),
6
+ prototype = $.fn,
7
+ valHooks = $.valHooks,
8
+ hooks,
9
+ placeholder;
10
+
11
+ if (isInputSupported && isTextareaSupported) {
12
+
13
+ placeholder = prototype.placeholder = function() {
14
+ return this;
15
+ };
16
+
17
+ placeholder.input = placeholder.textarea = true;
18
+
19
+ } else {
20
+
21
+ placeholder = prototype.placeholder = function() {
22
+ var $this = this;
23
+ $this
24
+ .filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
25
+ .not('.placeholder')
26
+ .bind({
27
+ 'focus.placeholder': clearPlaceholder,
28
+ 'blur.placeholder': setPlaceholder
29
+ })
30
+ .data('placeholder-enabled', true)
31
+ .trigger('blur.placeholder');
32
+ return $this;
33
+ };
34
+
35
+ placeholder.input = isInputSupported;
36
+ placeholder.textarea = isTextareaSupported;
37
+
38
+ hooks = {
39
+ 'get': function(element) {
40
+ var $element = $(element);
41
+ return $element.data('placeholder-enabled') && $element.hasClass('placeholder') ? '' : element.value;
42
+ },
43
+ 'set': function(element, value) {
44
+ var $element = $(element);
45
+ if (!$element.data('placeholder-enabled')) {
46
+ return element.value = value;
47
+ }
48
+ if (value == '') {
49
+ element.value = value;
50
+ // Issue #56: Setting the placeholder causes problems if the element continues to have focus.
51
+ if (element != document.activeElement) {
52
+ // We can't use `triggerHandler` here because of dummy text/password inputs :(
53
+ setPlaceholder.call(element);
54
+ }
55
+ } else if ($element.hasClass('placeholder')) {
56
+ clearPlaceholder.call(element, true, value) || (element.value = value);
57
+ } else {
58
+ element.value = value;
59
+ }
60
+ // `set` can not return `undefined`; see http://jsapi.info/jquery/1.7.1/val#L2363
61
+ return $element;
62
+ }
63
+ };
64
+
65
+ isInputSupported || (valHooks.input = hooks);
66
+ isTextareaSupported || (valHooks.textarea = hooks);
67
+
68
+ $(function() {
69
+ // Look for forms
70
+ $(document).delegate('form', 'submit.placeholder', function() {
71
+ // Clear the placeholder values so they don't get submitted
72
+ var $inputs = $('.placeholder', this).each(clearPlaceholder);
73
+ setTimeout(function() {
74
+ $inputs.each(setPlaceholder);
75
+ }, 10);
76
+ });
77
+ });
78
+
79
+ // Clear placeholder values upon page reload
80
+ $(window).bind('beforeunload.placeholder', function() {
81
+ $('.placeholder').each(function() {
82
+ this.value = '';
83
+ });
84
+ });
85
+
86
+ }
87
+
88
+ function args(elem) {
89
+ // Return an object of element attributes
90
+ var newAttrs = {},
91
+ rinlinejQuery = /^jQuery\d+$/;
92
+ $.each(elem.attributes, function(i, attr) {
93
+ if (attr.specified && !rinlinejQuery.test(attr.name)) {
94
+ newAttrs[attr.name] = attr.value;
95
+ }
96
+ });
97
+ return newAttrs;
98
+ }
99
+
100
+ function clearPlaceholder(event, value) {
101
+ var input = this,
102
+ $input = $(input);
103
+ if (input.value == $input.attr('placeholder') && $input.hasClass('placeholder')) {
104
+ if ($input.data('placeholder-password')) {
105
+ $input = $input.hide().next().show().attr('id', $input.removeAttr('id').data('placeholder-id'));
106
+ // If `clearPlaceholder` was called from `$.valHooks.input.set`
107
+ if (event === true) {
108
+ return $input[0].value = value;
109
+ }
110
+ $input.focus();
111
+ } else {
112
+ input.value = '';
113
+ $input.removeClass('placeholder');
114
+ input == document.activeElement && input.select();
115
+ }
116
+ }
117
+ }
118
+
119
+ function setPlaceholder() {
120
+ var $replacement,
121
+ input = this,
122
+ $input = $(input),
123
+ $origInput = $input,
124
+ id = this.id;
125
+ if (input.value == '') {
126
+ if (input.type == 'password') {
127
+ if (!$input.data('placeholder-textinput')) {
128
+ try {
129
+ $replacement = $input.clone().attr({ 'type': 'text' });
130
+ } catch(e) {
131
+ $replacement = $('<input>').attr($.extend(args(this), { 'type': 'text' }));
132
+ }
133
+ $replacement
134
+ .removeAttr('name')
135
+ .data({
136
+ 'placeholder-password': true,
137
+ 'placeholder-id': id
138
+ })
139
+ .bind('focus.placeholder', clearPlaceholder);
140
+ $input
141
+ .data({
142
+ 'placeholder-textinput': $replacement,
143
+ 'placeholder-id': id
144
+ })
145
+ .before($replacement);
146
+ }
147
+ $input = $input.removeAttr('id').hide().prev().attr('id', id).show();
148
+ // Note: `$input[0] != input` now!
149
+ }
150
+ $input.addClass('placeholder');
151
+ $input[0].value = $input.attr('placeholder');
152
+ } else {
153
+ $input.removeClass('placeholder');
154
+ }
155
+ }
156
+
157
+ }(this, document, jQuery));
@@ -0,0 +1,5 @@
1
+ @import enjoy_cms/*
2
+
3
+ html
4
+ -moz-font-smoothing: antialiased
5
+ -webkit-font-smoothing: antialiased
@@ -0,0 +1,63 @@
1
+ .flash
2
+ margin: 0 auto
3
+ padding: 10px 0
4
+ width: 530px
5
+
6
+ .message
7
+ border-radius: 3px
8
+ behavior: url('/PIE.htc')
9
+ text-align: center
10
+ margin: 0 auto 15px
11
+ color: white
12
+ font-family: Tahoma
13
+ font-size: 17px
14
+ position: relative
15
+ a.close_flash
16
+ cursor: pointer
17
+ position: absolute
18
+ top: 1px
19
+ right: 2px
20
+ font-weight: bold
21
+ text-shadow: none
22
+ text-decoration: none
23
+ font-family: Arial
24
+ &:hover
25
+ opacity: 0.8
26
+
27
+ p
28
+ margin: 5px 10px 7px
29
+ color: white
30
+ font-size: 17px
31
+ line-height: 1.2
32
+
33
+ .success
34
+ border: 1px solid #009357
35
+ background: #02bb6f
36
+ +background(linear-gradient(top, #02bb6f, #019f4b))
37
+ text-shadow: 0px 1px #006d1c
38
+ a.close_flash
39
+ color: #004b2c
40
+
41
+ .notice
42
+ border: 1px solid #69b3d1
43
+ background: #79cdee
44
+ +background(linear-gradient(top, #79cdee, #56b6e5))
45
+ text-shadow: 0px 1px #248cd1
46
+ a.close_flash
47
+ color: #2f5f72
48
+
49
+ .warning
50
+ border: 1px solid #ce8f4b
51
+ background: #fbae5c
52
+ +background(linear-gradient(top, #fbae5c, #f9903b))
53
+ text-shadow: 0px 1px #f57024
54
+ a.close_flash
55
+ color: #865623
56
+
57
+ .error, .alert
58
+ border: 1px solid #ce4549
59
+ background: #f0565b
60
+ +background(linear-gradient(top, #f0565b, #e83639))
61
+ text-shadow: 0px 1px #d71012
62
+ a.close_flash
63
+ color: #782124
@@ -0,0 +1,406 @@
1
+ /*! normalize.css v2.1.3 | MIT License | git.io/normalize */
2
+
3
+ /* ==========================================================================
4
+ HTML5 display definitions
5
+ ========================================================================== */
6
+
7
+ /**
8
+ * Correct `block` display not defined in IE 8/9.
9
+ */
10
+
11
+ article,
12
+ aside,
13
+ details,
14
+ figcaption,
15
+ figure,
16
+ footer,
17
+ header,
18
+ hgroup,
19
+ main,
20
+ nav,
21
+ section,
22
+ summary {
23
+ display: block;
24
+ }
25
+
26
+ /**
27
+ * Correct `inline-block` display not defined in IE 8/9.
28
+ */
29
+
30
+ audio,
31
+ canvas,
32
+ video {
33
+ display: inline-block;
34
+ }
35
+
36
+ /**
37
+ * Prevent modern browsers from displaying `audio` without controls.
38
+ * Remove excess height in iOS 5 devices.
39
+ */
40
+
41
+ audio:not([controls]) {
42
+ display: none;
43
+ height: 0;
44
+ }
45
+
46
+ /**
47
+ * Address `[hidden]` styling not present in IE 8/9.
48
+ * Hide the `template` element in IE, Safari, and Firefox < 22.
49
+ */
50
+
51
+ [hidden],
52
+ template {
53
+ display: none;
54
+ }
55
+
56
+ /* ==========================================================================
57
+ Base
58
+ ========================================================================== */
59
+
60
+ /**
61
+ * 1. Set default font family to sans-serif.
62
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
63
+ * user zoom.
64
+ */
65
+
66
+ html {
67
+ font-family: sans-serif; /* 1 */
68
+ -ms-text-size-adjust: 100%; /* 2 */
69
+ -webkit-text-size-adjust: 100%; /* 2 */
70
+ }
71
+
72
+ /**
73
+ * Remove default margin.
74
+ */
75
+
76
+ body {
77
+ margin: 0;
78
+ }
79
+
80
+ /* ==========================================================================
81
+ Links
82
+ ========================================================================== */
83
+
84
+ /**
85
+ * Remove the gray background color from active links in IE 10.
86
+ */
87
+
88
+ a {
89
+ background: transparent;
90
+ }
91
+
92
+ /**
93
+ * Address `outline` inconsistency between Chrome and other browsers.
94
+ */
95
+
96
+ a:focus {
97
+ outline: thin dotted;
98
+ }
99
+
100
+ /**
101
+ * Improve readability when focused and also mouse hovered in all browsers.
102
+ */
103
+
104
+ a:active,
105
+ a:hover {
106
+ outline: 0;
107
+ }
108
+
109
+ /* ==========================================================================
110
+ Typography
111
+ ========================================================================== */
112
+
113
+ /**
114
+ * Address variable `h1` font-size and margin within `section` and `article`
115
+ * contexts in Firefox 4+, Safari 5, and Chrome.
116
+ */
117
+
118
+ h1 {
119
+ font-size: 2em;
120
+ margin: 0.67em 0;
121
+ }
122
+
123
+ /**
124
+ * Address styling not present in IE 8/9, Safari 5, and Chrome.
125
+ */
126
+
127
+ abbr[title] {
128
+ border-bottom: 1px dotted;
129
+ }
130
+
131
+ /**
132
+ * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
133
+ */
134
+
135
+ b,
136
+ strong {
137
+ font-weight: bold;
138
+ }
139
+
140
+ /**
141
+ * Address styling not present in Safari 5 and Chrome.
142
+ */
143
+
144
+ dfn {
145
+ font-style: italic;
146
+ }
147
+
148
+ /**
149
+ * Address differences between Firefox and other browsers.
150
+ */
151
+
152
+ hr {
153
+ -moz-box-sizing: content-box;
154
+ box-sizing: content-box;
155
+ height: 0;
156
+ }
157
+
158
+ /**
159
+ * Address styling not present in IE 8/9.
160
+ */
161
+
162
+ mark {
163
+ background: #ff0;
164
+ color: #000;
165
+ }
166
+
167
+ /**
168
+ * Correct font family set oddly in Safari 5 and Chrome.
169
+ */
170
+
171
+ code,
172
+ kbd,
173
+ pre,
174
+ samp {
175
+ font-family: monospace, serif;
176
+ font-size: 1em;
177
+ }
178
+
179
+ /**
180
+ * Improve readability of pre-formatted text in all browsers.
181
+ */
182
+
183
+ pre {
184
+ white-space: pre-wrap;
185
+ }
186
+
187
+ /**
188
+ * Set consistent quote types.
189
+ */
190
+
191
+ q {
192
+ quotes: "\201C" "\201D" "\2018" "\2019";
193
+ }
194
+
195
+ /**
196
+ * Address inconsistent and variable font size in all browsers.
197
+ */
198
+
199
+ small {
200
+ font-size: 80%;
201
+ }
202
+
203
+ /**
204
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
205
+ */
206
+
207
+ sub,
208
+ sup {
209
+ font-size: 75%;
210
+ line-height: 0;
211
+ position: relative;
212
+ vertical-align: baseline;
213
+ }
214
+
215
+ sup {
216
+ top: -0.5em;
217
+ }
218
+
219
+ sub {
220
+ bottom: -0.25em;
221
+ }
222
+
223
+ /* ==========================================================================
224
+ Embedded content
225
+ ========================================================================== */
226
+
227
+ /**
228
+ * Remove border when inside `a` element in IE 8/9.
229
+ */
230
+
231
+ img {
232
+ border: 0;
233
+ }
234
+
235
+ /**
236
+ * Correct overflow displayed oddly in IE 9.
237
+ */
238
+
239
+ svg:not(:root) {
240
+ overflow: hidden;
241
+ }
242
+
243
+ /* ==========================================================================
244
+ Figures
245
+ ========================================================================== */
246
+
247
+ /**
248
+ * Address margin not present in IE 8/9 and Safari 5.
249
+ */
250
+
251
+ figure {
252
+ margin: 0;
253
+ }
254
+
255
+ /* ==========================================================================
256
+ Forms
257
+ ========================================================================== */
258
+
259
+ /**
260
+ * Define consistent border, margin, and padding.
261
+ */
262
+
263
+ fieldset {
264
+ border: 1px solid #c0c0c0;
265
+ margin: 0 2px;
266
+ padding: 0.35em 0.625em 0.75em;
267
+ }
268
+
269
+ /**
270
+ * 1. Correct `color` not being inherited in IE 8/9.
271
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
272
+ */
273
+
274
+ legend {
275
+ border: 0; /* 1 */
276
+ padding: 0; /* 2 */
277
+ }
278
+
279
+ /**
280
+ * 1. Correct font family not being inherited in all browsers.
281
+ * 2. Correct font size not being inherited in all browsers.
282
+ * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
283
+ */
284
+
285
+ button,
286
+ input,
287
+ select,
288
+ textarea {
289
+ font-family: inherit; /* 1 */
290
+ font-size: 100%; /* 2 */
291
+ margin: 0; /* 3 */
292
+ }
293
+
294
+ /**
295
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
296
+ * the UA stylesheet.
297
+ */
298
+
299
+ button,
300
+ input {
301
+ line-height: normal;
302
+ }
303
+
304
+ /**
305
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
306
+ * All other form control elements do not inherit `text-transform` values.
307
+ * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
308
+ * Correct `select` style inheritance in Firefox 4+ and Opera.
309
+ */
310
+
311
+ button,
312
+ select {
313
+ text-transform: none;
314
+ }
315
+
316
+ /**
317
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
318
+ * and `video` controls.
319
+ * 2. Correct inability to style clickable `input` types in iOS.
320
+ * 3. Improve usability and consistency of cursor style between image-type
321
+ * `input` and others.
322
+ */
323
+
324
+ button,
325
+ html input[type="button"], /* 1 */
326
+ input[type="reset"],
327
+ input[type="submit"] {
328
+ -webkit-appearance: button; /* 2 */
329
+ cursor: pointer; /* 3 */
330
+ }
331
+
332
+ /**
333
+ * Re-set default cursor for disabled elements.
334
+ */
335
+
336
+ button[disabled],
337
+ html input[disabled] {
338
+ cursor: default;
339
+ }
340
+
341
+ /**
342
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
343
+ * 2. Remove excess padding in IE 8/9/10.
344
+ */
345
+
346
+ input[type="checkbox"],
347
+ input[type="radio"] {
348
+ box-sizing: border-box; /* 1 */
349
+ padding: 0; /* 2 */
350
+ }
351
+
352
+ /**
353
+ * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
354
+ * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
355
+ * (include `-moz` to future-proof).
356
+ */
357
+
358
+ input[type="search"] {
359
+ -webkit-appearance: textfield; /* 1 */
360
+ -moz-box-sizing: content-box;
361
+ -webkit-box-sizing: content-box; /* 2 */
362
+ box-sizing: content-box;
363
+ }
364
+
365
+ /**
366
+ * Remove inner padding and search cancel button in Safari 5 and Chrome
367
+ * on OS X.
368
+ */
369
+
370
+ input[type="search"]::-webkit-search-cancel-button,
371
+ input[type="search"]::-webkit-search-decoration {
372
+ -webkit-appearance: none;
373
+ }
374
+
375
+ /**
376
+ * Remove inner padding and border in Firefox 4+.
377
+ */
378
+
379
+ button::-moz-focus-inner,
380
+ input::-moz-focus-inner {
381
+ border: 0;
382
+ padding: 0;
383
+ }
384
+
385
+ /**
386
+ * 1. Remove default vertical scrollbar in IE 8/9.
387
+ * 2. Improve readability and alignment in all browsers.
388
+ */
389
+
390
+ textarea {
391
+ overflow: auto; /* 1 */
392
+ vertical-align: top; /* 2 */
393
+ }
394
+
395
+ /* ==========================================================================
396
+ Tables
397
+ ========================================================================== */
398
+
399
+ /**
400
+ * Remove most spacing between table cells.
401
+ */
402
+
403
+ table {
404
+ border-collapse: collapse;
405
+ border-spacing: 0;
406
+ }