mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-12-23 16:08:53 -05:00
updated source and styles from latest master
This commit is contained in:
parent
284c5f98f8
commit
2691bee2be
@ -14,6 +14,10 @@ $sidebar-width-wide: 300px !default;
|
||||
|
||||
$indented-lists: false !default;
|
||||
|
||||
$header-font-size: 1em !default;
|
||||
$header-padding-top: 1.5em !default;
|
||||
$header-padding-bottom: 1.5em !default;
|
||||
|
||||
.group { @include pie-clearfix; }
|
||||
|
||||
@mixin collapse-sidebar {
|
||||
@ -32,7 +36,10 @@ $indented-lists: false !default;
|
||||
&.thirds section {
|
||||
width: 30%;
|
||||
margin-left: 5%;
|
||||
&.first { margin-left: 0; }
|
||||
&.first {
|
||||
margin-left: 0;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,7 +48,7 @@ body {
|
||||
max-width: $max-width;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
> header, > nav, > footer, #content > article, #content > div > article, #content > div > section, nav.pagination {
|
||||
> header, > nav, > footer, #content > article, #content > div > article, #content > div > section {
|
||||
@extend .group;
|
||||
padding-left: $pad-min;
|
||||
padding-right: $pad-min;
|
||||
@ -58,10 +65,27 @@ body {
|
||||
padding-right: $pad-wide;
|
||||
}
|
||||
}
|
||||
div.pagination {
|
||||
@extend .group;
|
||||
margin-left: $pad-min;
|
||||
margin-right: $pad-min;
|
||||
@media only screen and (min-width: 480px) {
|
||||
margin-left: $pad-narrow;
|
||||
margin-right: $pad-narrow;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
margin-left: $pad-medium;
|
||||
margin-right: $pad-medium;
|
||||
}
|
||||
@media only screen and (min-width: 992px) {
|
||||
margin-left: $pad-wide;
|
||||
margin-right: $pad-wide;
|
||||
}
|
||||
}
|
||||
> header {
|
||||
font-size: 1em;
|
||||
padding-top: 1.5em;
|
||||
padding-bottom: 1.5em;
|
||||
font-size: $header-font-size;
|
||||
padding-top: $header-padding-top;
|
||||
padding-bottom: $header-padding-bottom;
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,14 +119,14 @@ body.sidebar-footer {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 550px) {
|
||||
body > header { font-size: 1em; }
|
||||
body > header { font-size: $header-font-size; }
|
||||
}
|
||||
@media only screen and (min-width: 750px) {
|
||||
aside.sidebar { @include collapse-sidebar; }
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
body { -webkit-text-size-adjust: auto; }
|
||||
body > header { font-size: 1.2em; }
|
||||
body > header { font-size: $header-font-size * 1.2; }
|
||||
#main {
|
||||
@extend .group;
|
||||
padding: 0;
|
||||
@ -139,7 +163,7 @@ body.sidebar-footer {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
body > header { font-size: 1.3em; }
|
||||
body > header { font-size: $header-font-size * 1.3; }
|
||||
#content { margin-right: $sidebar-width-wide; }
|
||||
#content {
|
||||
> div, > article {
|
||||
|
@ -18,17 +18,29 @@ $solar-green: #859900 !default;
|
||||
$solarized: dark !default;
|
||||
|
||||
@if $solarized == light {
|
||||
$base03: #fdf6e3;
|
||||
$base02: #eee8d5;
|
||||
$base01: #93a1a1;
|
||||
$base00: #839496;
|
||||
$base0: #657b83;
|
||||
$base1: #586e75;
|
||||
$base2: #073642;
|
||||
$base3: #002b36;
|
||||
|
||||
$_base03: $base03;
|
||||
$_base02: $base02;
|
||||
$_base01: $base01;
|
||||
$_base00: $base00;
|
||||
$_base0: $base0;
|
||||
$_base1: $base1;
|
||||
$_base2: $base2;
|
||||
$_base3: $base3;
|
||||
|
||||
$base03: $_base3;
|
||||
$base02: $_base2;
|
||||
$base01: $_base1;
|
||||
$base00: $_base0;
|
||||
$base0: $_base00;
|
||||
$base1: $_base01;
|
||||
$base2: $_base02;
|
||||
$base3: $_base03;
|
||||
}
|
||||
|
||||
/* non highlighted code colors */
|
||||
$pre-bg: $base03 !default;
|
||||
$pre-border: $base02 !default;
|
||||
$pre-border: darken($base02, 5) !default;
|
||||
$pre-color: $base1 !default;
|
||||
|
||||
|
||||
|
@ -23,6 +23,8 @@ $type-border: #ddd !default;
|
||||
|
||||
/* Navigation */
|
||||
$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;
|
||||
@ -46,6 +48,8 @@ $twitter-status-link: lighten($sidebar-link-color-subdued, 15) !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;
|
||||
|
@ -1,21 +1,30 @@
|
||||
$blockquote: $type-border !default;
|
||||
$mono: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace;
|
||||
$sans: "PT Sans", "Helvetica Neue", Arial, sans-serif !default;
|
||||
$serif: "PT Serif", Georgia, Times, "Times New Roman", serif !default;
|
||||
$mono: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace !default;
|
||||
$heading-font-family: "PT Serif", "Georgia", "Helvetica Neue", Arial, sans-serif !default;
|
||||
$header-title-font-family: $heading-font-family !default;
|
||||
$header-subtitle-font-family: $heading-font-family !default;
|
||||
|
||||
// Fonts
|
||||
.heading {
|
||||
font-family: "PT Serif", "Georgia", "Helvetica Neue", Arial, sans-serif;
|
||||
font-family: $heading-font-family;
|
||||
}
|
||||
.sans { font-family: "PT Sans", "Helvetica Neue", Arial, sans-serif; }
|
||||
.serif { font-family: "PT Serif", Georgia, Times, "Times New Roman", serif; }
|
||||
.sans { font-family: $sans; }
|
||||
.serif { font-family: $serif; }
|
||||
.mono { font-family: $mono; }
|
||||
|
||||
body > header h1 {
|
||||
font-size: 2.2em;
|
||||
@extend .heading;
|
||||
font-family: $header-title-font-family;
|
||||
font-weight: normal;
|
||||
line-height: 1.2em;
|
||||
margin-bottom: 0.6667em;
|
||||
}
|
||||
body > header h2 {
|
||||
font-family: $header-subtitle-font-family;
|
||||
}
|
||||
|
||||
body {
|
||||
line-height: 1.5em;
|
||||
@ -56,12 +65,12 @@ h6, section h5, section section h4, section section section h3 {
|
||||
p, blockquote, ul, ol { margin-bottom: 1.5em; }
|
||||
|
||||
ul { list-style-type: disc;
|
||||
ul { list-style-type: circle;
|
||||
ul { list-style-type: square; }}}
|
||||
ul { list-style-type: circle; margin-bottom: 0px;
|
||||
ul { list-style-type: square; margin-bottom: 0px; }}}
|
||||
|
||||
ol { list-style-type: decimal;
|
||||
ol { list-style-type: lower-alpha;
|
||||
ol { list-style-type: lower-roman; }}}
|
||||
ol { list-style-type: lower-alpha; margin-bottom: 0px;
|
||||
ol { list-style-type: lower-roman; margin-bottom: 0px; }}}
|
||||
|
||||
ul, ol { &, ul, ol { margin-left: 1.3em; }}
|
||||
|
||||
@ -115,7 +124,8 @@ blockquote {
|
||||
}
|
||||
}
|
||||
|
||||
.has-pullquote:before {
|
||||
.pullquote-right:before,
|
||||
.pullquote-left:before {
|
||||
/* Reset metrics. */
|
||||
padding: 0;
|
||||
border: none;
|
||||
@ -134,6 +144,13 @@ blockquote {
|
||||
font-size: 1.4em;
|
||||
line-height: 1.45em;
|
||||
}
|
||||
|
||||
.pullquote-left:before {
|
||||
/* Make left pullquotes align properly. */
|
||||
float: left;
|
||||
margin: .5em 1.5em 1em 0;
|
||||
}
|
||||
|
||||
/* @extend this to force long lines of continuous text to wrap */
|
||||
.force-wrap {
|
||||
white-space: -moz-pre-wrap;
|
||||
|
10
sass/custom/_fonts.scss
Normal file
10
sass/custom/_fonts.scss
Normal file
@ -0,0 +1,10 @@
|
||||
// Here you can easily change font faces which are used in your site.
|
||||
// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works. your sites's.
|
||||
// If you love to use Web Fonts, you also need to add some lines to source/_includes/custom/head.html
|
||||
|
||||
//$sans: "Optima", sans-serif;
|
||||
//$serif: "Baskerville", serif;
|
||||
//$mono: "Courier", monospace;
|
||||
//$heading-font-family: "Verdana", sans-serif;
|
||||
//$header-title-font-family: "Futura", sans-serif;
|
||||
//$header-subtitle-font-family: "Futura", sans-serif;
|
@ -74,6 +74,8 @@ article {
|
||||
p.meta {
|
||||
margin-bottom: .8em;
|
||||
font-size: .85em;
|
||||
clear: both;
|
||||
overflow: hidden;
|
||||
}
|
||||
.byline + time:before, time +time:before, .comments:before, .byline ~ .categories:before {
|
||||
@extend .separator;
|
||||
@ -121,14 +123,12 @@ article + article {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#content nav.pagination {
|
||||
#content div.pagination {
|
||||
text-align: center;
|
||||
font-size: .95em;
|
||||
div {
|
||||
position: relative;
|
||||
background: $img-border top left repeat-x;
|
||||
padding: {top: 1.5em; bottom: 1.5em;}
|
||||
}
|
||||
position: relative;
|
||||
background: $img-border top left repeat-x;
|
||||
padding: {top: 1.5em; bottom: 1.5em;}
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: $text-color-light;
|
||||
|
@ -4,7 +4,7 @@ body > footer {
|
||||
color: $footer-color;
|
||||
text-shadow: lighten($footer-bg, 5) 0 1px;
|
||||
background-color: $footer-bg;
|
||||
@include background(image-url('noise.png'), linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)));
|
||||
@include background($footer-bg-front, $footer-bg-back);
|
||||
border-top: 1px solid $footer-border-top;
|
||||
position: relative;
|
||||
padding-top: 1em;
|
||||
|
@ -1,7 +1,7 @@
|
||||
body > nav {
|
||||
position: relative;
|
||||
background-color: $nav-bg;
|
||||
@include background(image-url('noise.png'), linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)));
|
||||
@include background($nav-bg-front, $nav-bg-back);
|
||||
border: {
|
||||
top: 1px solid $nav-border-top;
|
||||
bottom: 1px solid $nav-border-bottom; }
|
||||
|
@ -1,4 +1,5 @@
|
||||
@import "sidebar/base";
|
||||
@import "sidebar/twitter";
|
||||
@import "sidebar/googleplus";
|
||||
@import "sidebar/pinboard";
|
||||
@import "sidebar/delicious";
|
||||
|
@ -21,17 +21,19 @@
|
||||
}
|
||||
border: 1px solid $pre-border !important;
|
||||
}
|
||||
figure.code, .gist-file, pre {
|
||||
@include box-shadow(rgba(#000, .06) 0 0 10px);
|
||||
.highlight pre { @include box-shadow(none); }
|
||||
}
|
||||
|
||||
html .gist .gist-file {
|
||||
margin-bottom: 1.8em;
|
||||
position: relative;
|
||||
border: none;
|
||||
padding-top: image-height("code_bg.png") !important;
|
||||
.gist-syntax {
|
||||
@if $solarized == dark {
|
||||
border-bottom: 1px solid $base03 !important;
|
||||
} @else if $solarized == light {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
border-bottom: 0 !important;
|
||||
background: none !important;
|
||||
.gist-highlight{
|
||||
background: $base03 !important;
|
||||
pre {
|
||||
@ -46,6 +48,7 @@ html .gist .gist-file {
|
||||
font-size: .7em !important;
|
||||
@if $solarized == light {
|
||||
background: lighten($base03, 2) $noise-bg;
|
||||
border: 1px solid $pre-border !important;
|
||||
border-top: 1px solid lighten($base03, 2) !important;
|
||||
} @else {
|
||||
background: $base02 $noise-bg;
|
||||
@ -89,7 +92,8 @@ h3.filename {
|
||||
p, li {
|
||||
code {
|
||||
@extend .mono;
|
||||
white-space: pre;
|
||||
display: inline-block;
|
||||
white-space: no-wrap;
|
||||
background: #fff;
|
||||
font-size: .8em;
|
||||
line-height: 1.5em;
|
||||
@ -246,3 +250,4 @@ figure.code {
|
||||
text-shadow: #cbcccc 0 1px 0;
|
||||
padding-left: 3em;
|
||||
}
|
||||
|
||||
|
26
sass/partials/sidebar/_googleplus.scss
Normal file
26
sass/partials/sidebar/_googleplus.scss
Normal file
@ -0,0 +1,26 @@
|
||||
.googleplus {
|
||||
h1 {
|
||||
-moz-box-shadow: none !important;
|
||||
-webkit-box-shadow: none !important;
|
||||
-o-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
border-bottom: 0px none !important;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
white-space: normal !important;
|
||||
line-height: 32px;
|
||||
|
||||
img {
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
border: 0 none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.googleplus-hidden {
|
||||
position: absolute;
|
||||
top: -1000em;
|
||||
left: -1000em;
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
@include reset-html5;
|
||||
|
||||
@import "custom/colors";
|
||||
@import "custom/fonts";
|
||||
@import "custom/layout";
|
||||
@import "base";
|
||||
@import "partials";
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% include disqus.html %}
|
||||
{% include facebook_like.html %}
|
||||
{% include google_plus_one.html %}
|
||||
{% include twitter_sharing.html %}
|
||||
{% include google_analytics.html %}
|
||||
{% include custom/after_footer.html %}
|
||||
|
@ -1,9 +1,9 @@
|
||||
{% unless page.no_header %}
|
||||
<header>
|
||||
{% if index %}
|
||||
<h1 class="entry-title"><a href="{{ root_url }}{{ post.url }}">{{ post.title | titlecase }}</a></h1>
|
||||
<h1 class="entry-title"><a href="{{ root_url }}{{ post.url }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a></h1>
|
||||
{% else %}
|
||||
<h1 class="entry-title">{{ page.title | titlecase }}</h1>
|
||||
<h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1>
|
||||
{% endif %}
|
||||
{% unless page.meta == false %}
|
||||
<p class="meta">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<section>
|
||||
<h1>On Delicious</h1>
|
||||
<div id="delicious"></div>
|
||||
<script type="text/javascript" src="http://feeds.delicious.com/v1/json/{{ site.delicious_user }}?count={{ site.delicious_count }}&sort=date&callback=renderDeliciousLinks"></script>
|
||||
<script type="text/javascript" src="http://feeds.delicious.com/v2/json/{{ site.delicious_user }}?count={{ site.delicious_count }}&sort=date&callback=renderDeliciousLinks"></script>
|
||||
<p><a href="http://delicious.com/{{ site.delicious_user }}">My Delicious Bookmarks »</a></p>
|
||||
</section>
|
||||
{% endif %}
|
11
source/_includes/asides/googleplus.html
Normal file
11
source/_includes/asides/googleplus.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% if site.googleplus_user %}
|
||||
<section class="googleplus{% if site.googleplus_hidden %} googleplus-hidden{% endif %}">
|
||||
<h1>
|
||||
<a href="https://plus.google.com/{{ site.googleplus_user }}?rel=author">
|
||||
<img src="http://www.google.com/images/icons/ui/gprofile_button-32.png" width="32" height="32">
|
||||
Google+
|
||||
</a>
|
||||
</h1>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
27
source/_includes/custom/category_feed.xml
Normal file
27
source/_includes/custom/category_feed.xml
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
layout: nil
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
||||
<title><![CDATA[{{ page.title }} | {{ site.title }}]]></title>
|
||||
<link href="{{ site.url }}/{{ page.feed_url }}" rel="self"/>
|
||||
<link href="{{ site.url }}/"/>
|
||||
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
||||
<id>{{ site.url }}/</id>
|
||||
<author>
|
||||
<name><![CDATA[{{ site.author | strip_html }}]]></name>
|
||||
{% if site.email %}<email><![CDATA[{{ site.email }}]]></email>{% endif %}
|
||||
</author>
|
||||
<generator uri="http://octopress.org/">Octopress</generator>
|
||||
|
||||
{% for post in site.categories[page.category] limit: 5 %}
|
||||
<entry>
|
||||
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
|
||||
<link href="{{ site.url }}{{ post.url }}"/>
|
||||
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
||||
<id>{{ site.url }}{{ post.id }}</id>
|
||||
<content type="html"><![CDATA[{{ post.content | expand_urls: site.url | markdownify | cdata_escape }}]]></content>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
@ -1,19 +1,18 @@
|
||||
{% comment %} Load script if disquss comments are enabled and `page.comments` is either empty (index) or set to true {% endcomment %}
|
||||
{% if site.disqus_short_name and page.comments != false %}
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
var disqus_shortname = '{{ site.disqus_short_name }}';
|
||||
{% if page.comments == true %}
|
||||
{% comment %} `page.comments` can be only be set to true on pages/posts, so we embed the comments here. {% endcomment %}
|
||||
// var disqus_developer = 1;
|
||||
var disqus_identifier = '{{ site.url }}{{ page.url }}';
|
||||
var disqus_url = '{{ site.url }}{{ page.url }}';
|
||||
var disqus_script = 'embed.js'
|
||||
var disqus_script = 'embed.js';
|
||||
{% else %}
|
||||
{% comment %} As `page.comments` is empty, we must be on the index page. {% endcomment %}
|
||||
var disqus_script = 'count.js'
|
||||
var disqus_script = 'count.js';
|
||||
{% endif %}
|
||||
|
||||
(function () {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
|
10
source/_includes/facebook_like.html
Normal file
10
source/_includes/facebook_like.html
Normal file
@ -0,0 +1,10 @@
|
||||
{% if site.facebook_like %}
|
||||
<div id="fb-root"></div>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) {return;}
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/all.js#appId=212934732101925&xfbml=1";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
{% endif %}
|
@ -8,7 +8,7 @@
|
||||
<meta name="author" content="{{ site.author }}">
|
||||
|
||||
{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}
|
||||
<meta name="description" content="{{ description | strip_newlines | strip_html | truncate:150 }}">
|
||||
<meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}">
|
||||
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %}
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
@ -16,7 +16,7 @@
|
||||
<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' }}{% endif %}{% endcapture %}
|
||||
{% 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 href="{{ root_url }}/favicon.png" rel="icon">
|
||||
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
@ -25,4 +25,5 @@
|
||||
<script src="{{ root_url }}/javascripts/octopress.js" type="text/javascript"></script>
|
||||
<link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml">
|
||||
{% include custom/head.html %}
|
||||
{% include google_analytics.html %}
|
||||
</head>
|
||||
|
@ -1,12 +1,15 @@
|
||||
{% capture date %}{{ page.date }}{{ post.date }}{% endcapture %}
|
||||
{% capture date_formatted %}{{ page.date_formatted }}{{ post.date_formatted }}{% endcapture %}
|
||||
{% capture has_date %}{{ date | size }}{% endcapture %}
|
||||
|
||||
{% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %}
|
||||
{% capture updated_formatted %}{{ page.updated_formatted }}{{ post.updated_formatted }}{% endcapture %}
|
||||
{% capture was_updated %}{{ updated | size }}{% endcapture %}
|
||||
|
||||
{% if has_date != '0' %}
|
||||
{% capture time %}<time datetime="{{ date | datetime | date_to_xmlschema }}" pubdate {% if updated %} data-updated="true" {% endif %}>{{ date | ordinalize }}</time>{% endcapture %}
|
||||
{% capture time %}<time datetime="{{ date | datetime | date_to_xmlschema }}" pubdate{% if updated %} data-updated="true"{% endif %}>{{ date_formatted }}</time>{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% if was_updated != '0' %}
|
||||
{% capture updated %}<time class="updated" datetime="{{ updated | datetime | date_to_xmlschema }}">Updated {{ updated | ordinalize }}</time>{% endcapture %}
|
||||
{% else %}{% assign updated = false %}{% endif %}
|
||||
{% capture updated %}<time datetime="{{ updated | datetime | date_to_xmlschema }}" class="updated">Updated {{ updated_formatted }}</time>{% endcapture %}
|
||||
{% else %}{% assign updated = false %}{% endif %}
|
@ -5,4 +5,7 @@
|
||||
{% if site.google_plus_one %}
|
||||
<div class="g-plusone" data-size="{{ site.google_plus_one_size }}"></div>
|
||||
{% endif %}
|
||||
{% if site.facebook_like %}
|
||||
<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@ layout: default
|
||||
<article role="article">
|
||||
{% if page.title %}
|
||||
<header>
|
||||
<h1 class="entry-title">{{ page.title | titlecase }}</h1>
|
||||
<h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1>
|
||||
{% if page.date %}<p class="meta">{% include post/date.html %}{{ time }}</p>{% endif %}
|
||||
</header>
|
||||
{% endif %}
|
||||
|
@ -15,6 +15,14 @@ single: true
|
||||
{% unless page.sharing == false %}
|
||||
{% include post/sharing.html %}
|
||||
{% endunless %}
|
||||
<p class="meta">
|
||||
{% if page.previous.url %}
|
||||
<a class="basic-alignment left" href="{{page.previous.url}}" title="Previous Post: {{page.previous.title}}">« {{page.previous.title}}</a>
|
||||
{% endif %}
|
||||
{% if page.next.url %}
|
||||
<a class="basic-alignment right" href="{{page.next.url}}" title="next Post: {{page.next.title}}">{{page.next.title}} »</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</footer>
|
||||
</article>
|
||||
{% if site.disqus_short_name and page.comments == true %}
|
||||
|
@ -4,25 +4,24 @@ layout: nil
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
||||
<title>{{ site.title }}</title>
|
||||
<title><![CDATA[{{ site.title }}]]></title>
|
||||
<link href="{{ site.url }}/atom.xml" rel="self"/>
|
||||
<link href="{{ site.url }}/"/>
|
||||
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
||||
<id>{{ site.url }}/</id>
|
||||
<author>
|
||||
<name>{{ site.author }}</name>
|
||||
{% if site.email %}
|
||||
<email>{{ site.email }}</email>
|
||||
{% endif %}
|
||||
<name><![CDATA[{{ site.author | strip_html }}]]></name>
|
||||
{% if site.email %}<email><![CDATA[{{ site.email }}]]></email>{% endif %}
|
||||
</author>
|
||||
<generator uri="http://octopress.org/">Octopress</generator>
|
||||
|
||||
{% for post in site.posts limit: 20 %}
|
||||
<entry>
|
||||
<title>{{ post.title }}</title>
|
||||
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
|
||||
<link href="{{ site.url }}{{ post.url }}"/>
|
||||
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
||||
<id>{{ site.url }}{{ post.id }}</id>
|
||||
<content type="html">{{ post.content | expand_urls: site.url | xml_escape }}</content>
|
||||
<content type="html"><![CDATA[{{ post.content | expand_urls: site.url | cdata_escape }}]]></content>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
||||
|
@ -10,17 +10,15 @@ layout: default
|
||||
{% include article.html %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
<nav class="pagination">
|
||||
<div>
|
||||
{% if paginator.next_page %}
|
||||
<a class="prev" href="{{paginator.next_page}}">← Older</a>
|
||||
{% endif %}
|
||||
<a href="/blog/archives">Blog Archives</a>
|
||||
{% if paginator.previous_page %}
|
||||
<a class="next" href="{{paginator.previous_page}}">Newer →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
<div class="pagination">
|
||||
{% if paginator.next_page %}
|
||||
<a class="prev" href="{{paginator.next_page}}">← Older</a>
|
||||
{% endif %}
|
||||
<a href="/blog/archives">Blog Archives</a>
|
||||
{% if paginator.previous_page %}
|
||||
<a class="next" href="{{paginator.previous_page}}">Newer →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<aside class="sidebar">
|
||||
{% if site.blog_index_asides.size %}
|
||||
|
@ -9,14 +9,14 @@ var github = (function(){
|
||||
}
|
||||
return {
|
||||
showRepos: function(options){
|
||||
var feed = new jXHR();
|
||||
feed.onerror = function (msg,url) {
|
||||
$(options.target + ' li.loading').addClass('error').text("Error loading feed");
|
||||
};
|
||||
feed.onreadystatechange = function(data) {
|
||||
if (feed.readyState === 4) {
|
||||
$.ajax({
|
||||
url: "http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?"
|
||||
, type: 'jsonp'
|
||||
, error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
|
||||
, success: function(data) {
|
||||
var repos = [];
|
||||
for (var i = 0; i < data.repositories.length; i++){
|
||||
if (!data || !data.repositories) { return; }
|
||||
for (var i = 0; i < data.repositories.length; i++) {
|
||||
if (options.skip_forks && data.repositories[i].fork) { continue; }
|
||||
repos.push(data.repositories[i]);
|
||||
}
|
||||
@ -31,9 +31,7 @@ var github = (function(){
|
||||
if (options.count) { repos.splice(options.count); }
|
||||
render(options.target, repos);
|
||||
}
|
||||
};
|
||||
feed.open("GET","http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?");
|
||||
feed.send();
|
||||
});
|
||||
}
|
||||
};
|
||||
})();
|
||||
})();
|
||||
|
@ -1,12 +1,11 @@
|
||||
// JSON-P Twitter fetcher for Octopress
|
||||
// (c) Brandon Mathis // MIT Lisence
|
||||
// (c) Brandon Mathis // MIT License
|
||||
|
||||
/* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */
|
||||
function prettyDate(time) {
|
||||
if (navigator.appName === 'Microsoft Internet Explorer') {
|
||||
return "<span>∞</span>"; // because IE date parsing isn't fun.
|
||||
}
|
||||
|
||||
var say = {
|
||||
just_now: " now",
|
||||
minute_ago: "1m",
|
||||
@ -15,6 +14,7 @@ function prettyDate(time) {
|
||||
hours_ago: "h",
|
||||
yesterday: "1d",
|
||||
days_ago: "d",
|
||||
last_week: "1w",
|
||||
weeks_ago: "w"
|
||||
};
|
||||
|
||||
@ -35,6 +35,7 @@ function prettyDate(time) {
|
||||
diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) ||
|
||||
day_diff === 1 && say.yesterday ||
|
||||
day_diff < 7 && day_diff + say.days_ago ||
|
||||
day_diff === 7 && say.last_week ||
|
||||
day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago;
|
||||
}
|
||||
|
||||
@ -47,8 +48,10 @@ function linkifyTweet(text, url) {
|
||||
// Use twitter's api to replace t.co shortened urls with expanded ones.
|
||||
for (var u in url) {
|
||||
if(url[u].expanded_url != null){
|
||||
var shortUrl = new RegExp( url[u].url.replace(/https?:\/\//, ''), 'g');
|
||||
text = text.replace(shortUrl, url[u].display_url);
|
||||
var shortUrl = new RegExp(url[u].url, 'g');
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user