Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add updated ruby file, views and new README.
- Loading branch information
1 parent
107df41
commit e7ca870
Showing
5 changed files
with
39 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
Toopaste | ||
======== | ||
|
||
A simple (and tiny) Pastie clone written using Sinatra and DataMapper. | ||
A simple (and tiny) Pastie clone written by Nick Plante using Sinatra and DataMapper. | ||
|
||
This version has been modified by Dave Everitt as follows: | ||
|
||
- updated Snippet DataMapper model replaces deprecated :serial and :nullable | ||
- Snippet 'title' field added, with modified view | ||
- subtle changes to CSS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
<div class="snippet"> | ||
<h1>Paste a new code snippet below:</h1> | ||
<form action="/" method="POST"> | ||
<p><label for="name">Title: </label><input type="text" name="snippet_title" /></p> | ||
<textarea name="snippet_body" id="snippet_body" rows="20"></textarea> | ||
<br/><input type="submit" value="Save"/> | ||
<br/> | ||
<input type="submit" value="Save"/> | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
<div class="snippet"> | ||
<div class="sbody" id="content"><%= @snippet.formatted_body %></div> | ||
<div class="sdate">Created on <%= @snippet.created_at.strftime("%B %d, %Y at %I:%M %p") %></div> | ||
<br/><a href="/">New Paste!</a> | ||
<h1><%= @snippet.title %></h1> | ||
<div class="sbody" id="content"> | ||
<%= @snippet.formatted_body %> | ||
</div> | ||
<div class="sdate"> | ||
Created on <%= @snippet.created_at.strftime("%B %d, %Y at %I:%M %p") %> | ||
</div> | ||
<br/> | ||
<a href="/">Create new paste!</a> | ||
</div> |