Sha256: 186a58b802f78752a63cddf70c49bf93b3e2bb52866dad8957b4383d6e9cb324

Contents?: true

Size: 486 Bytes

Versions: 9

Compression:

Stored size: 486 Bytes

Contents

require 'nitro/element'

class Page < Nitro::Element
  def doctype
    %~
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ~
  end

  def render
    %~
    #{doctype}
    <html>
      <head>
        <base href="\#{request.host_url}" />
        <link href="style.css" media="screen" rel="Stylesheet" type="text/css" />
      </head>
      <body>
        #{content}
      </body>
    </html>
    ~
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
nitro-0.41.0 proto/src/skin.rb
nitro-0.26.0 proto/src/skin.rb
nitro-0.25.0 proto/src/skin.rb
nitro-0.28.0 proto/src/skin.rb
nitro-0.29.0 proto/src/skin.rb
nitro-0.27.0 proto/src/skin.rb
nitro-0.30.0 proto/src/skin.rb
nitro-0.31.0 proto/src/skin.rb
nitro-0.40.0 proto/src/skin.rb