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::BLOCK_TYPES, 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

#collect_document_children, #convert_boilerplate_links, #extract_designation_name, #extract_display_title, #extract_doctype, #extract_name_text, #extract_stage, #extract_term_definition, #extract_term_name, #formatted_doc_id, #publisher_logos_html, #render_abstract, #render_annex, #render_annex_title, #render_boilerplate, #render_boilerplate_section, #render_clause, #render_coverpage, #render_doc_title, #render_document, #render_foreword, #render_preface, #render_sections, #render_term, #render_term_definition, #render_term_designation, #render_term_origin, #render_terms_section, #render_title, #strip_html

Methods inherited from StandardRenderer

#bibitem_url, #extract_designation_name, #extract_termnote_label, #is_title_element?, #render_abstract_section, #render_amend_block, #render_annex_section, #render_bibitem, #render_bibitem_content, #render_bibliography, #render_clause_section, #render_coverpage, #render_doc_title, #render_floating_title, #render_foreword_section, #render_introduction_section, #render_references_section, #render_section, #render_section_block_collections, #render_standard_document, #render_standard_section, #render_standard_section_blocks, #render_standard_title, #render_subsections, #render_term, #render_term_definition, #render_term_designation, #render_term_example, #render_term_note, #render_term_source, #render_term_source_element, #render_terms_section

Methods inherited from BaseRenderer

#alignment_style, #assemble_document, #block_element?, #build_footer, #build_header, #build_publisher_logos, #build_scripts, #build_semx_skip_set, #build_styles, #build_toc_html, #capture_output, #check_presentation_markers, #collect_index_term, #collect_ordered_children, #deduplicate_semx_label, #deduplicate_semx_text, #element_attrs, #escape_html, #extract_block_label, #extract_plain_text, #extract_primary_doc_id, #extract_text_value, #extract_title_text, #flavor_css_module, #flavor_font_url, #flavor_js_module, #generate_full_document, #header_title_text, #html_class_for_span, #html_title, #initialize, inline_registry, #language, #load_logo_svg, #lookup_dispatch, #raw_content_node?, #register_figure_entry, register_inline_render, register_render, #register_table_entry, #register_toc_entry, #render, #render_admonition, #render_asciimath, #render_audio, #render_basic_section, #render_bookmark, #render_br, #render_cell_content, #render_comma, #render_concept, #render_content_section, #render_definition_list, #render_em, #render_eref, #render_example, #render_figure, #render_fmt_stem, #render_fmt_xref, #render_fn, #render_fn_inline, #render_footnotes_section, #render_formula, #render_hierarchical_section, #render_image, #render_index, #render_inline_collections, #render_inline_element, #render_inline_tag, #render_link, #render_liquid, #render_list_item, #render_math, #render_mixed_content_in_order, #render_mixed_inline, #render_noop, #render_noop_inline, #render_note, #render_note_inline, #render_ordered_content, #render_ordered_inline, #render_ordered_list, #render_paragraph, #render_quote, #render_raw_content, render_registry, #render_section_content, #render_section_title, #render_semx_content, #render_semx_inline, #render_small_caps, #render_sourcecode, #render_span, #render_stem, #render_stem_content, #render_strike, #render_strong, #render_sub, #render_sup, #render_tab, #render_table, #render_table_cell, #render_table_colgroup, #render_table_section, #render_table_section_rows, #render_tt, #render_underline, #render_unordered_list, #render_video, #render_xref, #renderer_context, #safe_attr, #sort_by_displayorder, #table_column_count, #tag, #to_html, #toc_entries, #validate_presentation_xml!, #walk_ordered

Constructor Details

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

Instance Method Details

#flavor_publisher_nameObject



13
14
15
# File 'lib/metanorma/html/pdfa_renderer.rb', line 13

def flavor_publisher_name
  "PDF Association"
end

#flavor_publishers(_doc_id) ⇒ Object



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

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

#publisher_logo_mapObject



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

def publisher_logo_map
  { "PDF Association" => "pdfa-logo.svg" }
end

#themeObject



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

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