diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/_includes/head.html | 2 | ||||
-rw-r--r-- | source/_includes/header.html | 20 | ||||
-rw-r--r-- | source/javascripts/twitter.js | 60 |
3 files changed, 44 insertions, 38 deletions
diff --git a/source/_includes/head.html b/source/_includes/head.html index 3b7a605..1265151 100644 --- a/source/_includes/head.html +++ b/source/_includes/head.html @@ -8,10 +8,12 @@ {% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %} <meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}"> {% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %} + <meta name="viewport" content="width=device-width, initial-scale=1"/> <link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml"> <link rel="canonical" href="{{ canonical }}"> <link href="{{ root_url }}/favicon.png" rel="icon"> + <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css"> <script src="{{ root_url }}/javascripts/jquery.min.js"></script> {% include custom/head.html %} diff --git a/source/_includes/header.html b/source/_includes/header.html index b6752aa..ac544be 100644 --- a/source/_includes/header.html +++ b/source/_includes/header.html @@ -1,13 +1,15 @@ <h1 class="left"><a href="{{ root_url }}/">{{ site.title }}</a></h1> <nav class="menu left">{% include navigation.html %}</nav> -<form class="search right" action="{{ site.simple_search }}" method="get"> - <input class="left" type="text" name="q" results="0"> - <input type="hidden" name="q" value="site:{{ site.url | shorthand_url }}"> -</form> -<div class="social right"> - <a href="http://www.facebook.com/tommy351" title="Facebook">Facebook</a> - <a href="https://plus.google.com/105931860008509594725" title="Google+">Google+</a> - <a href="http://twitter.com/tommy351" title="Twitter">Twitter</a> - <a href="{{ site.subscribe_rss }}" title="RSS">RSS</a> +<div class="right"> + <form class="search right" action="{{ site.simple_search }}" method="get"> + <input class="left" type="text" name="q" results="0"> + <input type="hidden" name="q" value="site:{{ site.url | shorthand_url }}"> + </form> + <div class="social right"> + <a href="http://www.facebook.com/tommy351" title="Facebook">Facebook</a> + <a href="https://plus.google.com/105931860008509594725" title="Google+">Google+</a> + <a href="http://twitter.com/tommy351" title="Twitter">Twitter</a> + <a href="{{ site.subscribe_rss }}" title="RSS">RSS</a> + </div> </div> {% include custom/header.html %}
\ No newline at end of file diff --git a/source/javascripts/twitter.js b/source/javascripts/twitter.js index 5a7b9d5..92fb7b1 100644 --- a/source/javascripts/twitter.js +++ b/source/javascripts/twitter.js @@ -50,39 +50,41 @@ } } - banner.show(); + if ($(window).width() > 600){ + banner.show(); - $.getJSON('http://twitter.com/status/user_timeline/tommy351.json?count=10&callback=?', function(json){ - var length = json.length, - fragment = document.createDocumentFragment(), - counts = 0, - timeout; + $.getJSON('http://twitter.com/status/user_timeline/tommy351.json?count=10&callback=?', function(json){ + var length = json.length, + fragment = document.createDocumentFragment(), + counts = 0, + timeout; - for (var i=0; i<length; i++){ - var item = document.createElement('li'); - item.innerHTML = linkify(json[i].text) + '<small>'+relativeDate(json[i].created_at)+'</small>'; - fragment.appendChild(item); - } + for (var i=0; i<length; i++){ + var item = document.createElement('li'); + item.innerHTML = linkify(json[i].text) + '<small>'+relativeDate(json[i].created_at)+'</small>'; + fragment.appendChild(item); + } - var play = function(){ - timeout = setTimeout(function(){ - feed.animate({top: '-='+30}, speed, function(){ - $(this).append($(this).children().eq(counts).clone()); - counts++; - play(); - }); - }, interval); - } + var play = function(){ + timeout = setTimeout(function(){ + feed.animate({top: '-='+30}, speed, function(){ + $(this).append($(this).children().eq(counts).clone()); + counts++; + play(); + }); + }, interval); + } - var pause = function(){ - clearTimeout(timeout); - } + var pause = function(){ + clearTimeout(timeout); + } - banner.on('mouseenter', pause).on('mouseleave', play) - .children('.loading').hide().end() - .children('.container').show() - .children('.feed').append(fragment); + banner.on('mouseenter', pause).on('mouseleave', play) + .children('.loading').hide().end() + .children('.container').show() + .children('.feed').append(fragment); - play(); - }); + play(); + }); + } })(jQuery);
\ No newline at end of file |