Skip to content

Commit

Permalink
Use grunt
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Dec 19, 2013
1 parent 7d126c0 commit ec4e29d
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 104 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
.DS_Store
node_modules
tmp
46 changes: 46 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = function(grunt){
grunt.initConfig({
gitclone: {
fontawesome: {
options: {
repository: 'https://github.com/FortAwesome/Font-Awesome.git',
directory: 'tmp/fontawesome'
},
},
fancybox: {
options: {
repository: 'https://github.com/fancyapps/fancyBox.git',
directory: 'tmp/fancybox'
}
}
},
copy: {
fontawesome: {
expand: true,
cwd: 'tmp/fontawesome/fonts/',
src: ['**'],
dest: 'source/css/fonts/'
},
fancybox: {
expand: true,
cwd: 'tmp/fancybox/source/',
src: ['**'],
dest: 'source/fancybox/'
}
},
_clean: {
tmp: ['tmp'],
fontawesome: ['source/css/fonts'],
fancybox: ['source/fancybox']
}
});

require('load-grunt-tasks')(grunt);

grunt.renameTask('clean', '_clean');

grunt.registerTask('fontawesome', ['gitclone:fontawesome', 'copy:fontawesome', '_clean:tmp']);
grunt.registerTask('fancybox', ['gitclone:fancybox', 'copy:fancybox', '_clean:tmp']);
grunt.registerTask('default', ['gitclone', 'copy', '_clean:tmp']);
grunt.registerTask('clean', ['_clean']);
};
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012 Tommy Chen
Copyright (c) 2013 Tommy Chen

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:

Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "hexo-theme-landscape",
"version": "0.0.1",
"private": true,
"devDependencies": {
"grunt": "~0.4.2",
"load-grunt-tasks": "~0.2.0",
"grunt-git": "~0.2.2",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-copy": "~0.4.1"
}
}
Empty file modified source/css/fonts/fontawesome-webfont.eot
100755 → 100644
Empty file.
Empty file modified source/css/fonts/fontawesome-webfont.svg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified source/css/fonts/fontawesome-webfont.ttf
100755 → 100644
Empty file.
Empty file modified source/css/fonts/fontawesome-webfont.woff
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion source/fancybox/helpers/jquery.fancybox-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* });
*
*/
(function ($) {
;(function ($) {
//Shortcut for fancyBox object
var F = $.fancybox;

Expand Down
2 changes: 1 addition & 1 deletion source/fancybox/helpers/jquery.fancybox-media.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
*/
(function ($) {
;(function ($) {
"use strict";

//Shortcut for fancyBox object
Expand Down
9 changes: 6 additions & 3 deletions source/fancybox/helpers/jquery.fancybox-thumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* });
*
*/
(function ($) {
;(function ($) {
//Shortcut for fancyBox object
var F = $.fancybox;

Expand Down Expand Up @@ -62,7 +62,8 @@

//Load each thumbnail
$.each(obj.group, function (i) {
var href = thumbSource( obj.group[ i ] );
var el = obj.group[ i ],
href = thumbSource( el );

if (!href) {
return;
Expand Down Expand Up @@ -105,7 +106,9 @@

$(this).hide().appendTo(parent).fadeIn(300);

}).attr('src', href);
})
.attr('src', href)
.attr('title', el.title);
});

//Set initial width
Expand Down
15 changes: 7 additions & 8 deletions source/fancybox/jquery.fancybox.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
}

#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('fancybox_sprite.png');
background-image: url(fancybox_sprite.png);
}

#fancybox-loading {
Expand All @@ -94,7 +94,7 @@
#fancybox-loading div {
width: 44px;
height: 44px;
background: url('fancybox_loading.gif') center center no-repeat;
background: url(fancybox_loading.gif) center center no-repeat;
}

.fancybox-close {
Expand All @@ -114,7 +114,7 @@
height: 100%;
cursor: pointer;
text-decoration: none;
background: transparent url('blank.gif'); /* helps IE */
background: transparent url(blank.gif); /* helps IE */
-webkit-tap-highlight-color: rgba(0,0,0,0);
z-index: 8040;
}
Expand Down Expand Up @@ -156,7 +156,6 @@
position: absolute;
top: -99999px;
left: -99999px;
visibility: hidden;
max-width: 99999px;
max-height: 99999px;
overflow: visible !important;
Expand All @@ -165,7 +164,7 @@
/* Overlay helper */

.fancybox-lock {
overflow: hidden !important;
overflow: visible !important;
width: auto;
}

Expand All @@ -184,7 +183,7 @@
overflow: hidden;
display: none;
z-index: 8010;
background: url('fancybox_overlay.png');
background: url(fancybox_overlay.png);
}

.fancybox-overlay-fixed {
Expand Down Expand Up @@ -263,12 +262,12 @@
only screen and (min-device-pixel-ratio: 1.5){

#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('[email protected]');
background-image: url([email protected]);
background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
}

#fancybox-loading div {
background-image: url('[email protected]');
background-image: url([email protected]);
background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
}
}
Loading

0 comments on commit ec4e29d

Please sign in to comment.