1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-11 23:55:16 +01:00

Merge pull request #27 from kremalicious/feature/jekyll3

Update to Jekyll 3
This commit is contained in:
Matthias Kretschmann 2015-10-31 20:53:50 +01:00
commit a08868f4cf
9 changed files with 19 additions and 98 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ bower_components
_site _site
_build _build
Gemfile.lock Gemfile.lock
_src/.jekyll-metadata

View File

@ -7,14 +7,17 @@ group :jekyll do
gem 'jekyll-redirect-from' gem 'jekyll-redirect-from'
gem 'jekyll-picture-tag' gem 'jekyll-picture-tag'
gem 'jekyll-archives' gem 'jekyll-archives'
gem 'jekyll-paginate'
end end
group :development do group :development do
gem 'classifier-reborn', :git => 'https://github.com/jekyll/classifier-reborn.git' gem 'redcarpet'
gem 'rouge', '1.9.0'
gem 'mini_magick' gem 'mini_magick'
gem 'fileutils' end
group :lsi do
gem 'gsl' gem 'gsl'
gem 'rb-gsl' gem 'rb-gsl'
gem 'narray' gem 'narray'
gem 'classifier-reborn'
end end

View File

@ -37,7 +37,6 @@ category_title_prefix: ""
future: false future: false
markdown: redcarpet markdown: redcarpet
highlighter: rouge
redcarpet: redcarpet:
extensions: ['autolink', 'smart', 'hard_wrap'] extensions: ['autolink', 'smart', 'hard_wrap']
@ -58,6 +57,7 @@ gems:
- jekyll-sitemap - jekyll-sitemap
- jekyll-redirect-from - jekyll-redirect-from
- jekyll-picture-tag - jekyll-picture-tag
- jekyll-paginate
- jekyll-archives - jekyll-archives

View File

@ -15,12 +15,6 @@ $(ASAP = function() {
}); });
$(window).load(AfterLoad = function() {
photoGrid.init();
});
var siteNavigation = { var siteNavigation = {
siteSearch: function() { siteSearch: function() {
@ -138,33 +132,3 @@ var siteNavigation = {
} }
} }
var photoGrid = {
masonryLayout: function() {
var $container = $('#main .masonry');
$container.imagesLoaded(function() {
$container.masonry({
itemSelector: 'article',
columnWidth: '.grid-sizer'
});
});
},
init: function() {
// only fire when photo page present and screen bigger than 480px
if ($('.page-photos').length > 0) {
this.masonryLayout();
}
}
}
var siteEffects = {
init: function() {
}
}

View File

@ -67,6 +67,7 @@
background: #000 background: #000
background: rgba(#000, .4) background: rgba(#000, .4)
.photo-link .photo-link
display: block display: block

View File

@ -182,40 +182,3 @@
.btn .btn
display: block display: block
// Masonry
/////////////////////////////////////
.masonry
@media $breakpoint2
width: 100%
clearfix()
.hentry
@media $breakpoint1
width: 49%
float: left
clear: none
padding-top: 0
padding-bottom: 0
margin-bottom: .7em
margin-top: 0
margin-left: 0
margin-right: 1%
border: none
&:before
display: none
&:nth-child(2n+1)
margin-right: 0
&:last-child
margin-bottom: 3em
.grid-sizer
width: 100%
@media screen and (min-width: 480px)
width: 50%

View File

@ -12,20 +12,10 @@ layout: base
<h1 class="page-title">{{ page.type }} archive for {{ page.title }}</h1> <h1 class="page-title">{{ page.type }} archive for {{ page.title }}</h1>
{% endif %} {% endif %}
{% if page.title == 'photos' %}
<div class="masonry">
<div class="grid-sizer"></div>
{% endif %}
{% for post in page.posts %} {% for post in page.posts %}
{% include articles.html %} {% include articles.html %}
{% endfor %} {% endfor %}
{% if page.title == 'photos' %}
</div>
{% endif %}
</section> </section>
{% include paginator.html %} {% include paginator.html %}

View File

@ -117,7 +117,7 @@ gulp.task('jekyll', function(cb) {
if (isProduction) { if (isProduction) {
var jekyll = spawn('bundle', ['exec', 'jekyll', 'build', '--lsi'], { stdio: 'inherit' }); var jekyll = spawn('bundle', ['exec', 'jekyll', 'build', '--lsi'], { stdio: 'inherit' });
} else { } else {
var jekyll = spawn('bundle', ['exec', 'jekyll', 'build', '--drafts', '--future'], { stdio: 'inherit' }); var jekyll = spawn('bundle', ['exec', 'jekyll', 'build', '--drafts', '--future', '--incremental'], { stdio: 'inherit' });
} }
jekyll.on('exit', function(code) { jekyll.on('exit', function(code) {

View File

@ -12,7 +12,6 @@
"dependencies": { "dependencies": {
"imagesloaded": ">=3.1.8", "imagesloaded": ">=3.1.8",
"jquery": ">=2.1.4", "jquery": ">=2.1.4",
"masonry-layout": ">=3.3.0",
"normalize-css": ">=2.3.1", "normalize-css": ">=2.3.1",
"normalize-opentype.css": ">=0.2.4", "normalize-opentype.css": ">=0.2.4",
"picturefill": ">=2.3.1", "picturefill": ">=2.3.1",