Blagovest Petrov
11 years ago
40 changed files with 3719 additions and 1055 deletions
@ -1,5 +1,5 @@ |
|||||
@import "base/utilities"; |
@import "base/color"; |
||||
@import "base/solarized"; |
@import "base/font"; |
||||
@import "base/theme"; |
|
||||
@import "base/typography"; |
|
||||
@import "base/layout"; |
@import "base/layout"; |
||||
|
@import "base/typography"; |
||||
|
@import "base/utilities"; |
@ -1,8 +1,2 @@ |
|||||
@import "partials/header"; |
|
||||
@import "partials/navigation"; |
|
||||
@import "partials/blog"; |
|
||||
@import "partials/sharing"; |
|
||||
@import "partials/syntax"; |
@import "partials/syntax"; |
||||
@import "partials/archive"; |
@import "partials/blog"; |
||||
@import "partials/sidebar"; |
|
||||
@import "partials/footer"; |
|
||||
|
@ -1,85 +1,92 @@ |
|||||
|
$color-dark: #272727 !default; |
||||
|
$color-emph: #00585f !default; |
||||
|
$color-light: #b0bf5a !default; |
||||
|
$color-none: #fefefe !default; |
||||
|
$color-simple: #a6a6a6 !default; |
||||
|
|
||||
$noise-bg: image-url('noise.png') top left !default; |
$noise-bg: image-url('noise.png') top left !default; |
||||
$img-border: inline-image('dotted-border.png') !default; |
$img-border: inline-image('dotted-border.png') !default; |
||||
|
|
||||
// Main Link Colors |
|
||||
$link-color: lighten(#165b94, 3) !default; |
$link-color: lighten(#165b94, 3) !default; |
||||
$link-color-hover: adjust-color($link-color, $lightness: 10, $saturation: 25) !default; |
|
||||
$link-color-visited: adjust-color($link-color, $hue: 80, $lightness: -4) !default; |
|
||||
$link-color-active: adjust-color($link-color-hover, $lightness: -15) !default; |
|
||||
|
|
||||
// Main Section Colors |
|
||||
$main-bg: #f8f8f8 !default; |
|
||||
$page-bg: #252525 !default; |
|
||||
$article-border: #eeeeee !default; |
|
||||
|
|
||||
$header-bg: #333 !default; |
|
||||
$header-border: lighten($header-bg, 15) !default; |
|
||||
$title-color: #f2f2f2 !default; |
|
||||
$subtitle-color: #aaa !default; |
|
||||
|
|
||||
$text-color: #222 !default; |
|
||||
$text-color-light: #aaa !default; |
|
||||
$type-border: #ddd !default; |
|
||||
|
|
||||
/* Navigation */ |
// global color setup |
||||
$nav-bg: #ccc !default; |
|
||||
$nav-bg-front: image-url('noise.png') !default; |
|
||||
$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)) !default; |
|
||||
$nav-color: darken($nav-bg, 38) !default; |
|
||||
$nav-color-hover: darken($nav-color, 25) !default; |
|
||||
$nav-placeholder: desaturate(darken($nav-bg, 10), 15) !default; |
|
||||
$nav-border: darken($nav-bg, 10) !default; |
|
||||
$nav-border-top: lighten($nav-bg, 15) !default; |
|
||||
$nav-border-bottom: darken($nav-bg, 25) !default; |
|
||||
$nav-border-left: darken($nav-bg, 11) !default; |
|
||||
$nav-border-right: lighten($nav-bg, 7) !default; |
|
||||
|
|
||||
/* Sidebar colors */ |
body { |
||||
$sidebar-bg: #f2f2f2 !default; |
background-color: $color-none; |
||||
$sidebar-link-color: $link-color !default; |
color: $color-dark; |
||||
$sidebar-link-color-hover: $link-color-hover !default; |
@include selection($color-emph, $color-none); |
||||
$sidebar-link-color-active: $link-color-active !default; |
} |
||||
$sidebar-color: change-color(mix($text-color, $sidebar-bg, 80), $hue: hue($sidebar-bg), $saturation: saturation($sidebar-bg)/2) !default; |
.content { |
||||
$sidebar-border: desaturate(darken($sidebar-bg, 7), 10) !default; |
overflow: hidden; |
||||
$sidebar-border-hover: darken($sidebar-bg, 7) !default; |
} |
||||
$sidebar-link-color-subdued: lighten($sidebar-color, 20) !default; |
|
||||
$sidebar-link-color-subdued-hover: $sidebar-link-color-hover !default; |
|
||||
|
|
||||
$footer-color: #888 !default; |
|
||||
$footer-bg: #ccc !default; |
|
||||
$footer-bg-front: image-url('noise.png') !default; |
|
||||
$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)) !default; |
|
||||
$footer-color: darken($footer-bg, 38) !default; |
|
||||
$footer-color-hover: darken($footer-color, 10) !default; |
|
||||
$footer-border-top: lighten($footer-bg, 15) !default; |
|
||||
$footer-border-bottom: darken($footer-bg, 15) !default; |
|
||||
$footer-link-color: darken($footer-bg, 38) !default; |
|
||||
$footer-link-color-hover: darken($footer-color, 25) !default; |
|
||||
$page-border-bottom: darken($footer-bg, 5) !default; |
|
||||
|
|
||||
|
.entry-content { |
||||
|
a { |
||||
|
color: $color-dark; |
||||
|
border-bottom: 2px dashed $color-dark; |
||||
|
@include transition(0.5s); |
||||
|
} |
||||
|
a:hover { |
||||
|
color: $color-light; |
||||
|
border-bottom: 2px dashed $color-light; |
||||
|
} |
||||
|
} |
||||
|
|
||||
/* Core theme application */ |
#main > footer { |
||||
|
background-color: $color-dark; |
||||
|
color: $color-none; |
||||
|
@include selection($color-light, $color-none); |
||||
|
} |
||||
|
|
||||
|
#sidebar { |
||||
|
background-color: $color-dark; |
||||
|
color: $color-none; |
||||
|
@include selection($color-light, $color-none); |
||||
a { |
a { |
||||
@include link-colors($link-color, $hover: $link-color-hover, $focus: $link-color-hover, $visited: $link-color-visited, $active: $link-color-active); |
color: $color-light; |
||||
} |
} |
||||
aside.sidebar a { |
a:hover { |
||||
@include link-colors($sidebar-link-color, $hover: $sidebar-link-color-hover, $focus: $sidebar-link-color-hover, $active: $sidebar-link-color-active); |
color: $color-none; |
||||
} |
} |
||||
|
h1 a { |
||||
|
color: $color-none; |
||||
|
} |
||||
|
h1 a:hover { |
||||
|
color: $color-light; |
||||
|
} |
||||
|
} |
||||
|
|
||||
a { |
a { |
||||
@include transition(color .3s); |
color: $color-simple; |
||||
|
@include transition(0.5s); |
||||
|
} |
||||
|
a:hover { |
||||
|
color: $color-light; |
||||
} |
} |
||||
|
|
||||
html { |
.articlemeta { |
||||
background: $page-bg image-url('line-tile.png') top left; |
background-color: $color-emph; |
||||
} |
} |
||||
body { |
.articlemeta, |
||||
> div { |
.articlemeta a { |
||||
background: $sidebar-bg $noise-bg; |
color: $color-none; |
||||
border-bottom: 1px solid $page-border-bottom; |
|
||||
> div { |
|
||||
background: $main-bg $noise-bg; |
|
||||
border-right: 1px solid $sidebar-border; |
|
||||
} |
} |
||||
|
|
||||
|
.articlemeta:hover { |
||||
|
background-color: $color-dark; |
||||
|
} |
||||
|
|
||||
|
#disqus_thread { |
||||
|
border-top: 0.2em solid $color-emph; |
||||
|
} |
||||
|
|
||||
|
h1, h1 a, h1 a:hover { |
||||
|
color: $color-emph; |
||||
|
} |
||||
|
|
||||
|
.entry-title a { |
||||
|
color: $color-dark; |
||||
} |
} |
||||
|
.entry-title a:hover { |
||||
|
color: $color-light; |
||||
} |
} |
||||
|
@ -1,18 +1,43 @@ |
|||||
// Customize the colors of Octoflat Here |
// Here you can easily change your sites's color scheme. |
||||
|
// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works. |
||||
|
// If you need a handy color picker try http://hslpicker.com |
||||
|
|
||||
/* Remove this line for the light theme / for custom colors |
//$header-bg: #263347; |
||||
|
//$subtitle-color: lighten($header-bg, 58); |
||||
|
//$nav-bg: desaturate(lighten(#8fc17a, 18), 5); |
||||
|
//$nav-bg-front: image-url('noise.png'); |
||||
|
//$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)); |
||||
|
//$sidebar-bg: desaturate(#eceff5, 8); |
||||
|
//$sidebar-link-color: saturate(#526f9a, 10); |
||||
|
//$sidebar-link-color-hover: darken(#7ab662, 9); |
||||
|
//$footer-bg: #ccc !default; |
||||
|
//$footer-bg-front: image-url('noise.png'); |
||||
|
//$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)); |
||||
|
|
||||
$primary-color: #e69411; // Jumbotron, Horizontal Rules, Headings |
|
||||
$secondary-color: #1dbbd6; // Tags, Links, Main Heading, Quote Border |
|
||||
$tertiary-color: #C0392B; // Hover-over color, Active Page color |
|
||||
$accent-color1: #23defe; // Hover-over background color for tags |
|
||||
$accent-color2: #34495E; // Sub-headings, Date Stamp |
|
||||
$accent-color3: #ffffff; // Navbar Text, Tag text |
|
||||
$bg-color: #ffffff; // Background |
|
||||
$navbar-color: #1ec2de; // Navbar |
|
||||
$code-bg-color: #2C3E50; // Code background |
|
||||
$quote-color: #E74C3C; // Quote Color |
|
||||
$text-color: #5a5e5f; // Body Text |
|
||||
$footer-color: #7F8C8D; // Footer |
|
||||
|
|
||||
And remove this line */ |
/* To use the dark Solarized highlighting theme comment the following line and line 29 */ |
||||
|
$solarized: light; |
||||
|
|
||||
|
/* If you want to tweak the Solarized colors you can do that here */ |
||||
|
//$base03: #002b36; //darkest blue |
||||
|
//$base02: #073642; //dark blue |
||||
|
//$base01: #586e75; //darkest gray |
||||
|
//$base00: #657b83; //dark gray |
||||
|
//$base0: #839496; //medium gray |
||||
|
//$base1: #93a1a1; //medium light gray |
||||
|
//$base2: #eee8d5; //cream |
||||
|
$base3: #fff; //white for light theme |
||||
|
//$solar-yellow: #b58900; |
||||
|
//$solar-orange: #cb4b16; |
||||
|
//$solar-red: #dc322f; |
||||
|
//$solar-magenta: #d33682; |
||||
|
//$solar-violet: #6c71c4; |
||||
|
//$solar-blue: #268bd2; |
||||
|
//$solar-cyan: #2aa198; |
||||
|
//$solar-green: #859900; |
||||
|
|
||||
|
|
||||
|
/* Non highlighted code colors */ |
||||
|
//$pre-bg: $base03; |
||||
|
//$pre-border: darken($base02, 5); |
||||
|
//$pre-color: $base1; |
||||
|
@ -1 +1,2 @@ |
|||||
// Add your custom styling here. |
// This File is imported last, and will override other styles in the cascade |
||||
|
// Add styles here to make changes without digging in too much |
||||
|
@ -1,13 +1,9 @@ |
|||||
@import "compass"; |
@import "compass"; |
||||
|
|
||||
@import "colors"; |
@import "custom/color"; |
||||
@import "custom/colors"; |
|
||||
@import "bootstrap"; |
@import "base"; |
||||
@import "bootstrap-responsive"; |
@import "parts"; |
||||
@import "flat-ui"; |
@import "plugins"; |
||||
@import "font-awesome"; |
|
||||
@import "octoflat-partials"; |
|
||||
@import "solarized"; |
|
||||
@import "syntax"; |
|
||||
@import "quotes"; |
|
||||
@import "custom/styles"; |
@import "custom/styles"; |
@ -1,5 +1,5 @@ |
|||||
|
<script src="{{ root_url }}/javascripts/slash.js"></script> |
||||
|
{% include fancybox.html %} <!-- Delete or comment this line to disable Fancybox --> |
||||
{% include disqus.html %} |
{% include disqus.html %} |
||||
{% include facebook_like.html %} |
{% include google_analytics.html %} |
||||
{% include google_plus_one.html %} |
|
||||
{% include twitter_sharing.html %} |
|
||||
{% include custom/after_footer.html %} |
{% include custom/after_footer.html %} |
@ -1,23 +1,22 @@ |
|||||
{% capture category %}{{ post.categories | size }}{% endcapture %} |
{% capture date %}{{ post.date }}{% endcapture %} |
||||
<div class="row-fluid"> |
{% capture this_year %}{{ date | date: "%Y" }}{% endcapture %} |
||||
<div class="span1"> |
{% unless year == this_year %} |
||||
<h1 class="date-time"><time datetime="{{ post.date | datetime | date_to_xmlschema }}" pubdate>{{ post.date | date: "<span class='month'>%b</span> <span class='day'>%d</span><span class='year'><!--%Y--></span>"}}</time></h1> |
{% assign year = this_year %} |
||||
</div> |
{% unless forloop.first %} |
||||
<div class="span10"> |
</section> |
||||
<h1><a href="{{ root_url }}{{ post.url }}">{{post.title}}</a></h1> |
{% endunless %} |
||||
</div> |
<section class="archives"><h1 class="year">{{ date | date: "%Y" }}</h1> |
||||
</div> |
{% endunless %} |
||||
{% if category != '0' %} |
<article> |
||||
<div class="row-fluid"> |
<h2 class="title"><a href="{{ root_url }}{{ post.url }}">{{post.title}}</a></h2> |
||||
<div class="span1"> |
<div class="meta"> |
||||
</div> |
<div class="date">{{ date | date: "%b %e" }}</div> |
||||
<div class="span10"> |
<div class="tags">{% include post/categories.html %}</div> |
||||
|
{% if site.disqus_short_name and post.comments == true and site.disqus_show_comment_count == true %} |
||||
|
<div class="comments"><a href="{{ root_url }}{{ post.url }}#disqus_thread">Comments</a></div> |
||||
<footer class="archive"> |
{% endif %} |
||||
<span class="categories">posted in {{ post.categories | category_links }}</span> |
|
||||
</footer> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
</div> |
||||
|
</article> |
||||
|
{% if forloop.last %} |
||||
|
</section> |
||||
{% endif %} |
{% endif %} |
@ -1,39 +1,26 @@ |
|||||
{% unless page.no_header %} |
|
||||
{% if index %} |
{% if index %} |
||||
<div class="row-fluid"> |
<h2 class="title"> |
||||
<div class="span2"> |
{% if post.external-url %} |
||||
<h1 class="date-time">{% include post/date.html %}<i class="icon-calendar-empty"></i> {{ time }}</h5> |
<a href="{{ post.external-url }}"> |
||||
<div class="row-fluid"> |
{% else %} |
||||
{% if site.disqus_short_name and page.comments != false and post.comments != false and site.disqus_show_comment_count == true %} |
<a href="{{ root_url }}{{ post.url }}"> |
||||
<a href="{% if index %}{{ site.url }}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">Comments </a> <span class="fui-bubble-16"></span> |
|
||||
{% endif %} |
|
||||
</div> |
|
||||
{% if post.categories %} |
|
||||
<div class="row-fluid"> |
|
||||
{% for category in post.categories %} |
|
||||
<a href="{{ root_url }}/{{ site.category_dir }}/{{ category | split: " " | join: "-" }}/"><span class="badge">{{ category }}</span></a> |
|
||||
{% endfor %} |
|
||||
</div> |
|
||||
{% endif %} |
{% endif %} |
||||
</div> |
{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a> |
||||
<div class="span10"> |
</h2> |
||||
<h1 class="link"><a href="{{ root_url }}{{ post.url }}">{{ post.title }}</a></h1> |
<div class="entry-content"> |
||||
{{ content | excerpt }} |
{{ content | excerpt }} |
||||
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %} |
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %} |
||||
{% if excerpted == 'true' %} <a href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a> {% endif %} |
{% if excerpted == 'true' %}<a href="{{ root_url }}{{ post.url }}" class="more-link">{{ site.excerpt_link }}</a>{% endif %} |
||||
</div> |
|
||||
</div> |
</div> |
||||
{% else %} |
{% else %} |
||||
<header> |
<h2 class="title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h2> |
||||
<div class="jumbotron"> |
<div class="entry-content">{{ content }}</div> |
||||
{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %} |
|
||||
<h5>{% include post/date.html %}<i class="icon-calendar-empty"></i> {{ time }}</h5> |
|
||||
</div> |
|
||||
</header> |
|
||||
<div class="row-fluid"> |
|
||||
<div class="span12"> |
|
||||
{{ content }} |
|
||||
</div> |
|
||||
</div> |
|
||||
{% endif %} |
{% endif %} |
||||
{% endunless %} |
|
||||
|
<div class="meta"> |
||||
|
<div class="date">{% include post/date.html %}{{ time }}</div> |
||||
|
<div class="tags">{% include post/categories.html %}</div> |
||||
|
{% if site.disqus_short_name and site.disqus_show_comment_count == true %} |
||||
|
<div class="comments"><a href="{{ root_url }}{% if index %}{{ post.url }}{% endif %}#disqus_thread">Comments</a></div> |
||||
|
{% endif %} |
||||
|
</div> |
||||
|
@ -1,30 +1,10 @@ |
|||||
{% if site.github_user %} |
{% if site.github_user %} |
||||
<section> |
<section> |
||||
<h1>GitHub Repos</h1> |
<h2>github</h2> |
||||
<ul id="gh_repos"> |
|
||||
<li class="loading">Status updating...</li> |
|
||||
</ul> |
|
||||
{% if site.github_show_profile_link %} |
{% if site.github_show_profile_link %} |
||||
<a href="https://github.com/{{site.github_user}}">@{{site.github_user}}</a> on GitHub |
<a href="https://github.com/{{site.github_user}}">@{{site.github_user}}</a> |
||||
{% endif %} |
{% endif %} |
||||
<script type="text/javascript"> |
<ul id="gh_repos"> |
||||
$(document).ready(function(){ |
</ul> |
||||
if (!window.jXHR){ |
|
||||
var jxhr = document.createElement('script'); |
|
||||
jxhr.type = 'text/javascript'; |
|
||||
jxhr.src = '{{ root_url}}/javascripts/libs/jXHR.js'; |
|
||||
var s = document.getElementsByTagName('script')[0]; |
|
||||
s.parentNode.insertBefore(jxhr, s); |
|
||||
} |
|
||||
|
|
||||
github.showRepos({ |
|
||||
user: '{{site.github_user}}', |
|
||||
count: {{site.github_repo_count}}, |
|
||||
skip_forks: {{site.github_skip_forks}}, |
|
||||
target: '#gh_repos' |
|
||||
}); |
|
||||
}); |
|
||||
</script> |
|
||||
<script src="{{ root_url }}/javascripts/github.js" type="text/javascript"> </script> |
|
||||
</section> |
</section> |
||||
{% endif %} |
{% endif %} |
||||
|
@ -1,10 +1,10 @@ |
|||||
<!--<section> |
<section> |
||||
<h1>Recent Posts</h1> |
<h2>recent</h2> |
||||
<ul id="recent_posts"> |
<ul id="recent_posts"> |
||||
{% for post in site.posts limit: site.recent_posts %} |
{% for post in site.posts limit: site.recent_posts %} |
||||
<li class="post"> |
<li class="post"> |
||||
<a href="{{ root_url }}{{ post.url }}">{{ post.title }}</a> |
<a href="{{ root_url }}{{ post.url }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a> |
||||
</li> |
</li> |
||||
{% endfor %} |
{% endfor %} |
||||
</ul> |
</ul> |
||||
</section>--> |
</section> |
||||
|
@ -1,3 +0,0 @@ |
|||||
{% comment %} |
|
||||
Add content to be output at the bottom of each page. (You might use this for analytics scripts, for example) |
|
||||
{% endcomment %} |
|
@ -1,10 +1,8 @@ |
|||||
<p> |
Copyright © {{ site.time | date: "%Y" }} |
||||
Copyright © {{ site.time | date: "%Y" }} - {{ site.author }} - |
{% if site.author %} |
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span> - Theme by <a href="http://alexgaribay.com">Alex Garibay</a> Hosted by <a href="http://github.com" target="_BLANK">GitHub</a> |
{{ site.author }} |
||||
<br/> |
{% else %} |
||||
<div style="text-align: center;"> |
{{ site.title }} |
||||
<a href="http://planet.sofiavalley.com/" target="_BLANK"> |
{% endif %} |
||||
<img src="https://2.gravatar.com/avatar/1f7785f4f6ead44826cab850fa447351?d=https%3A%2F%2Fidentiscons.github.com%2F69e88b213e91b67d3cf0ea69c26e81aa.png&r=x&s=50" ALT="Planet Sofia Valley"> |
<br/><br/> |
||||
</a> |
<div class="center"><a href="http://planet.sofiavalley.com/" target="_BLANK"><img src="https://2.gravatar.com/avatar/1f7785f4f6ead44826cab850fa447351?d=https%3A%2F%2Fidentiscons.github.com%2F69e88b213e91b67d3cf0ea69c26e81aa.png&r=x&s=50"></img></a></div> |
||||
</p> |
|
||||
</div> |
|
@ -1,3 +0,0 @@ |
|||||
<!--Fonts from Google"s Web font directory at http://google.com/webfonts --> |
|
||||
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css"> |
|
||||
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css"> |
|
@ -1,6 +0,0 @@ |
|||||
<div class="jumbotron"> |
|
||||
<div class="container"> |
|
||||
Hi. I'm Blago. |
|
||||
<h3 class="tagline">This is just another personal blog</h3> |
|
||||
</div> |
|
||||
</div> |
|
@ -1,35 +1,20 @@ |
|||||
<!DOCTYPE html> |
<!DOCTYPE HTML> |
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]--> |
<html> |
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]--> |
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]--> |
|
||||
<head> |
<head> |
||||
<meta charset="utf-8"> |
<meta charset="utf-8"> |
||||
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title> |
<title>{% if page.title %}{{ page.title | strip_html }} - {% endif %}{{ site.title }}</title> |
||||
<meta name="author" content="{{ site.author }}"> |
<meta name="author" content="{{ site.author }}"> |
||||
|
|
||||
{% capture description %}{% if page.description %}{{ page.description }}{% elsif site.description %}{{ site.description }}{% endif %}{% endcapture %} |
{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %} |
||||
<meta name="description" content="{{ description }}"> |
<meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}"> |
||||
{% capture keywords %}{% if page.keywords %}{{ page.keywords }}{% elsif site.keywords %}{{ site.keywords }}{% endif %}{% endcapture %} |
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %} |
||||
<meta name="keywords" content="{{ keywords }}"> |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
||||
|
|
||||
<!-- http://t.co/dKP3o1e --> |
<link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml"> |
||||
<meta name="HandheldFriendly" content="True"> |
|
||||
<meta name="MobileOptimized" content="320"> |
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
||||
|
|
||||
{% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} |
|
||||
<link rel="canonical" href="{{ canonical }}"> |
<link rel="canonical" href="{{ canonical }}"> |
||||
<link href="{{ root_url }}/favicon.png" rel="icon"> |
<link href="{{ root_url }}/favicon.png" rel="shortcut icon"> |
||||
<link href='http://fonts.googleapis.com/css?family=Quicksand:300,400' rel='stylesheet' type='text/css'> |
|
||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'> |
|
||||
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css"> |
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css"> |
||||
<link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml"> |
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> |
||||
<script src="/js/jquery.js"></script> |
<script async="true" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> |
||||
<script src="/js/bootstrap-collapse.js"></script> |
|
||||
<script src="{{ root_url }}/js/modernizr-2.0.js"></script> |
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> |
|
||||
<script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/lib/jquery.min.js"%3E%3C/script%3E'))</script> |
|
||||
<script src="{{ root_url }}/js/octopress.js" type="text/javascript"></script> |
|
||||
{% include custom/head.html %} |
{% include custom/head.html %} |
||||
{% include google_analytics.html %} |
|
||||
</head> |
</head> |
||||
|
@ -1 +1,59 @@ |
|||||
|
<h1><a href="{{ root_url }}/">{{ site.title }}</a></h1> |
||||
|
<nav id="main-nav">{% include navigation.html %}</nav> |
||||
|
<nav id="mobile-nav"> |
||||
|
<div class="alignleft menu"> |
||||
|
<a class="button">Menu</a> |
||||
|
<div class="container">{% include navigation.html %}</div> |
||||
|
</div> |
||||
|
<div class="alignright search"> |
||||
|
<a class="button"></a> |
||||
|
<div class="container"> |
||||
|
<form action="{{ site.simple_search }}" method="get"> |
||||
|
<input type="text" name="q" results="0"> |
||||
|
<input type="hidden" name="q" value="site:{{ site.url | shorthand_url }}"> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</nav> |
||||
|
<nav id="sub-nav" class="alignright"> |
||||
|
<div class="social"> |
||||
|
{% if site.facebook_user %} |
||||
|
<a class="facebook" href="http://www.facebook.com/{{ site.facebook_user }}" title="Facebook">Facebook</a> |
||||
|
{% endif %} |
||||
|
{% if site.googleplus_user and site.googleplus_hidden == false %} |
||||
|
<a class="google" href="https://plus.google.com/{{ site.googleplus_user }}?rel=author" title="Google+">Google+</a> |
||||
|
{% endif %} |
||||
|
{% if site.twitter_user %} |
||||
|
<a class="twitter" href="http://twitter.com/{{ site.twitter_user }}" title="Twitter">Twitter</a> |
||||
|
{% endif %} |
||||
|
{% if site.github_user %} |
||||
|
<a class="github" href="https://github.com/{{ site.github_user }}" title="GitHub">GitHub</a> |
||||
|
{% endif %} |
||||
|
{% if site.pinboard_user %} |
||||
|
<a class="pinboard" href="https://pinboard.in/u:{{ site.pinboard_user }}" title="Pinboard">Pinboard</a> |
||||
|
{% endif %} |
||||
|
{% if site.coderwall_user %} |
||||
|
<a class="coderwall" href="https://coderwall.com/{{ site.coderwall_user }}" title="Coderwall">Coderwall</a> |
||||
|
{% endif %} |
||||
|
{% if site.linkedin_user %} |
||||
|
<a class="linkedin" href="http://www.linkedin.com/in/{{ site.linkedin_user }}">LinkedIn</a> |
||||
|
{% endif %} |
||||
|
{% if site.pinterest_user %} |
||||
|
<a class="pinterest" href="https://pinterest.com/{{ site.pinterest_user }}" title="Pinterest">Pinterest</a> |
||||
|
{% endif %} |
||||
|
{% if site.delicious_user %} |
||||
|
<a class="delicious" href="http://delicious.com/{{ site.delicious_user }}" title="Delicious">Delicious</a> |
||||
|
{% endif %} |
||||
|
{% if site.subscribe_rss %} |
||||
|
<a class="rss" href="{{ site.subscribe_rss }}" title="RSS">RSS</a> |
||||
|
{% endif %} |
||||
|
{% if site.instagram_user %} |
||||
|
<a class="instagram" href="http://instagram.com/{{ site.instagram_user }}" title="Instagram">Instagram</a> |
||||
|
{% endif %} |
||||
|
</div> |
||||
|
<form class="search" action="{{ site.simple_search }}" method="get"> |
||||
|
<input class="alignright" type="text" name="q" results="0"> |
||||
|
<input type="hidden" name="q" value="site:{{ site.url | shorthand_url }}"> |
||||
|
</form> |
||||
|
</nav> |
||||
{% include custom/header.html %} |
{% include custom/header.html %} |
||||
|
@ -1,21 +1 @@ |
|||||
{% include custom/navigation.html %} |
{% include custom/navigation.html %} |
||||
<ul class="nav pull-right"> |
|
||||
{% if site.github_user %} |
|
||||
<li><a href="http://github.com/{{ site.github_user }}" title="Github Profile"><i class="icon-github-sign social-navbar"></i></a></li> |
|
||||
{% endif %} |
|
||||
{% if site.linkedin_user %} |
|
||||
<li><a href="http://linkedin.com/in/{{ site.linkedin_user }}" title="Linkedin Profile"><i class="icon-linkedin-sign social-navbar"></i></a></li> |
|
||||
{% endif %} |
|
||||
{% if site.twitter_user %} |
|
||||
<li><a href="http://twitter.com/{{ site.twitter_user }}" title="Twitter Profile"><i class="icon-twitter-sign social-navbar"></i></a></li> |
|
||||
{% endif %} |
|
||||
{% if site.googleplus_user %} |
|
||||
<li><a href="http://plus.google.com/{{ site.googleplus_user }}" title="Google+ Profile"><i class="icon-google-plus-sign social-navbar"></i></a></li> |
|
||||
{% endif %} |
|
||||
{% if site.facebook_user %} |
|
||||
<li><a href="http://facebook.com/{{ site.facebook_user }}" title="Facebook Profile"><i class="icon-facebook-sign social-navbar"></i></a></li> |
|
||||
{% endif %} |
|
||||
{% if site.email %} |
|
||||
<li><a href="mailto:{{ site.email }}" title="Email"><i class="icon-envelope-alt social-navbar"></i></a></li> |
|
||||
{% endif %} |
|
||||
</ul> |
|
||||
|
@ -1,12 +1,8 @@ |
|||||
{% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %} |
{% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %} |
||||
{% unless category == '0' %} |
{% unless category == '0' %} |
||||
{% if post %} |
{% if post %} |
||||
{% for category in post.categories %} |
{{ post.categories | category_links }} |
||||
<a href="{{ root_url }}/{{ site.category_dir }}/{{ category | split: " " | join: "-" }}/"><span class="badge">{{ category }}</span></a> |
|
||||
{% endfor %} |
|
||||
{% else %} |
{% else %} |
||||
{% for category in page.categories %} |
{{ page.categories | category_links }} |
||||
<a href="{{ root_url }}/{{ site.category_dir }}/{{ category | split: " " | join: "-" }}/"><span class="badge">{{ category }}</span></a> |
|
||||
{% endfor %} |
|
||||
{% endif %} |
{% endif %} |
||||
{% endunless %} |
{% endunless %} |
||||
|
@ -1,32 +1,13 @@ |
|||||
{% capture root_url %}{{ site.root | strip_slash }}{% endcapture %} |
{% capture root_url %}{{ site.root | strip_slash }}{% endcapture %} |
||||
{% include head.html %} |
{% include head.html %} |
||||
<body {% if page.body_id %} id="{{ page.body_id }}" {% endif %} {% if page.sidebar == false %} class="no-sidebar" {% endif %} {% if page.sidebar == 'collapse' or site.sidebar == 'collapse' %} class="collapse-sidebar sidebar-footer" {% endif %}> |
|
||||
<div class="navbar navbar-inverse navbar-static-top"> |
<body> |
||||
<div class="navbar-inner"> |
<header id="header" class="inner">{% include header.html %}</header> |
||||
<div class="container"> |
{% unless page.banner == false %} |
||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-responsive-collapse"> |
{% include banner.html %} |
||||
<span class="fui-menu-24"></span> |
{% endunless %} |
||||
</a> |
<div id="content" class="inner">{{ content | expand_urls: root_url }}</div> |
||||
<div class="nav-collapse collapse navbar-responsive-collapse" style="height:0;"> |
<footer id="footer" class="inner">{% include footer.html %}</footer> |
||||
{% include navigation.html %} |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="container" id="main"> |
|
||||
<div class="span12"> |
|
||||
<div class="row-fluid"> |
|
||||
<div id="content"> |
|
||||
{{ content | expand_urls: root_url }} |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="row-fluid"> |
|
||||
<footer class="footer-page" role="contentinfo"> |
|
||||
{% include footer.html %} |
|
||||
</footer> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
{% include after_footer.html %} |
{% include after_footer.html %} |
||||
</body> |
</body> |
||||
</html> |
</html> |
@ -1,26 +1,18 @@ |
|||||
--- |
--- |
||||
layout: default |
layout: default |
||||
--- |
--- |
||||
{% include header.html %} |
|
||||
<div class="blog-index"> |
|
||||
{% assign index = true %} |
{% assign index = true %} |
||||
{% for post in paginator.posts %} |
{% for post in paginator.posts %} |
||||
{% assign content = post.content %} |
{% assign content = post.content %} |
||||
<article> |
<article class="post">{% include article.html %}</article> |
||||
{% include article.html %} |
|
||||
</article> |
|
||||
{% unless post == paginator.posts.last %} |
|
||||
<hr> |
|
||||
{% endunless %} |
|
||||
{% endfor %} |
{% endfor %} |
||||
<div class="pagination"> |
<nav id="pagenavi"> |
||||
{% if paginator.next_page %} |
|
||||
<a class="prev" href="{{paginator.next_page}}">← Older</a> |
|
||||
{% endif %} |
|
||||
|
|
||||
{% if paginator.previous_page %} |
{% if paginator.previous_page %} |
||||
<a class="next" href="{{paginator.previous_page}}">Newer →</a> |
<a href="{{paginator.previous_page}}" class="prev">Prev</a> |
||||
{% endif %} |
{% endif %} |
||||
</div> |
{% if paginator.next_page %} |
||||
</div> |
<a href="{{paginator.next_page}}" class="next">Next</a> |
||||
|
{% endif %} |
||||
|
<div class="center"><a href="{{ root_url }}/blog/archives">Blog Archives</a></div> |
||||
|
</nav> |
File diff suppressed because one or more lines are too long
@ -1,78 +1,92 @@ |
|||||
// JSON-P Twitter fetcher for Octopress
|
(function($){ |
||||
// (c) Brandon Mathis // MIT License
|
$.fn.getTwitterFeed = function(userid, count, reply){ |
||||
|
var banner = $(this), |
||||
|
feed = banner.find('.feed'), |
||||
|
interval = 10000, |
||||
|
speed = 500; |
||||
|
|
||||
/* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */ |
var linkify = function(text){ |
||||
function prettyDate(time) { |
text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>').replace(/(^|\W)@(\w+)/g, '$1<a href="http://twitter.com/$2">@$2</a>').replace(/(^|\W)#(\w+)/g, '$1<a href="http://search.twitter.com/search?q=%23$2">#$2</a>'); |
||||
if (navigator.appName === 'Microsoft Internet Explorer') { |
|
||||
return "<span>∞</span>"; // because IE date parsing isn't fun.
|
return text; |
||||
} |
} |
||||
var say = { |
|
||||
just_now: " now", |
var relativeDate = function(date){ |
||||
minute_ago: "1m", |
if (navigator.appName === 'Microsoft Internet Explorer') return ''; |
||||
minutes_ago: "m", |
|
||||
hour_ago: "1h", |
var unit = { |
||||
hours_ago: "h", |
now: 'Now', |
||||
yesterday: "1d", |
minute: '1 min', |
||||
days_ago: "d", |
minutes: ' mins', |
||||
last_week: "1w", |
hour: '1 hr', |
||||
weeks_ago: "w" |
hours: ' hrs', |
||||
|
day: 'Yesterday', |
||||
|
days: ' days', |
||||
|
week: '1 week', |
||||
|
weeks: ' weeks' |
||||
}; |
}; |
||||
|
|
||||
var current_date = new Date(), |
var current = new Date(), |
||||
current_date_time = current_date.getTime(), |
tweet = new Date(date), |
||||
current_date_full = current_date_time + (1 * 60000), |
diff = (((current.getTime() + (1 * 60000)) - tweet.getTime()) / 1000), |
||||
date = new Date(time), |
|
||||
diff = ((current_date_full - date.getTime()) / 1000), |
|
||||
day_diff = Math.floor(diff / 86400); |
day_diff = Math.floor(diff / 86400); |
||||
|
|
||||
if (isNaN(day_diff) || day_diff < 0) { return "<span>∞</span>"; } |
if (day_diff == 0){ |
||||
|
if (diff < 60) return unit.now; |
||||
return day_diff === 0 && ( |
else if (diff < 120) return unit.minute; |
||||
diff < 60 && say.just_now || |
else if (diff < 3600) return Math.floor(diff / 60) + unit.minutes; |
||||
diff < 120 && say.minute_ago || |
else if (diff < 7200) return unit.hour; |
||||
diff < 3600 && Math.floor(diff / 60) + say.minutes_ago || |
else if (diff < 86400) return Math.floor(diff / 3600) + unit.hours; |
||||
diff < 7200 && say.hour_ago || |
else return ''; |
||||
diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) || |
} else if (day_diff == 1) { |
||||
day_diff === 1 && say.yesterday || |
return unit.day; |
||||
day_diff < 7 && day_diff + say.days_ago || |
} else if (day_diff < 7) { |
||||
day_diff === 7 && say.last_week || |
return day_diff + unit.days; |
||||
day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago; |
} else if (day_diff == 7) { |
||||
|
return unit.week; |
||||
|
} else if (day_diff > 7) { |
||||
|
return Math.ceil(day_diff / 7) + unit.weeks; |
||||
|
} else { |
||||
|
return ''; |
||||
|
} |
||||
} |
} |
||||
|
|
||||
function linkifyTweet(text, url) { |
if ($(window).width() > 600){ |
||||
// Linkify urls, usernames, hashtags
|
var url = 'https://api.twitter.com/1/statuses/user_timeline/'+userid+'.json?count='+count+'&exclude_replies='+(reply ? '0' : '1')+'&trim_user=true&callback=?'; |
||||
text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>') |
banner.show(); |
||||
.replace(/(^|\W)@(\w+)/g, '$1<a href="https://twitter.com/$2">@$2</a>') |
$.getJSON(url, function(json){ |
||||
.replace(/(^|\W)#(\w+)/g, '$1<a href="https://search.twitter.com/search?q=%23$2">#$2</a>'); |
var length = json.length, |
||||
|
fragment = document.createDocumentFragment(), |
||||
|
counts = 0, |
||||
|
timeout; |
||||
|
|
||||
// Use twitter's api to replace t.co shortened urls with expanded ones.
|
for (var i=0; i<length; i++){ |
||||
for (var u in url) { |
var item = document.createElement('li'); |
||||
if(url[u].expanded_url != null){ |
item.innerHTML = linkify(json[i].text) + '<small>'+relativeDate(json[i].created_at)+'</small>'; |
||||
var shortUrl = new RegExp(url[u].url, 'g'); |
fragment.appendChild(item); |
||||
text = text.replace(shortUrl, url[u].expanded_url); |
|
||||
var shortUrl = new RegExp(">"+(url[u].url.replace(/https?:\/\//, '')), 'g'); |
|
||||
text = text.replace(shortUrl, ">"+url[u].display_url); |
|
||||
} |
|
||||
} |
} |
||||
return text |
|
||||
} |
|
||||
|
|
||||
function showTwitterFeed(tweets, twitter_user) { |
|
||||
var timeline = document.getElementById('tweets'), |
|
||||
content = ''; |
|
||||
|
|
||||
for (var t in tweets) { |
var play = function(){ |
||||
content += '<li>'+'<p>'+'<a href="https://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'), tweets[t].entities.urls)+'</p>'+'</li>'; |
timeout = setTimeout(function(){ |
||||
|
feed.animate({top: '-='+30}, speed, function(){ |
||||
|
$(this).append($(this).children().eq(counts).clone()); |
||||
|
counts++; |
||||
|
play(); |
||||
|
}); |
||||
|
}, interval); |
||||
} |
} |
||||
timeline.innerHTML = content; |
|
||||
|
var pause = function(){ |
||||
|
clearTimeout(timeout); |
||||
} |
} |
||||
|
|
||||
function getTwitterFeed(user, count, replies) { |
banner.on('mouseenter', pause).on('mouseleave', play) |
||||
count = parseInt(count, 10); |
.children('.loading').hide().end() |
||||
$.ajax({ |
.children('.container').show() |
||||
url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?" |
.children('.feed').append(fragment); |
||||
, type: 'jsonp' |
|
||||
, error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); } |
play(); |
||||
, success: function(data) { showTwitterFeed(data.slice(0, count), user); } |
}); |
||||
}) |
|
||||
} |
} |
||||
|
}; |
||||
|
})(jQuery); |
Loading…
Reference in new issue