Class: Docit::UI::ScalarRenderer
- Inherits:
-
BaseRenderer
- Object
- BaseRenderer
- Docit::UI::ScalarRenderer
- Defined in:
- lib/docit/ui/scalar_renderer.rb
Instance Attribute Summary
Attributes inherited from BaseRenderer
Instance Method Summary collapse
Methods inherited from BaseRenderer
Constructor Details
This class inherits a constructor from Docit::UI::BaseRenderer
Instance Method Details
#render ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/docit/ui/scalar_renderer.rb', line 6 def render <<~HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>#{title}</title> <style> body { margin: 0; } </style> </head> <body> #{(active: :scalar)} <script id="api-reference"></script> <script> document.getElementById('api-reference').dataset.configuration = JSON.stringify({ spec: { url: #{spec_url_json} }, theme: "elysiajs", showSidebar: true, hideDownloadButton: false, hideModels: false, searchHotKey: "k" }) </script> <script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script> </body> </html> HTML end |