Mercurial > zeropaste
diff 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 |
line wrap: on
line diff
--- a/app/views/pastes/show.html.erb Mon Jun 08 19:14:53 2015 +0900 +++ b/app/views/pastes/show.html.erb Sat Jun 27 14:46:01 2015 +0900 @@ -1,41 +1,35 @@ <% provide :title, "Paste ##{@paste.id}" %> -<div id="paste-show" data-id="<%= @paste.id %>"> - <ul id="paste-mode" class="nav nav-tabs"> - <li class="active"><%= link_to 'Plain', '#pl', :data => { :toggle => 'pill' } %></li> - <li><%= link_to 'Highlight', '#hl', :data => { :toggle => 'pill' } %></li> - <li><%= link_to 'Markdown', '#md', :data => { :toggle => 'pill' } %></li> - </ul> +<div class="paste-content"> + <div class="paste-nav"> + <%= link_to 'Plain', '#pl', :class => "paste-nav-item active" %> + <%= link_to 'Highlight', '#hl', :class => "paste-nav-item" %> + <%= link_to 'Markdown', '#md', :class => "paste-nav-item" %> + </div> - <div id="paste"> - <% lines = @paste.paste.split("\n") %> - <%# list number contains <n> + "." + <2.5 * spaces (approx)> %> - <ol style="padding-left: <%= lines.size.to_s.length + 4 %>ch"> - <% lines.each.with_index(1) do |line, i| %> - <li id="L<%= i %>"> - <%= line %> - </li> - <% end %> - </ol> - </div> + <% lines = @paste.paste.split("\n") %> + <%# list number contains <n> + "." + <2.5 * spaces (approx)> %> + <ol style="padding-left: <%= lines.size.to_s.length + 4 %>ch" class="paste-plain monospaced"> + <% lines.each.with_index(1) do |line, i| %> + <li id="L<%= i %>" class="line"> + <%= line %> + </li> + <% end %> + </ol> </div> -<nav id="paste-show-nav"> - <%= form_for @paste, :method => :delete, :authenticity_token => false do |f| %> +<div class="settings"> + <%= form_for @paste, :method => :delete, :authenticity_token => false, :html => { :class => "settings-item settings-item--inline" } do |f| %> - <div class="row"><div class="col-md-4"> - <div class="input-group"> - <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :class => "form-control", :autofocus => f.object.errors.any? %> - <span class="input-group-btn"> - <%= f.button 'Delete this paste', :class => 'btn btn-danger' %> - </span> - </div> - </div></div> + <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :autofocus => f.object.errors.any?, :class => "main-textarea" %> + + <%= f.button 'Delete this paste', :class => 'btn btn--danger btn--min-width' %> <% end %> - <ul class="nav nav-pills"> - <li><%= link_to 'Raw', paste_path(@paste, :txt) %></li> - <li><%= link_to 'Derive', root_path(:base => @paste) %></li> - <li><%= link_to 'More Paste', root_path %></li> - </ul> -</nav> +</div> + +<div class="paste-nav paste-nav--bottom"> + <%= link_to 'Raw', paste_path(@paste, :txt), :class => "paste-nav-item" %> + <%= link_to 'Derive', root_path(:base => @paste), :class => "paste-nav-item" %> + <%= link_to 'More Paste', root_path, :class => "paste-nav-item" %> +</div>