diff --git a/bootstrap-buttons.js b/bootstrap-buttons.js new file mode 100644 index 0000000..16fa161 --- /dev/null +++ b/bootstrap-buttons.js @@ -0,0 +1,62 @@ +/* ============================================================ + * bootstrap-buttons.js v1.4.0 + * http://twitter.github.com/bootstrap/javascript.html#buttons + * ============================================================ + * Copyright 2011 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + +!function( $ ){ + + "use strict" + + function setState(el, state) { + var d = 'disabled' + , $el = $(el) + , data = $el.data() + + state = state + 'Text' + data.resetText || $el.data('resetText', $el.html()) + + $el.html( data[state] || $.fn.button.defaults[state] ) + + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + } + + function toggle(el) { + $(el).toggleClass('active') + } + + $.fn.button = function(options) { + return this.each(function () { + if (options == 'toggle') { + return toggle(this) + } + options && setState(this, options) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $(function () { + $('body').delegate('.btn[data-toggle]', 'click', function () { + $(this).button('toggle') + }) + }) + +}( window.jQuery || window.ender ); \ No newline at end of file diff --git a/create.cgi b/create.cgi index 9eed24b..964437d 100755 --- a/create.cgi +++ b/create.cgi @@ -38,13 +38,16 @@ cat < Fetching tweets of $id + +
+
-

Greptweet is running a operation to fetch upto 3200 tweets from $id

+

Fetching upto 3200 tweets from $id

-

Please be patient. Closing this page prematurely you can limit the tweets fetch-tweets.sh gets and trigger a locking bug.

+

Please be patient. Closing this page prematurely you can limit the tweets fetch-tweets.sh gets and trigger a locking bug.

 END
@@ -104,7 +107,9 @@ cd $oldpwd; ./users.sh > users.shtml
 
 cat <
-

Visit http://$HTTP_HOST/u/$id

+

Now to grep fetched tweets, goto http://$HTTP_HOST/u/$id

+
+
END diff --git a/index.html b/index.html index 9262038..b64e797 100644 --- a/index.html +++ b/index.html @@ -3,21 +3,36 @@ Grepping twitter backup + - +
+
+ + + + +
-

-

Type a search query like foo

+

Type a search query like foo

+ +
+ +
+
+ diff --git a/index.js b/index.js index f6462c7..014705f 100644 --- a/index.js +++ b/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(); } } - diff --git a/index.shtml b/index.shtml index 65cd396..b0660e6 100644 --- a/index.shtml +++ b/index.shtml @@ -3,28 +3,68 @@ GrepTweet - + - - + + + -
-
-Create or update a backup of your tweets, so you can grep them -

-

Try get older tweets, instead of newer tweets when updating

- -
+ +
+ +
+ + +
+
+ + + + +
+ +
+ +
+
+ + +
    +
  • + +
  • +
+ +
+ +First fetch tweets to search "grep" them +
+ +
+
+

Greppable tweeters

+
+
+ + +
+
diff --git a/main.js b/main.js index 20eafb7..590be95 100644 --- a/main.js +++ b/main.js @@ -1,7 +1,7 @@ function grep(query) { $.getJSON("/u/" + NAME + "/grep.php?q=" + query + "&jsoncallback=?", function(data) { - var results = "

Searched for: " + query + "

    "; + var results = "

    Searched for: " + query + "

      "; for (var i in data) { tweet = data[i].split('|'); if (tweet.length > 2) { @@ -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,6 +35,7 @@ $(document).ready(function() { $("input[type=text]").focus(); $("#source").html('' + NAME + ' simple text backup file'); + document.title = "Greptweet " + NAME; }); diff --git a/style.css b/style.css index 08b8de4..0b47976 100644 --- a/style.css +++ b/style.css @@ -1,18 +1,19 @@ -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; +} + + +/* 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); +} diff --git a/themes/bigbox.css b/themes/bigbox.css deleted file mode 100644 index c1ee39b..0000000 --- a/themes/bigbox.css +++ /dev/null @@ -1,124 +0,0 @@ -html, -body { - height: 100%; -} -.humane { - position: fixed; - -moz-transition: all 0.3s ease-out; - -webkit-transition: all 0.3s ease-out; - -ms-transition: all 0.3s ease-out; - -o-transition: all 0.3s ease-out; - transition: all 0.3s ease-out; - z-index: -1; -} -.humane.humane-animate, -.humane.humane-js-animate { - z-index: 100000; -} -.humane { - font-family: Ubuntu, Verdana, sans-serif; - line-height: 40px; - font-size: 35px; - top: 25%; - left: 25%; - opacity: 0; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); - width: 50%; - min-height: 40px; - padding: 30px; - text-align: center; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1AAAABmJLR0QA/wD/AP+gvaeTAAAAc0lEQVQokb2RQQ6EMAwDx/7/n80BtIEC3RYhLlXrVLGTAYiBWBIGtkPSP01SfreTVoV5re9Rcee1scwDk9NurbR62sZJcpzy9O+2X5KsXabyPaQFYNuvkqkRviDTp9Vs8opC0TpkHvJtVjeReW/5kEyX1gKeLEKE9peeWAAAAABJRU5ErkJggg=='); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #000), color-stop(1, rgba(0,0,0,0.90))) no-repeat; - background: -moz-linear-gradient(top, #000 0%, rgba(0,0,0,0.90) 100%) no-repeat; - background: -webkit-linear-gradient(top, #000 0%, rgba(0,0,0,0.90) 100%) no-repeat; - background: -ms-linear-gradient(top, #000 0%, rgba(0,0,0,0.90) 100%) no-repeat; - background: -o-linear-gradient(top, #000 0%, rgba(0,0,0,0.90) 100%) no-repeat; - background: linear-gradient(top, #000 0%, rgba(0,0,0,0.90) 100%) no-repeat; - *background-color: #000; - color: #fff; - -moz-border-radius: 15px; - -webkit-border-radius: 15px; - -ms-border-radius: 15px; - -o-border-radius: 15px; - border-radius: 15px; - text-shadow: 0 -1px 1px #ddd; - -moz-box-shadow: 0 15px 15px -15px #000; - -webkit-box-shadow: 0 15px 15px -15px #000; - -ms-box-shadow: 0 15px 15px -15px #000; - -o-box-shadow: 0 15px 15px -15px #000; - box-shadow: 0 15px 15px -15px #000; - -moz-transform: scale(0.1); - -webkit-transform: scale(0.1); - -ms-transform: scale(0.1); - -o-transform: scale(0.1); - transform: scale(0.1); -} -.humane p, -.humane ul { - margin: 0; - padding: 0; -} -.humane ul { - list-style: none; -} -.humane.humane-info { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1AAAABmJLR0QA/wD/AP+gvaeTAAAAQElEQVQokWNgYEj5z8TAwPCfiYGBgQGVIEKMTG2DTYwRVez/IHIaNcUGyBnYgpORel6gpvFEJhBqpxIaG8/AAADsKDq/HhYQ2AAAAABJRU5ErkJggg=='); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #000064), color-stop(1, rgba(0,0,100,0.90))) no-repeat; - background: -moz-linear-gradient(top, #000064 0%, rgba(0,0,100,0.90) 100%) no-repeat; - background: -webkit-linear-gradient(top, #000064 0%, rgba(0,0,100,0.90) 100%) no-repeat; - background: -ms-linear-gradient(top, #000064 0%, rgba(0,0,100,0.90) 100%) no-repeat; - background: -o-linear-gradient(top, #000064 0%, rgba(0,0,100,0.90) 100%) no-repeat; - background: linear-gradient(top, #000064 0%, rgba(0,0,100,0.90) 100%) no-repeat; - *background-color: #030; -} -.humane.humane-success { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1AAAABmJLR0QA/wD/AP+gvaeTAAAAPklEQVQokWNgSGH4z8TAACEYUAkixMjUNsjEGFHF/g8ip1FVbGCcgS04GannBaoaT1wCwWkvmXbQ2HgGBgYA8Yw6v+m4Kh8AAAAASUVORK5CYII='); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #006400), color-stop(1, rgba(0,100,0,0.90))) no-repeat; - background: -moz-linear-gradient(top, #006400 0%, rgba(0,100,0,0.90) 100%) no-repeat; - background: -webkit-linear-gradient(top, #006400 0%, rgba(0,100,0,0.90) 100%) no-repeat; - background: -ms-linear-gradient(top, #006400 0%, rgba(0,100,0,0.90) 100%) no-repeat; - background: -o-linear-gradient(top, #006400 0%, rgba(0,100,0,0.90) 100%) no-repeat; - background: linear-gradient(top, #006400 0%, rgba(0,100,0,0.90) 100%) no-repeat; - *background-color: #030; -} -.humane.humane-error { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1AAAABmJLR0QA/wD/AP+gvaeTAAAAPklEQVQokWNIYWD4z8QAJRhQCSLEyNQ2uMQYUcX+DyKnUVdsQJyBLTgZqecF6hpPVALBaS+ZdtDYeAYGBgYA9vA6v4OR3MkAAAAASUVORK5CYII='); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #640000), color-stop(1, rgba(100,0,0,0.90))) no-repeat; - background: -moz-linear-gradient(top, #640000 0%, rgba(100,0,0,0.90) 100%) no-repeat; - background: -webkit-linear-gradient(top, #640000 0%, rgba(100,0,0,0.90) 100%) no-repeat; - background: -ms-linear-gradient(top, #640000 0%, rgba(100,0,0,0.90) 100%) no-repeat; - background: -o-linear-gradient(top, #640000 0%, rgba(100,0,0,0.90) 100%) no-repeat; - background: linear-gradient(top, #640000 0%, rgba(100,0,0,0.90) 100%) no-repeat; - *background-color: #300; -} -.humane.humane-animate { - opacity: 1; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); - -moz-transform: scale(1); - -webkit-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); -} -.humane.humane-animate:hover { - opacity: 0.6; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); - -moz-transform: scale(0.8); - -webkit-transform: scale(0.8); - -ms-transform: scale(0.8); - -o-transform: scale(0.8); - transform: scale(0.8); -} -.humane.humane-js-animate { - opacity: 1; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); - -moz-transform: scale(1); - -webkit-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); -} -.humane.humane-js-animate:hover { - opacity: 0.6; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); -}