Skip to content

Commit

Permalink
Merge branch 'jez-qcon'
Browse files Browse the repository at this point in the history
  • Loading branch information
jez committed Nov 19, 2024
2 parents a5fc292 + 3927350 commit 51810e1
Show file tree
Hide file tree
Showing 49 changed files with 3,100 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/talks/QCon2024/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Author: Jake Zimmerman <jake@zimmerman.io>
#
# ===== Usage ================================================================
#
# make Compile index.html to a Reveal.js presentation
#
# make watch Start a local HTTP server and rebuild on changes
# PORT=4242 make watch Like above, but use port 4242
#
# make build.zip Zip up all the files that would be required to serve
# a standalone presentation. (i.e., you probably don't
# want to deploy the Makefile or serve.sh script to your
# web host)
#
# make clean Delete all generated files
#
# ============================================================================

index.html: index.md stripe.theme default.revealjs
pandoc --highlight-style stripe.theme -t revealjs --standalone --template=./default.revealjs -o $@ $<

build.zip: index.html $(wildcard css/*.css) $(wildcard js/*.js) $(wildcard fonts/Sohne/*.otf) $(wildcard img/*)
zip -r $@ $^

# Need to use a custom template because we want to patch the template slightly,
# but not completely fork it (improvements should still be submitted upstream).
default.revealjs:
curl -O https://raw.githubusercontent.com/jgm/pandoc/master/data/templates/default.revealjs && \
sed -i.bak -e '/css\/theme\/black.css/d' $@ && \
rm -f $@.bak

.PHONY: clean
clean:
rm -f index.html

.PHONY: watch
watch: index.html serve.sh
./serve.sh
65 changes: 65 additions & 0 deletions docs/talks/QCon2024/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# docs/talks/QCon2024

These are the slides for the talk the Sorbet team gave at RubyConf 2021, using
[Reveal.js](https://revealjs.com/#/).

It uses Pandoc and the Reveal.js to generate presentations as HTML pages.

## Dependencies

There are no other dependencies other than [Pandoc]. Optional functionality to
watch the file system and rebuild on changes requires [Watchman]. Optional
functionality to serve and preview the files locally uses [Python 3].

- [Pandoc], a universal document converter
- [Watchman], a file watching service
- [Python 3], for `http.server`

[Pandoc]: http://pandoc.org/
[Watchman]: https://facebook.github.io/watchman/
[Python 3]: https://docs.python.org/3/library/http.server.html

Installation instructions vary depending on your system.
See the linked websites for more information, or just try this:

```shell
brew install pandoc
brew install watchman
```

## Usage

1. Write your content in `index.md`
- Start a new slide with `#`
1. Run `make watch` to build the site and watch for changes.

The sample presentation is already built. If you just want to preview it and
don't want to install Watchman, run `python -m http.server` in `src/`.

1. View the presentation at <http://127.0.0.1:8000>.

Read the [Makefile's documentation][Makefile] for more commands.

[Makefile]: ./Makefile

To use speaker notes, you **must** either serve the presentation from HTTPS or
use the loopback address, i.e., <http://127.0.0.1:8000>. [Read more about why
and alternatives here][https].

[https]: https://letsencrypt.org/docs/certificates-for-localhost/

This template supports both **light** and **dark**. The default is dark. To
switch to the light theme, click the title on the title slide. The presentation
writes the most recent preference into local storage, so even if you refresh it
will be saved.

You can generate a PDF from your slides (in Chrome) by tacking `?print-pdf` onto
the URL and using the browser's print diaglog:

- <http://127.0.0.1:8000/?print-pdf>

Note the query string must come **before** the `#slide-number`.

## License

[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://jez.io/MIT-LICENSE.txt)
74 changes: 74 additions & 0 deletions docs/talks/QCon2024/css/line-highlights.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
pre > code {
position: relative;
display: inline-block;
min-width: 100%;
/* So that we can put the ::after behind the text but in front of the background */
z-index: 1;
}

pre > code.sourceCode > span {
/* Have to re-apply a change that was reverted upstream,
* see https://github.com/jgm/skylighting/pull/202 */
display: inline-block;

position: relative;
min-width: 100%;
}

pre > code.sourceCode > span::after {
position: absolute;
background-color: var(--code-highlight);
z-index: -1;
left: -10px; /* undo padding of parent */
right: 10px; /* undo padding of parent */
top: 0;
height: 100%;
}

/* Undo styles that pandoc injects into the page. */
@media print {
pre > code.sourceCode { white-space: pre; }
pre > code.sourceCode > span { text-indent: 0px; padding-left: 0px; }
}


pre.hl-1 > code.sourceCode > span:nth-of-type(1)::after { content: ""; }
pre.hl-2 > code.sourceCode > span:nth-of-type(2)::after { content: ""; }
pre.hl-3 > code.sourceCode > span:nth-of-type(3)::after { content: ""; }
pre.hl-4 > code.sourceCode > span:nth-of-type(4)::after { content: ""; }
pre.hl-5 > code.sourceCode > span:nth-of-type(5)::after { content: ""; }
pre.hl-6 > code.sourceCode > span:nth-of-type(6)::after { content: ""; }
pre.hl-7 > code.sourceCode > span:nth-of-type(7)::after { content: ""; }
pre.hl-8 > code.sourceCode > span:nth-of-type(8)::after { content: ""; }
pre.hl-9 > code.sourceCode > span:nth-of-type(9)::after { content: ""; }
pre.hl-10 > code.sourceCode > span:nth-of-type(10)::after { content: ""; }
pre.hl-11 > code.sourceCode > span:nth-of-type(11)::after { content: ""; }
pre.hl-12 > code.sourceCode > span:nth-of-type(12)::after { content: ""; }
pre.hl-13 > code.sourceCode > span:nth-of-type(13)::after { content: ""; }
pre.hl-14 > code.sourceCode > span:nth-of-type(14)::after { content: ""; }
pre.hl-15 > code.sourceCode > span:nth-of-type(15)::after { content: ""; }
pre.hl-16 > code.sourceCode > span:nth-of-type(16)::after { content: ""; }
pre.hl-17 > code.sourceCode > span:nth-of-type(17)::after { content: ""; }
pre.hl-18 > code.sourceCode > span:nth-of-type(18)::after { content: ""; }
pre.hl-19 > code.sourceCode > span:nth-of-type(19)::after { content: ""; }
pre.hl-20 > code.sourceCode > span:nth-of-type(20)::after { content: ""; }
pre.hl-21 > code.sourceCode > span:nth-of-type(21)::after { content: ""; }
pre.hl-22 > code.sourceCode > span:nth-of-type(22)::after { content: ""; }
pre.hl-23 > code.sourceCode > span:nth-of-type(23)::after { content: ""; }
pre.hl-24 > code.sourceCode > span:nth-of-type(24)::after { content: ""; }
pre.hl-25 > code.sourceCode > span:nth-of-type(25)::after { content: ""; }
pre.hl-26 > code.sourceCode > span:nth-of-type(26)::after { content: ""; }
pre.hl-27 > code.sourceCode > span:nth-of-type(27)::after { content: ""; }
pre.hl-28 > code.sourceCode > span:nth-of-type(28)::after { content: ""; }
pre.hl-29 > code.sourceCode > span:nth-of-type(29)::after { content: ""; }
pre.hl-30 > code.sourceCode > span:nth-of-type(30)::after { content: ""; }
pre.hl-31 > code.sourceCode > span:nth-of-type(31)::after { content: ""; }
pre.hl-32 > code.sourceCode > span:nth-of-type(32)::after { content: ""; }
pre.hl-33 > code.sourceCode > span:nth-of-type(33)::after { content: ""; }
pre.hl-34 > code.sourceCode > span:nth-of-type(34)::after { content: ""; }
pre.hl-35 > code.sourceCode > span:nth-of-type(35)::after { content: ""; }
pre.hl-36 > code.sourceCode > span:nth-of-type(36)::after { content: ""; }
pre.hl-37 > code.sourceCode > span:nth-of-type(37)::after { content: ""; }
pre.hl-38 > code.sourceCode > span:nth-of-type(38)::after { content: ""; }
pre.hl-39 > code.sourceCode > span:nth-of-type(39)::after { content: ""; }
pre.hl-40 > code.sourceCode > span:nth-of-type(40)::after { content: ""; }
Loading

0 comments on commit 51810e1

Please sign in to comment.