summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorSkyArrow <tommy351@gmail.com>2012-01-24 18:20:05 +0100
committerSkyArrow <tommy351@gmail.com>2012-01-24 18:20:05 +0100
commit1599df108116ca573208e4117ace405fdb8be2be (patch)
treea5d006741b20128dfff8f9e4e905ed3e5ccf5e3c /source
parent106288f71d6ccd4ef7e510705d9099836dd98476 (diff)
downloadoctopress-theme-jeyzu-1599df108116ca573208e4117ace405fdb8be2be.zip
octopress-theme-jeyzu-1599df108116ca573208e4117ace405fdb8be2be.tar.gz
responsive layout
Diffstat (limited to 'source')
-rw-r--r--source/_includes/head.html2
-rw-r--r--source/_includes/header.html20
-rw-r--r--source/javascripts/twitter.js60
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