Class: Metanorma::Html::PdfaRenderer

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

Overview

Renders PDF Association (PDFA) taste documents to HTML. PDFA brand: #cf9c1d gold + #d03544 red + #4992b2 steel blue from logo

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/pdfa_renderer.rb', line 14

def flavor_publisher_name
  "PDF Association"
end

#flavor_publishers(_doc_id) ⇒ Object



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

def flavor_publishers(_doc_id)
  ["PDF Association"]
end

#publisher_logo_mapObject



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

def publisher_logo_map
  { "PDF Association" => "pdfa-logo.svg" }
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
# File 'lib/metanorma/html/pdfa_renderer.rb', line 22

def theme
  @theme ||= Theme.new.tap do |t|
    t.primary        = "#3a6e85"
    t.accent         = "#cf9c1d"
    t.accent_deep    = "#b08518"
    t.gradient       = "linear-gradient(135deg, #2a5268 0%, #3a6e85 50%, #4992b2 100%)"
    t.primary_light  = "#eef5f8"
    t.accent_light   = "#fdf6e6"
    t.warm           = "#d03544"
    t.warm_light     = "#fdeef0"
    t.header_background = "linear-gradient(135deg, #2a5268 0%, #3a6e85 40%, #4992b2 100%)"
    t.cover_background  = "linear-gradient(175deg, #1a3848 0%, #2a5268 25%, #3a6e85 55%, #4992b2 85%, #cf9c1d 100%)"
    t.cover_before_bg   = "background: radial-gradient(ellipse at 25% 20%, rgba(207,156,29,0.15) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(73,146,178,0.2) 0%, transparent 40%)"
    t.cover_after_bg    = "height: 3px; background: linear-gradient(90deg, transparent, #cf9c1d, #d03544, transparent)"
    t.progress_bar_color = "#cf9c1d"
    t.note_border     = "#4992b2"
    t.note_bg         = "#eef5f8"
    t.note_color      = "#4992b2"
    t.example_border  = "#3a6e85"
    t.example_bg      = "#eef5f8"
    t.example_color   = "#3a6e85"
    t.admonition_border = "#d03544"
    t.admonition_color  = "#d03544"
    t.footer_border_color = "#cf9c1d"
    t.cover_separator_color = "rgba(207,156,29,0.25)"
  end
end