Skip to content

Commit 473d357

Browse files
author
System Administrator
committed
Landing page and demo copy
1 parent b4cfb5a commit 473d357

File tree

9 files changed

+46
-284
lines changed

9 files changed

+46
-284
lines changed

app/controllers/drafts_controller.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ class DraftsController < ApplicationController
33
require 'htmlentities'
44
require 'stanfordparser'
55

6+
def landing
7+
@title = "Concise, rapid feedback for writing"
8+
end
9+
610
def compose
711
@drft = Draft.find_by_url(params[:id])
812
if !@drft
@@ -13,6 +17,7 @@ def compose
1317
end
1418

1519
def create
20+
@title = "Create a new draft"
1621
@the_url = params[:draft_id]
1722
end
1823

@@ -69,6 +74,7 @@ def save
6974

7075
def review
7176
@draft = Draft.find_by_public_url(params[:id])
77+
@title = "Reviewing \"#{@draft.title}\""
7278
if session[:review_ids].nil? then session[:review_ids] = {} end
7379
if session[:review_ids][@draft.id].nil? # Time to set up a new review for this <draft, session>.
7480
reviewified = @draft.reviewify
@@ -125,6 +131,7 @@ def submit_review
125131

126132
def feedback
127133
@drft = Draft.find_by_url(params[:id])
134+
@title = "Feedback for \"#{@drft.title}\""
128135
@reviews = @drft.reviews.sort {|a, b| a.updated_at <=> b.updated_at}
129136
end
130137
end

app/models/draft.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def reviewify
5050
glob = HTMLEntities.new.decode(sentences.compact.join(" "))
5151
glob = glob.gsub(/<a class="sentence" href="#" id="sent\-\d">\.<\/a>/) {|s| ""}.gsub("</p>.", "</p>")
5252
glob = glob.gsub("< span style =", "<span class=\"heading\" style=").gsub("< \\\/ span >.", "</span>").gsub("< br >", "<br>").gsub("'' >", "\">")
53-
glob = glob.gsub(" -LRB- ", " (").gsub(" -RRB-", ")")
53+
glob = glob.gsub("-LRB- ", "(").gsub(" -RRB-", ")")
5454
glob = glob.gsub("</p></a>", "</a></p>")
5555
return {:content => glob, :n_sentences => "0" * (sentences.length + 1)}
5656
end

app/views/drafts/landing.html.erb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<style type="text/css">
2+
#wpbody {margin-left: 40px;}
3+
h2 {font-family: Verdana;}
4+
p {font-family: Verdana;}
5+
</style>
6+
<script language="javascript" src="/javascripts/simpleswap.js"></script>
7+
<div style="margin:0 auto; margin-top: 80px; margin-right: 40px;">
8+
<table style="width: 100%">
9+
<tr colspan="3">
10+
<div style="text-align: center; font-size: 32px; color: #444; margin-bottom: 20px;">
11+
Get fine-grained feedback on your writing, fast.<br/><br/><br/>
12+
<a href=""><img type="image" src="/images/button.png" oversrc="/images/button-hover.png"/></a>
13+
</div>
14+
</tr>
15+
<tr>
16+
<td valign="top" width="300px;">
17+
<h2>Step 1: Write</h2>
18+
<p>Write your draft in style, using our <strong>simple and beautiful rich-text editor</strong> ripped straight from Wordpress.</p>
19+
<img src="/images/step-1.png" style="width: 266px; margin-left: 10px;"/>
20+
</td>
21+
<td valign="top" width="300px">
22+
<h2>Step 2: Share</h2>
23+
<p>Once your draft is ready, we create a special reviewing page that you can share with friends and colleagues. It lets them <strong>edit at the speed of reading</strong>. <a href="" style="font-weight: bold;">Try it!</a></p>
24+
</td>
25+
<td valign="top" width="300px;">
26+
<h2>Step 3: Profit!</h2>
27+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
28+
</td>
29+
</tr>
30+
</table>
31+
</div>

app/views/drafts/review.html.erb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ li {
2929
line-height: 1.3em;
3030
padding-top: 8px;
3131
padding-bottom: 10px;
32-
background-color: #ccc;
32+
background-color: #ddd;
3333
float: left;
3434
}
3535
#wpcontent {
@@ -443,14 +443,13 @@ $(document).ready(function() {
443443
<div id="mark" class="mark" style="position: absolute; display: none; font-size: 12px; color: #ff5544; z-index: 10">&#9679;</div>
444444
<div class="instructions">
445445
<div style="float: right;"><a href="/drafts/refresh_review?public_url=<%= params[:id] %>&amp;draft_id=<%= @draft.id %>"><img src="/images/reload.png" alt="Refresh latest draft and clear markup" title="Refresh latest draft and clear markup"/></a></div>
446-
<h2 style="margin: 2px 0px 5px 0px; font-size: 18px;">How it works:</h2>
447-
<ol style="font-size: 12px;">
448-
<li>Click a sentence <strong>once</strong> if you like it and <strong>twice</strong> if you don't.</li>
446+
<ul style="font-size: 12px; font-family: Arial; list-style: disc inside">
447+
<li>Click a sentence <strong>once</strong> if you like it and <strong>twice</strong> if you don't. Notice the colored underlines.</li>
449448
<li>A window for <strong>quick notes</strong> will pop up in either case. <strong>Notes disappear</strong> if you don't type anything.</li>
450449
<li><strong>Hit enter</strong> to close note windows. <strong>Everything will be saved automatically</strong>, once every 30 seconds.</li>
451-
<li>A note will pop up if you <strong>SHIFT-click</strong> anywhere in the white area.</li>
450+
<li>A box for <strong>freehand notes</strong> will pop up if you <strong>SHIFT-click</strong> anywhere in the white area.</li>
452451
<li>To see notes, mouse over highlighted sentences or the little orange dots (<span style="font-size: 12px; color: #ff5544">&#9679;</span>). Click to edit.</li>
453-
</ol>
452+
</ul>
454453
</div>
455454

456455
<div id="draft">

app/views/layouts/application.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"http://www.w3.org/TR/html4/strict.dtd">
44
<html>
55
<head>
6-
<title>[draft]back</title>
6+
<title>[draft]back &raquo; <%= @title %></title>
77
<%= javascript_include_tag "jquery-1.3.2.min.js" %>
88
<%= stylesheet_link_tag "wp" %>
99
<%= stylesheet_link_tag "colors-fresh" %>

config/routes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# end
3232

3333
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
34-
# map.root :controller => "welcome"
34+
map.root :controller => "drafts", :action => "landing"
3535

3636
# See how all your routes lay out with "rake routes"
3737

db/development.sqlite3

0 Bytes
Binary file not shown.

public/images/step-1.png

56.5 KB
Loading

0 commit comments

Comments
 (0)