Skip to content

Commit

Permalink
feat: Add justfile and logo baking
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyx committed Mar 13, 2024
1 parent e76ed14 commit d669550
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ Current [`revealjs`](https://github.com/hakimel/reveal.js) version: `4.6.1`

## Examples

- `npm install` -> Install all dependencies.
- `npm run present` -> Presentation in Browser.
- `npm run package` -> PDF & HTML and standalone `zip` file to distribute.
- `just install` -> Install all dependencies.
- `just present` -> Presentation in Browser.
- `just package` -> PDF & HTML and standalone `zip` file to distribute.

## Modifications

- Edit design in [`company.scss`](css/theme/source/company.scss).
- Company Logo: Edit the file [`company-logo.svg`](css/theme/source/files/company-logo.svg).
- Replace embedded image in [`company.scss`](css/theme/source/company.scss) with

```shell
repl=$(cat css/theme/source/files/company-logo.svg | base64 -w 0| sed "s/\+/\\\+/g") &&
sed -i -E "s@background-image(.*);base64,.*\"@background-image\1;base64,$repl\"@" css/theme/source/company.scss
```
- Replace embedded image in [`company.scss`](css/theme/source/company.scss) with

```shell
just bake-logo
```

# RevealJS

Expand Down
17 changes: 17 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
set positional-arguments
set shell := ["bash", "-cue"]
root_dir := justfile_directory()

install:
npm run install

present:
npm run present

package:
npm run package

bake-logo:
cd "{{root_dir}}" && \
repl=$(cat css/theme/source/files/company-logo.svg | base64 -w 0| sed "s/\+/\\\+/g") && \
sed -i -E "s@background-image(.*);base64,.*\"@background-image\1;base64,$repl\"@" css/theme/source/company.scss

0 comments on commit d669550

Please sign in to comment.