Sha256: 961313a0d69170563cbb28110cd970c182ff9b03c8cc5cb75d7be9f6372d40ed

Contents?: true

Size: 2 KB

Versions: 6

Compression:

Stored size: 2 KB

Contents

table(id=@id class=['tableblock',"frame-#{attr :frame, 'all'}","grid-#{attr :grid, 'all'}",role]
    style=[("width:#{attr :tablepcwidth}%" unless option? 'autowidth'),("float:#{attr :float}" if attr? :float)].compact.join('; '))
  - if title?
    caption.title=captioned_title
  - unless (attr :rowcount).zero?
    colgroup
      - if option? 'autowidth'
        - @columns.each do
          col
      - else
        - @columns.each do |col|
          col style="width:#{col.attr :colpcwidth}%"
    - [:head, :foot, :body].select {|tblsec| !@rows[tblsec].empty? }.each do |tblsec|
      / not sure about this one, done when converting to a compilable slim template
      <t#{tblsec}>
        - @rows[tblsec].each do |row|
          tr
            - row.each do |cell|
              / store reference of content in advance to resolve attribute assignments in cells
              - if tblsec == :head
                - cell_content = cell.text
              - else
                - case cell.style
                - when :literal
                  - cell_content = cell.text
                - else
                  - cell_content = cell.content
              = 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=>((@document.attr? :cellbgcolor) ? %(background-color:#{@document.attr :cellbgcolor};) : nil))
                - if tblsec == :head
                  =cell_content
                - else
                  - case cell.style
                  - when :asciidoc
                    div=cell_content
                  - when :literal
                    .literal: pre=cell_content
                  - when :header
                    - cell_content.each do |text|
                      p.tableblock.header=text
                  - else
                    - cell_content.each do |text|
                      p.tableblock=text

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
asciidoctor-revealjs-4.0.1 templates/table.html.slim
asciidoctor-revealjs-4.0.0 templates/table.html.slim
asciidoctor-revealjs-3.1.0 templates/table.html.slim
asciidoctor-revealjs-3.0.0 templates/table.html.slim
asciidoctor-revealjs-3.0.0.pre.rc1 templates/table.html.slim
asciidoctor-revealjs-2.0.1 templates/table.html.slim