blog-engine-sac
Advanced tools
Comparing version 5.8.0 to 5.9.0
@@ -15,3 +15,3 @@ export { createHeaderHtml }; | ||
return ` | ||
<nav id="nav"> | ||
<nav id="top-nav"> | ||
<ul class="navbar-nav ml-auto"> | ||
@@ -18,0 +18,0 @@ <li class="nav-item"> |
@@ -6,3 +6,3 @@ export { makeBackGroundPicture }; | ||
return `<picture class="position-relative"> | ||
<source srcset="/images/${name}.jpg" media="(min-width: 1392px)"> | ||
<source srcset="/images/${name}.jpg" media="(min-width: 2000px)"> | ||
<source srcset="/images/${name}-${standard}.jpg" media="(min-width: 992px)"> | ||
@@ -9,0 +9,0 @@ <img alt="" src="/images/${name}-${small}.jpg" class="w100 hauto"> |
@@ -5,5 +5,10 @@ export {styleSheets}; | ||
const styleSheets = (options) => { | ||
let custom = ``; | ||
if (options.customCss) { | ||
custom = `<link href="/css/${options.customCss}" rel="stylesheet">`; | ||
} | ||
return ` | ||
<link href="/css/bootstrap-legend.css" rel="stylesheet"> | ||
<link href="/css/clean-blog.css" rel="stylesheet">`; | ||
<link href="/css/blog-engine-sac.css" rel="stylesheet"> | ||
${custom}`; | ||
}; |
{ | ||
"name": "blog-engine-sac", | ||
"version": "5.8.0", | ||
"version": "5.9.0", | ||
"description": "static site generator, that uses markdown files as input and outputs web pages", | ||
@@ -5,0 +5,0 @@ "license": "CC0-1.0", |
@@ -74,2 +74,3 @@ # [Blog-engine-sac](https://gitlab.com/GrosSacASac/blog-engine-z) | ||
Create file `blog-engine-sac.yaml` with | ||
```yaml | ||
@@ -126,2 +127,13 @@ --- | ||
### Custom css | ||
Add the following key-value pair in your site settings. | ||
```yaml | ||
customCss: custom.css | ||
``` | ||
Then create a folder named `css`. Inside create a file `custom.css`. Then copy inside `custom.css` the first rule [found inside blog-engine-sac.css](https://gitlab.com/GrosSacASac/blog-engine-z/-/blob/master/css/blog-engine-sac.css). These are some css variables easy to edit as a starting point. | ||
### user provided tags | ||
@@ -128,0 +140,0 @@ |
@@ -23,5 +23,5 @@ export { | ||
const highQualityWidth = 900; | ||
const standardWidth = 620; | ||
const standardWidth = 720; | ||
const standard = `m`; | ||
const smallWidth = 420; | ||
const smallWidth = 480; | ||
const small = `s`; | ||
@@ -28,0 +28,0 @@ |
@@ -0,0 +0,0 @@ export { consoleOutputEarly, consoleOutputReady }; |
@@ -15,2 +15,3 @@ export { | ||
const imageDirectory = `/images/`; | ||
const cssDirectory = `/css/`; | ||
@@ -28,8 +29,29 @@ | ||
`/../css/bootstrap-legend.css`, | ||
`/../css/clean-blog.css`, | ||
`/../css/blog-engine-sac.css`, | ||
]; | ||
return copyArrayFiles(filesToCopy, { | ||
return Promise.all([copyArrayFiles(filesToCopy, { | ||
...options, | ||
flatTarget: `css`, | ||
fromEngineItself: true, | ||
}), | ||
copyCustomCss(options)]); | ||
}; | ||
const copyCustomCss = (options) => { | ||
return new Promise(function (resolve, reject) { | ||
fs.readdir(`.${cssDirectory}`, (error, files) => { | ||
if (error) { | ||
// reject(error); // no need to have custom css | ||
return []; | ||
} | ||
resolve(files.map(function (file) { | ||
return `${cssDirectory}${file}`; | ||
})); | ||
}); | ||
}).then(filesToCopy => { | ||
return copyArrayFiles(filesToCopy, { | ||
...options, | ||
fromEngineItself: false, | ||
}); | ||
}); | ||
@@ -36,0 +58,0 @@ }; |
@@ -0,0 +0,0 @@ export { isLocalUrl }; |
Sorry, the diff of this file is not supported yet
177
410735
8913