reveal-carve

Slides in Carve, rendered in the browser.

What is on this deck

  • reveal-carve
  • The pitch [2 min]
  • 1. Code, unescaped
  • 2. Highlight the line you are talking about
  • 3. Before and after, side by side
  • 4. The boxes a technical deck needs
  • 5. Tables without ceremony
  • 6. Vertical stacks
  • Slide attributes
  • 7. Diagrams, from the same source
  • What you also get

The pitch

  • Code samples need no escaping
  • Layout is markup, not embedded HTML
  • Stepwise code highlighting from a fence attribute
  • The source is checkable before anyone presents it

1. Code, unescaped

$articles = $this->Articles->find()
    ->contain(['Users'])
    ->where(['published' => true])
    ->orderBy(['created' => 'DESC'])
    ->all();

In HTML this slide would need > eleven times. Every one of them is a chance to break the sample.

2. Highlight the line you are talking about

$query = $this->Orders->selectQuery();
$query->contain(['Customers'])
    ->where(['status' => 'open']);
$total = $query->count();

Press the right arrow: the deck walks the three steps written in the fence’s attribute line.

3. Before and after, side by side

CakePHP 4

$table->query()
    ->update()
    ->set(['done' => true]);

CakePHP 5

$table->updateQuery()
    ->set(['done' => true]);

Two containers with attributes. No <div> in the source.

4. The boxes a technical deck needs

Exercise: open config/app.php, set errorLevel to E_ALL, click through the app and read the log.

Version markers ride along inline: enum support 5.0 and enum validation 5.1.

5. Tables without ceremony

Removed in 5.0Replacement
ShellCommand
PaginatorComponentNumericPaginator
Mailer\EmailMailer

6. Vertical stacks

The main line stays on the horizontal axis.

Detail on demand

Questions that only sometimes come up live below the slide, not in the main flow.

Another one

Press the up arrow to go back.

Slide attributes

Backgrounds, transitions and auto-animate pairs come from an %% attr: directive.

7. Diagrams, from the same source

Enabled with --extension mermaid. Carve emits the block, Mermaid draws it.

What you also get

lint, handout, watch

A deck source is checkable, exportable as a document, and rebuilt on save.