some correction
This commit is contained in:
parent
584a4d90d8
commit
2b23778dfd
227
app.js
227
app.js
|
@ -1,115 +1,114 @@
|
|||
const express = require('express'),
|
||||
cors = require("cors"),
|
||||
app = express(),
|
||||
log = require("color-logs")(true, true, "Dryusdan.fr"),
|
||||
fs = require("fs"),
|
||||
path = require('path'),
|
||||
promise = require('promise'),
|
||||
hbs = require('hbs');
|
||||
|
||||
log.info("Application started and now preparing");
|
||||
|
||||
var corsOptions = {
|
||||
"origin": "*",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"methods": "GET,HEAD,PUT,PATCH,POST,DELETE",
|
||||
"preflightContinue": false
|
||||
};
|
||||
/**
|
||||
* Create menu html
|
||||
*/
|
||||
const config = require("./config.json");
|
||||
var Template = require("./classes/Template.class");
|
||||
var Categories = require("./classes/Categories.class");
|
||||
var Articles = require("./classes/Articles.class");
|
||||
|
||||
class App {
|
||||
constructor(rootPath, port){
|
||||
|
||||
/**
|
||||
* Listen to http://0.0.0.0:port
|
||||
*/
|
||||
app.listen(port);
|
||||
log.info("HTTP server listening on port", port);
|
||||
log.info("Application ready");
|
||||
var template = new Template();
|
||||
|
||||
app.get("/", function(req, res){
|
||||
var categories = new Categories();
|
||||
Promise.all([
|
||||
template.getNav(),
|
||||
categories.getHome()
|
||||
]).then(data => {
|
||||
var nav = data[0];
|
||||
var content = data[1];
|
||||
res.setHeader("Content-type", "text/html");
|
||||
var tplData = {
|
||||
"blogName": config.blogName,
|
||||
"title": 'Accueil',
|
||||
"nav": nav,
|
||||
"content": content
|
||||
};
|
||||
res.render('template.hbs', tplData);
|
||||
}).catch(err => {
|
||||
res.setHeader("Content-type", "text/plain");
|
||||
|
||||
res.end("erreur");
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
app.get("/:slug", function(req, res){
|
||||
var categories = new Categories();
|
||||
Promise.all([
|
||||
template.getNav(),
|
||||
categories.getListArticles(req.params.slug),
|
||||
categories.getCategorie(req.params.slug)
|
||||
]).then(data => {
|
||||
var nav = data[0];
|
||||
var content = data[1];
|
||||
var dataCategories = data[2];
|
||||
res.setHeader("Content-type", "text/html");
|
||||
var tplData = {
|
||||
"blogName": config.blogName,
|
||||
"title": dataCategories.title,
|
||||
"nav": nav,
|
||||
"content": content
|
||||
};
|
||||
res.render('template.hbs', tplData);
|
||||
}).catch(err => {
|
||||
res.setHeader("Content-type", "text/plain");
|
||||
|
||||
res.end("erreur");
|
||||
});
|
||||
});
|
||||
app.get("/:categories/:slug", function(req, res){
|
||||
var categories = new Categories();
|
||||
var articles = new Articles();
|
||||
Promise.all([
|
||||
template.getNav(),
|
||||
categories.getCategorie(req.params.categories),
|
||||
articles.getArticle(req.params.categories, req.params.slug)
|
||||
]).then(data => {
|
||||
var nav = data[0];
|
||||
var dataCategories = data[1];
|
||||
var content = data[2];
|
||||
res.setHeader("Content-type", "text/html");
|
||||
var tplData = {
|
||||
"blogName": config.blogName,
|
||||
"title": dataCategories.title,
|
||||
"nav": nav,
|
||||
"content": content
|
||||
};
|
||||
res.render('template.hbs', tplData);
|
||||
}).catch(err => {
|
||||
res.setHeader("Content-type", "text/plain");
|
||||
console.log(err);
|
||||
res.end("erreur");
|
||||
});
|
||||
});
|
||||
app.use(express.static("./public"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const express = require('express'),
|
||||
cors = require("cors"),
|
||||
app = express(),
|
||||
log = require("color-logs")(true, true, "Dryusdan.fr"),
|
||||
fs = require("fs"),
|
||||
path = require('path'),
|
||||
promise = require('promise'),
|
||||
hbs = require('hbs');
|
||||
|
||||
log.info("Application started and now preparing");
|
||||
|
||||
var corsOptions = {
|
||||
"origin": "*",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"methods": "GET,HEAD,PUT,PATCH,POST,DELETE",
|
||||
"preflightContinue": false
|
||||
};
|
||||
/**
|
||||
* Create menu html
|
||||
*/
|
||||
const config = require("./config.json");
|
||||
var Template = require("./classes/Template.class");
|
||||
var Categories = require("./classes/Categories.class");
|
||||
var Articles = require("./classes/Articles.class");
|
||||
|
||||
class App {
|
||||
constructor(rootPath, port){
|
||||
|
||||
/**
|
||||
* Listen to http://0.0.0.0:port
|
||||
*/
|
||||
app.listen(port);
|
||||
log.info("HTTP server listening on port", port);
|
||||
log.info("Application ready");
|
||||
var template = new Template();
|
||||
|
||||
app.get("/", function(req, res){
|
||||
var categories = new Categories();
|
||||
Promise.all([
|
||||
template.getNav(),
|
||||
categories.getHome()
|
||||
]).then(data => {
|
||||
var nav = data[0];
|
||||
var content = data[1];
|
||||
res.setHeader("Content-type", "text/html");
|
||||
var tplData = {
|
||||
"blogName": config.blogName,
|
||||
"title": config.homeTitle,
|
||||
"nav": nav,
|
||||
"content": content
|
||||
};
|
||||
res.render('template.hbs', tplData);
|
||||
}).catch(err => {
|
||||
res.setHeader("Content-type", "text/plain");
|
||||
|
||||
res.end("erreur");
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
app.get("/:slug", function(req, res){
|
||||
var categories = new Categories();
|
||||
Promise.all([
|
||||
template.getNav(),
|
||||
categories.getListArticles(req.params.slug),
|
||||
categories.getCategorie(req.params.slug)
|
||||
]).then(data => {
|
||||
var nav = data[0];
|
||||
var content = data[1];
|
||||
var dataCategories = data[2];
|
||||
res.setHeader("Content-type", "text/html");
|
||||
var tplData = {
|
||||
"blogName": config.blogName,
|
||||
"title": dataCategories.title+" - "+ config.blogName,
|
||||
"nav": nav,
|
||||
"content": content
|
||||
};
|
||||
res.render('template.hbs', tplData);
|
||||
}).catch(err => {
|
||||
res.setHeader("Content-type", "text/plain");
|
||||
|
||||
res.end("erreur");
|
||||
});
|
||||
});
|
||||
app.get("/:categories/:slug", function(req, res){
|
||||
var categories = new Categories();
|
||||
var articles = new Articles();
|
||||
Promise.all([
|
||||
template.getNav(),
|
||||
categories.getCategorie(req.params.categories),
|
||||
articles.getArticle(req.params.categories, req.params.slug)
|
||||
]).then(data => {
|
||||
var nav = data[0];
|
||||
var dataCategories = data[1];
|
||||
var content = data[2];
|
||||
res.setHeader("Content-type", "text/html");
|
||||
var tplData = {
|
||||
"blogName": config.blogName,
|
||||
"title": articles.title+" - "+dataCategories.title+" - "+ config.blogName,
|
||||
"nav": nav,
|
||||
"content": content
|
||||
};
|
||||
res.render('template.hbs', tplData);
|
||||
}).catch(err => {
|
||||
res.setHeader("Content-type", "text/plain");
|
||||
res.end("erreur");
|
||||
});
|
||||
});
|
||||
app.use(express.static("./public"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new App("/", config.appPort);
|
|
@ -1,52 +1,52 @@
|
|||
const log = require('color-logs')(true, true, "Articles.class.js"),
|
||||
hbs = require('handlebars'),
|
||||
promise = require('promise'),
|
||||
markdown = require('markdown').markdown,
|
||||
fs = require("fs");
|
||||
|
||||
var title,
|
||||
author,
|
||||
content,
|
||||
date,
|
||||
slug;
|
||||
|
||||
class Articles {
|
||||
|
||||
getArticle(categorie, article){
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile('./views/articles/article.hbs', 'utf-8', (error, source) => {
|
||||
var paramPath = "./ressources/"+categorie+"/"+article+".json"; // path to param of article
|
||||
var contentPath = "./ressources/"+categorie+"/"+article+".md"; //path to article
|
||||
fs.access(paramPath, fs.constants.F_OK || fs.constants.R_OK, (error) => {
|
||||
if(error)
|
||||
resolve(new Error("File not exist"));
|
||||
else
|
||||
fs.access(contentPath, fs.constants.F_OK || fs.constants.R_OK, (error) => {
|
||||
if(error)
|
||||
resolve(new Error("File not exist"));
|
||||
else{
|
||||
fs.readFile(contentPath, 'utf-8', (error, content) => {
|
||||
var content = markdown.toHTML(content);
|
||||
const articleParams = require("."+paramPath);
|
||||
var data = {
|
||||
'title':articleParams.title,
|
||||
'author': articleParams.author,
|
||||
'content': content
|
||||
};
|
||||
console.log(data);
|
||||
hbs.registerHelper('articles', (articles) =>{
|
||||
return articles;
|
||||
});
|
||||
var template = hbs.compile(source);
|
||||
var html = template(data);
|
||||
resolve(html);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Articles;
|
||||
const log = require('color-logs')(true, true, "Articles.class.js"),
|
||||
hbs = require('handlebars'),
|
||||
promise = require('promise'),
|
||||
markdown = require('markdown').markdown,
|
||||
fs = require("fs");
|
||||
|
||||
var title,
|
||||
author,
|
||||
content,
|
||||
date,
|
||||
slug;
|
||||
|
||||
class Articles {
|
||||
|
||||
getArticle(categorie, article){
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile('./views/articles/article.hbs', 'utf-8', (error, source) => {
|
||||
var paramPath = "./ressources/"+categorie+"/"+article+".json"; // path to param of article
|
||||
var contentPath = "./ressources/"+categorie+"/"+article+".md"; //path to article
|
||||
fs.access(paramPath, fs.constants.F_OK || fs.constants.R_OK, (error) => {
|
||||
if(error)
|
||||
resolve(new Error("File not exist"));
|
||||
else
|
||||
fs.access(contentPath, fs.constants.F_OK || fs.constants.R_OK, (error) => {
|
||||
if(error)
|
||||
resolve(new Error("File not exist"));
|
||||
else{
|
||||
fs.readFile(contentPath, 'utf-8', (error, content) => {
|
||||
var content = markdown.toHTML(content);
|
||||
const articleParams = require("."+paramPath);
|
||||
this.title = articleParams.title;
|
||||
var data = {
|
||||
'title':articleParams.title,
|
||||
'author': articleParams.author,
|
||||
'content': content
|
||||
};
|
||||
hbs.registerHelper('articles', (articles) =>{
|
||||
return articles;
|
||||
});
|
||||
var template = hbs.compile(source);
|
||||
var html = template(data);
|
||||
resolve(html);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Articles;
|
||||
|
|
|
@ -1,83 +1,141 @@
|
|||
const log = require('color-logs')(true, true, "Categories.class.js"),
|
||||
path = require('path'),
|
||||
hbs = require('handlebars'),
|
||||
promise = require('promise'),
|
||||
fs = require("fs");
|
||||
|
||||
hbs.registerHelper('listArticle', function(tabs, options) {
|
||||
var i = 1;
|
||||
var out = '';
|
||||
for(var x in options['data']['root']){
|
||||
|
||||
out = out + "" + options.fn(options['data']['root'][x]) + "";
|
||||
if(i == 3){
|
||||
i= 1;
|
||||
out = out + "</div><div class=\"row\">";
|
||||
}
|
||||
else{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return out;
|
||||
});
|
||||
|
||||
class Categories {
|
||||
|
||||
/**
|
||||
* hydrate global var
|
||||
* @param {type} slug : url of categorie
|
||||
* @returns {Promise} data of categories
|
||||
*/
|
||||
getCategorie(slug){
|
||||
return new Promise((resolve, reject) => {
|
||||
var path = "./ressources/"+slug+"/params.json";
|
||||
fs.access(path, fs.constants.F_OK || fs.constants.R_OK, (error) => {
|
||||
if(error)
|
||||
resolve(new Error("File not exist"));
|
||||
else
|
||||
resolve(require("."+path));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {Promise} the list of article
|
||||
*/
|
||||
getHome(){
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile('./views/articles/list.hbs', 'utf-8', (error, source) => {
|
||||
const data = require('../ressources/lastArticles.json');
|
||||
hbs.registerHelper('articles', (articles) =>{
|
||||
return articles;
|
||||
});
|
||||
var template = hbs.compile(source);
|
||||
var html = template(data);
|
||||
resolve(html);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {type} slug : url of categorie
|
||||
* @returns {Promise} the list of article in this categorie
|
||||
*/
|
||||
getListArticles(slug){
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile('./views/articles/list.hbs', 'utf-8', (error, source) => {
|
||||
const data = require('../ressources/lastArticles.json');
|
||||
hbs.registerHelper('articles', (articles) =>{
|
||||
return articles;
|
||||
});
|
||||
var template = hbs.compile(source);
|
||||
var html = template(data);
|
||||
resolve(html);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const log = require('color-logs')(true, true, "Categories.class.js"),
|
||||
path = require('path'),
|
||||
hbs = require('handlebars'),
|
||||
promise = require('promise'),
|
||||
fs = require("fs");
|
||||
|
||||
hbs.registerHelper('listArticle', function(tabs, options) {
|
||||
var i = 1;
|
||||
var out = '';
|
||||
for(var x in options['data']['root']){
|
||||
|
||||
out = out + "" + options.fn(options['data']['root'][x]) + "";
|
||||
if(i == 3){
|
||||
i= 1;
|
||||
out = out + "</div><div class=\"row\">";
|
||||
}
|
||||
else{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return out;
|
||||
});
|
||||
|
||||
class Categories {
|
||||
|
||||
/**
|
||||
* hydrate global var
|
||||
* @param {type} slug : url of categorie
|
||||
* @returns {Promise} data of categories
|
||||
*/
|
||||
getCategorie(slug){
|
||||
return new Promise((resolve, reject) => {
|
||||
var path = "./ressources/"+slug+"/params.json";
|
||||
fs.access(path, fs.constants.F_OK || fs.constants.R_OK, (error) => {
|
||||
if(error)
|
||||
resolve(new Error("File not exist"));
|
||||
else
|
||||
resolve(require("."+path));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {Promise} the list of article
|
||||
*/
|
||||
getHome(){
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile('./views/articles/list.hbs', 'utf-8', (error, source) => {
|
||||
const data = require('../ressources/lastArticles.json');
|
||||
hbs.registerHelper('articles', (articles) =>{
|
||||
return articles;
|
||||
});
|
||||
//console.log(data);
|
||||
var template = hbs.compile(source);
|
||||
var html = template(data);
|
||||
resolve(html);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {type} slug : url of categorie
|
||||
* @returns {Promise} the list of article in this categorie
|
||||
*/
|
||||
getListArticles(slug){
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile('./views/articles/list.hbs', 'utf-8', (error, source) => {
|
||||
var pathOfArticles = "./ressources/"+slug+"";
|
||||
var dataObj = {};
|
||||
fs.readdir(pathOfArticles, (err, files)=> {
|
||||
if(err){
|
||||
resolve(new Error("File not exist"));
|
||||
}
|
||||
else{
|
||||
var i = 0;
|
||||
files.forEach((file) => {
|
||||
if(file != "params.json"){
|
||||
if(path.extname(file) == ".json"){
|
||||
dataObj[i] = require('.'+pathOfArticles+"/"+file);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
var objectSize = Object.keys(dataObj).length;
|
||||
var data = "{";
|
||||
for(var x in dataObj){
|
||||
if(x < objectSize-1){
|
||||
data += "\""+x+"\""+":"+JSON.stringify(dataObj[x])+',';
|
||||
}
|
||||
else{
|
||||
data += "\""+x+"\""+":"+JSON.stringify(dataObj[x])+'';
|
||||
}
|
||||
}
|
||||
data += "}";
|
||||
data = JSON.parse(data);
|
||||
// console.log(data);
|
||||
//console.log(data[0]['title']);
|
||||
|
||||
hbs.registerHelper('articles', (articles) =>{
|
||||
return articles;
|
||||
});
|
||||
|
||||
var template = hbs.compile(source);
|
||||
var html = html + template(data);
|
||||
resolve(html);
|
||||
}
|
||||
});
|
||||
//const data = require('../ressources/lastArticles.json');
|
||||
// hbs.registerHelper('articles', (articles) =>{
|
||||
// return articles;
|
||||
// });
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
var fs = require('fs');
|
||||
fs.readdir('/', function (err, files) { // '/' denotes the root folder
|
||||
if (err) throw err;
|
||||
|
||||
files.forEach( function (file) {
|
||||
fs.lstat('/'+file, function(err, stats) {
|
||||
if (!err && stats.isDirectory()) { //conditing for identifying folders
|
||||
$('ul#foldertree').append('<li class="folder">'+file+'</li>');
|
||||
}
|
||||
else{
|
||||
$('ul#foldertree').append('<li class="file">'+file+'</li>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
module.exports = Categories;
|
|
@ -1,44 +1,43 @@
|
|||
const log = require('color-logs')(true, true, "Template.class.js"),
|
||||
fs = require("fs"),
|
||||
hbs = require('handlebars'),
|
||||
promise = require('promise'),
|
||||
config = require('../config.json');
|
||||
|
||||
hbs.registerHelper('listNav', function(tabs, options) {
|
||||
var out = '';
|
||||
for(var x in options['data']['root']){
|
||||
out = out + "" + options.fn(options['data']['root'][x]) + "";
|
||||
|
||||
}
|
||||
return out;
|
||||
});
|
||||
|
||||
class Template {
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {Promise} the navbar in html compiled
|
||||
*/
|
||||
|
||||
getNav(){
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile('./views/_nav.hbs', 'utf-8', (error, source) => {
|
||||
const articles = require("../ressources/categories.json");
|
||||
hbs.registerHelper('nav', (nav) =>{
|
||||
return nav;
|
||||
});
|
||||
var template = hbs.compile(source);
|
||||
var html = template(articles);
|
||||
//console.log(html);
|
||||
resolve(html);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getToot(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const log = require('color-logs')(true, true, "Template.class.js"),
|
||||
fs = require("fs"),
|
||||
hbs = require('handlebars'),
|
||||
promise = require('promise'),
|
||||
config = require('../config.json');
|
||||
|
||||
hbs.registerHelper('listNav', function(tabs, options) {
|
||||
var out = '';
|
||||
for(var x in options['data']['root']){
|
||||
out = out + "" + options.fn(options['data']['root'][x]) + "";
|
||||
|
||||
}
|
||||
return out;
|
||||
});
|
||||
|
||||
class Template {
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {Promise} the navbar in html compiled
|
||||
*/
|
||||
|
||||
getNav(){
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile('./views/_nav.hbs', 'utf-8', (error, source) => {
|
||||
const articles = require("../ressources/categories.json");
|
||||
hbs.registerHelper('nav', (nav) =>{
|
||||
return nav;
|
||||
});
|
||||
var template = hbs.compile(source);
|
||||
var html = template(articles);
|
||||
resolve(html);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getToot(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module.exports = Template;
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"appPort": "8888",
|
||||
"blogName": "Dryusdan"
|
||||
}
|
||||
{
|
||||
"appPort": "8888",
|
||||
"blogName": "Dryusdan",
|
||||
"homeTitle": "Dryusdan.fr, blog d'un passionné d'informatique"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<main class="transparent">
|
||||
<section>
|
||||
<div class="flexgrid">
|
||||
<div class="row">
|
||||
{{{lists}}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
|
@ -1,25 +1,25 @@
|
|||
<main class="transparent">
|
||||
<section>
|
||||
<div class="flexgrid">
|
||||
<div class="row">
|
||||
{{#listArticle articles}}
|
||||
<div class="cell tile">
|
||||
<a href="{{slug}}">
|
||||
<div class="tileCover">
|
||||
<img src="{{img}}">
|
||||
</div>
|
||||
<div class="tileLegend">
|
||||
<div class="content">
|
||||
<div class="titleLegend">{{categorie}}</div>
|
||||
<img class="blackAsset separator" src="assets/img/separator.png">
|
||||
<h2>{{title}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{{/listArticle}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<main class="transparent">
|
||||
<section>
|
||||
<div class="flexgrid">
|
||||
<div class="row">
|
||||
{{#listArticle articles}}
|
||||
<div class="cell tile">
|
||||
<a href="{{slug}}">
|
||||
<div class="tileCover">
|
||||
<img src="{{img}}">
|
||||
</div>
|
||||
<div class="tileLegend">
|
||||
<div class="content">
|
||||
<div class="titleLegend">{{categorie}}</div>
|
||||
<img class="blackAsset separator" src="assets/img/separator.png">
|
||||
<h2>{{title}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{{/listArticle}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
|
@ -1,27 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{title}} - {{blogName}}</title>
|
||||
<link rel="stylesheet" href="/assets/css/global.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div id="logo"><a href="/">{{blogName}}</a></div>
|
||||
{{{nav}}}
|
||||
</header>
|
||||
<div class="search">
|
||||
<div class="inputContainer">
|
||||
<input type="search" placeholder="Rechercher...">
|
||||
<button> </button>
|
||||
</div>
|
||||
</div>
|
||||
{{{content}}}
|
||||
<footer>
|
||||
|
||||
</footer>
|
||||
<script src="/assets/js/jquery-2.2.0.min.js"></script>
|
||||
<script src="/assets/js/parallax.js"></script>
|
||||
<script src="/assets/js/searchInput.js"></script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{title}}</title>
|
||||
<link rel="stylesheet" href="/assets/css/global.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div id="logo"><a href="/">{{blogName}}</a></div>
|
||||
{{{nav}}}
|
||||
</header>
|
||||
<div class="search">
|
||||
<div class="inputContainer">
|
||||
<input type="search" placeholder="Rechercher...">
|
||||
<button> </button>
|
||||
</div>
|
||||
</div>
|
||||
{{{content}}}
|
||||
<footer>
|
||||
|
||||
</footer>
|
||||
<script src="/assets/js/jquery-2.2.0.min.js"></script>
|
||||
<script src="/assets/js/parallax.js"></script>
|
||||
<script src="/assets/js/searchInput.js"></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue