Sha256: d2f31a2b5577f1e06182610bf69a3a8cff5d6dc9dc98dc78ac306e288f0d40dd

Contents?: true

Size: 1.25 KB

Versions: 33

Compression:

Stored size: 1.25 KB

Contents

<!-- Renders one of five HTML DOCTYPE declarations, according to the `version` attribute.

### Attributes
 - 'version' - the doctype version, must be one of:

   - HTML 4.01 STRICT
   - HTML 4.01 TRANSITIONAL
   - XHTML 1.0 STRICT
   - XHTML 1.0 TRANSITIONAL
   - XHTML 1.1
   - HTML
   - html
   - HTML5
   - html5

See the source for the actual output

 -->
<def tag="doctype" attrs="version"><%=raw(
  case version.upcase
    when "HTML 4.01 STRICT"
      '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ' +
        '"http://www.w3.org/TR/html4/strict.dtd">'
    when "HTML 4.01 TRANSITIONAL"
      '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ' +
        '"http://www.w3.org/TR/html4/loose.dtd">'
    when "XHTML 1.0 STRICT"
      '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ' +
        '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
    when "XHTML 1.0 TRANSITIONAL"
      '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ' +
        '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
    when "XHTML 1.1"
      '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" ' +
      '"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
    when "HTML", "html", "HTML5", "html5"
      '<!DOCTYPE html>'
  end)
%></def>

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
hobo_rapid-2.2.6 taglibs/html/doctype.dryml
hobo_rapid-2.2.5 taglibs/html/doctype.dryml
hobo_rapid-2.2.4 taglibs/html/doctype.dryml
hobo_rapid-2.2.3 taglibs/html/doctype.dryml
hobo_rapid-2.2.2 taglibs/html/doctype.dryml
hobo_rapid-2.2.1 taglibs/html/doctype.dryml
hobo_rapid-2.2.0 taglibs/html/doctype.dryml
hobo_rapid-2.1.2 taglibs/html/doctype.dryml
hobo_rapid-2.1.1 taglibs/html/doctype.dryml
hobo_rapid-2.1.0 taglibs/html/doctype.dryml
hobo_rapid-2.1.0.pre4 taglibs/html/doctype.dryml
hobo_rapid-2.1.0.pre3 taglibs/html/doctype.dryml
hobo_rapid-2.1.0.pre2 taglibs/html/doctype.dryml
hobo_rapid-2.1.0.pre1 taglibs/html/doctype.dryml
hobo_rapid-2.0.1 taglibs/html/doctype.dryml
hobo_rapid-2.0.0 taglibs/html/doctype.dryml
hobo_rapid-2.0.0.pre10 taglibs/html/doctype.dryml
hobo_rapid-2.0.0.pre9 taglibs/html/doctype.dryml
hobo_rapid-2.0.0.pre8 taglibs/html/doctype.dryml
hobo_rapid-2.0.0.pre7 taglibs/html/doctype.dryml