Sha256: 0c7147180f7a5badc08560c298af3b313cf4306d3113bf20234361ef70b34e29

Contents?: true

Size: 1.96 KB

Versions: 59

Compression:

Stored size: 1.96 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|
      *{:tag=>"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 :verse, :literal
                  - cell_content = cell.text
                - else
                  - cell_content = cell.content
              *{:tag=>(tblsec == :head ? '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 :verse
                    .verse=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

59 entries across 26 versions & 2 rubygems

Version Path
asciidoctor-revealjs-1.0.4 templates/slim/block_table.html.slim
asciidoctor-revealjs-1.0.3 templates/slim/block_table.html.slim
asciidoctor-revealjs-1.0.2 templates/slim/block_table.html.slim
asciidoctor-revealjs-1.0.1 templates/slim/block_table.html.slim
asciidoctor-revealjs-1.0.0 templates/slim/block_table.html.slim
hyla-1.0.9 lib/resources/backends/slim/html5/block_table.html.slim
hyla-1.0.9 lib/resources/backends/slim/revealjs-redhat/block_table.html.slim
hyla-1.0.9 lib/resources/backends/slim/revealjs/block_table.html.slim
hyla-1.0.9.pre.3 lib/resources/backends/slim/revealjs-redhat/block_table.html.slim
hyla-1.0.9.pre.3 lib/resources/backends/slim/revealjs/block_table.html.slim
hyla-1.0.9.pre.3 lib/resources/backends/slim/html5/block_table.html.slim
hyla-1.0.9.pre.2 lib/resources/backends/slim/html5/block_table.html.slim
hyla-1.0.9.pre.2 lib/resources/backends/slim/revealjs/block_table.html.slim
hyla-1.0.9.pre.2 lib/resources/backends/slim/revealjs-redhat/block_table.html.slim
hyla-1.0.9.pre.1 lib/resources/backends/slim/revealjs/block_table.html.slim
hyla-1.0.9.pre.1 lib/resources/backends/slim/html5/block_table.html.slim
hyla-1.0.9.pre.1 lib/resources/backends/slim/revealjs-redhat/block_table.html.slim
hyla-1.0.8 lib/resources/backends/slim/revealjs/block_table.html.slim
hyla-1.0.8 lib/resources/backends/slim/html5/block_table.html.slim
hyla-1.0.8 lib/resources/backends/slim/revealjs-redhat/block_table.html.slim