diff --git a/.eleventy.js b/.eleventy.js index 9d38f14..e061920 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -13,7 +13,7 @@ const markdownClassMapping = { h6: ['font-bold', 'mt-2'], a: ['text-pink-700', 'hover:underline', 'focus:text-white', 'focus:bg-pink-700', 'focus:outline-link'], p: ['mb-2', 'text-gray-500'], - img: ['max-w-full', 'rounded-lg'], + img: ['max-w-full', 'rounded-lg', 'max-h-600px'], ul: ['list-disc', 'ml-4'], }; diff --git a/img/content/my-spells.png b/img/content/my-spells.png new file mode 100644 index 0000000..be6172e Binary files /dev/null and b/img/content/my-spells.png differ diff --git a/repos/blabber-comic.md b/repos/blabber-comic.md index ef5e7f5..c16cd41 100644 --- a/repos/blabber-comic.md +++ b/repos/blabber-comic.md @@ -1,5 +1,6 @@ --- tags: repos +templateEngineOverride: md title: blabber-comic description: Converts chat logs to comics. date: 2018-12-30 @@ -7,8 +8,6 @@ date: 2018-12-30 [Fork on Gitlab](https://gitlab.com/gaiety/blabber-comic) -# Blabber-Comic - [![npm version](https://badge.fury.io/js/blabber-comic.svg)](https://badge.fury.io/js/blabber-comic) ## Sample @@ -19,90 +18,7 @@ date: 2018-12-30 Powered by Node and a node-canvas a comic can automatically be generated from a json array of users/text and some characters/backgrounds to be chosen at random. -## How to use it from the CLI - -### Installing - -Note: Your system may need some [compiled dependencies for canvas to work](https://github.com/Automattic/node-canvas#compiling). - -`npm install -g blabber-comic` - -### Using - -``` -$ blabber -$ Who?: Glen -$ Said What?: Test 1 -$ Another? (y/n) y -$ Who?: Sarah -$ Said What?: Test 2 -$ Another? (y/n) y -$ Who?: Glen -$ Said What?: Test 3 -$ Another? (y/n) n -$ Generating Comic... -$ [ Comic Generated @ comics/1.png ] -``` - -### Additional Options - -``` -$ blabber --path ~/Pictures -``` - - -## How to use it in other projects - -### Generate base64Data - -```javascript -const blabbercomic = require('blabber-comic'); -let messages = [] // Array of messages... - -blabbercomic(messages).then(response => { - console.log('Generated comic as base64 data', response); -}).catch(error => { - throw error; -}); -``` - -### Save as file with `fs` - -Example included in project. Clone then run `npm run test`. - -```javascript -const blabbercomic = require('blabber-comic'); -const fs = require('fs'); -let messages = [] // Array of messages... - -blabbercomic(messages).then(response => { - let base64Data = response.replace(/^data:image\/png;base64,/, ''); - - fs.writeFile('./storage/comics/comic.png', base64Data, 'base64', error => { - if (error) console.error('Uhoh...', error); - else console.log('Saved file as `comic.png`'); - }); -}).catch(error => { - throw error; -}); -``` - -### Customizing characters and backgrounds - -```javascript -const blabbercomic = require('blabber-comic'); -let backgrounds = ['./assets/backgrounds/1.png', './assets/backgrounds/2.png']; -let characters = ['./assets/characters/1.png', './assets/characters/2.png', './assets/characters/3.png']; // Provide at least 3 -let comicSize = 500; // in px square -let borderColor ='#CCCCCC'; -let font = 'Impact'; -let textColor: '#000000'; - -let messages = [] // Array of messages... -let config = { backgrounds, characters, comicSize, borderColor, font, textColor }; - -blabbercomic(messages, config); -``` +Can be used as a CLI by itself or plugged into other NodeJS projects. Its original use was as a Discord bot plugin on a personal server for fun. --- diff --git a/repos/ember-select-light.md b/repos/ember-select-light.md index 9d6ee94..233492d 100644 --- a/repos/ember-select-light.md +++ b/repos/ember-select-light.md @@ -1,5 +1,6 @@ --- tags: repos +templateEngineOverride: md title: ember-select-light description: The simplest Ember