Sha256: c4b2130e85c4b831b2e8a082911d82333a34e0d418f18f7d93fceb80658bc022
Contents?: true
Size: 843 Bytes
Versions: 8
Compression:
Stored size: 843 Bytes
Contents
# frozen_string_literal: true module Kitchen::Directions::CompositePageContainer class V1 renderable def bake(container_key:, uuid_key:, metadata_source:, content:, append_to:) @in_composite_chapter = append_to.is?(:composite_chapter) @is_eoc = append_to.is?(:chapter) || @in_composite_chapter @section = @is_eoc ? 'eoc' : 'eob' @title = I18n.t(:"#{@section}.#{container_key}") @uuid_key = uuid_key @container_class_type = container_key @metadata = metadata_source.children_to_keep.copy @content = content @main_title_tag = 'h1' if @in_composite_chapter @main_title_tag = 'h3' elsif @is_eoc @main_title_tag = 'h2' end append_to.append(child: render(file: '../../templates/composite_page_template.xhtml.erb')) end end end
Version data entries
8 entries across 8 versions & 1 rubygems