Module: Aptible::DocumentHelpers::SubsectionHeadings

Included in:
Aptible::DocumentHelpers
Defined in:
lib/aptible/document_helpers/subsection_headings.rb

Instance Method Summary collapse

Instance Method Details

#subsection_heading(heading_title, section_title) ⇒ Object

rubocop:disable MethodLength



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/aptible/document_helpers/subsection_headings.rb', line 5

def subsection_heading(heading_title, section_title)
  move_down 20
  formatted_text [
    text: heading_title,
    anchor: heading_title,
    font: 'Proxima Nova',
    size: 20,
    styles: [:bold],
    color: '003366'
  ]

  move_down 10

  outline.add_subsection_to(section_title) do
    # Add references for PDF navigation
    outline.section(title: heading_title, destination: page_number)
    # Add page titles and numbers for Table of Contents
    outline.page(title: heading_title, destination: page_number)
  end
end