Sha256: 23f652e0834278cf61d0a150132721b0ac04dc01d4bc7bf0f81fe8e881fc2ce4

Contents?: true

Size: 1.65 KB

Versions: 1

Compression:

Stored size: 1.65 KB

Contents

= block_with_caption :top, :class=>'tableblock'
  table [
      class=["frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", spread?]
      style=style_value(width: ("#{attr :tablepcwidth}%" if !autowidth? && !spread? || (local_attr :width)),
                        float: (attr :float)) ]
    - unless (attr :rowcount).zero?
      colgroup
        - if autowidth?
          - columns.each do
            col
        - else
          - columns.each do |col|
            col style="width: #{col.attr :colpcwidth}%;"
      - [:head, :foot, :body].reject { |tblsec| rows[tblsec].empty? }.each do |tblsec|
        <t#{tblsec}>
          - rows[tblsec].each do |row|
            tr
              - row.each do |cell|
                = html_tag(tblsec == :head || cell.style == :header ? 'th' : 'td',
                    :class=>['tableblock', "halign-#{cell.attr :halign}", "valign-#{cell.attr :valign}"],
                    :colspan=>cell.colspan,
                    :rowspan=>cell.rowspan,
                    :style=>style_value(background_color: (document.attr :cellbgcolor)))
                  - if tblsec == :head
                    =cell.text
                  - else
                    - case cell.style
                    - when :asciidoc
                      =cell.content
                    - when :verse
                      .verse: pre =cell.text
                    - when :literal
                      .literal: pre =cell.text
                    - else
                      - if cell.content.one?
                        =cell.content.first
                      - else
                        - cell.content.each do |text|
                          p =text

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asciidoctor-html5s-0.1.0.beta.1 data/templates/table.html.slim