diff app/views/pastes/new.html.erb @ 402:a18e19139f57

Markdown preview \o/
author nanaya <me@myconan.net>
date Sun, 06 Sep 2015 04:20:50 +0900
parents 851432f21603
children e0626046579a
line wrap: on
line diff
--- a/app/views/pastes/new.html.erb	Sun Sep 06 04:01:22 2015 +0900
+++ b/app/views/pastes/new.html.erb	Sun Sep 06 04:20:50 2015 +0900
@@ -1,4 +1,5 @@
 <% provide :title, t(".title") %>
+
 <%= form_for @paste do |f| %>
   <%= render "shared/filter_spam" %>
 
@@ -6,6 +7,13 @@
     <%= f.text_area :paste, :autofocus => true, :class => "form-control paste-paste js-paste-paste", :rows => 20 %>
   </div>
 
+
+  <div class="row"><div class="col-xs-12">
+      <%= link_to t(".preview_md"), "#",
+          :class => "btn btn-default js-paste-preview-md pull-right"
+      %>
+  </div>
+
   <div class="form-horizontal">
     <div class="form-group <%= error_class f.object, :key %>">
       <%= f.label :key, t(".deletion_key"), :class => "col-sm-2 control-label" %>
@@ -36,3 +44,17 @@
     </div></div>
   </div>
 <% end %>
+
+<div class="modal fade js-paste-preview-md-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
+  <div class="modal-dialog" role="document">
+    <div class="modal-content">
+      <div class="modal-body js-paste-preview-md-box">
+      </div>
+      <div class="modal-footer">
+        <button type="button" class="btn btn-default" data-dismiss="modal">
+          <%= t(".close") %>
+        </button>
+      </div>
+    </div>
+  </div>
+</div>