madness 0.9.9 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +74 -76
  3. data/app/public/css/main.css +494 -248
  4. data/app/public/css/main.css.map +30 -24
  5. data/app/public/font/fontello.eot +0 -0
  6. data/app/public/font/fontello.svg +16 -0
  7. data/app/public/font/fontello.ttf +0 -0
  8. data/app/public/font/fontello.woff +0 -0
  9. data/app/public/font/fontello.woff2 +0 -0
  10. data/app/public/js/clipboard.js +2 -2
  11. data/app/styles/_anchor.scss +5 -3
  12. data/app/styles/_breadcrumbs.scss +2 -1
  13. data/app/styles/_code.scss +35 -42
  14. data/app/styles/{_icons.scss → _fontello.scss} +28 -19
  15. data/app/styles/_footnotes.scss +5 -0
  16. data/app/styles/_general.scss +7 -3
  17. data/app/styles/_image.scss +0 -2
  18. data/app/styles/_keyboard.scss +8 -7
  19. data/app/styles/_line.scss +1 -26
  20. data/app/styles/_manifest.scss +12 -8
  21. data/app/styles/_nav.scss +5 -15
  22. data/app/styles/_rouge.scss +213 -0
  23. data/app/styles/_scrollbar.scss +9 -0
  24. data/app/styles/_search.scss +5 -6
  25. data/app/styles/_table.scss +12 -7
  26. data/app/styles/_typography.scss +9 -5
  27. data/app/styles/_variables.scss +40 -0
  28. data/app/styles/main.scss +3 -3
  29. data/app/views/_index_nav.slim +6 -5
  30. data/app/views/document.slim +2 -6
  31. data/bin/madness +6 -2
  32. data/lib/madness/cli.rb +21 -0
  33. data/lib/madness/commands/base.rb +11 -0
  34. data/lib/madness/commands/config.rb +48 -0
  35. data/lib/madness/commands/server.rb +76 -0
  36. data/lib/madness/commands/theme.rb +36 -0
  37. data/lib/madness/document.rb +5 -110
  38. data/lib/madness/exceptions.rb +6 -0
  39. data/lib/madness/highlight_renderer.rb +10 -0
  40. data/lib/madness/markdown_document.rb +103 -0
  41. data/lib/madness/server_base.rb +1 -1
  42. data/lib/madness/settings.rb +7 -7
  43. data/lib/madness/templates/madness.yml +6 -4
  44. data/lib/madness/version.rb +1 -1
  45. metadata +53 -50
  46. data/app/public/fonts/fontello.eot +0 -0
  47. data/app/public/fonts/fontello.svg +0 -16
  48. data/app/public/fonts/fontello.ttf +0 -0
  49. data/app/public/fonts/fontello.woff +0 -0
  50. data/app/public/fonts/fontello.woff2 +0 -0
  51. data/app/styles/_coderay.scss +0 -37
  52. data/lib/madness/command_line.rb +0 -139
  53. data/lib/madness/docopt.txt +0 -98
@@ -1,8 +1,5 @@
1
- require 'commonmarker'
2
- require 'coderay'
3
-
4
1
  module Madness
5
- # Handle a single markdown document.
2
+ # Handle a single document path.
6
3
  class Document
7
4
  include ServerHelper
8
5
  using StringRefinements
@@ -18,12 +15,7 @@ module Madness
18
15
 
19
16
  # Return the HTML for that document
20
17
  def content
21
- @content ||= content!
22
- end
23
-
24
- # Return the HTML for that document, force re-read.
25
- def content!
26
- %i[empty missing].include?(type) ? "<h1>#{title}</h1>" : markdown_to_html
18
+ @content ||= %i[empty missing].include?(type) ? "<h1>#{title}</h1>" : markdown.to_html
27
19
  end
28
20
 
29
21
  private
@@ -65,108 +57,11 @@ module Madness
65
57
  end
66
58
 
67
59
  def markdown
68
- @markdown ||= pre_process_markdown
69
- end
70
-
71
- def pre_process_markdown
72
- result = File.read file
73
- result = evaluate_shortlinks result if config.shortlinks
74
- result
75
- end
76
-
77
- def doc
78
- @doc ||= CommonMarker.render_doc markdown, :DEFAULT, [:table]
79
- end
80
-
81
- # Convert markdown to HTML, with some additional processing:
82
- # 1. Add anchors to headers
83
- # 2. Syntax highilghting
84
- # 3. Prepend H1 if needed
85
- def markdown_to_html
86
- replace_toc_marker
87
- prepend_h1 if config.auto_h1
88
- add_anchor_ids
89
- html = doc.to_html :UNSAFE
90
- html = syntax_highlight(html) if config.highlighter
91
- html
92
- end
93
-
94
- # Add anchors with IDs before all headers
95
- def add_anchor_ids
96
- doc.walk do |node|
97
- if node.type == :header
98
- anchor = CommonMarker::Node.new(:inline_html)
99
-
100
- next unless node.first_child.type == :text
101
-
102
- anchor_id = node.first_child.string_content.to_slug
103
- anchor.string_content = "<a id='#{anchor_id}'></a>"
104
- node.prepend_child anchor
105
- end
106
- end
60
+ @markdown ||= MarkdownDocument.new(markdown_text, title: title)
107
61
  end
108
62
 
109
- # Replace <!-- TOC --> with a Table of Contents for the page
110
- def replace_toc_marker
111
- toc_marker = doc.find do |node|
112
- node.type == :html and node.string_content.include? '<!-- TOC -->'
113
- end
114
-
115
- return unless toc_marker
116
-
117
- toc_marker.insert_after document_toc
118
- toc_marker.insert_after CommonMarker.render_doc('## Table of Contents').first_child
119
- end
120
-
121
- # Replace [[link]] with [link](link)
122
- def evaluate_shortlinks(raw)
123
- raw.gsub(/\[\[([^\]]+)\]\]/) { "[#{$1}](#{$1.to_href})" }
124
- end
125
-
126
- # Returns a UL object containing the document table of contents
127
- def document_toc
128
- toc = []
129
- doc.walk do |node|
130
- next unless node.type == :header
131
-
132
- level = node.header_level
133
- next unless level.between? 2, 3
134
-
135
- text = node.first_child.string_content
136
- spacer = ' ' * (level - 1)
137
- toc << "#{spacer}- [#{text}](##{text.to_slug})"
138
- end
139
-
140
- toc = toc.join "\n"
141
- CommonMarker.render_doc(toc).first_child
142
- end
143
-
144
- # If the document does not start with an H1 tag, add it.
145
- def prepend_h1
146
- return unless doc.first_child
147
- return if (doc.first_child.type == :header) && (doc.first_child.header_level == 1)
148
-
149
- h1 = CommonMarker.render_doc("# #{title}").first_child
150
- doc.first_child.insert_before h1
151
- end
152
-
153
- # Apply syntax highlighting with CodeRay. This will parse for any
154
- # <code class='LANG'> sections in the HTML, pass it to CodeRay for
155
- # highlighting.
156
- # Since CodeRay adds another HTML escaping, on top of what RDiscount
157
- # does, we unescape it before passing it to CodeRay.
158
- #
159
- # Open StackOverflow question:
160
- # http://stackoverflow.com/questions/37771279/prevent-double-escaping-with-coderay-and-rdiscount
161
- def syntax_highlight(html)
162
- line_numbers = config.line_numbers ? :table : nil
163
- opts = { css: :style, wrap: nil, line_numbers: line_numbers }
164
- html.gsub(%r{<code class="language-(.+?)">(.+?)</code>}m) do
165
- lang = $1
166
- code = $2
167
- code = CGI.unescapeHTML code
168
- CodeRay.scan(code, lang).html opts
169
- end
63
+ def markdown_text
64
+ @markdown_text ||= File.read file
170
65
  end
171
66
 
172
67
  def md_file?
@@ -0,0 +1,6 @@
1
+ module Madness
2
+ class Interrupt < Interrupt; end
3
+ class Error < StandardError; end
4
+ class InitError < Error; end
5
+ class ConfigurationError < Error; end
6
+ end
@@ -0,0 +1,10 @@
1
+ require 'redcarpet'
2
+ require 'rouge'
3
+ require 'rouge/plugins/redcarpet'
4
+
5
+ module Madness
6
+ # Renderer with syntax highlighting support
7
+ class HighlightRenderer < Redcarpet::Render::HTML
8
+ include Rouge::Plugins::Redcarpet
9
+ end
10
+ end
@@ -0,0 +1,103 @@
1
+ require 'redcarpet'
2
+
3
+ module Madness
4
+ # Handle a pure markdown document.
5
+ class MarkdownDocument
6
+ include ServerHelper
7
+ using StringRefinements
8
+
9
+ attr_reader :markdown, :title
10
+
11
+ def initialize(markdown, title: nil)
12
+ @markdown = markdown
13
+ @title = title || ''
14
+ end
15
+
16
+ def text
17
+ @text ||= begin
18
+ result = markdown
19
+ result = parse_toc(result) if config.auto_toc
20
+ result = parse_shortlinks(result) if config.shortlinks
21
+ result = prepend_h1(result) if config.auto_h1
22
+ result
23
+ end
24
+ end
25
+
26
+ def to_html
27
+ @to_html ||= Redcarpet::Markdown.new(redcarpet_renderer, redcarpet_options).render text
28
+ end
29
+
30
+ private
31
+
32
+ def parse_toc(input)
33
+ input.gsub '<!-- TOC -->', toc
34
+ end
35
+
36
+ def parse_shortlinks(input)
37
+ input.gsub(/\[\[([^\]]+)\]\]/) { "[#{$1}](#{$1.to_href})" }
38
+ end
39
+
40
+ def prepend_h1(input)
41
+ return input if has_h1?(input)
42
+
43
+ "# #{title}\n\n#{input}"
44
+ end
45
+
46
+ def has_h1?(input)
47
+ lines = input.lines(chomp: true).reject(&:empty?)
48
+ return false if lines.empty?
49
+
50
+ lines[0].match(/^# \w+/) || (lines[1] && lines[0].match(/^\w+/) && lines[1].start_with?('='))
51
+ end
52
+
53
+ def redcarpet_options
54
+ @redcarpet_options ||= {
55
+ no_intra_emphasis: true,
56
+ autolink: true,
57
+ tables: true,
58
+ fenced_code_blocks: true,
59
+ strikethrough: true,
60
+ space_after_headers: true,
61
+ superscript: true,
62
+ underline: true,
63
+ highlight: true,
64
+ quote: false,
65
+ footnotes: true,
66
+ }
67
+ end
68
+
69
+ def redcarpet_renderer
70
+ redcarpet_handler.new with_toc_data: true
71
+ end
72
+
73
+ def redcarpet_handler
74
+ config.highlighter ? HighlightRenderer : Redcarpet::Render::HTML
75
+ end
76
+
77
+ def toc_caption
78
+ @toc_caption ||= if config.auto_toc.is_a?(String)
79
+ config.auto_toc
80
+ else
81
+ '## Table of Contents'
82
+ end
83
+ end
84
+
85
+ def toc
86
+ result = ["#{toc_caption}\n"]
87
+ markdown.lines(chomp: true).each do |line|
88
+ next unless line.start_with? '#'
89
+
90
+ matches = line.match(/^(?<level>\#{2,3})\s+(?<text>.+)/)
91
+ next unless matches
92
+
93
+ level = matches[:level].size - 1
94
+ text = matches[:text]
95
+
96
+ spacer = ' ' * level
97
+ result.push "#{spacer}- [#{text}](##{text.to_slug})"
98
+ end
99
+
100
+ result.join "\n"
101
+ end
102
+ end
103
+ end
@@ -36,7 +36,7 @@ module Madness
36
36
  end
37
37
 
38
38
  def self.set_basic_auth
39
- use Rack::Auth::Basic, config.auth_realm do |username, password|
39
+ use Rack::Auth::Basic, config.auth_zone do |username, password|
40
40
  config.auth.split(':') == [username, password]
41
41
  end
42
42
  end
@@ -47,7 +47,9 @@ module Madness
47
47
  data[:expose_extensions] ? "*.{md,#{data[:expose_extensions].delete(' ')}}" : '*.md'
48
48
  end
49
49
 
50
- private
50
+ def data
51
+ @data ||= defaults.merge(file_data)
52
+ end
51
53
 
52
54
  def defaults
53
55
  {
@@ -57,23 +59,21 @@ module Madness
57
59
  sidebar: true,
58
60
  auto_h1: true,
59
61
  auto_nav: true,
62
+ auto_toc: true,
60
63
  highlighter: true,
61
- line_numbers: true,
62
64
  copy_code: true,
63
65
  shortlinks: false,
64
66
  toc: nil,
65
67
  theme: nil,
66
68
  open: false,
67
69
  auth: false,
68
- auth_realm: 'Madness',
70
+ auth_zone: 'Restricted Documentation',
69
71
  expose_extensions: nil,
70
- exclude: [/^[a-z_\-0-9]+$/],
72
+ exclude: ['^[a-z_\-0-9]+$'],
71
73
  }
72
74
  end
73
75
 
74
- def data
75
- @data ||= defaults.merge(file_data)
76
- end
76
+ private
77
77
 
78
78
  def file_data
79
79
  result = if file_exist?
@@ -20,12 +20,14 @@ auto_h1: true
20
20
  # append navigation to directory READMEs
21
21
  auto_nav: true
22
22
 
23
+ # replace <!-- TOC --> in any file with its internal table of contents
24
+ # set to true to enable it with the default '## Table of Contents' caption,
25
+ # or set to any string that will be inserted before it as a caption.
26
+ auto_toc: true
27
+
23
28
  # enable syntax highlighter for code snippets
24
29
  highlighter: true
25
30
 
26
- # enable line numbers for code snippets
27
- line_numbers: true
28
-
29
31
  # enable the copy to clipboard icon for code snippets
30
32
  copy_code: true
31
33
 
@@ -48,7 +50,7 @@ open: false
48
50
  auth: false
49
51
 
50
52
  # if auth is enabled, specify auth realm name
51
- auth_zone: Madness
53
+ auth_zone: Restricted Documentation
52
54
 
53
55
  # show files with these extensions in the navigation and search, for example:
54
56
  # expose_extensions: pdf,docx,xlsx,txt
@@ -1,3 +1,3 @@
1
1
  module Madness
2
- VERSION = '0.9.9'
2
+ VERSION = '1.0.0.rc2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madness
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 1.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-16 00:00:00.000000000 Z
11
+ date: 2023-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -25,137 +25,131 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.7'
27
27
  - !ruby/object:Gem::Dependency
28
- name: coderay
28
+ name: colsole
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.1'
33
+ version: '0.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.1'
40
+ version: '0.5'
41
41
  - !ruby/object:Gem::Dependency
42
- name: colsole
42
+ name: extended_yaml
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.7.2
47
+ version: '0.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.7.2
54
+ version: '0.2'
55
55
  - !ruby/object:Gem::Dependency
56
- name: commonmarker
56
+ name: mister_bin
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.23'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 0.23.4
61
+ version: '0.7'
65
62
  type: :runtime
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
66
  - - "~>"
70
67
  - !ruby/object:Gem::Version
71
- version: '0.23'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 0.23.4
68
+ version: '0.7'
75
69
  - !ruby/object:Gem::Dependency
76
- name: docopt
70
+ name: naturally
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
73
  - - "~>"
80
74
  - !ruby/object:Gem::Version
81
- version: '0.6'
75
+ version: '2.2'
82
76
  type: :runtime
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
80
  - - "~>"
87
81
  - !ruby/object:Gem::Version
88
- version: '0.6'
82
+ version: '2.2'
89
83
  - !ruby/object:Gem::Dependency
90
- name: extended_yaml
84
+ name: os
91
85
  requirement: !ruby/object:Gem::Requirement
92
86
  requirements:
93
87
  - - "~>"
94
88
  - !ruby/object:Gem::Version
95
- version: 0.2.3
89
+ version: '1.0'
96
90
  type: :runtime
97
91
  prerelease: false
98
92
  version_requirements: !ruby/object:Gem::Requirement
99
93
  requirements:
100
94
  - - "~>"
101
95
  - !ruby/object:Gem::Version
102
- version: 0.2.3
96
+ version: '1.0'
103
97
  - !ruby/object:Gem::Dependency
104
- name: naturally
98
+ name: puma
105
99
  requirement: !ruby/object:Gem::Requirement
106
100
  requirements:
107
- - - "~>"
101
+ - - ">="
108
102
  - !ruby/object:Gem::Version
109
- version: '2.2'
103
+ version: '5.1'
110
104
  type: :runtime
111
105
  prerelease: false
112
106
  version_requirements: !ruby/object:Gem::Requirement
113
107
  requirements:
114
- - - "~>"
108
+ - - ">="
115
109
  - !ruby/object:Gem::Version
116
- version: '2.2'
110
+ version: '5.1'
117
111
  - !ruby/object:Gem::Dependency
118
- name: os
112
+ name: redcarpet
119
113
  requirement: !ruby/object:Gem::Requirement
120
114
  requirements:
121
115
  - - "~>"
122
116
  - !ruby/object:Gem::Version
123
- version: '1.0'
117
+ version: '3.5'
124
118
  type: :runtime
125
119
  prerelease: false
126
120
  version_requirements: !ruby/object:Gem::Requirement
127
121
  requirements:
128
122
  - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: '1.0'
124
+ version: '3.5'
131
125
  - !ruby/object:Gem::Dependency
132
- name: puma
126
+ name: requires
133
127
  requirement: !ruby/object:Gem::Requirement
134
128
  requirements:
135
- - - ">="
129
+ - - "~>"
136
130
  - !ruby/object:Gem::Version
137
- version: '5.1'
131
+ version: '1.0'
138
132
  type: :runtime
139
133
  prerelease: false
140
134
  version_requirements: !ruby/object:Gem::Requirement
141
135
  requirements:
142
- - - ">="
136
+ - - "~>"
143
137
  - !ruby/object:Gem::Version
144
- version: '5.1'
138
+ version: '1.0'
145
139
  - !ruby/object:Gem::Dependency
146
- name: requires
140
+ name: rouge
147
141
  requirement: !ruby/object:Gem::Requirement
148
142
  requirements:
149
143
  - - "~>"
150
144
  - !ruby/object:Gem::Version
151
- version: '1.0'
145
+ version: '4.0'
152
146
  type: :runtime
153
147
  prerelease: false
154
148
  version_requirements: !ruby/object:Gem::Requirement
155
149
  requirements:
156
150
  - - "~>"
157
151
  - !ruby/object:Gem::Version
158
- version: '1.0'
152
+ version: '4.0'
159
153
  - !ruby/object:Gem::Dependency
160
154
  name: sinatra
161
155
  requirement: !ruby/object:Gem::Requirement
@@ -195,20 +189,20 @@ files:
195
189
  - app/public/css/main.css
196
190
  - app/public/css/main.css.map
197
191
  - app/public/favicon.ico
198
- - app/public/fonts/fontello.eot
199
- - app/public/fonts/fontello.svg
200
- - app/public/fonts/fontello.ttf
201
- - app/public/fonts/fontello.woff
202
- - app/public/fonts/fontello.woff2
192
+ - app/public/font/fontello.eot
193
+ - app/public/font/fontello.svg
194
+ - app/public/font/fontello.ttf
195
+ - app/public/font/fontello.woff
196
+ - app/public/font/fontello.woff2
203
197
  - app/public/js/clipboard.js
204
198
  - app/public/js/vendor/clipboard.min.js
205
199
  - app/public/js/vendor/jquery.min.js
206
200
  - app/styles/_anchor.scss
207
201
  - app/styles/_breadcrumbs.scss
208
202
  - app/styles/_code.scss
209
- - app/styles/_coderay.scss
203
+ - app/styles/_fontello.scss
204
+ - app/styles/_footnotes.scss
210
205
  - app/styles/_general.scss
211
- - app/styles/_icons.scss
212
206
  - app/styles/_image.scss
213
207
  - app/styles/_keyboard.scss
214
208
  - app/styles/_line.scss
@@ -216,9 +210,12 @@ files:
216
210
  - app/styles/_manifest.scss
217
211
  - app/styles/_mixins.scss
218
212
  - app/styles/_nav.scss
213
+ - app/styles/_rouge.scss
214
+ - app/styles/_scrollbar.scss
219
215
  - app/styles/_search.scss
220
216
  - app/styles/_table.scss
221
217
  - app/styles/_typography.scss
218
+ - app/styles/_variables.scss
222
219
  - app/styles/main.scss
223
220
  - app/views/_breadcrumbs.slim
224
221
  - app/views/_index_nav.slim
@@ -231,11 +228,17 @@ files:
231
228
  - lib/madness.rb
232
229
  - lib/madness/breadcrumbs.rb
233
230
  - lib/madness/browser.rb
234
- - lib/madness/command_line.rb
231
+ - lib/madness/cli.rb
232
+ - lib/madness/commands/base.rb
233
+ - lib/madness/commands/config.rb
234
+ - lib/madness/commands/server.rb
235
+ - lib/madness/commands/theme.rb
235
236
  - lib/madness/directory.rb
236
- - lib/madness/docopt.txt
237
237
  - lib/madness/document.rb
238
+ - lib/madness/exceptions.rb
239
+ - lib/madness/highlight_renderer.rb
238
240
  - lib/madness/item.rb
241
+ - lib/madness/markdown_document.rb
239
242
  - lib/madness/navigation.rb
240
243
  - lib/madness/refinements/array_refinements.rb
241
244
  - lib/madness/refinements/hash_refinements.rb
@@ -270,9 +273,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
270
273
  version: '2.7'
271
274
  required_rubygems_version: !ruby/object:Gem::Requirement
272
275
  requirements:
273
- - - ">="
276
+ - - ">"
274
277
  - !ruby/object:Gem::Version
275
- version: '0'
278
+ version: 1.3.1
276
279
  requirements: []
277
280
  rubygems_version: 3.4.3
278
281
  signing_key:
Binary file
@@ -1,16 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Copyright (C) 2019 by original authors @ fontello.com</metadata>
5
- <defs>
6
- <font id="fontello" horiz-adv-x="1000" >
7
- <font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
- <missing-glyph horiz-adv-x="1000" />
9
- <glyph glyph-name="export" unicode="&#xe800;" d="M750 60l0 56 100 82 0-188q0-20-15-35t-35-15l-750 0q-20 0-35 15t-15 35l0 550q0 22 14 36t36 14l288 0q-32-24-59-49t-39-39l-10-12-130 0 0-450 650 0z m-82 348q-166 0-242-41t-160-181q0 8 1 22t9 56 22 79 44 83 70 79 107 56 149 23l0 156 332-250-332-260 0 178z" horiz-adv-x="1000" />
10
-
11
- <glyph glyph-name="home" unicode="&#xe801;" d="M888 336q16-16 11-27t-27-11l-84 0 0-310q0-14-1-21t-8-13-23-6l-204 0 0 310-204 0 0-310-194 0q-28 0-35 10t-7 30l0 310-84 0q-22 0-27 11t11 27l400 402q16 16 38 16t38-16z" horiz-adv-x="900" />
12
-
13
- <glyph glyph-name="search-1" unicode="&#xe802;" d="M772 78q30-34 6-62l-46-46q-36-32-68 0l-190 190q-74-42-156-42-128 0-223 95t-95 223 90 219 218 91 224-95 96-223q0-88-46-162z m-678 358q0-88 68-156t156-68 151 63 63 153q0 88-68 155t-156 67-151-63-63-151z" horiz-adv-x="789" />
14
- </font>
15
- </defs>
16
- </svg>
Binary file
Binary file
Binary file
@@ -1,37 +0,0 @@
1
- .clipboard-button {
2
- position: absolute;
3
- right: 0;
4
- font-size: 1.25em;
5
- opacity: 0.2;
6
- transition: opacity 0.3s;
7
- }
8
-
9
- table.CodeRay:hover .clipboard-button {
10
- opacity: 1;
11
- transition: opacity 0.3s;
12
- }
13
-
14
- table.CodeRay {
15
- position: relative;
16
- margin-bottom: 0;
17
-
18
- pre {
19
- margin-bottom: 0;
20
- }
21
-
22
- tr, td {
23
- border: 0;
24
- pre {
25
- margin-left: 0;
26
- }
27
- }
28
-
29
- td.line-numbers {
30
- background: #eee;
31
- padding: 4px;
32
- }
33
-
34
- td.code {
35
- }
36
-
37
- }