|
1 | | -%form{:action => "/programs", :method => "POST"} |
2 | | - %label{:for => "program_title"} Title |
3 | | - %br/ |
4 | | - %input{:type => "text", :id => "program_title", :name => "program[title]"} |
5 | | - %br/ |
6 | | - %label{:for => "program_body"} Body |
| 1 | +.span-9 |
| 2 | + %a{:href => "/"} |
| 3 | + %img{:height => "64", :src => "/images/logo.png", :style => "float:left"}/ |
| 4 | + %p.body{:style => "padding-top:20px;padding-left:80px"} Hackety Hack |
| 5 | +- if logged_in? |
| 6 | + .span-6.prepend-3.last |
| 7 | + %ul |
| 8 | + %li{:style => "display:inline"} |
| 9 | + %a{:href => "/download"} Download |
| 10 | + | |
| 11 | + %li{:style => "display:inline"} |
| 12 | + %a{:href => "/hackers/#{current_user.username.to_slug}"} My Page |
| 13 | + | |
| 14 | + %li{:style => "display:inline"} |
| 15 | + %a{:href => "/logout"} Log out |
| 16 | +- else |
| 17 | + .span-4.prepend-5.last |
| 18 | + %ul |
| 19 | + %li{:style => "display:inline"} |
| 20 | + %a{:href => "/download"} Download |
| 21 | + | |
| 22 | + %li{:style => "display:inline"} |
| 23 | + %a{:href => "/login"} Log in |
| 24 | +.span-18.last |
| 25 | + %h1 A new program |
| 26 | + %form{:action => "/programs", :method => "POST"} |
| 27 | + %label{:for => "program_title"} Title |
| 28 | + %br/ |
| 29 | + %input{:type => "text", :id => "program_title", :name => "program[title]"} |
| 30 | + %br/ |
| 31 | + %label{:for => "program_body"} Body |
| 32 | + %br/ |
| 33 | + %textarea{:id => "program_body", :name => "program[code]"} |
| 34 | + %br/ |
| 35 | + %input{:type => "submit", :value => "Create", :class => "button"} |
| 36 | + |
7 | 37 | %br/ |
8 | | - %textarea{:id => "program_body", :name => "program[code]"} |
9 | 38 | %br/ |
10 | | - %input{:type => "submit", :value => "Create", :class => "button"} |
11 | | - |
12 | | -%br/ |
13 | | -%br/ |
|
0 commit comments