Mercurial > zeropaste
annotate app/views/pastes/show.html.erb @ 395:26f8c634052c
Complete rework.
author | nanaya <me@myconan.net> |
---|---|
date | Sat, 27 Jun 2015 14:46:01 +0900 |
parents | 91dabc034389 |
children | 851432f21603 |
rev | line source |
---|---|
98 | 1 <% provide :title, "Paste ##{@paste.id}" %> |
190 | 2 |
395 | 3 <div class="paste-content"> |
4 <div class="paste-nav"> | |
5 <%= link_to 'Plain', '#pl', :class => "paste-nav-item active" %> | |
6 <%= link_to 'Highlight', '#hl', :class => "paste-nav-item" %> | |
7 <%= link_to 'Markdown', '#md', :class => "paste-nav-item" %> | |
8 </div> | |
264 | 9 |
395 | 10 <% lines = @paste.paste.split("\n") %> |
11 <%# list number contains <n> + "." + <2.5 * spaces (approx)> %> | |
12 <ol style="padding-left: <%= lines.size.to_s.length + 4 %>ch" class="paste-plain monospaced"> | |
13 <% lines.each.with_index(1) do |line, i| %> | |
14 <li id="L<%= i %>" class="line"> | |
15 <%= line %> | |
16 </li> | |
17 <% end %> | |
18 </ol> | |
100
90b59418828a
Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents:
98
diff
changeset
|
19 </div> |
2 | 20 |
395 | 21 <div class="settings"> |
22 <%= form_for @paste, :method => :delete, :authenticity_token => false, :html => { :class => "settings-item settings-item--inline" } do |f| %> | |
265
6cca1ab53337
Infinitely better error messages and notice.
edogawaconan <me@myconan.net>
parents:
264
diff
changeset
|
23 |
395 | 24 <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :autofocus => f.object.errors.any?, :class => "main-textarea" %> |
25 | |
26 <%= f.button 'Delete this paste', :class => 'btn btn--danger btn--min-width' %> | |
390 | 27 <% end %> |
189
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
179
diff
changeset
|
28 |
395 | 29 </div> |
30 | |
31 <div class="paste-nav paste-nav--bottom"> | |
32 <%= link_to 'Raw', paste_path(@paste, :txt), :class => "paste-nav-item" %> | |
33 <%= link_to 'Derive', root_path(:base => @paste), :class => "paste-nav-item" %> | |
34 <%= link_to 'More Paste', root_path, :class => "paste-nav-item" %> | |
35 </div> |