mirror of
https://github.com/thewesker/greptweet.git
synced 2025-12-20 12:11:05 -05:00
Applied bootstrap
This commit is contained in:
12
create.cgi
12
create.cgi
@@ -38,14 +38,16 @@ cat <<END
|
||||
<head>
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
|
||||
<h1>Greptweet is running a operation to fetch upto 3200 tweets from $id</h1>
|
||||
<h1 class="alert-message info">Fetching upto 3200 tweets from $id</h1>
|
||||
|
||||
<p>Please be patient. Closing this page prematurely you can limit the tweets <a href="https://github.com/kaihendry/Greptweet/blob/master/fetch-tweets.sh">fetch-tweets.sh</a> gets and trigger a locking bug.</p>
|
||||
<p class="help-inline">Please be patient. Closing this page prematurely you can limit the tweets <a href="https://github.com/kaihendry/Greptweet/blob/master/fetch-tweets.sh">fetch-tweets.sh</a> gets and trigger a locking bug.</p>
|
||||
|
||||
<pre>
|
||||
END
|
||||
@@ -105,7 +107,9 @@ cd $oldpwd; ./users.sh > users.shtml
|
||||
|
||||
cat <<END
|
||||
</pre>
|
||||
<h1>Visit <a href="http://$HTTP_HOST/u/$id">http://$HTTP_HOST/u/$id</a></h1>
|
||||
<h1 class="alert-message success">Now to grep fetched tweets, goto <a href="http://$HTTP_HOST/u/$id">http://$HTTP_HOST/u/$id</a></h1>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
END
|
||||
|
||||
17
index.html
17
index.html
@@ -3,8 +3,8 @@
|
||||
<head>
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -12,21 +12,26 @@
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Greptweet @<span id="name"></span></h1>
|
||||
</div>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/">Home</a> <span class="divider">/</span></li>
|
||||
<li id="name" class="active">You are here</li>
|
||||
</ul>
|
||||
|
||||
<input type="text" name="q" class="xlarge" />
|
||||
<button class="btn primary">Greptweet</button>
|
||||
|
||||
<div id="results"></div>
|
||||
|
||||
<p id="source"></p>
|
||||
|
||||
<p>Type a search query like <a href="?foo">foo</a></p>
|
||||
<p class="help-inline">Type a search query like <a href="?foo">foo</a></p>
|
||||
|
||||
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
|
||||
<script async src="/main.js"></script>
|
||||
|
||||
<footer><span id="source"></span></footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
11
index.js
11
index.js
@@ -1,15 +1,6 @@
|
||||
function massage() {
|
||||
humane.timeout = 5000;
|
||||
humane("Please wait...");
|
||||
humane("Still loading...");
|
||||
}
|
||||
|
||||
function submitPressed() {
|
||||
if (document.forms.f.checkValidity()) {
|
||||
b = document.getElementById("b");
|
||||
b.disabled = true;
|
||||
massage();
|
||||
$("#b").button('loading');
|
||||
document.forms.f.submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
12
index.shtml
12
index.shtml
@@ -4,9 +4,9 @@
|
||||
<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>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
|
||||
<script src="bootstrap-buttons.js"></script>
|
||||
<script src="index.js"></script>
|
||||
</head>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<h1><a href="http://twitter.com/greptweet">@Greptweet</a> <small>Search your tweets</small></h1>
|
||||
<h1><a href="http://twitter.com/greptweet">@Greptweet</a> <small>Grep your tweets</small></h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -43,12 +43,12 @@
|
||||
</ul>
|
||||
|
||||
<div class="well">
|
||||
<button class="btn large primary" id="b" onclick="submitPressed()">Fetch tweets</button>
|
||||
<button class="btn large primary" id="b" data-loading-text="Fetching tweets..." onclick="submitPressed()">Fetch tweets</button>
|
||||
<span class="help-inline">First fetch tweets to search "grep" them</span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h3>Greppable tweeters</h3>
|
||||
@@ -59,7 +59,7 @@
|
||||
<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>
|
||||
|
||||
|
||||
3
main.js
3
main.js
@@ -18,6 +18,7 @@ function grep(query) {
|
||||
$(document).ready(function() {
|
||||
|
||||
NAME = window.location.pathname.split('/')[2];
|
||||
$("#name").html(NAME);
|
||||
|
||||
$("input[type=text]").change(function() {
|
||||
query = this.value;
|
||||
@@ -34,7 +35,7 @@ $(document).ready(function() {
|
||||
$("input[type=text]").focus();
|
||||
|
||||
$("#source").html('<a href="' + NAME + '.txt">' + NAME + ' simple text backup file</a>');
|
||||
$("#name").html(NAME);
|
||||
document.title = "Greptweet " + NAME;
|
||||
|
||||
});
|
||||
|
||||
|
||||
14
style.css
14
style.css
@@ -3,3 +3,17 @@
|
||||
html, body {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
||||
/* The white background content wrapper */
|
||||
.content {
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
|
||||
-webkit-border-radius: 0 0 6px 6px;
|
||||
-moz-border-radius: 0 0 6px 6px;
|
||||
border-radius: 0 0 6px 6px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user