changeset 408:f3cdc83b87b4

Add about.
author nanaya <me@myconan.net>
date Sun, 06 Sep 2015 04:55:56 +0900
parents 9ba3451cc063
children 130dc1054fd2
files app/views/layouts/_about.en.html.erb app/views/layouts/application.html.erb app/views/pastes/new.html.erb config/locales/en.yml
diffstat 4 files changed, 52 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/layouts/_about.en.html.erb	Sun Sep 06 04:55:56 2015 +0900
@@ -0,0 +1,22 @@
+<p>
+  Copyright 2015 nanaya &lt;me@myconan.net&gt;
+</p>
+
+<p>
+  This website is a service for sharing text snippets with ease.
+  Currently there's no expiration on any pastes but may
+  be added later.
+</p>
+
+<p>
+  Availability of this service is not guaranteed. While I try my best
+  to not losing data and keeping the service available, accidents do
+  happen and I'm not taking responsibility of anything caused by
+  this service.
+</p>
+
+<p>
+  Any suggestions, questions, and DMCA complaints regarding this service
+  can be directed to my e-mail at
+  <a href="mailto:me@myconan.net">me@myconan.net</a>.
+</p>
--- a/app/views/layouts/application.html.erb	Sun Sep 06 04:52:01 2015 +0900
+++ b/app/views/layouts/application.html.erb	Sun Sep 06 04:55:56 2015 +0900
@@ -22,6 +22,12 @@
         <div class="collapse navbar-collapse" id="navbar-menu">
           <ul class="nav navbar-nav navbar-right">
             <li>
+              <%= link_to t(".about"), "#",
+                :data => { :toggle => "modal",
+                    :target => "#modal-about" }
+              %>
+            </li>
+            <li>
               <a href="https://bitbucket.org/nanaya1/zeropaste"><%= t(".source") %></a>
             </li>
             <li>
@@ -41,6 +47,26 @@
       <%= yield %>
 
     </div>
+
+    <div class="modal fade" id="modal-about" tabindex="-1" role="dialog" aria-labelledby="aboutModal">
+      <div class="modal-dialog" role="document">
+        <div class="modal-content">
+          <div class="modal-header">
+            <h4><%= t(".about") %></h4>
+          </div>
+
+          <div class="modal-body">
+            <%= render "layouts/about" %>
+          </div>
+          <div class="modal-footer">
+            <button type="button" class="btn btn-default" data-dismiss="modal">
+              <%= t("buttons.close") %>
+            </button>
+          </div>
+        </div>
+      </div>
+    </div>
+
     <%= javascript_include_tag "application" %>
   </body>
 </html>
--- a/app/views/pastes/new.html.erb	Sun Sep 06 04:52:01 2015 +0900
+++ b/app/views/pastes/new.html.erb	Sun Sep 06 04:55:56 2015 +0900
@@ -50,7 +50,7 @@
       </div>
       <div class="modal-footer">
         <button type="button" class="btn btn-default" data-dismiss="modal">
-          <%= t(".close") %>
+          <%= t("buttons.close") %>
         </button>
       </div>
     </div>
--- a/config/locales/en.yml	Sun Sep 06 04:52:01 2015 +0900
+++ b/config/locales/en.yml	Sun Sep 06 04:55:56 2015 +0900
@@ -2,6 +2,9 @@
 # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
 
 en:
+  buttons:
+    close: Close
+
   layouts:
     application:
       donate: Donate
@@ -10,7 +13,6 @@
   pastes:
     new:
       clear: Clear
-      close: Close
       deletion_key: Deletion Key
       preview_md: Markdown Preview
       privacy: