twitter bootstrap

This commit is contained in:
Kai Hendry
2011-12-04 21:19:19 +08:00
parent efd326fa2f
commit 1a6330e60d
5 changed files with 66 additions and 28 deletions

View File

@@ -39,6 +39,7 @@ cat <<END
<meta charset="utf-8" />
<title>Fetching tweets of $id</title>
<link rel="stylesheet" type="text/css" href="/style.css">
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
</head>
<body>

View File

@@ -4,11 +4,19 @@
<meta charset="utf-8" />
<title>Grepping twitter backup</title>
<link rel="stylesheet" type="text/css" href="/style.css">
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
</head>
<body>
<input type="text" name="q" />
<div class="container">
<div class="content">
<div class="page-header">
<h1>Greptweet @<span id="name"></span></h1>
</div>
<input type="text" name="q" class="xlarge" />
<div id="results"></div>
@@ -19,5 +27,7 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script async src="/main.js"></script>
</div>
</body>
</html>

View File

@@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<title>GrepTweet</title>
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
<link id='theme' rel='stylesheet' href='themes/bigbox.css'/>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="humane.min.js" async></script>
@@ -20,21 +21,59 @@ if (document.forms.f.checkValidity()) {
<body>
<form name="f" action="create.cgi" method="get">
<fieldset>
<legend>Create or update a backup of your tweets, so you can grep them</legend>
<p><label>Twitter username: <input type="text" name="id" required placeholder="kaihendry"></label></p>
<p><input type="checkbox" name="o" />Try get older tweets, instead of newer tweets when updating</p>
<button id="b" onclick="submitPressed()">Fetch tweets</button>
</fieldset>
<div class="container">
<div class="content">
<div class="page-header">
<h1><a href="http://twitter.com/greptweet">@Greptweet</a> <small>Search your tweets</small></h1>
</div>
<div class="row">
<div class="span10">
<form name="f" action="create.cgi" method="get" class="form-stacked">
<div class="clearfix">
<label for="username">Twitter username</label>
<div class="input">
<input class="xlarge" id="username" type="text" name="id" size="16" required placeholder="kaihendry">
</div>
</div>
<ul class="inputs-list">
<li>
<label>
<input type="checkbox" name="o" />
<span>Get older tweets, instead of newer tweets when updating</span>
</label>
</li>
</ul>
<div class="well">
<button class="btn large primary" id="b" onclick="submitPressed()">Fetch tweets</button>
</div>
</form>
<!--#include virtual="users.shtml" -->
</div>
<div class="span4">
<h3>Greppable tweeters</h3>
<!--#include virtual="users.shtml" -->
</div>
</div>
<footer>
<p>Please follow <a href="https://twitter.com/greptweet">@greptweet</a> for
updates and <a href="https://github.com/kaihendry/Greptweet">contribute to the
source on Github!</a></p>
source on Github!</a></p>
</footer>
</div>
</div>
</body>
</html>

View File

@@ -1,7 +1,7 @@
function grep(query) {
$.getJSON("/u/" + NAME + "/grep.php?q=" + query + "&jsoncallback=?", function(data) {
var results = "<p>Searched for: " + query + "</p><ol>";
var results = "<p class=\"label\">Searched for: " + query + "</p><ol>";
for (var i in data) {
tweet = data[i].split('|');
if (tweet.length > 2) {
@@ -34,6 +34,7 @@ $(document).ready(function() {
$("input[type=text]").focus();
$("#source").html('<a href="' + NAME + '.txt">' + NAME + ' simple text backup file</a>');
$("#name").html(NAME);
});

View File

@@ -1,18 +1,5 @@
body {
font: 1.2em 'Lucida Grande',sans-serif;
}
footer {
font-size: small; margin: 2em;
}
input[type=text] {
font-size: 2em;
border:1px solid #A78B53;
}
button {
font-size: 3em;
}
#users li { display: inline; }
html, body {
background-color: #eee;
}