Corrections diverses sur les pages générées: html et css

This commit is contained in:
Thomas Schwery 2016-11-12 19:56:18 +01:00
parent 92bf393718
commit 08ffd94a2b
10 changed files with 36 additions and 42 deletions

View file

@ -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) {

View file

@ -1,6 +0,0 @@
module.exports = {
files: '**/*.css',
cleanCSS: {
rebase: true
}
}

View file

@ -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);
}

5
config/postcss.js Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
plugins: {
'autoprefixer': {}
}
}

View file

@ -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",

View file

@ -4,10 +4,10 @@
Recettes
{{/ content}}
{{#content "content"}}
<div class="content row">
<div class="list-recette list col-sm-8">
<h2>Les dernières recettes</h2>
{{#each pagination.files }}
{{> recetteList }}
{{/ each}}

View file

@ -1,10 +1,14 @@
<!DOCTYPE html>
<html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Recettes de cuisine testées et sélectionnées par nos soins" />
<meta name="keywords" content="recettes,recette de cuisine" />
<meta name="robots" content="index,follow" />
<link rel="stylesheet" href="/styles/bootstrap.min.css">
<link rel="stylesheet" href="/styles/customHighlight.css">

View file

@ -1,19 +1,19 @@
<article class="content">
<header class="header">
<div class="header-container row">
<h3 class="list-content-title">
<a href="{{ path.href }}">
<span class="glyphicon glyphicon-apple"></span>
{{ data.title }}
</a>
<small class="header-metadata">
<time datetime="{{ data.publication }}" class="timestamp" title="{{formatDate data.publication }}">{{formatDate data.publication }}</time>
{{ data.time }}
</small>
</h3>
</div>
</header>
<section class="content-article">
<header class="header">
<div class="header-container row">
<h3 class="list-content-title">
<a href="{{ path.href }}">
<span class="glyphicon glyphicon-apple"></span>
{{ data.title }}
</a>
<small class="header-metadata">
<time datetime="{{ data.publication }}" class="timestamp" title="{{formatDate data.publication }}">{{formatDate data.publication }}</time>
{{ data.time }}
</small>
</h3>
</div>
</header>
<div class="header-container row">
<div class="col-sm-4">
{{{ data.description }}}

View file

@ -1,22 +1,9 @@
{{#extend "base"}}
{{#content "title"}}
Recettes
Recettes{{ pagination.name }}
{{/ content}}
{{#content "navitems"}}
{{#if pagination.previous }}
<li><a href="/{{ pagination.previous.path }}" class="btn pull-right">
<i class="glyphicon glyphicon-chevron-right">
</i>Newer&nbsp;&nbsp;</a></li>
{{/ if}}
{{#if pagination.next }}
<li><a href="/{{ pagination.next.path }}" class="btn pull-left">
<i class="glyphicon glyphicon-chevron-left">
</i>&nbsp;&nbsp;Older</a></li>
{{/ if}}
{{/content}}
{{#content "content"}}
<nav class="navigation cf">
{{#each pagination.pages }}
@ -28,11 +15,10 @@
{{/each}}
</nav>
<div class="content row">
<h2>Recettes • {{ pagination.name }}</h2>
<div class="list-recette list col-sm-8">
{{#each pagination.files }}
{{#ifCond type '==' 'recette'}}
{{> recetteList }}
{{/ifCond}}
{{> recetteList }}
{{/ each}}
</div>
<div class="list-tags list col-sm-4">

View file

@ -10,7 +10,7 @@
{{#if contents }}
{{{ contents }}}
{{/if }}
<h2>Recettes</h2>
<h2>Recettes{{ title }}</h2>
{{#eachSorted posts 'data' 'title' 'asc' }}
{{> recetteList }}
{{/ eachSorted}}