[calendar] update banners

This commit is contained in:
Avris 2021-09-14 17:45:20 +02:00
parent 3419958a64
commit a57c1e845c
11 changed files with 7 additions and 5 deletions

3
.gitignore vendored
View File

@ -4,6 +4,7 @@
/db.sqlite
/db.sqlite-shm
/db.sqlite-wal
/db.sqlite-*
/daemonise.json
/daemonise.log
@ -14,7 +15,7 @@
/cache
/static/card
/static/img-local/
/static/img-local
# Created by .ignore support plugin (hsz.mobi)
### Node template

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 KiB

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 KiB

View File

@ -3,7 +3,6 @@ require('../src/dotenv')();
const Pageres = require('pageres');
const fs = require('fs');
const Suml = require('suml');
const locale = new Suml().parse(fs.readFileSync(`./data/config.suml`).toString()).locale;
const shoot = async (url, filename) => {
const pr = new Pageres({
@ -12,13 +11,15 @@ const shoot = async (url, filename) => {
});
pr.src(process.env.BASE_URL + url, ['1500x300']);
for (let buffer of await pr.run()) {
const target = `${__dirname}/../static/calendar/${filename}.png`;
const dir = `${__dirname}/../static/img-local/calendar`;
fs.mkdirSync(dir, {recursive: true})
const target = `${dir}/${filename}.png`;
console.log(target);
fs.writeFileSync(target, buffer);
}
}
(async () => {
await shoot('/calendar-wide', `calendar-${locale}-overview`);
await shoot('/calendar-wide?labels=true', `calendar-${locale}-labels`);
await shoot('/calendar-wide', `overview`);
await shoot('/calendar-wide?labels=true', `labels`);
})();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 747 KiB