Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisBarranqueiro committed May 16, 2015
2 parents 73f861c + 8553da4 commit 3bbc815
Show file tree
Hide file tree
Showing 19 changed files with 86 additions and 67 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A gorgeous responsive theme for Hexo blog framework

## General ##

- **Latest version** : 1.0.0
- **Latest version** : 1.0.1
- **Compatibility** : Hexo v3.0.0 or higher

## Features ##
Expand Down Expand Up @@ -52,8 +52,8 @@ A gorgeous responsive theme for Hexo blog framework
## Quick start ##

**For users** :
1. Download the latest version ready for production utilisation here : [tranquilpeak-hexo-theme-built-for-production-1.0.0]
(https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme/releases/download/v1.0.0/tranquilpeak-hexo-theme-built-for-production-1.0.0.zip) or choose an other version here : [all releases](https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme/releases)
1. Download the latest version ready for production utilisation here : [tranquilpeak-hexo-theme-built-for-production-1.0.1]
(https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme/releases/download/v1.0.1/tranquilpeak-hexo-theme-built-for-production-1.0.1.zip) or choose an other version here : [all releases](https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme/releases)
2. Follow [user documentation](https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme/blob/master/docs/user.md) to install and configure the theme

**For developers** : Run ```git clone https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme.git```
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tranquilpeak-hexo-theme",
"version": "1.0",
"version": "1.0.1",
"description": "A gorgeous responsive theme for Hexo blog framework",
"authors": [
"Louis Barranqueiro"
Expand Down
11 changes: 6 additions & 5 deletions docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ On production environment, these javascript and stylesheets files are concatenat
- **cssmin** : Minify ```source/assets/cssstyle.css``` file in : ```source/assets/cssstyle.min.css```
- **replace** :
* linker : Replace ```EJS_ENDTAG``` string to resolve a problem of ejs escaping with sails-linker tasks
* cssFancybox : Modify url of images in fancybox.css to resolve images path. Impossible to use an other plugin to do that because in the bower fancybox packages, css files and images are in the same folder and that not the case in assets folder.
* cssFancybox : Resolve path of images in fancybox.css. Impossible to use an other plugin to do that because in the bower fancybox packages, css files and images are in the same folder and that not the case in assets folder.
* cssTranquilpeak : Resolve path of images and fonts in tranquilpeak.css.
- **sails-linker** :
* devJs : Link all javascript files listed in ```tasks/pipeline.js``` to ```layout/_partial/script.ejs```
* devCss : Link all stylesheets files listed in ```tasks/pipeline.js``` to ```layout/_partial/head.ejs```
Expand All @@ -428,13 +429,13 @@ On production environment, these javascript and stylesheets files are concatenat

- **build** : Synchronize bower dependencies, compile assets (css and js) and link it to views
- **buildProd** : Synchronize bower dependencies, compile assets (css and js) with some optimization (concat and minify) and link it to views
- **compileAssets** : Compile scss files, concat js files and syncrhonize images
- **compileAssets** : Compile scss files, concat js files
- **linkAssets** : Link all javascript and stylesheets files to views
- **linkAssetsProd** : Link one javascript file and one stylesheet file (concatenated and minified) to views
- **syncAssets** : Synchronize assets (css, js and images)
- **watch** : Synchronize assets (css, js and images) after changes
- **syncAssets** : Synchronize assets (css, js, fonts and images)
- **watch** : Compile and synchronize assets (css, js, fonts and images) after changes

When you run ```build``` or ```buildProd``` tasks, a ```source/assets``` folder will be created with all files generated in. When you will start your hexo server, only this folder will be copied in ```public``` folder
When you run ```grunt Build``` or ```grunt BuildProd``` tasks, a ```source/assets``` folder will be created with all files generated in. When you will start your hexo server, only this folder will be copied in ```public``` folder

**Development environment**:
1. For the first time, run ```grunt build``` to sync bower dependencies, compile assets and link it to views
Expand Down
4 changes: 2 additions & 2 deletions docs/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ If you want to report a bug or ask a question, [create an issue](https://github.

## Installation ##

1. Download the latest version built and ready for production here : [tranquilpeak-hexo-theme-built-for-production-1.0.0]
(https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme/releases/download/v1.0.0/tranquilpeak-hexo-theme-built-for-production-1.0.0.zip) or choose an other version here : [all releases](https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme/releases)
1. Download the latest version built and ready for production here : [tranquilpeak-hexo-theme-built-for-production-1.0.1]
(https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme/releases/download/v1.0.1/tranquilpeak-hexo-theme-built-for-production-1.0.1.zip) or choose an other version here : [all releases](https://github.com/LouisBarranqueiro/tranquilpeak-hexo-theme/releases)
2. Rename the folder in ```tranquilpeak``` and place it in ```themes``` folder of your Hexo blog

## Hexo configuration ##
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<%- css('assets/css/font-awesome.css') %>
<%- css('assets/css/jquery.fancybox.css') %>
<%- css('assets/css/jquery.fancybox-thumbs.css') %>
<%- css('assets/css/tranquil-peak.css') %>
<%- css('assets/css/tranquilpeak.css') %>
<!--STYLES END-->
<%- partial('google-analytics') %>
</head>
2 changes: 1 addition & 1 deletion layout/_partial/script.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%- js('assets/js/jquery.js') %>
<%- js('assets/js/jquery.fancybox.js') %>
<%- js('assets/js/jquery.fancybox-thumbs.js') %>
<%- js('assets/js/tranquil-peak.js') %>
<%- js('assets/js/tranquilpeak.js') %>
<!--SCRIPTS END-->
<% if ((config.disqus_shortname) && (is_post())) { %>
<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tranquilpeak-hexo-theme",
"version": "1.0.0",
"version": "1.0.1",
"description": "A gorgeous responsive theme for Hexo blog framework ",
"main": "Gruntfile.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion source/_css/components/_highlight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ figure.highlight {
display: block;
width: 100%;
overflow-y: hidden;
overflow-x: scroll;
overflow-x: auto;
}
// Reset for tag `pre` and for class `.gutter`, `.code`, `.tag`
pre,
Expand Down
6 changes: 3 additions & 3 deletions source/_css/components/_tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ a.tag--default,
}

a.tag--success,
.tag--default {
.tag--success {
@include tag-color-variant(map-get($colors, success));
}

a.tag--primary,
.tag--default {
.tag--primary {
@include tag-color-variant(map-get($colors, primary));
}

a.tag--danger,
.tag--default {
.tag--danger {
@include tag-color-variant(map-get($colors, danger));
}

Expand Down
2 changes: 1 addition & 1 deletion source/_css/layout/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
position: fixed;
top: 0;
background: map-get($sidebar, background);
overflow: scroll;
overflow: auto;
z-index: map-get($z-indexes, l-sidebar);
// Sidebar animation
// Transition style (push)
Expand Down
Empty file added source/_fonts/.gitkeep
Empty file.
16 changes: 7 additions & 9 deletions tasks/config/cssmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ module.exports = function(grunt) {
grunt.config.set('cssmin', {
// Minify `style.css` file into `style.min.css`
prod: {
files: [
{
expand: true,
cwd: 'source/assets/css',
src: ['style.css'],
dest: 'source/assets/css',
ext: '.min.css'
}
]
files: [{
expand: true,
cwd: 'source/assets/css',
src: ['style.css'],
dest: 'source/assets/css',
ext: '.min.css'
}]
}
});

Expand Down
44 changes: 30 additions & 14 deletions tasks/config/replace.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,50 @@
module.exports = function(grunt) {
grunt.config.set('replace', {
// Replace `EJS_ENDTAG` string to resolve a problem of ejs escaping with sails-linker
linker: {
linker: {
overwrite: true,
src: [
'layout/_partial/head.ejs',
'layout/_partial/script.ejs'
],
replacements: [
{
from: 'EJS_ENDTAG',
to: '%>'
}
]
replacements: [{
from: 'EJS_ENDTAG',
to: '%>'
}]
},
// Modify url of images in fancybox.css to resolve images path.
// Impossible to use an other plugin to do that
// because in the bower fancybox packages, css files and images are in the same folder
// and that not the case in assets folder.
cssFancybox: {
cssFancybox: {
overwrite: true,
src: [
'source/assets/css/jquery.fancybox.css'
],
replacements: [
{
from: 'url(\'',
to: 'url(\'../images/'
}
]
replacements: [{
from: 'url(\'',
to: 'url(\'../images/'
}]
},
// Modify url of images and fonts in tranquilpeak.css to resolve images and fonts path.
cssTranquilpeak: {
overwrite: true,
src: [
'source/assets/css/tranquilpeak.css'
],
replacements: [{
from: /url\(\"[.\/]+_images\//,
to: 'url\(\"..\/images\/'
}, {
from: /url\(\'[.\/]+_images\//,
to: 'url\(\'..\/images\/'
}, {
from: /url\(\"[.\/]+_fonts\//,
to: 'url\(\"..\/fonts\/'
}, {
from: /url\(\'[.\/]+_fonts\//,
to: 'url\(\'..\/fonts\/'
}]
}
});

Expand Down
16 changes: 7 additions & 9 deletions tasks/config/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ module.exports = function(grunt) {
options: {
sourcemap: 'none'
},
files: [
{
expand: true,
cwd: 'source/_css',
src: ['tranquilpeak.scss'],
dest: 'source/assets/css/',
ext: '.css'
}
]
files: [{
expand: true,
cwd: 'source/_css',
src: ['tranquilpeak.scss'],
dest: 'source/assets/css/',
ext: '.css'
}]
}
});

Expand Down
18 changes: 10 additions & 8 deletions tasks/config/sync.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
module.exports = function(grunt) {
grunt.config.set('sync', {
// Synchronize images
// Synchronize images and fonts
dev: {
files: [
{
cwd: 'source/_images',
src: ['**/*'],
dest: 'source/assets/images'
}
]
files: [{
cwd: 'source/_images',
src: ['**/*'],
dest: 'source/assets/images'
}, {
cwd: 'source/_fonts',
src: ['**/*'],
dest: 'source/assets/fonts'
}]
}
});

Expand Down
5 changes: 3 additions & 2 deletions tasks/register/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ module.exports = function(grunt) {
grunt.registerTask('Build', [
'clean:build',
'bower:dev',
'CompileAssets',
'SyncAssets',
'LinkAssets',
'replace:cssFancybox'
'replace:cssFancybox',
'replace:cssTranquilpeak'
]);
};
7 changes: 4 additions & 3 deletions tasks/register/buildProd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ module.exports = function(grunt) {
grunt.registerTask('BuildProd', [
'clean:build',
'bower:dev',
'CompileAssets',
'SyncAssets',
'replace:cssFancybox',
'replace:cssTranquilpeak',
'concat',
'cssmin',
'uglify',
'LinkAssetsProd',
'replace:cssFancybox'
'LinkAssetsProd'
]);
};
3 changes: 1 addition & 2 deletions tasks/register/compileAssets.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module.exports = function(grunt) {
// Compile assets all assets (css and js)
grunt.registerTask('CompileAssets', [
'sass:dev',
'concat:devJs',
'sync:dev'
'concat:devJs'
]);
};
5 changes: 4 additions & 1 deletion tasks/register/syncAssets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = function(grunt) {
// Synchronize all assets (css, js and images) after changes
grunt.registerTask('SyncAssets', ['CompileAssets']);
grunt.registerTask('SyncAssets', [
'CompileAssets',
'sync:dev'
]);
};

0 comments on commit 3bbc815

Please sign in to comment.