Class: Metanorma::Html::OimlRenderer

Inherits:
IsoRenderer show all
Defined in:
lib/metanorma/html/oiml_renderer.rb

Overview

Renders OimlDocument (OIML) components to HTML. Extends IsoRenderer with OIML branding.

Constant Summary

Constants inherited from BaseRenderer

BaseRenderer::CLASS_MAP, BaseRenderer::LOGO_DIR, BaseRenderer::METANORMA_LOGO, BaseRenderer::TEMPLATE_CACHE

Instance Attribute Summary

Attributes inherited from BaseRenderer

#footnote_collector, #index_term_collector

Instance Method Summary collapse

Methods inherited from IsoRenderer

doc_types, #extract_display_title, #extract_doctype, #extract_stage, #formatted_doc_id, registers_doc_type, #render, #render_inline_element, #render_term_origin

Methods inherited from StandardRenderer

#render

Methods inherited from BaseRenderer

#assemble_document, #build_footer, #build_header, #build_publisher_logos, #build_reader_controls, #build_scripts, #build_styles, #build_toc_html, #check_presentation_markers, #detect_publishers, #extract_plain_text, #extract_primary_doc_id, #flavor_css_module, #flavor_font_url, #flavor_js_module, #generate_full_document, #header_title_text, #html_title, #initialize, #language, #load_logo_svg, #register_figure_entry, #register_table_entry, #register_toc_entry, #render, #render_liquid, #to_html, #toc_entries, #validate_presentation_xml!

Constructor Details

This class inherits a constructor from Metanorma::Html::BaseRenderer

Instance Method Details

#flavor_publisher_nameObject



14
15
16
# File 'lib/metanorma/html/oiml_renderer.rb', line 14

def flavor_publisher_name
  "OIML"
end

#flavor_publishers(_doc_id) ⇒ Object



10
11
12
# File 'lib/metanorma/html/oiml_renderer.rb', line 10

def flavor_publishers(_doc_id)
  ["OIML"]
end

#publisher_logo_mapObject



18
19
20
# File 'lib/metanorma/html/oiml_renderer.rb', line 18

def publisher_logo_map
  {}
end

#themeObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/metanorma/html/oiml_renderer.rb', line 22

def theme
  @theme ||= Theme.new.tap do |t|
    t.font_body      = '"Merriweather", "Georgia", serif'
    t.font_sans      = '"Montserrat", "Helvetica Neue", Arial, sans-serif'
    t.font_mono      = '"JetBrains Mono", "Fira Code", monospace'
    t.font_url       = "https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,400&family=Montserrat:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
    t.primary        = "#1a5c3a"
    t.accent         = "#2e8b57"
    t.accent_deep    = "#247049"
    t.gradient       = "linear-gradient(135deg, #0d3d22 0%, #1a5c3a 50%, #2e8b57 100%)"
    t.primary_light  = "#edf7f1"
    t.accent_light   = "#e0f5e8"
    t.warm           = "#d4a017"
    t.warm_light     = "#fdf6e8"
    t.header_background = "linear-gradient(135deg, #0d3d22 0%, #1a5c3a 50%, #2e8b57 100%)"
    t.cover_background  = "linear-gradient(175deg, #071f14 0%, #0d3d22 30%, #1a5c3a 65%, #2e8b57 100%)"
    t.cover_before_bg   = "background: radial-gradient(ellipse at 30% 20%, rgba(46,139,87,0.2) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(212,160,23,0.15) 0%, transparent 40%)"
    t.cover_after_bg    = "height: 3px; background: linear-gradient(90deg, transparent, #d4a017, transparent)"
    t.progress_bar_color = "#2e8b57"
    t.note_border     = "#2e8b57"
    t.note_bg         = "#e0f5e8"
    t.note_color      = "#2e8b57"
    t.example_border  = "#1a5c3a"
    t.example_bg      = "#edf7f1"
    t.example_color   = "#1a5c3a"
    t.admonition_border = "#d4a017"
    t.admonition_color  = "#d4a017"
    t.footer_border_color = "#2e8b57"
    t.cover_separator_color = "rgba(46,139,87,0.25)"
  end
end