Permalink
Browse files

- fixed a bug I caused in shorten.php

- More interface basics
  • Loading branch information...
1 parent f427674 commit 24d699e26d735448b98ff322b925f38557c0a04a @emasters committed Apr 3, 2012
Showing with 38 additions and 3 deletions.
  1. +37 −2 index.php
  2. +1 −1 shorten.php
View
@@ -30,6 +30,25 @@
</html>
<body>
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <a class="brand" href="#">Shorten It</a>
+ <div class="nav-collapse">
+ <ul class="nav">
+ <li class="active"><a href="#">Home</a></li>
+ <li><a href="#about">About</a></li>
+ <li><a href="#contact">Contact</a></li>
+ </ul>
+ </div><!--/.nav-collapse -->
+ </div>
+ </div>
+ </div>
<div class="container">
<div class="hero-unit">
<form action="shorten.php" id="shortener" class="well form-inline">
@@ -39,7 +58,23 @@
</form>
<div id="shorturl"></div>
</div>
-
+ <div class="row">
+ <div class="span4">
+ <h2>Bookmarklet</h2>
+ <p>Drag the button below to your bookmark bar.</p>
+ <p><a href="javascript:(function(){document.location='http://b.elide.us/shorten.php?longurl='+encodeURIComponent(location.href)}());" class="btn">Shorten It</a></p>
+ </div>
+ <div class="span4">
+ <h2>API Key</h2>
+ <p>Information about the API key will go here.</p>
+ <p><a href="#" class="btn">View details</a></p>
+ </div>
+ <div class="span4">
+ <h2>Help</h2>
+ <p>Documentation and such go here.</p>
+ <p><a href="#" class="btn">View details</a></p>
+ </div>
+ </div>
</div>
<script type="text/javascript">
window.onload = (function(){
@@ -58,7 +93,7 @@
/* Send the data using post and put the results in a div */
$.post( url, { longurl: term },
function( data ) {
- $( "#shorturl" ).empty().append( data );
+ $( "#shorturl" ).empty().addClass('alert alert-success').append( data );
}
);
});
View
@@ -85,7 +85,7 @@
}
- echo '<div class="alert alert-success">'.BASE_HREF . $shortened_url.'</div>';
+ echo BASE_HREF . $shortened_url;
}
function getShortenedURLFromID ($integer, $base = ALLOWED_CHARS)

0 comments on commit 24d699e

Please sign in to comment.