nexmo-oas-renderer 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +7 -0
  2. data/.env.example +1 -0
  3. data/.github/workflows/push-docker-publish.yml +19 -0
  4. data/.gitignore +6 -0
  5. data/.rspec +1 -0
  6. data/.rubocop.yml +135 -0
  7. data/.travis.yml +9 -0
  8. data/CHANGELOG.md +58 -0
  9. data/CONTRIBUTING.md +46 -0
  10. data/Dockerfile +6 -0
  11. data/Gemfile +6 -0
  12. data/Gemfile.lock +248 -0
  13. data/LICENSE.txt +21 -0
  14. data/README.md +103 -0
  15. data/Rakefile +2 -0
  16. data/bin/console +14 -0
  17. data/bin/setup +8 -0
  18. data/exe/nexmo-oas-renderer +5 -0
  19. data/lib/nexmo/oas/engine.rb +11 -0
  20. data/lib/nexmo/oas/renderer.rb +13 -0
  21. data/lib/nexmo/oas/renderer/app.rb +201 -0
  22. data/lib/nexmo/oas/renderer/config.ru +9 -0
  23. data/lib/nexmo/oas/renderer/config/code_languages.yml +138 -0
  24. data/lib/nexmo/oas/renderer/config/dynamic_content.yml +1 -0
  25. data/lib/nexmo/oas/renderer/decorators/response_parser_decorator.rb +55 -0
  26. data/lib/nexmo/oas/renderer/helpers/navigation.rb +66 -0
  27. data/lib/nexmo/oas/renderer/helpers/render.rb +25 -0
  28. data/lib/nexmo/oas/renderer/helpers/summary.rb +33 -0
  29. data/lib/nexmo/oas/renderer/helpers/url.rb +19 -0
  30. data/lib/nexmo/oas/renderer/presenters/api_specification.rb +54 -0
  31. data/lib/nexmo/oas/renderer/presenters/endpoint.rb +21 -0
  32. data/lib/nexmo/oas/renderer/presenters/groups.rb +39 -0
  33. data/lib/nexmo/oas/renderer/presenters/navigation.rb +26 -0
  34. data/lib/nexmo/oas/renderer/presenters/open_api_specification.rb +62 -0
  35. data/lib/nexmo/oas/renderer/presenters/request_body_raw.rb +141 -0
  36. data/lib/nexmo/oas/renderer/presenters/response_format.rb +29 -0
  37. data/lib/nexmo/oas/renderer/presenters/response_tab/link.rb +36 -0
  38. data/lib/nexmo/oas/renderer/presenters/response_tab/panel.rb +45 -0
  39. data/lib/nexmo/oas/renderer/presenters/response_tabs.rb +58 -0
  40. data/lib/nexmo/oas/renderer/presenters/versions.rb +51 -0
  41. data/lib/nexmo/oas/renderer/public/500.html +66 -0
  42. data/lib/nexmo/oas/renderer/public/assets/images/brands/android.svg +1 -0
  43. data/lib/nexmo/oas/renderer/public/assets/images/brands/curl.svg +1 -0
  44. data/lib/nexmo/oas/renderer/public/assets/images/brands/dotnet.svg +1 -0
  45. data/lib/nexmo/oas/renderer/public/assets/images/brands/ios.svg +1 -0
  46. data/lib/nexmo/oas/renderer/public/assets/images/brands/java.svg +1 -0
  47. data/lib/nexmo/oas/renderer/public/assets/images/brands/javascript.svg +1 -0
  48. data/lib/nexmo/oas/renderer/public/assets/images/brands/node.svg +1 -0
  49. data/lib/nexmo/oas/renderer/public/assets/images/brands/php.svg +1 -0
  50. data/lib/nexmo/oas/renderer/public/assets/images/brands/python.svg +11 -0
  51. data/lib/nexmo/oas/renderer/public/assets/images/brands/ruby.svg +1 -0
  52. data/lib/nexmo/oas/renderer/public/assets/images/lost.svg +37 -0
  53. data/lib/nexmo/oas/renderer/public/assets/javascripts/components/format.js +47 -0
  54. data/lib/nexmo/oas/renderer/public/assets/javascripts/nexmo-oas-renderer.js +65 -0
  55. data/lib/nexmo/oas/renderer/public/assets/javascripts/popper.min.js +5 -0
  56. data/lib/nexmo/oas/renderer/public/assets/javascripts/prism.js +22 -0
  57. data/lib/nexmo/oas/renderer/public/assets/javascripts/tooltip.min.js +5 -0
  58. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.accordion.js +307 -0
  59. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.core.js +230 -0
  60. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.modal.js +300 -0
  61. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.tabs.js +143 -0
  62. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.tooltip.js +76 -0
  63. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css +287 -0
  64. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css.map +7 -0
  65. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/api.scss +341 -0
  66. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/mediaqueries.scss +48 -0
  67. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/style.scss +6 -0
  68. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/dark.scss +89 -0
  69. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/light.scss +68 -0
  70. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/variables.scss +91 -0
  71. data/lib/nexmo/oas/renderer/public/assets/stylesheets/volta-prism.min.css +1 -0
  72. data/lib/nexmo/oas/renderer/public/assets/stylesheets/volta.min.css +1 -0
  73. data/lib/nexmo/oas/renderer/public/assets/symbol/volta-icons.svg +1 -0
  74. data/lib/nexmo/oas/renderer/public/favicon.ico +0 -0
  75. data/lib/nexmo/oas/renderer/public/fonts/Spezia-Regular.eot +0 -0
  76. data/lib/nexmo/oas/renderer/public/fonts/Spezia-Regular.ttf +0 -0
  77. data/lib/nexmo/oas/renderer/public/fonts/Spezia-Regular.woff +0 -0
  78. data/lib/nexmo/oas/renderer/public/fonts/Spezia-Regular.woff2 +0 -0
  79. data/lib/nexmo/oas/renderer/public/fonts/Spezia-SemiBold.eot +0 -0
  80. data/lib/nexmo/oas/renderer/public/fonts/Spezia-SemiBold.ttf +0 -0
  81. data/lib/nexmo/oas/renderer/public/fonts/Spezia-SemiBold.woff +0 -0
  82. data/lib/nexmo/oas/renderer/public/fonts/Spezia-SemiBold.woff2 +0 -0
  83. data/lib/nexmo/oas/renderer/public/fonts/Spezia-SemiMonoSemiBold.eot +0 -0
  84. data/lib/nexmo/oas/renderer/public/fonts/Spezia-SemiMonoSemiBold.ttf +0 -0
  85. data/lib/nexmo/oas/renderer/public/fonts/Spezia-SemiMonoSemiBold.woff +0 -0
  86. data/lib/nexmo/oas/renderer/public/fonts/Spezia-SemiMonoSemiBold.woff2 +0 -0
  87. data/lib/nexmo/oas/renderer/public/fonts/Spezia-WideMedium.eot +0 -0
  88. data/lib/nexmo/oas/renderer/public/fonts/Spezia-WideMedium.ttf +0 -0
  89. data/lib/nexmo/oas/renderer/public/fonts/Spezia-WideMedium.woff +0 -0
  90. data/lib/nexmo/oas/renderer/public/fonts/Spezia-WideMedium.woff2 +0 -0
  91. data/lib/nexmo/oas/renderer/services/oas_parser.rb +23 -0
  92. data/lib/nexmo/oas/renderer/services/open_api_definition_resolver.rb +35 -0
  93. data/lib/nexmo/oas/renderer/version.rb +9 -0
  94. data/lib/nexmo/oas/renderer/views/api/index.erb +19 -0
  95. data/lib/nexmo/oas/renderer/views/api/show.erb +1 -0
  96. data/lib/nexmo/oas/renderer/views/concepts/list/plain.html.erb +5 -0
  97. data/lib/nexmo/oas/renderer/views/layouts/_head.erb +6 -0
  98. data/lib/nexmo/oas/renderer/views/layouts/_javascripts.erb +14 -0
  99. data/lib/nexmo/oas/renderer/views/layouts/api.erb +23 -0
  100. data/lib/nexmo/oas/renderer/views/layouts/open_api.erb +12 -0
  101. data/lib/nexmo/oas/renderer/views/open_api/_auth.erb +74 -0
  102. data/lib/nexmo/oas/renderer/views/open_api/_available_endpoints.erb +25 -0
  103. data/lib/nexmo/oas/renderer/views/open_api/_callback.erb +5 -0
  104. data/lib/nexmo/oas/renderer/views/open_api/_callback_endpoint.erb +38 -0
  105. data/lib/nexmo/oas/renderer/views/open_api/_callbacks.erb +5 -0
  106. data/lib/nexmo/oas/renderer/views/open_api/_code_examples.erb +16 -0
  107. data/lib/nexmo/oas/renderer/views/open_api/_endpoint.erb +54 -0
  108. data/lib/nexmo/oas/renderer/views/open_api/_header.erb +71 -0
  109. data/lib/nexmo/oas/renderer/views/open_api/_model.erb +43 -0
  110. data/lib/nexmo/oas/renderer/views/open_api/_navigation.erb +68 -0
  111. data/lib/nexmo/oas/renderer/views/open_api/_parameter_groups.erb +56 -0
  112. data/lib/nexmo/oas/renderer/views/open_api/_parameters.erb +115 -0
  113. data/lib/nexmo/oas/renderer/views/open_api/_request_json.erb +4 -0
  114. data/lib/nexmo/oas/renderer/views/open_api/_request_one_of.erb +70 -0
  115. data/lib/nexmo/oas/renderer/views/open_api/_request_single.erb +53 -0
  116. data/lib/nexmo/oas/renderer/views/open_api/_requests.erb +22 -0
  117. data/lib/nexmo/oas/renderer/views/open_api/_response_description_parameters.erb +130 -0
  118. data/lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb +45 -0
  119. data/lib/nexmo/oas/renderer/views/open_api/_response_fields.erb +3 -0
  120. data/lib/nexmo/oas/renderer/views/open_api/_response_tabs.erb +18 -0
  121. data/lib/nexmo/oas/renderer/views/open_api/_responses.erb +51 -0
  122. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_parameters.erb +64 -0
  123. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_single_parameter.erb +56 -0
  124. data/lib/nexmo/oas/renderer/views/open_api/_webhooks.erb +30 -0
  125. data/lib/nexmo/oas/renderer/views/open_api/show.erb +26 -0
  126. data/lib/nexmo/oas/renderer/views/static/404.erb +6 -0
  127. data/nexmo-oas-renderer.gemspec +51 -0
  128. metadata +397 -0
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nexmo
4
+ module OAS
5
+ module Renderer
6
+ module Presenters
7
+ class ResponseFormat
8
+ MAPPINGS = {
9
+ 'application/json' => 'JSON',
10
+ 'application/xml' => 'XML',
11
+ 'text/xml' => 'XML',
12
+ }.freeze
13
+
14
+ def self.to_dropdown(formats)
15
+ MAPPINGS.slice(*formats)
16
+ end
17
+
18
+ def initialize(responses)
19
+ @responses = responses
20
+ end
21
+
22
+ def extract
23
+ @extract ||= @responses.flat_map(&:formats).uniq
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nexmo
4
+ module OAS
5
+ module Renderer
6
+ module Presenters
7
+ module ResponseTab
8
+ class Link
9
+ attr_reader :index
10
+
11
+ def initialize(index:, schema:)
12
+ @index = index
13
+ @schema = schema
14
+ end
15
+
16
+ def css_classes
17
+ classes = ['tab-sync Vlt-tabs__link']
18
+ classes << 'Vlt-tabs__link_active' if @index.zero?
19
+ classes.join(' ')
20
+ end
21
+
22
+ def data_tab_link
23
+ return nil unless @schema['x-tab-id']
24
+
25
+ @schema['x-tab-id']
26
+ end
27
+
28
+ def content
29
+ @schema['description'] || "Response #{@index + 1}"
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nexmo
4
+ module OAS
5
+ module Renderer
6
+ module Presenters
7
+ module ResponseTab
8
+ class Panel
9
+ attr_reader :index
10
+
11
+ def initialize(schema:, index:, format:, content:, endpoint:, theme_light: nil) # rubocop:disable Metrics/ParameterLists
12
+ @schema = schema
13
+ @index = index
14
+ @format = format
15
+ @content = content
16
+ @endpoint = endpoint
17
+ @theme_light = theme_light
18
+ end
19
+
20
+ def css_classes
21
+ classes = ['Vlt-tabs__panel']
22
+ classes << 'Vlt-tabs__panel_active' if @index.zero?
23
+ classes.join(' ')
24
+ end
25
+
26
+ def content
27
+ if @content == :responses
28
+ Nexmo::OAS::Renderer::ResponseParserDecorator
29
+ .new(@schema)
30
+ .html(@format, xml_options: @schema['xml'], theme_light: @theme_light)
31
+ else
32
+ [:'open_api/_response_fields', locals: {
33
+ schema: @schema,
34
+ index: @index,
35
+ format: @format,
36
+ endpoint: @endpoint,
37
+ }]
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './response_tab/link'
4
+ require_relative './response_tab/panel'
5
+
6
+ module Nexmo
7
+ module OAS
8
+ module Renderer
9
+ module Presenters
10
+ class ResponseTabs
11
+ attr_reader :format
12
+
13
+ def initialize(format, response, content, endpoint, theme_light: nil)
14
+ @format = format
15
+ @response = response
16
+ @content = content
17
+ @endpoint = endpoint
18
+ @theme_light = theme_light
19
+ end
20
+
21
+ def tab_links
22
+ @tab_links ||= @response.split_schemas(@format).map.with_index do |schema, index|
23
+ schema = handle_all_of(schema)
24
+ ResponseTab::Link.new(
25
+ index: index,
26
+ schema: schema
27
+ )
28
+ end
29
+ end
30
+
31
+ def tab_panels
32
+ @tab_panels ||= @response.split_schemas(@format).map.with_index do |schema, index|
33
+ schema = handle_all_of(schema)
34
+ ResponseTab::Panel.new(
35
+ schema: schema,
36
+ index: index,
37
+ format: @format,
38
+ content: @content,
39
+ endpoint: @endpoint,
40
+ theme_light: @theme_light
41
+ )
42
+ end
43
+ end
44
+
45
+ def handle_all_of(schema)
46
+ if schema['allOf']
47
+ schema['allOf'].each do |p|
48
+ schema.deep_merge!(p)
49
+ end
50
+ schema.delete('allOf')
51
+ end
52
+ schema
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nexmo
4
+ module OAS
5
+ module Renderer
6
+ module Presenters
7
+ class Versions
8
+ def initialize(definition_name)
9
+ @definition_name = definition_name
10
+ end
11
+
12
+ def base_name
13
+ @base_name ||= @definition_name.gsub(/\.v\d+/, '')
14
+ end
15
+
16
+ def current_version
17
+ @current_version ||= begin
18
+ m = /\.v(\d+)/.match(@definition_name)
19
+ m.nil? ? '1' : m[1]
20
+ end
21
+ end
22
+
23
+ def available_versions
24
+ @available_versions ||= begin
25
+ matches = definitions.select do |definition|
26
+ definition.match(/^#{base_name}(\.v\d+)?$/) && !definition.include?("#{base_name}/")
27
+ end
28
+
29
+ matches = matches.map do |definition|
30
+ m = /\.v(\d+)/.match(definition)
31
+ next { 'version' => '1', 'name' => definition } unless m
32
+
33
+ { 'version' => m[1], 'name' => definition }
34
+ end
35
+
36
+ matches.sort_by { |v| v['version'] }
37
+ end
38
+ end
39
+
40
+ def definitions
41
+ @definitions ||= begin
42
+ Dir.glob("#{API.oas_path}/**/*.yml").map do |file|
43
+ file.sub("#{API.oas_path}/", '').chomp('.yml')
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
@@ -0,0 +1 @@
1
+ <svg id="android" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="60" height="60" viewBox="0 0 128 128" style="enable-background:new 0 0 48 48;;fill:#000000;"><g id="surface1"> <path style="fill:#7CB342;" d="M12,29c0,1.1-0.9,2-2,2s-2-0.9-2-2v-9c0-1.1,0.9-2,2-2s2,0.9,2,2V29z"></path> <path style="fill:#7CB342;" d="M40,29c0,1.1-0.9,2-2,2s-2-0.9-2-2v-9c0-1.1,0.9-2,2-2s2,0.9,2,2V29z"></path> <path style="fill:#7CB342;" d="M22,40c0,1.1-0.9,2-2,2s-2-0.9-2-2v-9c0-1.1,0.9-2,2-2s2,0.9,2,2V40z"></path> <path style="fill:#7CB342;" d="M30,40c0,1.1-0.9,2-2,2s-2-0.9-2-2v-9c0-1.1,0.9-2,2-2s2,0.9,2,2V40z"></path> <path style="fill:#7CB342;" d="M14,18v15c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V18H14z"></path> <path style="fill:#7CB342;" d="M24,8c-6,0-9.7,3.6-10,8h20C33.7,11.6,30,8,24,8z M20,13.6c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1 s1,0.4,1,1C21,13.1,20.6,13.6,20,13.6z M28,13.6c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1s1,0.4,1,1C29,13.1,28.6,13.6,28,13.6z"></path> <path style="fill:#7CB342;" d="M28.3,10.5c-0.2,0-0.4-0.1-0.6-0.2c-0.5-0.3-0.6-0.9-0.3-1.4l1.7-2.5c0.3-0.5,0.9-0.6,1.4-0.3 c0.5,0.3,0.6,0.9,0.3,1.4l-1.7,2.5C29,10.3,28.7,10.5,28.3,10.5z"></path> <path style="fill:#7CB342;" d="M19.3,10.1c-0.3,0-0.7-0.2-0.8-0.5l-1.3-2.1c-0.3-0.5-0.2-1.1,0.3-1.4c0.5-0.3,1.1-0.2,1.4,0.3 l1.3,2.1c0.3,0.5,0.2,1.1-0.3,1.4C19.7,10,19.5,10.1,19.3,10.1z"></path></g></svg>
@@ -0,0 +1 @@
1
+ <svg id="curl" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path id="plain" fill="#0b3754" d="M64,7.83H4.77L14.95,95.13l49,25,.06,0,49.07-25L123.23,7.83Zm42.77,54.86c0,.88,0,1.67-.77,2L73.25,80.44l-2.42,1.13-.27-3.15V72.23l.24-1.57,1.09-.47L95.07,59.81l-21.54-9.6L64.35,68.34,58.9,78.87l-1.22,2.27-2.05-.9L22,64.71a2.42,2.42,0,0,1-1.45-2V56.91a2.39,2.39,0,0,1,1.42-2l34-15.73,3.21-1.44v9.66l.24,1.34-1.56.7L34.45,59.79,56.3,69.42l8.05-16,6.21-12.65,1.13-2.28,1.81.91L106,54.89c.73.35.76,1.14.76,2Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="dotnet" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" clip-rule="evenodd" fill="#1384C8" d="M82.108 78.432c.479-1.232 1.022-2.445 1.427-3.701 2.288-7.097 4.554-14.2 6.805-21.309.865-2.731 1.813-5.42 3.515-7.767 2.692-3.709 6.442-5.652 10.88-6.331 1.741-.266 3.518-.389 5.28-.406 5.267-.05 10.536-.015 15.804-.01.28 0 .56.029.957.052-.129.304-.199.525-.311.724-1.955 3.494-3.872 7.009-5.885 10.468-3.505 6.022-7.016 12.042-10.631 17.998-2.319 3.819-4.834 7.52-7.687 10.974-2.105 2.548-4.321 4.984-7.146 6.77-1.925 1.217-3.981 1.929-6.315 1.917-8.278-.045-16.556-.012-24.834-.024-2.461-.004-4.568-.941-6.356-2.603-2.563-2.381-4.093-5.412-5.345-8.608-2.284-5.835-3.563-11.951-5.031-18.014-.688-2.838-1.47-5.654-2.215-8.478-.048-.183-.142-.354-.25-.617l-.577.542c-3.228 3.207-6.071 6.741-8.615 10.498-.693 1.024-.926 2.374-1.313 3.591-1.424 4.47-2.722 8.983-4.264 13.411-1.477 4.242-4.125 7.616-8.264 9.61-2.42 1.165-5.004 1.795-7.689 1.855-3.98.088-7.962.098-11.943.134-.952.009-.996-.069-.748-.99 1.707-6.338 3.87-12.514 6.58-18.492 2.794-6.167 6.085-12.048 10.231-17.419 2.823-3.657 5.941-7.031 9.843-9.582 1.979-1.293 4.083-2.315 6.477-2.584.394-.045.793-.073 1.189-.073 8.478-.004 16.956.082 25.433-.039 4.547-.065 7.839 1.855 10.304 5.515 1.533 2.276 2.63 4.761 3.553 7.328 1.861 5.178 3.018 10.547 4.325 15.878.748 3.051 1.581 6.081 2.379 9.12.06.228.157.446.238.668l.199-.006z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="ios" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="53" height="53" viewBox="0 0 128 128" style="fill:#296CAD;"> <path style="line-height:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;block-progression:tb;isolation:auto;mix-blend-mode:normal" d="M 15 3 C 8.3845336 3 3 8.3845336 3 15 L 3 35 C 3 41.615466 8.3845336 47 15 47 L 35 47 C 41.615466 47 47 41.615466 47 35 L 47 15 C 47 8.3845336 41.615466 3 35 3 L 15 3 z M 15 5 L 35 5 C 40.534534 5 45 9.4654664 45 15 L 45 35 C 45 40.534534 40.534534 45 35 45 L 15 45 C 9.4654664 45 5 40.534534 5 35 L 5 15 C 5 9.4654664 9.4654664 5 15 5 z M 11.615234 18.066406 C 10.912234 18.066406 10.394531 18.567563 10.394531 19.226562 C 10.394531 19.876563 10.912234 20.376953 11.615234 20.376953 C 12.318234 20.376953 12.837891 19.876562 12.837891 19.226562 C 12.837891 18.567562 12.318234 18.066406 11.615234 18.066406 z M 22.037109 18.636719 C 18.398109 18.636719 16.113281 21.18525 16.113281 25.28125 C 16.113281 29.36825 18.354109 31.933594 22.037109 31.933594 C 25.711109 31.933594 27.943359 29.35925 27.943359 25.28125 C 27.943359 21.19425 25.693109 18.637719 22.037109 18.636719 z M 34.966797 18.636719 C 32.198797 18.636719 30.351562 20.139437 30.351562 22.398438 C 30.351562 24.261437 31.397406 25.37025 33.691406 25.90625 L 35.326172 26.302734 C 37.005172 26.697734 37.744141 27.277141 37.744141 28.244141 C 37.744141 29.369141 36.583953 30.185547 35.001953 30.185547 C 33.306858 30.185547 32.128927 29.421639 31.960938 28.21875 L 30.007812 28.21875 C 30.148813 30.48675 32.037609 31.935547 34.849609 31.935547 C 37.855609 31.935547 39.736328 30.416234 39.736328 27.990234 C 39.736328 26.083234 38.6645 25.027875 36.0625 24.421875 L 34.666016 24.078125 C 33.014016 23.691125 32.345703 23.172578 32.345703 22.267578 C 32.345703 21.124578 33.383453 20.378906 34.939453 20.378906 C 36.416453 20.378906 37.434141 21.106391 37.619141 22.275391 L 39.535156 22.275391 C 39.421156 20.139391 37.541797 18.636719 34.966797 18.636719 z M 22.037109 20.472656 C 24.446109 20.472656 25.931641 22.33725 25.931641 25.28125 C 25.931641 28.20725 24.445109 30.097656 22.037109 30.097656 C 19.603109 30.097656 18.126953 28.20825 18.126953 25.28125 C 18.126953 22.33725 19.646109 20.473656 22.037109 20.472656 z M 10.675781 22.056641 L 10.675781 31.626953 L 12.556641 31.626953 L 12.556641 22.056641 L 10.675781 22.056641 z" font-weight="400" font-family="sans-serif" white-space="normal" overflow="visible"></path></svg>
@@ -0,0 +1 @@
1
+ <svg id="java" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#0074BD" d="M47.617 98.12s-4.767 2.774 3.397 3.71c9.892 1.13 14.947.968 25.845-1.092 0 0 2.871 1.795 6.873 3.351-24.439 10.47-55.308-.607-36.115-5.969zM44.629 84.455s-5.348 3.959 2.823 4.805c10.567 1.091 18.91 1.18 33.354-1.6 0 0 1.993 2.025 5.132 3.131-29.542 8.64-62.446.68-41.309-6.336z"/><path fill="#EA2D2E" d="M69.802 61.271c6.025 6.935-1.58 13.17-1.58 13.17s15.289-7.891 8.269-17.777c-6.559-9.215-11.587-13.792 15.635-29.58 0 .001-42.731 10.67-22.324 34.187z"/><path fill="#0074BD" d="M102.123 108.229s3.529 2.91-3.888 5.159c-14.102 4.272-58.706 5.56-71.094.171-4.451-1.938 3.899-4.625 6.526-5.192 2.739-.593 4.303-.485 4.303-.485-4.953-3.487-32.013 6.85-13.743 9.815 49.821 8.076 90.817-3.637 77.896-9.468zM49.912 70.294s-22.686 5.389-8.033 7.348c6.188.828 18.518.638 30.011-.326 9.39-.789 18.813-2.474 18.813-2.474s-3.308 1.419-5.704 3.053c-23.042 6.061-67.544 3.238-54.731-2.958 10.832-5.239 19.644-4.643 19.644-4.643zM90.609 93.041c23.421-12.167 12.591-23.86 5.032-22.285-1.848.385-2.677.72-2.677.72s.688-1.079 2-1.543c14.953-5.255 26.451 15.503-4.823 23.725 0-.002.359-.327.468-.617z"/><path fill="#EA2D2E" d="M76.491 1.587s12.968 12.976-12.303 32.923c-20.266 16.006-4.621 25.13-.007 35.559-11.831-10.673-20.509-20.07-14.688-28.815 8.548-12.834 32.229-19.059 26.998-39.667z"/><path fill="#0074BD" d="M52.214 126.021c22.476 1.437 57-.8 57.817-11.436 0 0-1.571 4.032-18.577 7.231-19.186 3.612-42.854 3.191-56.887.874 0 .001 2.875 2.381 17.647 3.331z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="javascript" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="55" height="55" viewBox="0 0 128 128" style="fill:#000000;"><g id="surface1"><path style=" " d="M 43.335938 4 L 6.667969 4 C 5.195313 4 4 5.195313 4 6.667969 L 4 43.332031 C 4 44.804688 5.195313 46 6.667969 46 L 43.332031 46 C 44.804688 46 46 44.804688 46 43.335938 L 46 6.667969 C 46 5.195313 44.804688 4 43.335938 4 Z M 27 36.183594 C 27 40.179688 24.65625 42 21.234375 42 C 18.140625 42 15.910156 39.925781 15 38 L 18.144531 36.097656 C 18.75 37.171875 19.671875 38 21 38 C 22.269531 38 23 37.503906 23 35.574219 L 23 23 L 27 23 Z M 35.675781 42 C 32.132813 42 30.121094 40.214844 29 38 L 32 36 C 32.816406 37.335938 33.707031 38.613281 35.589844 38.613281 C 37.171875 38.613281 38 37.824219 38 36.730469 C 38 35.425781 37.140625 34.960938 35.402344 34.199219 L 34.449219 33.789063 C 31.695313 32.617188 29.863281 31.148438 29.863281 28.039063 C 29.863281 25.179688 32.046875 23 35.453125 23 C 37.878906 23 39.621094 23.84375 40.878906 26.054688 L 37.910156 27.964844 C 37.253906 26.789063 36.550781 26.328125 35.453125 26.328125 C 34.335938 26.328125 33.628906 27.039063 33.628906 27.964844 C 33.628906 29.109375 34.335938 29.570313 35.972656 30.28125 L 36.925781 30.691406 C 40.171875 32.078125 42 33.496094 42 36.683594 C 42 40.117188 39.300781 42 35.675781 42 Z "></path></g></svg>
@@ -0,0 +1 @@
1
+ <svg id="node" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#83CD29" d="M112.678 30.334l-44.143-25.605c-2.781-1.584-6.424-1.584-9.227 0l-44.488 25.605c-2.869 1.651-4.82 4.754-4.82 8.073v51.142c0 3.319 1.992 6.423 4.862 8.083l11.729 6.688c5.627 2.772 7.186 2.772 9.746 2.772 8.334 0 12.662-5.039 12.662-13.828v-50.49c.001-.713.446-1.774-.255-1.774h-5.622c-.712 0-2.122 1.061-2.122 1.773v50.49c0 3.896-3.616 7.773-10.202 4.48l-12.122-7.013c-.422-.23-.676-.693-.676-1.181v-51.142c0-.482.463-.966.891-1.213l44.378-25.561c.415-.235 1.002-.235 1.415 0l43.963 25.555c.421.253.354.722.354 1.219v51.142c0 .488.092.963-.323 1.198l-44.133 25.576c-.378.227-.87.227-1.285 0l-11.317-6.749c-.341-.198-.752-.269-1.08-.086-3.145 1.783-3.729 2.02-6.679 3.043-.727.253-1.799.692.408 1.929l14.798 8.754c1.416.82 3.027 1.246 4.647 1.246 1.642 0 3.249-.426 4.666-1.246l43.976-25.582c2.871-1.672 4.322-4.764 4.322-8.083v-51.142c-.001-3.319-1.452-6.414-4.323-8.073zM77.727 81.445c-11.727 0-14.309-3.235-15.17-9.066-.102-.628-.634-1.379-1.274-1.379h-5.73c-.709 0-1.28.86-1.28 1.566 0 7.466 4.06 16.512 23.454 16.512 14.038 0 22.088-5.455 22.088-15.109 0-9.572-6.467-12.084-20.082-13.886-13.762-1.819-15.16-2.738-15.16-5.962 0-2.658 1.184-6.203 11.374-6.203 9.104 0 12.46 1.954 13.841 8.091.119.577.646.991 1.241.991h5.754c.354 0 .691-.143.939-.396.241-.272.367-.613.336-.979-.893-10.569-7.913-15.494-22.112-15.494-12.632 0-20.166 5.334-20.166 14.275 0 9.698 7.497 12.378 19.622 13.577 14.505 1.422 15.633 3.542 15.633 6.395 0 4.956-3.978 7.067-13.308 7.067z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="php" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#6181B6" d="M64 33.039c-33.74 0-61.094 13.862-61.094 30.961s27.354 30.961 61.094 30.961 61.094-13.862 61.094-30.961-27.354-30.961-61.094-30.961zm-15.897 36.993c-1.458 1.364-3.077 1.927-4.86 2.507-1.783.581-4.052.461-6.811.461h-6.253l-1.733 10h-7.301l6.515-34h14.04c4.224 0 7.305 1.215 9.242 3.432 1.937 2.217 2.519 5.364 1.747 9.337-.319 1.637-.856 3.159-1.614 4.515-.759 1.357-1.75 2.624-2.972 3.748zm21.311 2.968l2.881-14.42c.328-1.688.208-2.942-.361-3.555-.57-.614-1.782-1.025-3.635-1.025h-5.79l-3.731 19h-7.244l6.515-33h7.244l-1.732 9h6.453c4.061 0 6.861.815 8.402 2.231s2.003 3.356 1.387 6.528l-3.031 15.241h-7.358zm40.259-11.178c-.318 1.637-.856 3.133-1.613 4.488-.758 1.357-1.748 2.598-2.971 3.722-1.458 1.364-3.078 1.927-4.86 2.507-1.782.581-4.053.461-6.812.461h-6.253l-1.732 10h-7.301l6.514-34h14.041c4.224 0 7.305 1.215 9.241 3.432 1.935 2.217 2.518 5.418 1.746 9.39zM95.919 54h-5.001l-2.727 14h4.442c2.942 0 5.136-.29 6.576-1.4 1.442-1.108 2.413-2.828 2.918-5.421.484-2.491.264-4.434-.66-5.458-.925-1.024-2.774-1.721-5.548-1.721zM38.934 54h-5.002l-2.727 14h4.441c2.943 0 5.136-.29 6.577-1.4 1.441-1.108 2.413-2.828 2.917-5.421.484-2.491.264-4.434-.66-5.458s-2.772-1.721-5.546-1.721z"/></svg>
@@ -0,0 +1,11 @@
1
+ <svg version="1.1" id="python" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
2
+ viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
3
+ <path fill="#FFD845" d="M122.3,48.8c-2.1-8.4-6.1-14.8-14.6-14.8H97v13c0,10-8.8,18-18.5,18H49.3c-8,0-14.3,7.3-14.3,15.3v27.8
4
+ c0,7.9,6.7,12.6,14.5,14.8c9.2,2.7,18,3.2,29.1,0c7.3-2.1,14.5-6.4,14.5-14.8V97H64v-4h43.7c8.5,0,11.6-5.8,14.6-14.7
5
+ C125.3,69.2,125.2,60.5,122.3,48.8L122.3,48.8z M80.3,104.4c3,0,5.5,2.5,5.5,5.5c0,3.1-2.5,5.6-5.5,5.6c-3,0-5.5-2.5-5.5-5.6
6
+ C74.8,106.9,77.3,104.4,80.3,104.4z"/>
7
+ <path fill="#3979B0" d="M78.4,4c-5-0.8-10.2-1.2-15.2-1.2c-5,0-9.6,0.4-13.8,1.2C37.1,6.2,35,10.8,35,19.2V30h29v4H23.8
8
+ c-8.5,0-15.9,5.1-18.2,14.8c-2.7,11.1-2.8,17.9,0,29.5C7.6,87,12.6,93,21.1,93H31V80c0-9.6,8.4-18,18.3-18h29.2
9
+ C86.6,62,93,55.1,93,47V19.2C93,11.3,86.4,5.3,78.4,4z M47.5,22.9c-3,0-5.5-2.5-5.5-5.5c0-3.1,2.5-5.6,5.5-5.6c3,0,5.5,2.5,5.5,5.6
10
+ C53,20.4,50.5,22.9,47.5,22.9z"/>
11
+ </svg>
@@ -0,0 +1 @@
1
+ <svg id="ruby" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" clip-rule="evenodd" fill="#D91404" d="M35.971 111.33c27.466 3.75 54.444 7.433 81.958 11.188-9.374-15.606-18.507-30.813-27.713-46.144l-54.245 34.956zM125.681 24.947c-2.421 3.636-4.847 7.269-7.265 10.907-8.304 12.493-16.607 24.986-24.903 37.485-.462.696-1.061 1.248-.41 2.321 8.016 13.237 15.969 26.513 23.942 39.777 1.258 2.095 2.53 4.182 4.157 6.192 1.612-32.193 3.223-64.387 4.834-96.58l-.355-.102zM16.252 66.22c.375.355 1.311.562 1.747.347 7.689-3.779 15.427-7.474 22.948-11.564 2.453-1.333 4.339-3.723 6.452-5.661 6.997-6.417 13.983-12.847 20.966-19.278.427-.395.933-.777 1.188-1.275 2.508-4.902 4.973-9.829 7.525-14.898-3.043-1.144-5.928-2.263-8.849-3.281-.396-.138-1.02.136-1.449.375-6.761 3.777-13.649 7.353-20.195 11.472-3.275 2.061-5.943 5.098-8.843 7.743-4.674 4.266-9.342 8.542-13.948 12.882-1.222 1.152-2.336 2.468-3.288 3.854-3.15 4.587-6.206 9.24-9.402 14.025 1.786 1.847 3.41 3.613 5.148 5.259zM44.354 59.949c-3.825 16.159-7.627 32.227-11.556 48.823 18.423-11.871 36.421-23.468 54.3-34.987-14.228-4.605-28.41-9.196-42.744-13.836zM120.985 25.103c-15.566 2.601-30.76 5.139-46.15 7.71 5.242 12.751 10.379 25.246 15.662 38.096 10.221-15.359 20.24-30.41 30.488-45.806zM44.996 56.644c14.017 4.55 27.755 9.01 41.892 13.6-5.25-12.79-10.32-25.133-15.495-37.737-8.815 8.059-17.498 15.999-26.397 24.137zM16.831 75.643c-4.971 11.883-9.773 23.362-14.662 35.048 9.396-.278 18.504-.547 27.925-.825-4.423-11.412-8.759-22.6-13.263-34.223zM30.424 101.739l.346-.076c3.353-13.941 6.754-27.786 10.177-42.272-7.636 3.969-14.92 7.754-22.403 11.644 3.819 9.926 7.891 20.397 11.88 30.704zM115.351 22.842c-4.459-1.181-8.918-2.366-13.379-3.539-6.412-1.686-12.829-3.351-19.237-5.052-.801-.213-1.38-.352-1.851.613-2.265 4.64-4.6 9.245-6.901 13.868-.071.143-.056.328-.111.687 13.886-2.104 27.679-4.195 41.47-6.285l.009-.292zM89.482 12.288l36.343 10.054c-2.084-5.939-4.017-11.446-6.005-17.11l-30.285 6.715-.053.341zM33.505 114.007c-4.501-.519-9.122-.042-13.687.037-3.75.063-7.5.206-11.25.323-.386.012-.771.09-1.156.506 31.003 2.866 62.005 5.732 93.007 8.6l.063-.414c-9.938-1.357-19.877-2.714-29.815-4.07-12.384-1.691-24.747-3.551-37.162-4.982zM2.782 99.994c3.995-9.27 7.973-18.546 11.984-27.809.401-.929.37-1.56-.415-2.308-1.678-1.597-3.237-3.318-5.071-5.226-2.479 12.24-4.897 24.177-7.317 36.113l.271.127c.185-.297.411-.578.548-.897zM81.522 9.841c6.737-1.738 13.572-3.097 20.367-4.613.44-.099.87-.244 1.303-.368l-.067-.332c-9.571 1.287-19.141 2.575-29.194 3.928 2.741 1.197 4.853 2.091 7.591 1.385z"/></svg>
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="200px" height="200px" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve">
6
+ <circle fill="#FFFFFF" cx="99.453" cy="99.453" r="97.453"/>
7
+ <g>
8
+ <path fill="#1C8ECD" d="M100,0C44.772,0,0,44.771,0,100c0,55.229,44.772,100,100,100c55.229,0,100-44.771,100-100
9
+ C200,44.771,155.229,0,100,0z M136.423,159.785c-11.741,0-22.331-5.014-29.754-13.006H38.098c-2.631,0-4.765-2.133-4.765-4.764
10
+ v-85.15c0-2.631,2.133-4.764,4.765-4.764h123.804c2.632,0,4.766,2.133,4.766,4.764v35.207c6.45,7.194,10.381,16.689,10.381,27.088
11
+ C177.048,141.561,158.822,159.785,136.423,159.785z"/>
12
+ <path fill="#D2E3EB" d="M97.001,109.355c0.873-3.506,2.203-6.834,3.921-9.917H43.417v37.254h56.366
13
+ c-1.178-2.45-2.112-5.041-2.782-7.73H53.688v-7.675h42.166c-0.036-0.706-0.056-1.415-0.056-2.129c0-0.718,0.02-1.427,0.056-2.132
14
+ H53.688v-7.674h43.313V109.355z"/>
15
+ <rect x="43.417" y="62.185" fill="#D2E3EB" width="113.166" height="6.279"/>
16
+ <path fill="#E6547B" d="M166.667,108.152c-1.271-3.482-3.094-6.701-5.416-9.506c-1.394-1.684-2.964-3.213-4.668-4.583
17
+ c-5.524-4.447-12.53-7.125-20.16-7.125c-10.336,0-19.524,4.912-25.426,12.502c-4.241,5.457-6.795,12.289-6.795,19.72
18
+ c0,6.467,1.933,12.482,5.226,17.535c2.68,4.109,6.272,7.556,10.486,10.084c4.837,2.902,10.471,4.603,16.509,4.603
19
+ c6.039,0,11.673-1.7,16.511-4.603c6.293-3.777,11.184-9.627,13.733-16.612c1.258-3.44,1.978-7.138,1.978-11.007
20
+ C168.645,115.29,167.925,111.594,166.667,108.152z M139.688,139.867c-0.273,0.642-0.654,1.195-1.146,1.664
21
+ c-0.487,0.469-1.06,0.834-1.708,1.1c-0.652,0.264-1.354,0.396-2.107,0.396c-0.771,0-1.483-0.135-2.138-0.396
22
+ c-0.651-0.266-1.216-0.631-1.692-1.1c-0.479-0.469-0.854-1.022-1.129-1.664c-0.275-0.641-0.414-1.328-0.414-2.062
23
+ c0-0.732,0.139-1.412,0.414-2.047c0.272-0.63,0.648-1.178,1.129-1.646c0.479-0.467,1.041-0.84,1.692-1.113
24
+ c0.652-0.273,1.364-0.412,2.138-0.412c0.754,0,1.455,0.139,2.107,0.412c0.648,0.273,1.221,0.646,1.708,1.113
25
+ c0.489,0.471,0.87,1.019,1.146,1.646c0.274,0.635,0.412,1.312,0.412,2.047S139.962,139.227,139.688,139.867z M147.945,112.467
26
+ c-0.428,1.12-0.973,2.098-1.633,2.932c-0.662,0.834-1.385,1.555-2.168,2.151c-0.783,0.603-1.527,1.166-2.229,1.696
27
+ c-0.703,0.527-1.313,1.047-1.832,1.557c-0.521,0.508-0.84,1.079-0.962,1.709l-0.854,4.274h-6.475l-0.671-4.916
28
+ c-0.021-0.123-0.036-0.244-0.046-0.366c-0.012-0.121-0.018-0.244-0.018-0.367c0-0.895,0.215-1.678,0.645-2.351
29
+ c0.427-0.671,0.965-1.287,1.617-1.847c0.648-0.562,1.354-1.1,2.104-1.619c0.753-0.519,1.454-1.077,2.104-1.678
30
+ c0.652-0.603,1.191-1.272,1.619-2.018c0.429-0.741,0.643-1.622,0.643-2.641c0-1.221-0.402-2.191-1.207-2.916
31
+ c-0.805-0.723-1.906-1.086-3.312-1.086c-1.078,0-1.979,0.113-2.701,0.338c-0.725,0.226-1.344,0.475-1.862,0.748
32
+ s-0.972,0.523-1.358,0.748c-0.386,0.226-0.771,0.336-1.158,0.336c-0.877,0-1.525-0.377-1.955-1.131l-2.504-3.846
33
+ c0.752-0.632,1.572-1.222,2.457-1.772c0.888-0.549,1.838-1.032,2.854-1.45c1.019-0.417,2.112-0.743,3.282-0.977
34
+ s2.438-0.352,3.801-0.352c1.912,0,3.639,0.254,5.176,0.763c1.536,0.509,2.842,1.237,3.922,2.183
35
+ c1.078,0.946,1.907,2.086,2.488,3.419c0.579,1.332,0.87,2.812,0.87,4.441C148.587,110.005,148.373,111.348,147.945,112.467z"/>
36
+ </g>
37
+ </svg>
@@ -0,0 +1,47 @@
1
+ class Format {
2
+ constructor() {
3
+ this.formatSelectors = document.getElementsByClassName('js-format-selector');
4
+
5
+ if (this.formatSelectors.length) {
6
+ this.formatChanged(this.formatSelectors[0].value, false)
7
+ for (let selector of this.formatSelectors) {
8
+ selector.addEventListener('change', (event) => {
9
+ this.formatChanged(event.target.value)
10
+ })
11
+ }
12
+
13
+ this.restoreFormat()
14
+ }
15
+ }
16
+
17
+ formatChanged(format, persist = true) {
18
+ for (var item of document.getElementsByClassName('js-format')) {
19
+ item.hidden = true
20
+ }
21
+ for (var item of document.querySelectorAll(`.js-format[data-format='${format}']`)) {
22
+ item.hidden = false
23
+ }
24
+
25
+ if (persist) {
26
+ this.persistFormat(format)
27
+ }
28
+ }
29
+
30
+ persistFormat(format) {
31
+ if (window.localStorage) {
32
+ window.localStorage.setItem('format', format)
33
+ }
34
+ }
35
+
36
+ restoreFormat() {
37
+ if (window.localStorage) {
38
+ const format = window.localStorage.getItem('format')
39
+ if (format) {
40
+ for (let selector of this.formatSelectors) {
41
+ selector.value = format
42
+ }
43
+ this.formatChanged(format, false)
44
+ }
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,65 @@
1
+ if(document.querySelector(".oas-wrapper")){
2
+ if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
3
+ var queryString = new URLSearchParams(window.location.search);
4
+ if (!queryString.get('theme')) {
5
+ queryString.set("theme", "dark");
6
+ window.location.search = queryString.toString();
7
+ }
8
+ }
9
+
10
+ document.addEventListener("DOMContentLoaded", function() {
11
+ // Handle people clicking on oneOf tabs by changing every one on the page
12
+ var oneOfTabs = document.querySelectorAll('[data-tab-link]');
13
+ Array.from(oneOfTabs).forEach(function (element) {
14
+ element.addEventListener('click', function (event) {
15
+ var link = event.target.getAttribute('data-tab-link');
16
+ var matchingTabs = document.querySelectorAll('[data-tab-link="' + link + '"]');
17
+ Array.from(matchingTabs).forEach(function (element) {
18
+ element.dispatchEvent(new Event('toggle'));
19
+ });
20
+ });
21
+ });
22
+
23
+ var toggleTopNav = function(event, closeOnly) {
24
+
25
+ if (event) {
26
+ if (!Array.from(event.target.classList).includes("oas-trigger")) {
27
+ return;
28
+ }
29
+ }
30
+
31
+ var c = document.querySelector('.oas-trigger-content');
32
+ if (closeOnly === true) {
33
+ c.style.display = "none";
34
+ return;
35
+ }
36
+ c.style.display = c.style.display == 'block' ? 'none' : "block";
37
+ };
38
+
39
+ if (document.querySelector('.oas-trigger')) {
40
+ document.querySelector('.oas-trigger').addEventListener("click", toggleTopNav);
41
+ }
42
+
43
+ document.querySelectorAll('a').forEach((element) => {
44
+ var href = element.getAttribute("href");
45
+ if (!href){ return; }
46
+ if (href.slice(0,1) !== "#"){ return; }
47
+ element.addEventListener('click', function (event) {
48
+ event.preventDefault();
49
+
50
+ toggleTopNav(null, true);
51
+
52
+ var to = document.querySelector(event.target.hash)
53
+ history.pushState({}, '', event.target.href);
54
+ window.scrollTo({
55
+ top: (window.scrollY + to.getBoundingClientRect().y) - 70,
56
+ left: 0,
57
+ })
58
+
59
+
60
+ });
61
+ });
62
+
63
+ });
64
+ }
65
+