diff --git a/build.js b/build.js index 65112bf..0ff0283 100644 --- a/build.js +++ b/build.js @@ -6,6 +6,7 @@ var pagination = require('metalsmith-pagination') var paths = require('metalsmith-paths') var filemetadata = require('metalsmith-filemetadata') var matters = require('metalsmith-matters') +var postcss = require('metalsmith-postcss') var fs = require('fs'); var moment = require('moment'); @@ -126,6 +127,7 @@ metalsmith(__dirname) .use(paths(require('./config/paths'))) .use(layouts(require('./config/layouts'))) .use(copyVendor()) + .use(postcss(require('./config/postcss'))) .use(epubGen()) .destination('build') .build(function (err) { diff --git a/config/css.js b/config/css.js deleted file mode 100644 index 246d32f..0000000 --- a/config/css.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - files: '**/*.css', - cleanCSS: { - rebase: true - } -} diff --git a/config/pagination.js b/config/pagination.js index 6c65db5..5f77705 100644 --- a/config/pagination.js +++ b/config/pagination.js @@ -11,6 +11,7 @@ module.exports = { first: 'search.html', layout: 'search.hbs', path: 'search/:num/index.html', + filter: 'type == \'recette\'', groupBy: function(data) { return data.title.normalize('NFD').charAt(0); } diff --git a/config/postcss.js b/config/postcss.js new file mode 100644 index 0000000..632861c --- /dev/null +++ b/config/postcss.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + 'autoprefixer': {} + } +} diff --git a/package.json b/package.json index e9e5b38..78942fb 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "autoprefixer": ">=6.5.3", "bower": ">=1.5.2", "epub-generator": ">=1.0.1", "handlebars": ">=3.0.3", @@ -16,9 +17,10 @@ "metalsmith-matters": ">=1.2.0", "metalsmith-pagination": ">=1.0.0", "metalsmith-paths": ">=2.1.2", - "metalsmith-permalinks": "^0.5.0", + "metalsmith-permalinks": ">=0.5.0", + "metalsmith-postcss": ">=4.0.0", "moment": ">=2.6.0", - "underscore": "^1.8.3" + "underscore": ">=1.8.3" }, "scripts": { "build": "node build.js", diff --git a/templates/index.hbs b/templates/index.hbs index afca41c..1b38b17 100644 --- a/templates/index.hbs +++ b/templates/index.hbs @@ -4,10 +4,10 @@ Recettes {{/ content}} - {{#content "content"}}
+

Les dernières recettes

{{#each pagination.files }} {{> recetteList }} {{/ each}} diff --git a/templates/partials/base.hbs b/templates/partials/base.hbs index 4778083..f9541b8 100644 --- a/templates/partials/base.hbs +++ b/templates/partials/base.hbs @@ -1,10 +1,14 @@ - + + + + + diff --git a/templates/partials/recetteList.hbs b/templates/partials/recetteList.hbs index 4dfdae5..32b525b 100644 --- a/templates/partials/recetteList.hbs +++ b/templates/partials/recetteList.hbs @@ -1,19 +1,19 @@
-
-
-

- - - {{ data.title }} - - -

-
-
+
+
+

+ + + {{ data.title }} + + +

+
+
{{{ data.description }}} diff --git a/templates/search.hbs b/templates/search.hbs index 8957b3a..957b5af 100644 --- a/templates/search.hbs +++ b/templates/search.hbs @@ -1,22 +1,9 @@ {{#extend "base"}} {{#content "title"}} - Recettes + Recettes • {{ pagination.name }} {{/ content}} -{{#content "navitems"}} - {{#if pagination.previous }} -
  • - - Newer  
  • - {{/ if}} - {{#if pagination.next }} -
  • - -   Older
  • - {{/ if}} -{{/content}} - {{#content "content"}}
    +

    Recettes • {{ pagination.name }}

    {{#each pagination.files }} - {{#ifCond type '==' 'recette'}} - {{> recetteList }} - {{/ifCond}} + {{> recetteList }} {{/ each}}
    diff --git a/templates/tag.hbs b/templates/tag.hbs index 3ac4eaf..bb71d36 100644 --- a/templates/tag.hbs +++ b/templates/tag.hbs @@ -10,7 +10,7 @@ {{#if contents }} {{{ contents }}} {{/if }} -

    Recettes

    +

    Recettes • {{ title }}

    {{#eachSorted posts 'data' 'title' 'asc' }} {{> recetteList }} {{/ eachSorted}}