Sha256: 34c217dd5f45d9b9d06f7e263112eb6e653897ecefd9cb386871be4e33bbd7ce
Contents?: true
Size: 850 Bytes
Versions: 1
Compression:
Stored size: 850 Bytes
Contents
# frozen_string_literal: true module Kitchen module Directions module BakeAutotitledNotes def self.v1(book:, classes:, bake_subtitle: true, cases: false) book.notes.each do |note| next unless (note.classes & classes).any? bake_note(note: note, bake_subtitle: bake_subtitle, cases: cases) end end def self.bake_note(note:, bake_subtitle:, cases: false) Kitchen::Directions::BakeIframes.v1(outer_element: note) note.wrap_children(class: 'os-note-body') BakeNoteSubtitle.v1(note: note, cases: cases) if bake_subtitle note.prepend(child: <<~HTML <h3 class="os-title" data-type="title"> <span class="os-title-label">#{note.autogenerated_title}</span> </h3> HTML ) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
openstax_kitchen-11.1.0 | lib/kitchen/directions/bake_notes/bake_autotitled_notes.rb |