Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adds interactive prompt to home page to indicate the graph name can b…

…e changed.
  • Loading branch information...
commit b1785a6d50685c89825c6975ec3b39839ae0b6fd 1 parent dbf873a
@aaronpk authored
Showing with 23 additions and 3 deletions.
  1. +6 −0 assets/styles.css
  2. +16 −3 index.php
  3. +1 −0  login.php
View
6 assets/styles.css
@@ -73,3 +73,9 @@ textarea, input {
.notification .inside {
padding: 5px;
}
+
+#graph-what {
+ border: 0;
+ border-bottom: 1px #777 solid;
+ background-color: #f9f9f9;
+}
View
19 index.php
@@ -14,9 +14,10 @@
<div style="font-size: 19pt; font-style: italic; width: 190px; margin: 70px auto 0 auto;">graph anything</div>
- <div style="margin-top: 36px;">Send an email to <span style="background-color: #f9f9f9;">your-graph@graphthis.me</span> to get started!</div>
- <div style="margin-top: 10px; font-size: 9pt;">Try sending an email with "150" in the subject line.</div>
- <div style="margin-top: 10px; font-size: 9pt;">You can make more graphs by changing the part before the "@" sign. <a href="/help">more help?</a></div>
+ <div style="margin-top: 36px;">What do you want to graph? <input type="text" id="graph-what" style="width: 140px;" /></div>
+ <div style="margin-top: 10px;">Send an email to <span style="background-color: #f9f9f9;"><span id="graph-id">your-graph</span>@graphthis.me</span> to get started!</div>
+ <div style="margin-top: 10px; font-size: 9pt;">Tip: Send an email to weight@graphthis.me with your weight in the subject line.</div>
+ <div style="margin-top: 10px; font-size: 9pt;">You can make more graphs by changing<br />the part before the "@" sign. <a href="/help">more help?</a></div>
<div style="margin-top: 40px;">Been here before?</div>
<div style="margin-top: 10px;"><a href="/login"><img src="/assets/images/sign-in-with-twitter-d.png" width="151" height="24" /></a></div>
@@ -25,6 +26,18 @@
</div>
+<script type="text/javascript">
+$(function(){
+ $("#graph-what").keyup(function(){
+ if($(this).val() != "") {
+ $("#graph-id").text($(this).val().replace(/[^a-z0-9]+/g, '-'));
+ } else {
+ $("#graph-id").text("your-graph");
+ }
+ }).focus();
+});
+</script>
+
<?php
include('templates/footer.php');
View
1  login.php
@@ -44,6 +44,7 @@
header('Location: /login?login_token=' . $entity->loginToken);
die();
} else {
+ irc_debug('Someone tried to log in from Twitter before creating an acct by email: ' . $account->screen_name);
// Haven't created an account yet, show a nice message
echo '<div style="width: 540px; margin: 40px auto; text-align: center;">';
echo '<div style="font-size: 18pt;">Sorry, you don\'t have an account yet.</div>';
Please sign in to comment.
Something went wrong with that request. Please try again.