| 91 | | html do |
| 92 | | head do |
| 93 | | title 'test' |
| 94 | | link :href=>R(Stylesheet), :rel=>'stylesheet', :type=>'text/css' |
| 95 | | end |
| 96 | | style <<-END, :type => 'text/css' |
| 97 | | body { |
| 98 | | font-family: verdana, arial, sans-serif; |
| 99 | | } |
| 100 | | h1, h2, h3, h4, h5 { |
| 101 | | font-weight: normal; |
| 102 | | } |
| 103 | | p.actions a { |
| 104 | | margin-right: 6px; |
| 105 | | } |
| 106 | | END |
| 107 | | body do |
| 108 | | p do |
| 109 | | small do |
| 110 | | span "welcome to " ; a 'tepee', :href => "http://code.whytheluckystiff.net/svn/camping/trunk/examples/tepee.rb" |
| 111 | | span '. go ' ; a 'home', :href => R(Show, 'home') |
| 112 | | span '. list all ' ; a 'pages', :href => R(List) |
| | 98 | unless @no_layout |
| | 99 | html do |
| | 100 | head do |
| | 101 | title 'test' |
| | 102 | link :href=>R(Stylesheet), :rel=>'stylesheet', :type=>'text/css' |
| | 103 | end |
| | 104 | style <<-END, :type => 'text/css' |
| | 105 | body { |
| | 106 | font-family: verdana, arial, sans-serif; |
| | 107 | } |
| | 108 | h1, h2, h3, h4, h5 { |
| | 109 | font-weight: normal; |
| | 110 | } |
| | 111 | p.actions a { |
| | 112 | margin-right: 6px; |
| | 113 | } |
| | 114 | END |
| | 115 | body do |
| | 116 | p do |
| | 117 | small do |
| | 118 | span "welcome to " ; a 'tepee', :href => "http://code.whytheluckystiff.net/svn/camping/trunk/examples/tepee.rb" |
| | 119 | span '. go ' ; a 'home', :href => R(Show, 'home') |
| | 120 | span '. list all ' ; a 'pages', :href => R(List) |
| | 121 | end |
| | 122 | end |
| | 123 | div.content do |
| | 124 | self << yield |
| 123 | | h1 @page.title |
| 124 | | div { _markup @version.body } |
| 125 | | if @boxx |
| 126 | | div.error! @boxx |
| 127 | | end |
| 128 | | p.actions do |
| 129 | | _button 'edit', :href => R(Edit, @version.title, @version.version) |
| 130 | | _button 'back', :href => R(Show, @version.title, @version.version-1) unless @version.version == 1 |
| 131 | | _button 'next', :href => R(Show, @version.title, @version.version+1) unless @version.version == @page.version |
| 132 | | _button 'current', :href => R(Show, @version.title) unless @version.version == @page.version |
| 133 | | _button 'versions', :href => R(Versions, @page.title) |
| | 134 | m = _markup @version.body |
| | 135 | unless @no_layout |
| | 136 | h1 @page.title |
| | 137 | div { m } |
| | 138 | if @boxx |
| | 139 | div.error! @boxx |
| | 140 | end |
| | 141 | p.actions do |
| | 142 | _button 'edit', :href => R(Edit, @version.title, @version.version) |
| | 143 | _button 'back', :href => R(Show, @version.title, @version.version-1) unless @version.version == 1 |
| | 144 | _button 'next', :href => R(Show, @version.title, @version.version+1) unless @version.version == @page.version |
| | 145 | _button 'current', :href => R(Show, @version.title) unless @version.version == @page.version |
| | 146 | _button 'versions', :href => R(Versions, @page.title) |
| | 147 | end |
| | 148 | else |
| | 149 | self << m |