zen 0.2.4.1 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. data/MANIFEST +42 -33
  2. data/README.md +14 -27
  3. data/ROADMAP.md +20 -2
  4. data/{Thorfile → Rakefile} +2 -3
  5. data/bin/zen +27 -5
  6. data/lib/zen.rb +70 -52
  7. data/lib/zen/asset.rb +258 -0
  8. data/lib/zen/bin/app.rb +42 -0
  9. data/lib/zen/controller/admin_controller.rb +53 -36
  10. data/lib/zen/controller/base_controller.rb +13 -8
  11. data/lib/zen/controller/frontend_controller.rb +4 -3
  12. data/lib/zen/controller/main_controller.rb +17 -33
  13. data/lib/zen/error/validation_error.rb +10 -0
  14. data/lib/zen/ext/string.rb +185 -0
  15. data/lib/zen/helper/acl.rb +120 -92
  16. data/lib/zen/helper/common.rb +1 -3
  17. data/lib/zen/helper/theme.rb +73 -0
  18. data/lib/zen/language.rb +66 -57
  19. data/lib/zen/layout/admin.xhtml +5 -48
  20. data/lib/zen/layout/login.xhtml +4 -44
  21. data/lib/zen/model/methods.rb +1 -1
  22. data/lib/zen/model/settings.rb +0 -3
  23. data/lib/zen/package.rb +101 -83
  24. data/lib/zen/package/base.rb +62 -0
  25. data/lib/zen/package/categories/lib/categories.rb +29 -10
  26. data/lib/zen/package/categories/lib/categories/controller/categories.rb +4 -5
  27. data/lib/zen/package/categories/lib/categories/controller/category_groups.rb +4 -5
  28. data/lib/zen/package/categories/lib/categories/language/en/category_groups.yml +4 -3
  29. data/lib/zen/package/categories/lib/categories/model/category.rb +2 -2
  30. data/lib/zen/package/categories/lib/categories/model/category_group.rb +3 -3
  31. data/lib/zen/package/categories/lib/categories/plugin/categories.rb +130 -0
  32. data/lib/zen/package/categories/lib/categories/view/admin/categories/form.xhtml +1 -1
  33. data/lib/zen/package/categories/lib/categories/view/admin/categories/index.xhtml +2 -2
  34. data/lib/zen/package/categories/lib/categories/view/admin/category-groups/index.xhtml +11 -6
  35. data/lib/zen/package/comments/lib/comments.rb +23 -13
  36. data/lib/zen/package/comments/lib/comments/controller/comments.rb +4 -5
  37. data/lib/zen/package/comments/lib/comments/controller/comments_form.rb +7 -8
  38. data/lib/zen/package/comments/lib/comments/model/comment.rb +4 -4
  39. data/lib/zen/package/comments/lib/comments/plugin/comments.rb +111 -0
  40. data/lib/zen/package/comments/lib/comments/view/admin/comments/form.xhtml +2 -2
  41. data/lib/zen/package/comments/lib/comments/view/admin/comments/index.xhtml +3 -3
  42. data/lib/zen/package/custom_fields/lib/custom_fields.rb +18 -11
  43. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_groups.rb +4 -5
  44. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_fields.rb +4 -5
  45. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field.rb +2 -2
  46. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_group.rb +3 -3
  47. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_value.rb +3 -3
  48. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-groups/index.xhtml +9 -5
  49. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-fields/form.xhtml +1 -1
  50. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-fields/index.xhtml +3 -3
  51. data/lib/zen/package/menus/lib/menus.rb +25 -43
  52. data/lib/zen/package/menus/lib/menus/controller/menu_items.rb +5 -6
  53. data/lib/zen/package/menus/lib/menus/controller/menus.rb +9 -5
  54. data/lib/zen/package/menus/lib/menus/helper/menu_item.rb +4 -4
  55. data/lib/zen/package/menus/lib/menus/model/menu.rb +2 -2
  56. data/lib/zen/package/menus/lib/menus/model/menu_item.rb +4 -1
  57. data/lib/zen/package/menus/lib/menus/plugin/menus.rb +152 -0
  58. data/lib/zen/package/menus/lib/menus/view/admin/menu-items/form.xhtml +1 -1
  59. data/lib/zen/package/menus/lib/menus/view/admin/menu-items/index.xhtml +3 -3
  60. data/lib/zen/package/menus/lib/menus/view/admin/menus/index.xhtml +7 -7
  61. data/lib/zen/package/sections/lib/sections.rb +32 -16
  62. data/lib/zen/package/sections/lib/sections/controller/section_entries.rb +9 -18
  63. data/lib/zen/package/sections/lib/sections/controller/sections.rb +8 -9
  64. data/lib/zen/package/sections/lib/sections/language/en/section_entries.yml +1 -1
  65. data/lib/zen/package/sections/lib/sections/model/section.rb +4 -4
  66. data/lib/zen/package/sections/lib/sections/model/section_entry.rb +9 -10
  67. data/lib/zen/package/sections/lib/sections/plugin/section_entries.rb +224 -0
  68. data/lib/zen/package/sections/lib/sections/plugin/sections.rb +85 -0
  69. data/lib/zen/package/sections/lib/sections/view/admin/form.xhtml +1 -1
  70. data/lib/zen/package/sections/lib/sections/view/admin/index.xhtml +9 -5
  71. data/lib/zen/package/sections/lib/sections/view/admin/section-entries/index.xhtml +2 -2
  72. data/lib/zen/package/settings/lib/settings.rb +145 -10
  73. data/lib/zen/package/settings/lib/settings/controller/settings.rb +28 -24
  74. data/lib/zen/package/settings/lib/settings/language/en/settings.yml +10 -0
  75. data/lib/zen/package/settings/lib/settings/model/setting.rb +3 -64
  76. data/lib/zen/package/settings/lib/settings/plugin/group_base.rb +40 -0
  77. data/lib/zen/package/settings/lib/settings/plugin/setting_base.rb +76 -0
  78. data/lib/zen/package/settings/lib/settings/plugin/settings.rb +236 -0
  79. data/lib/zen/package/settings/lib/settings/view/admin/settings/index.xhtml +20 -49
  80. data/lib/zen/package/settings/migrations/1295597111_create_schema.rb +0 -12
  81. data/lib/zen/package/settings/migrations/1303196915_settings_plugin.rb +31 -0
  82. data/lib/zen/package/users/lib/users.rb +18 -15
  83. data/lib/zen/package/users/lib/users/controller/access_rules.rb +44 -8
  84. data/lib/zen/package/users/lib/users/controller/user_groups.rb +4 -5
  85. data/lib/zen/package/users/lib/users/controller/users.rb +5 -6
  86. data/lib/zen/package/users/lib/users/language/en/access_rules.yml +11 -9
  87. data/lib/zen/package/users/lib/users/model/access_rule.rb +7 -6
  88. data/lib/zen/package/users/lib/users/model/user.rb +4 -4
  89. data/lib/zen/package/users/lib/users/model/user_group.rb +3 -3
  90. data/lib/zen/package/users/lib/users/public/admin/js/users/access_rules.js +50 -0
  91. data/lib/zen/package/users/lib/users/view/admin/access-rules/form.xhtml +32 -29
  92. data/lib/zen/package/users/lib/users/view/admin/access-rules/index.xhtml +8 -6
  93. data/lib/zen/package/users/lib/users/view/admin/user-groups/index.xhtml +3 -3
  94. data/lib/zen/package/users/lib/users/view/admin/users/index.xhtml +2 -2
  95. data/lib/zen/package/users/migrations/1303510943_class_rules.rb +13 -0
  96. data/lib/zen/plugin.rb +110 -104
  97. data/lib/zen/plugin/base.rb +46 -0
  98. data/lib/zen/{liquid/controller_behavior.rb → plugin/controller.rb} +9 -7
  99. data/lib/zen/plugin/helper.rb +47 -0
  100. data/lib/zen/plugin/markup/lib/markup.rb +14 -0
  101. data/lib/zen/plugin/markup/lib/markup/language/en/markup.yml +6 -0
  102. data/lib/zen/plugin/markup/lib/markup/markup.rb +154 -0
  103. data/lib/zen/public/admin/css/forms.css +4 -0
  104. data/lib/zen/public/admin/css/general.css +15 -15
  105. data/lib/zen/public/admin/css/layout.css +10 -10
  106. data/lib/zen/public/admin/css/reset.css +123 -0
  107. data/lib/zen/public/admin/images/icons/accept.png +0 -0
  108. data/lib/zen/public/admin/images/icons/add.png +0 -0
  109. data/lib/zen/public/admin/images/icons/back.png +0 -0
  110. data/lib/zen/public/admin/images/icons/bold.png +0 -0
  111. data/lib/zen/public/admin/images/icons/close.png +0 -0
  112. data/lib/zen/public/admin/images/icons/delete.png +0 -0
  113. data/lib/zen/public/admin/images/icons/edit.png +0 -0
  114. data/lib/zen/public/admin/images/icons/error.png +0 -0
  115. data/lib/zen/public/admin/images/icons/help.png +0 -0
  116. data/lib/zen/public/admin/images/icons/info.png +0 -0
  117. data/lib/zen/public/admin/images/icons/italic.png +0 -0
  118. data/lib/zen/public/admin/images/icons/large/error.png +0 -0
  119. data/lib/zen/public/admin/images/icons/large/notice.png +0 -0
  120. data/lib/zen/public/admin/images/icons/large/success.png +0 -0
  121. data/lib/zen/public/admin/images/icons/link.png +0 -0
  122. data/lib/zen/public/admin/images/icons/logout.png +0 -0
  123. data/lib/zen/public/admin/images/icons/ol.png +0 -0
  124. data/lib/zen/public/admin/images/icons/pdf.png +0 -0
  125. data/lib/zen/public/admin/images/icons/ul.png +0 -0
  126. data/lib/zen/public/admin/images/icons/user.png +0 -0
  127. data/lib/zen/public/admin/images/icons/view.png +0 -0
  128. data/lib/zen/public/admin/js/mootools/core.js +384 -333
  129. data/lib/zen/public/admin/js/mootools/more.js +256 -231
  130. data/lib/zen/public/admin/js/vendor/{datepicker/Picker.Date.js → datepicker.js} +447 -0
  131. data/lib/zen/public/admin/js/vendor/yepnope.js +1 -0
  132. data/lib/zen/public/admin/js/zen/editor/base.js +8 -1
  133. data/lib/zen/public/admin/js/zen/init.js +89 -26
  134. data/lib/zen/public/favicon.ico +0 -0
  135. data/lib/zen/task.rb +7 -0
  136. data/lib/zen/task/build.rake +60 -0
  137. data/lib/zen/task/clean.rake +27 -0
  138. data/lib/zen/task/db.rake +111 -0
  139. data/lib/zen/task/package.rake +67 -0
  140. data/lib/zen/task/plugin.rake +24 -0
  141. data/lib/zen/task/proto.rake +95 -0
  142. data/lib/zen/task/theme.rake +68 -0
  143. data/lib/zen/theme.rb +28 -55
  144. data/lib/zen/theme/base.rb +64 -0
  145. data/lib/zen/validation.rb +149 -0
  146. data/lib/zen/version.rb +1 -1
  147. data/lib/zen/view/bottom.xhtml +6 -0
  148. data/lib/zen/view/main.xhtml +32 -0
  149. data/proto/app/Rakefile +12 -0
  150. data/proto/app/app.rb +6 -6
  151. data/proto/app/config/config.rb +7 -14
  152. data/proto/app/config/database.rb +0 -20
  153. data/proto/app/start.rb +0 -1
  154. data/proto/app/{vendor/themes → task}/.gitkeep +0 -0
  155. data/proto/app/vendor/theme/.gitkeep +0 -0
  156. data/proto/package/lib/package.rb +8 -17
  157. data/proto/package/lib/package/controller/controllers.rb +4 -4
  158. data/proto/package/lib/package/language/en/languages.yml +3 -3
  159. data/proto/package/lib/package/model/model.rb +1 -1
  160. metadata +73 -73
  161. data/lib/zen/bin/base.rb +0 -109
  162. data/lib/zen/helper/asset.rb +0 -106
  163. data/lib/zen/liquid/general.rb +0 -94
  164. data/lib/zen/liquid/redirect.rb +0 -70
  165. data/lib/zen/liquid/strip.rb +0 -60
  166. data/lib/zen/package/categories/lib/categories/liquid/categories.rb +0 -16
  167. data/lib/zen/package/comments/lib/comments/liquid/comment_form.rb +0 -127
  168. data/lib/zen/package/comments/lib/comments/liquid/comments.rb +0 -115
  169. data/lib/zen/package/menus/lib/menus/liquid/menus.rb +0 -152
  170. data/lib/zen/package/sections/lib/sections/liquid/section_entries.rb +0 -228
  171. data/lib/zen/package/sections/lib/sections/liquid/sections.rb +0 -77
  172. data/lib/zen/package/settings/lib/settings/liquid/setting.rb +0 -58
  173. data/lib/zen/package/users/lib/users/liquid/user.rb +0 -77
  174. data/lib/zen/package/users/lib/users/liquid/users.rb +0 -82
  175. data/lib/zen/plugin/markup.rb +0 -30
  176. data/lib/zen/public/admin/css/boilerplate.css +0 -176
  177. data/lib/zen/public/admin/images/general/noise.jpg +0 -0
  178. data/lib/zen/public/admin/js/vendor/datepicker/Picker.Attach.js +0 -137
  179. data/lib/zen/public/admin/js/vendor/datepicker/Picker.js +0 -291
  180. data/lib/zen/public/admin/js/vendor/datepicker/README.md +0 -325
  181. data/lib/zen/public/admin/js/vendor/datepicker/locale.js +0 -16
  182. data/lib/zen/strict_struct.rb +0 -36
  183. data/lib/zen/task/build.rb +0 -123
  184. data/lib/zen/task/clean.rb +0 -46
  185. data/lib/zen/task/db.rb +0 -130
  186. data/lib/zen/task/package.rb +0 -87
  187. data/lib/zen/task/proto.rb +0 -116
  188. data/lib/zen/task/theme.rb +0 -88
  189. data/proto/app/Thorfile +0 -4
@@ -1,77 +0,0 @@
1
- #:nodoc:
2
- module Sections
3
- #:nodoc:
4
- module Liquid
5
- ##
6
- # Tag that can be used to retrieve a number of sections. By default
7
- # all sections will be retrieved but you can specify a specific section
8
- # by setting the "section" key.
9
- #
10
- # @example Basic usage
11
- # {% sections section="pages" %}
12
- # {{description}}
13
- # {% endsections %}
14
- #
15
- # The following arguments can be specified:
16
- #
17
- # * section
18
- # * limit
19
- # * offset
20
- #
21
- # @author Yorick Peterse
22
- # @since 0.1
23
- #
24
- class Sections < ::Liquid::Block
25
- include ::Zen::Liquid::General
26
-
27
- ##
28
- # Creates a new instance of the block and passes the tag name,
29
- # all additional arguments and the HTML to the constructor method.
30
- #
31
- # @author Yorick Peterse
32
- # @param [String] tag_name The name of the tag that was called.
33
- # @param [String] arguments All additional arguments passed as a string.
34
- # @param [String] html The HTML inside the block.
35
- # @since 0.1
36
- #
37
- def initialize(tag_name = 'sections', arguments = '', html = '')
38
- super
39
-
40
- @arguments = {
41
- 'limit' => nil,
42
- 'offset' => nil
43
- }.merge(parse_key_values(arguments))
44
-
45
- end
46
-
47
- ##
48
- # Renders the tag.
49
- #
50
- # @author Yorick Peterse
51
- # @param [Object] context The Liquid context for the current tag.
52
- # @return [Array]
53
- #
54
- def render(context)
55
- result = []
56
-
57
- if !@arguments.key?('section')
58
- sections = ::Sections::Models::Section.limit(@arguments['limit'], @arguments['offset'])
59
- else
60
- sections = ::Sections::Models::Section.filter(:slug => @arguments['section'])
61
- .limit(@arguments['limit'], @arguments['offset'])
62
- end
63
-
64
- sections.each do |s|
65
- s.values.each do |k, v|
66
- context[k.to_s] =v
67
- end
68
-
69
- result.push(render_all(@nodelist, context))
70
- end
71
-
72
- result.push(render_all(@nodelist, context)) if result.empty?
73
- return result
74
- end
75
- end
76
- end
77
- end
@@ -1,58 +0,0 @@
1
- #:nodoc:
2
- module Settings
3
- #:nodoc:
4
- module Liquid
5
- ##
6
- # Tag that can be used to retrieve the values of the given setting.
7
- # Using this tag couldn't be easier:
8
- #
9
- # {% settings "website_name" %}
10
- #
11
- # It's not required to specify quotes as setting keys don't contain
12
- # spaces but it's generally considered a good practice to do so anyway.
13
- #
14
- # @author Yorick Peterse
15
- # @since 0.1
16
- #
17
- class Setting < ::Liquid::Tag
18
- include ::Zen::Liquid::General
19
-
20
- ##
21
- # Constructor method is called when a new instance of this tag
22
- # is created. The variable "key" is the key name of the setting
23
- # who's value should be retrieved. This argument is always required.
24
- #
25
- # @author Yorick Peterse
26
- # @param [String] tag_name The name of the tag that was called.
27
- # @param [String] arguments All additional arguments passed as a string.
28
- # @param [String] html The HTML inside the block.
29
- # @since 0.1
30
- #
31
- def initialize(tag_name = 'setting', key = '', markup = '')
32
- super
33
-
34
- @key = key.gsub('"', '').gsub("'", '')
35
- end
36
-
37
- ##
38
- # Renders the tag.
39
- #
40
- # @author Yorick Peterse
41
- # @since 0.1
42
- #
43
- def render(context)
44
- setting = ::Settings::Models::Setting[:key => @key]
45
-
46
- if !setting.nil?
47
- if setting.value.nil? or setting.value.empty?
48
- @setting_value = setting.default
49
- else
50
- @setting_value = setting.value
51
- end
52
- end
53
-
54
- return @setting_value.to_s
55
- end
56
- end
57
- end
58
- end
@@ -1,77 +0,0 @@
1
- #:nodoc:
2
- module Users
3
- #:nodoc:
4
- module Liquid
5
- ##
6
- # Tag that can be used to retrieve details about a single user. When using this
7
- # tag you can use the database table's column names as the keys, multiple keys
8
- # will result in multiple WHERE/AND clauses. In order to retrieve a user with
9
- # the Email address "me@awesome.com" you'd do the following:
10
- #
11
- # {% user email="me@awesome.com" %}
12
- # {{name}}
13
- # {% enduser %}
14
- #
15
- # If you want to add an extra condition simply do the following:
16
- #
17
- # {% user email="me@awesome.com" status="open" %}
18
- # {{name}}
19
- # {% enduser %}
20
- #
21
- # Note that this class is a Liquid block, not a tag. This means that you'll have to
22
- # specify the closing tag. The reason for this is that there are multiple columns
23
- # for the user table and using a tag in combination of a variable would result in
24
- # more code.
25
- #
26
- # @author Yorick Peterse
27
- # @since 0.1
28
- #
29
- class User < ::Liquid::Block
30
- include ::Zen::Liquid::General
31
-
32
- ##
33
- # Initializes the class, parses the tag and retrieves the user for the specified tag.
34
- #
35
- # @author Yorick Peterse
36
- # @param [String] tag_name The name of the tag that was called.
37
- # @param [String] arguments All additional arguments passed as a string.
38
- # @param [String] html The HTML inside the block.
39
- # @since 0.1
40
- #
41
- def initialize tag_name, arguments, markup
42
- super
43
-
44
- @arguments = {}
45
- arguments = parse_key_values(arguments)
46
-
47
- arguments.each do |k, v|
48
- @arguments[k.to_sym] = v
49
- end
50
-
51
- @user = {}
52
- user = ::Users::Models::User[@arguments]
53
-
54
- if !user.nil?
55
- user.values.each do |k, v|
56
- @user[k.to_s] = v
57
- end
58
- end
59
- end
60
-
61
- ##
62
- # Renders the tag
63
- #
64
- # @author Yorick Peterse
65
- # @param [Object] context The Liquid context for the current tag.
66
- # @return [Array]
67
- #
68
- def render context
69
- @user.each do |k, v|
70
- context[k] = v
71
- end
72
-
73
- render_all(@nodelist, context)
74
- end
75
- end
76
- end
77
- end
@@ -1,82 +0,0 @@
1
- #:nodoc:
2
- module Users
3
- #:nodoc:
4
- module Liquid
5
- ##
6
- # Block that can be used to retrieve a number of users and show their details.
7
- # Basic usage of this tag is as following:
8
- #
9
- # {% users limit="10" offset="5" %}
10
- # {{email}}
11
- # {% endusers %}
12
- #
13
- # Note that this tag will retrieve a list of users, if you want to only retrieve
14
- # a single user it's best to use the tag "zen_user" defined under Users::Liquid::User.
15
- #
16
- # The following keys can be set:
17
- #
18
- # * limit
19
- # * offset
20
- #
21
- # @author Yorick Peterse
22
- # @since 0.1
23
- #
24
- class Users < ::Liquid::Block
25
- include ::Zen::Liquid::General
26
-
27
- ##
28
- # Initializes the class, parses the tag and retrieves the users for the specified tag.
29
- #
30
- # @author Yorick Peterse
31
- # @param [String] tag_name The name of the tag that was called.
32
- # @param [String] arguments All additional arguments passed as a string.
33
- # @param [String] html The HTML inside the block.
34
- # @since 0.1
35
- #
36
- def initialize tag_name, arguments, markup
37
- super
38
-
39
- @arguments = {
40
- 'limit' => nil,
41
- 'offset' => nil
42
- }
43
-
44
- @arguments = @arguments.merge(parse_key_values(arguments))
45
- @users = []
46
- users = ::Users::Models::User.limit(@arguments['limit'], @arguments['offset'])
47
-
48
- users.each do |u|
49
- hash = {}
50
-
51
- u.values.each do |k, v|
52
- hash[k.to_s] = v
53
- end
54
-
55
- @users.push(hash)
56
- end
57
- end
58
-
59
- ##
60
- # Renders the tag
61
- #
62
- # @author Yorick Peterse
63
- # @param [Object] context The Liquid context for the current tag.
64
- # @return [Array]
65
- #
66
- def render context
67
- result = []
68
-
69
- @users.each do |user|
70
- user.each do |k, v|
71
- context[k] = v
72
- end
73
-
74
- result << render_all(@nodelist, context)
75
- end
76
-
77
- result << render_all(@nodelist, context) if result.empty?
78
- return result
79
- end
80
- end
81
- end
82
- end
@@ -1,30 +0,0 @@
1
- Zen::Plugin.add do |plugin|
2
- plugin.name = 'Markup'
3
- plugin.author = 'Yorick Peterse'
4
- plugin.about = 'Plugin used for converting various markup formats to HTML.'
5
- plugin.identifier = 'com.zen.plugin.markup'
6
- plugin.actions = {
7
-
8
- # Converts HTML to, well, HTML.
9
- :html => lambda do |markup|
10
- markup
11
- end,
12
-
13
- # Converts the given markup to plain text by escaping all HTML
14
- :plain => lambda do |markup|
15
- include Ramaze::Helper::CGI
16
- h(markup)
17
- end,
18
-
19
- # Comvert Markdown documents to HTML
20
- :markdown => lambda do |markup|
21
- RDiscount.new(markup).to_html
22
- end,
23
-
24
- # Convert Textile documents to HTML
25
- :textile => lambda do |markup|
26
- RedCloth.new(markup).to_html
27
- end
28
-
29
- }
30
- end
@@ -1,176 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /* HTML5 ✰ Boilerplate */
4
- html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,
5
- cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,
6
- ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,
7
- aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,
8
- time,mark,audio,video
9
- {
10
- background: transparent;
11
- border: 0;
12
- font-size: 100%;
13
- margin: 0;
14
- padding: 0;
15
- outline: 0;
16
- vertical-align:baseline;
17
- }
18
- article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section
19
- {
20
- display: block;
21
- }
22
- nav ul
23
- {
24
- list-style: none;
25
- }
26
- blockquote,q
27
- {
28
- quotes: none;
29
- }
30
- blockquote:before,blockquote:after,q:before,q:after
31
- {
32
- content: '';
33
- content: none;
34
- }
35
- a
36
- {
37
- margin:0;
38
- padding:0;
39
- font-size:100%;
40
- vertical-align:baseline;
41
- background:transparent;
42
- }
43
- mark
44
- {
45
- background-color:#ff9;
46
- color:#000;
47
- font-style:italic;
48
- font-weight:bold;
49
- }
50
- abbr[title],dfn[title]
51
- {
52
- border-bottom:1px dotted;
53
- cursor:help;
54
- }
55
- table
56
- {
57
- border-collapse:collapse;
58
- border-spacing:0;
59
- }
60
- hr
61
- {
62
- display:block;
63
- height:1px;
64
- border:0;
65
- border-top:1px solid #ccc;
66
- margin:1em 0;
67
- padding:0;
68
- }
69
- input,select
70
- {
71
- vertical-align:middle;
72
- }
73
- body
74
- {
75
- font:13px/1.231 sans-serif;
76
- font-size:small;
77
- }
78
- select,input,textarea,button
79
- {
80
- font:99% sans-serif;
81
- }
82
- pre,code,kbd,samp
83
- {
84
- font-family:monospace, sans-serif;
85
- }
86
-
87
- body,select,input,textarea
88
- {
89
- color:#444;
90
- }
91
-
92
- h1,h2,h3,h4,h5,h6
93
- {
94
- font-weight:bold;
95
- }
96
-
97
- a:hover,a:active
98
- {
99
- outline:none;
100
- }
101
-
102
- a,a:active,a:visited
103
- {
104
- color:#607890;
105
- }
106
-
107
- a:hover
108
- {
109
- color:#036;
110
- }
111
-
112
- ul,ol
113
- {
114
- margin-left:1.8em;
115
- }
116
-
117
- ol
118
- {
119
- list-style-type:decimal;
120
- }
121
-
122
- nav ul,nav li
123
- {
124
- margin:0;
125
- }
126
-
127
- small
128
- {
129
- font-size:85%;
130
- }
131
-
132
- strong,th
133
- {
134
- font-weight:bold;
135
- }
136
-
137
- td,td img
138
- {
139
- vertical-align:top;
140
- }
141
-
142
- sub
143
- {
144
- vertical-align:sub;
145
- font-size:smaller;
146
- }
147
-
148
- sup
149
- {
150
- vertical-align:super;
151
- font-size:smaller;
152
- }
153
-
154
- pre
155
- {
156
- padding: 15px;
157
- white-space: pre;
158
- white-space: pre-wrap;
159
- white-space: pre-line;
160
- word-wrap: break-word;
161
- }
162
-
163
- textarea
164
- {
165
- overflow:auto;
166
- }
167
-
168
- input[type="radio"], input[type="checkbox"]
169
- {
170
- vertical-align: baseline;
171
- }
172
-
173
- label,input[type=button],input[type=submit],button
174
- {
175
- cursor: pointer;
176
- }