Class: Metanorma::Html::IecRenderer

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

Overview

IEC brand: #0061a9 blue from logo

Constant Summary

Constants inherited from BaseRenderer

BaseRenderer::LOGO_DIR, BaseRenderer::METANORMA_LOGO, BaseRenderer::SPAN_ROLE_CLASSES, BaseRenderer::TEMPLATE_CACHE, BaseRenderer::TEMPLATE_CACHE_MUTEX

Instance Attribute Summary

Attributes inherited from BaseRenderer

#footnote_collector, #index_term_collector

Instance Method Summary collapse

Methods inherited from IsoRenderer

#extract_display_title, #extract_doctype, #extract_stage, #formatted_doc_id, #render_term_origin

Methods inherited from BaseRenderer

#assemble_document, #build_footer, #build_header, #build_publisher_logos, #build_scripts, #build_styles, #build_toc_html, #check_presentation_markers, #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, inline_registry, #language, #load_logo_svg, #register_figure_entry, register_inline_render, register_render, #register_table_entry, #register_toc_entry, #render, #render_inline_element, #render_liquid, render_registry, #renderer_context, #to_html, #toc_entries, #validate_presentation_xml!

Constructor Details

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

Instance Method Details

#flavor_publisher_nameObject



12
13
14
# File 'lib/metanorma/html/iec_renderer.rb', line 12

def flavor_publisher_name
  "IEC"
end

#flavor_publishers(_doc_id) ⇒ Object



8
9
10
# File 'lib/metanorma/html/iec_renderer.rb', line 8

def flavor_publishers(_doc_id)
  ["IEC"]
end

#publisher_logo_mapObject



16
17
18
# File 'lib/metanorma/html/iec_renderer.rb', line 16

def publisher_logo_map
  { "IEC" => "iec-logo.svg" }
end

#themeObject



20
21
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
# File 'lib/metanorma/html/iec_renderer.rb', line 20

def theme
  @theme ||= Theme.new.tap do |t|
    t.font_body      = '"Crimson Pro", "Georgia", "Times New Roman", serif'
    t.font_sans      = '"IBM Plex Sans", "Helvetica Neue", Arial, sans-serif'
    t.font_mono      = '"IBM Plex Mono", "Fira Code", monospace'
    t.font_url       = "https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap"
    t.primary        = "#004a83"
    t.accent         = "#0061a9"
    t.accent_deep    = "#004a83"
    t.gradient       = "linear-gradient(135deg, #00305a 0%, #004a83 50%, #0061a9 100%)"
    t.primary_light  = "#ebf3f9"
    t.accent_light   = "#d9ecf7"
    t.warm           = "#d4a017"
    t.warm_light     = "#fdf6e8"
    t.header_background = "linear-gradient(135deg, #00305a 0%, #004a83 40%, #0061a9 100%)"
    t.cover_background  = "linear-gradient(175deg, #001f3d 0%, #00305a 25%, #004a83 55%, #0061a9 85%, #3391c4 100%)"
    t.cover_before_bg   = "background: radial-gradient(ellipse at 20% 10%, rgba(0,97,169,0.2) 0%, transparent 50%), radial-gradient(ellipse at 80% 90%, rgba(212,160,23,0.1) 0%, transparent 40%)"
    t.cover_after_bg    = "height: 3px; background: linear-gradient(90deg, transparent, #0061a9, #d4a017, transparent)"
    t.progress_bar_color = "#0061a9"
    t.note_border     = "#0061a9"
    t.note_bg         = "#d9ecf7"
    t.note_color      = "#0061a9"
    t.example_border  = "#004a83"
    t.example_bg      = "#ebf3f9"
    t.example_color   = "#004a83"
    t.admonition_border = "#d4a017"
    t.admonition_color  = "#b8860b"
    t.footer_border_color = "#0061a9"
    t.cover_separator_color = "rgba(0,97,169,0.25)"
  end
end