1
0
Fork 0
This commit is contained in:
Matthias Kretschmann 2013-11-23 21:53:52 +01:00
parent d1b5bb8828
commit 37726d9dcd
19 changed files with 376 additions and 181 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
node_modules
_site
_site
_src/_media/gen

View File

@ -17,7 +17,7 @@ module.exports = function(grunt){
grunt.log.writeln("");
grunt.log.writeln(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
grunt.log.writeln("");
grunt.log.writeln(" | (o) | Just what do you think you're doing, Matthias? ");
grunt.log.writeln(" (o) Just what do you think you're doing, Matthias? ");
grunt.log.writeln("");
grunt.log.writeln(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
grunt.log.writeln("");
@ -80,12 +80,16 @@ module.exports = function(grunt){
uglify: {
production: {
options: {
report: 'min',
mangle: true
report: 'min'
},
files: {
'<%= config.site %>/<%= config.assets.js %>/lib/picturefill.min.js': [
'<%= config.site %>/<%= config.assets.js %>/lib/picturefill.js'
],
'<%= config.site %>/<%= config.assets.js %>/kremalicious3.min.js': [
'<%= config.src %>/<%= config.assets.js %>/picturefill.js',
'<%= config.src %>/<%= config.assets.js %>/lib/infinitescroll/jquery.infinitescroll.js',
'<%= config.src %>/<%= config.assets.js %>/lib/socialite/socialite.js',
'<%= config.src %>/<%= config.assets.js %>/plugins.js',
'<%= config.src %>/<%= config.assets.js %>/app.js'
]
}
@ -165,7 +169,6 @@ module.exports = function(grunt){
// rsync stuff around
rsync: {
options: {
recursive: true
},
// copy media folder
@ -173,7 +176,7 @@ module.exports = function(grunt){
options: {
src: '<%= config.src %>/_media/',
dest: '<%= config.site %>/media/',
args: ["--exclude='gen'"],
args: ["--exclude='gen'"]
}
},
// deployment

View File

@ -14,7 +14,7 @@ pygments: true
source: ./_src
destination: ./_site
exclude: ['design', 'node_modules', 'less']
keep_files: ['media']
keep_files: ['media', 'gen']
picture:
source: "_media"

View File

@ -21,4 +21,9 @@
<p>© 2007-2013 <a href="http://matthiaskretschmann.com" rel="me">Matthias Kretschmann</a>.</p>
<p class="license">Code snippets: <a rel="item-license" href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>. Goodies: <a rel="item-license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY NC SA</a>. Hosted by <a href="http://www.mediatemple.net#a_aid=4f37f8fe3e47e" title="Media Temple">(mt)</a></p>
</section>
</footer>
</footer>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/assets/js/lib/jquery.min.js"><\/script>')</script>
<script src="/assets/js/kremalicious3.min.js"></script>

View File

@ -1,3 +1,30 @@
<!DOCTYPE html>
<!--
___ ___
/__/\ /__/|
| |::\ | |:|
| |:|:\ | |:|
__|__|:|\:\ __| |:|
/__/::::| \:\ /__/\_|:|____
\ \:\~~\__\/ \ \:\/:::::/
\ \:\ \ \::/~~~~
\ \:\ \ \:\
\ \:\ \ \:\
\__\/ \__\/
YOU EARNED THE GEEK ACHIEVEMENT
FOR LOOKING AT MY SOURCE
But because of all the minimizing and caching
going on you better check out the code on
github
_____________________________________________
https://github.com/kremalicious/kremalicious3
_____________________________________________
-->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta charset="utf-8">
@ -30,10 +57,16 @@
<link rel="stylesheet" href="/assets/css/{{ page.style }}">
{% endif %}
<script src="/assets/js/lib/picturefill.min.js" async></script>
<script data-cfasync="false" src="//use.typekit.com/msu4qap.js"></script>
<script data-cfasync="false">try{Typekit.load();}catch(e){}</script>
<script src="/assets/js/kremalicious3.min.js" defer async></script>
{% if paginator %}
<script>
var total = {{ paginator.total_pages }};
</script>
{% endif %}
<!-- Twitter Cards -->
<meta name="twitter:card" content="summary">

View File

@ -1,3 +1,4 @@
<header role="banner" class="banner container">
<div class="row">
<h1 class="banner-title">

View File

@ -1,46 +1,16 @@
<!DOCTYPE html>
<!--
___ ___
/__/\ /__/|
| |::\ | |:|
| |:|:\ | |:|
__|__|:|\:\ __| |:|
/__/::::| \:\ /__/\_|:|____
\ \:\~~\__\/ \ \:\/:::::/
\ \:\ \ \::/~~~~
\ \:\ \ \:\
\ \:\ \ \:\
\__\/ \__\/
YOU EARNED THE GEEK ACHIEVEMENT
FOR LOOKING AT MY SOURCE
But because of all the minimizing and caching
going on you better check out the code on
github
_____________________________________________
https://github.com/kremalicious/kremalicious3
_____________________________________________
-->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
{% include head.html %}
<body>
{% include header.html %}
<section role="document" class="container">
<section role="main" id="main" class="row">
{{ content }}
</section>
</section>
{% include footer.html %}
{% include head.html %}
</body>
</html>
<body>
{% include header.html %}
<section role="document" class="container">
{{ content }}
</section>
</body>
{% include footer.html %}

View File

@ -2,30 +2,34 @@
layout: base
---
<article class="hentry format-image">
<section role="main" id="main" class="row">
<div class="photoPost">
<figure class="hmedia">
<article class="hentry format-image">
<div class="photoPost">
<figure class="hmedia">
{% picture {{ page.image }} %}
{% picture {{ page.image }} %}
<figcaption class="entry-title fn">{{ page.title }}</figcaption>
exif
</figure>
</div>
<figcaption class="entry-title fn">{{ page.title }}</figcaption>
exif
</figure>
</div>
<section class="entry-content">
{{ content }}
</section>
<section class="entry-content">
{{ content }}
</section>
<footer class="entry-meta">
<p class="category">
{% for category in page.categories %}
<a rel="category tag" href="" title="{{ category }}">{{ category }}</a>
{% endfor %}
</p>
<p class="byline author vcard source-org"><span class="by">by</span> <a class="fn" rel="author" href="/about/">{{ page.author }}</a></p>
<p class="time">{{ page.date | date_to_string }} <span class="modtime"></span></p>
</footer>
<footer class="entry-meta">
<p class="category">
{% for category in page.categories %}
<a rel="category tag" href="" title="{{ category }}">{{ category }}</a>
{% endfor %}
</p>
<p class="byline author vcard source-org"><span class="by">by</span> <a class="fn" rel="author" href="/about/">{{ page.author }}</a></p>
<p class="time">{{ page.date | date_to_string }} <span class="modtime"></span></p>
</footer>
</article>
</article>
</section>

View File

@ -2,28 +2,32 @@
layout: base
---
<article class="hentry format-link">
<header>
<h1 class="entry-title">
<a href="{{ page.linkurl }}" title="Go to source">{{ page.title }} <i class="icon-forward"></i></a>
</h1>
</header>
<section class="entry-content">
{{ content }}
<p>
<a class="more-link" href="{{ page.linkurl }}">Go to source <i class="icon-forward"></i></a>
<a class="permalink-link" href="{{ page.url }}" rel="tooltip" title="Permalink">&#8734;</a>
</p>
</section>
<section role="main" id="main" class="row">
<footer class="entry-meta">
<p class="category">
{% for category in page.categories %}
<a rel="category tag" href="" title="{{ category }}">{{ category }}</a>
{% endfor %}
</p>
<p class="byline author vcard source-org"><span class="by">by</span> <a class="fn" rel="author" href="/about/">{{ page.author }}</a></p>
<p class="time">{{ page.date | date_to_string }} <span class="modtime"></span></p>
</footer>
</article>
<article class="hentry format-link">
<header>
<h1 class="entry-title">
<a href="{{ page.linkurl }}" title="Go to source">{{ page.title }} <i class="icon-forward"></i></a>
</h1>
</header>
<section class="entry-content">
{{ content }}
<p>
<a class="more-link" href="{{ page.linkurl }}">Go to source <i class="icon-forward"></i></a>
<a class="permalink-link" href="{{ page.url }}" rel="tooltip" title="Permalink">&#8734;</a>
</p>
</section>
<footer class="entry-meta">
<p class="category">
{% for category in page.categories %}
<a rel="category tag" href="" title="{{ category }}">{{ category }}</a>
{% endfor %}
</p>
<p class="byline author vcard source-org"><span class="by">by</span> <a class="fn" rel="author" href="/about/">{{ page.author }}</a></p>
<p class="time">{{ page.date | date_to_string }} <span class="modtime"></span></p>
</footer>
</article>
</section>

View File

@ -2,31 +2,35 @@
layout: base
---
<article class="hentry format-post">
<header>
<h1 class="entry-title">{{ page.title }}</h1>
</header>
<section class="entry-content">
{% if page.image %}
{% picture {{ page.image }} class="teaser" %}
{% endif %}
{{ content }}
</section>
<section role="main" id="main" class="row">
<footer class="entry-meta">
<p class="category">
{% for category in page.categories %}
<a rel="category tag" href="" title="{{ category }}">{{ category }}</a>
{% endfor %}
</p>
<p class="byline author vcard source-org"><span class="by">by</span> <a class="fn" rel="author" href="/about/">{{ page.author }}</a></p>
<div class="time">
<p>{{ page.date | date_to_string }}</p>
{% if page.moddate %}
<p class="modtime">updated: {{ page.moddate | date_to_string }}</p>
{% endif %}
</div>
</footer>
</article>
<article class="hentry format-post">
<header>
<h1 class="entry-title">{{ page.title }}</h1>
</header>
<section class="entry-content">
{% if page.image %}
{% picture {{ page.image }} class="teaser" %}
{% endif %}
{{ content }}
</section>
<footer class="entry-meta">
<p class="category">
{% for category in page.categories %}
<a rel="category tag" href="" title="{{ category }}">{{ category }}</a>
{% endfor %}
</p>
<p class="byline author vcard source-org"><span class="by">by</span> <a class="fn" rel="author" href="/about/">{{ page.author }}</a></p>
<div class="time">
<p>{{ page.date | date_to_string }}</p>
{% if page.moddate %}
<p class="modtime">updated: {{ page.moddate | date_to_string }}</p>
{% endif %}
</div>
</footer>
</article>
</section>

View File

@ -0,0 +1,138 @@
/*
MAIN JS FOR KREMALICIOUS.COM
-----------------------------------------------------------------
Copyright (c) 2013 Matthias Kretschmann | http://mkretschmann.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
$(ASAP = function(){
photoGrid.init();
});
$(window).load( AfterLoad = function() {
siteEffects.init();
infiniteScroll.init();
});
var photoGrid = {
masonryLayout: function() {
var $container = $('#main .masonry');
$container.imagesLoaded( function(){
$container.masonry({
itemSelector : 'article',
columnWidth : '.grid-sizer'
});
});
},
init: function(){
// only fire when photo post present and screen bigger than 480px
if ( $('#main .masonry').length > 0 && Modernizr.mq('only screen and (min-width: 480px)') ) {
this.masonryLayout();
}
}
}
var siteEffects = {
socialiteButtons: function() {
$('#tweetsWrap').one('mouseenter', function() {
Socialite.load($(this)[0]);
});
},
init: function(){
this.socialiteButtons();
}
}
var infiniteScroll = {
infiniteScrollSetup: function() {
if ( $('body.archive.category-photos').length > 0 ) {
var items = '#main .masonry';
} else {
var items = '#main article.hentry';
}
var $scrollContent = $('#main');
$scrollContent.infinitescroll({
itemSelector : items,
nextSelector : '.next a',
navSelector : '.pagination',
binder : $scrollContent,
behavior : 'krlc3',
}, function($scrollContent) {
// run picturefill over retrieved items
picturefill();
// run the photogrid over retrieved items
photoGrid.init();
});
},
init: function(){
this.infiniteScrollSetup();
}
}
/*
--------------------------------
Infinite Scroll Behavior
Manual mode with minimal loader
Usage: behavior: 'krlc3'
--------------------------------
*/
$.extend($.infinitescroll.prototype,{
_setup_krlc3: function infscr_setup_krlc3 () {
var opts = this.options,
instance = this,
loader = $('<span class="loading"> ...</span>');
$(opts.nextSelector).parent().parent().addClass('infiniteLoader');
// Bind nextSelector link to retrieve
$(opts.nextSelector).click(function(e) {
if (e.which == 1 && !e.metaKey && !e.shiftKey) {
e.preventDefault();
instance.retrieve();
}
});
// custom start
instance.options.loading.start = function (opts) {
loader
.appendTo(opts.nextSelector)
.show(opts.loading.speed, function () {
instance.beginAjax(opts);
});
}
// custom finish
instance.options.loading.finished = function(opts) {
loader.detach();
};
}
});

@ -0,0 +1 @@
Subproject commit 0c1e76f0b51bd420907875968465bdc6035be71d

6
_src/assets/js/lib/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

4
_src/assets/js/lib/modernizr.min.js vendored Normal file
View File

@ -0,0 +1,4 @@
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-cssanimations-touch-mq-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes
*/
;window.Modernizr=function(a,b,c){function A(a){j.cssText=a}function B(a,b){return A(m.join(a+";")+(b||""))}function C(a,b){return typeof a===b}function D(a,b){return!!~(""+a).indexOf(b)}function E(a,b){for(var d in a){var e=a[d];if(!D(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function F(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:C(f,"function")?f.bind(d||b):f}return!1}function G(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return C(b,"string")||C(b,"undefined")?E(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),F(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return w("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},y={}.hasOwnProperty,z;!C(y,"undefined")&&!C(y.call,"undefined")?z=function(a,b){return y.call(a,b)}:z=function(a,b){return b in a&&C(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:w(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},q.cssanimations=function(){return G("animationName")};for(var H in q)z(q,H)&&(v=H.toLowerCase(),e[v]=q[H](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)z(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},A(""),i=k=null,e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.mq=x,e.testProp=function(a){return E([a])},e.testAllProps=G,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document);

@ -0,0 +1 @@
Subproject commit fb04be59c2f5bf010439b4c21f631be0028faa2d

16
_src/assets/js/plugins.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -71,16 +71,18 @@ a.nav-main-link {
// Infinite Loader
/////////////////////////////////////
.infiniteLoader p {
width: 100%
.infiniteLoader .next {
width: 100%;
float: none;
}
.infiniteLoader .alignright,
.infiniteLoader .previous,
.infiniteLoader .pagenumber,
.infiniteLoader i {
.hide;
}
.infiniteLoader a {
.infiniteLoader .next a {
.btn;
.aligncenter;

View File

@ -4,73 +4,77 @@ title: kremalicious
description: 'Blog of designer & developer Matthias Kretschmann'
---
{% for post in paginator.posts %}
<section role="main" id="main" class="row">
{% if post.layout == "link" %}
{% for post in paginator.posts %}
<article class="hentry format-link">
<header>
<h1 class="entry-title">
<a href="{{ post.linkurl }}" title="Go to source">{{ post.title }} <i class="icon-forward"></i></a>
</h1>
</header>
{% if post.layout == "link" %}
<article class="hentry format-link">
<header>
<h1 class="entry-title">
<a href="{{ post.linkurl }}" title="Go to source">{{ post.title }} <i class="icon-forward"></i></a>
</h1>
</header>
<section class="entry-content">
{{ post.content }}
<p>
<a class="more-link" href="{{ post.linkurl }}">Go to source <i class="icon-forward"></i></a>
<a class="permalink-link" href="{{ post.url }}" rel="tooltip" title="Permalink">&#8734;</a>
</p>
</section>
</article>
<section class="entry-content">
{{ post.content }}
<p>
<a class="more-link" href="{{ post.linkurl }}">Go to source <i class="icon-forward"></i></a>
<a class="permalink-link" href="{{ post.url }}" rel="tooltip" title="Permalink">&#8734;</a>
</p>
</section>
</article>
{% elsif post.layout == "image" %}
{% elsif post.layout == "image" %}
<article class="hentry format-image">
<article class="hentry format-image">
<a class="photoPost" href="{{ post.url }}">
<figure class="hmedia">
<a class="photoPost" href="{{ post.url }}">
<figure class="hmedia">
{% picture {{ post.image }} %}
{% picture {{ post.image }} %}
<figcaption class="entry-title fn">{{ post.title }}</figcaption>
exif
</figure>
</a>
<figcaption class="entry-title fn">{{ post.title }}</figcaption>
exif
</figure>
</a>
</article>
</article>
{% else %}
{% else %}
<article class="hentry format-post">
<header>
<h1 class="entry-title"><a href="{{ post.url }}">{{ post.title }}</a></h1>
</header>
<article class="hentry format-post">
<header>
<h1 class="entry-title"><a href="{{ post.url }}">{{ post.title }}</a></h1>
</header>
<section class="entry-content">
<section class="entry-content">
{% if post.image %}
<a href="{{ post.url }}">
{% picture {{ post.image }} class="teaser" %}
</a>
{% endif %}
{% if post.image %}
<a href="{{ post.url }}">
{% picture {{ post.image }} class="teaser" %}
</a>
{% endif %}
{% capture has_more %}{{ post.content | has_more }}{% endcapture %}
{% capture has_more %}{{ post.content | has_more }}{% endcapture %}
{% if has_more == 'true' %}
{{ post.content | post.excerpt | excerpt }}
{% else %}
{{ post.excerpt }}
{% endif %}
{% if has_more == 'true' %}
{{ post.content | post.excerpt | excerpt }}
{% else %}
{{ post.excerpt }}
{% endif %}
<a class="more-link" href="{{ post.url }}">Continue reading <i class="icon-arrow-right"></i></a>
<a class="more-link" href="{{ post.url }}">Continue reading <i class="icon-arrow-right"></i></a>
</section>
</article>
</section>
</article>
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</section>
<nav class="row pager pagination">
{% if paginator.previous_page %}
@ -84,7 +88,7 @@ description: 'Blog of designer & developer Matthias Kretschmann'
{% endif %}
</p>
{% endif %}
<p class="col2 textcenter">
<p class="col2 pagenumber textcenter">
<span class="page_number ">Page {{ paginator.page }} of {{ paginator.total_pages }}</span>
</p>
{% if paginator.next_page %}
@ -94,5 +98,3 @@ description: 'Blog of designer & developer Matthias Kretschmann'
</p>
{% endif %}
</nav>