• Stars
    star
    3,990
  • Rank 10,825 (Top 0.3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 12 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

30-second slideshows for hackers

Cleaver

30-second Slideshows for Hackers. http://jdan.github.io/cleaver/

Travis Build NPM version

Intro

Cleaver turns this:

title: Basic Example
author:
  name: Jordan Scales
  twitter: jdan
  url: http://jordanscales.com
output: basic.html
controls: true

--

# Cleaver 101
## A first look at quick HTML presentations

--

### A textual example

Content can be written in **Markdown!** New lines no longer need two angle brackets.

This will be in a separate paragraph

--

### A list of things

* Item 1
* Item B
* Item gamma

No need for multiple templates!

Into this:

output

Quick Start

Get it on NPM:

npm install -g cleaver
# To update: npm update -g cleaver

And run it like so:

cleaver path/to/something.md

You can also watch for changes on a file and automatically recompile with:

cleaver watch path/to/something-changing.md

# Watching for changes on presentation.md. Ctrl-C to abort.
# Rebuilding: Thu Nov 07 2013 00:15:03 GMT-0500 (EST)
# Rebuilding: Thu Nov 07 2013 00:15:21 GMT-0500 (EST)
# Rebuilding: Thu Nov 07 2013 00:16:01 GMT-0500 (EST)
# Rebuilding: Thu Nov 07 2013 00:16:09 GMT-0500 (EST)

Use the --debug flag to display debug information:

$ cleaver --debug examples/basic.md
  cleaver loaded input document +0ms
  helper read /Users/jordan/Projects/cleaver/templates/layout.mustache +0ms
  helper read /Users/jordan/Projects/cleaver/templates/author.mustache +0ms
  helper read /Users/jordan/Projects/cleaver/templates/default.mustache +0ms
  cleaver loaded templates +3ms
  cleaver parsed metadata +4ms
  helper read /Users/jordan/Projects/cleaver/resources/default.css +13ms
  helper read /Users/jordan/Projects/cleaver/resources/github.css +0ms
  helper read /Users/jordan/Projects/cleaver/resources/script.js +0ms
  cleaver loaded static assets +9ms
  cleaver rendered slides +1ms
  cleaver rendered presentation +1ms

More Info

Cleaver is a one-stop shop for generating HTML presentations in record time. Using some spiced up markdown, you can produce good-looking, interactive presentations with a just a few lines of text.

Slides are written in Markdown, and are separated by two dashes (--).

Options

title: Basic Example
author:
  name: Jordan Scales
  twitter: jdan
  url: http://jordanscales.com
style: basic-style.css
output: basic.html

Cleaver supports several basic options that allow you to further customize the look and feel of your presentation, including author info, stylesheets, and custom templates.

See the documentation on options for more information.

Be sure to check out the wiki as well.

Themes

Check out the themes page on our wiki.

title: Theme Example
output: theme.html
theme: jdan/cleaver-retro

Cleaver has substantial theme support to give you more fine-grained control over your presentation, similar to options. Instead of manually specifying a stylesheet, template, layout, and others, you can specify a single theme containing each of these assets. More specifically, a theme may contain:

  • style.css - styles for your presentation
  • template.mustache - a template used to render the slides in your presentation
  • layout.mustache - a template used to render the entire document of your presentation
  • script.js - javascript to be included in your slideshow

A theme does not need to contain all of these files, only the ones present will be loaded into your slideshow.

Examples

cleaver-retro

cleaver-ribbon

reveal-cleaver-theme

Specifying Themes

Themes may be specified by one of the following options:

  • An absolute or relative path to a directory
  • A URL to a directory
  • A github repository in the form of username/reponame

Overriding Themes

By default, style.css and script.js will be appended to the default stylesheets and javascripts included in cleaver presentations. If you wish to completely override these defaults, you must include another file in your theme - settings.json - corresponding to the following:

{
  "override": true
}

Template files will automatically override the default templates.

More Info

For more information on themes, check out our documentation.

Markup

Cleaver slides are rendered using the following template:

{{#slides}}
  <div class="slide{{#hidden}} hidden{{/hidden}} {{classList}}" id="slide-{{id}}">
    <section class="slide-content">{{{content}}}</section>
  </div>
{{/slides}}

And produce the following markup:

+-------------------------------+
| #slide-N                      |
|     +-------------------+     |
|     | .slide-content    |     |
|     |                   |     |
|     |                   |     |
|     |                   |     |
|     |                   |     |
|     +-------------------+     |
|                               |
|                               |
| (navigation)                  |
+-------------------------------+

#slide-N (for example, #slide-3) allows you to identify a particular full-bleed slide by its position in the slideshow. It extends to the bounds of the page.

.slide-content is a smaller window which holds the actual content of the slide.

Class List

A class list can be placed after each "slice" (denoted --) to help you style individual slides without worrying about their index.

-- bg

This slide will have a class "bg" associated with it

-- bg blink

This one, too, but it will also have the class "blink"

Slide Types

Title slide

# Cleaver 101
## A first look at quick HTML presentations

h1 and h2 elements (prefaced with # and ## respectively), will automatically include padding to render a title slide.

Other slides

### A list of things

* Item 1
* Item B
* Item gamma

No need for multiple templates!

Since slides are written in Markdown, you can include things like lists, images, and arbitrary HTML.

h3 tags (prefaced ###) are automatically given a bottom border to represent a slide title.

Navigation

Cleaver supports keyboard navigation for switching between slides. Alternatively, click the control buttons located below the presentation.

To navigate the slideshow:

  • forward: K, L, UP, RIGHT, PgDn, and Space
  • reverse: H, J, LEFT, DOWN, PgUp, and Backspace

The toggle fullscreen mode, press the ENTER key.

Contributing

  • Fork it
  • Clone it
  • Install dependencies (npm install)
  • Checkout a release branch (git checkout -b feature/cool-wordart)
  • Make changes, commit, and push (npm test and make sure it passes)
  • Open a pull request!

With <3,
@jdan

--

MIT Licensed

More Repositories

1

98.css

A design system for building faithful recreations of old UIs
CSS
8,999
star
2

tota11y

an accessibility (a11y) visualization toolkit
JavaScript
5,042
star
3

isomer

Simple isometric graphics library for HTML5 canvas
JavaScript
2,868
star
4

dynamo.js

Cycles through bits of text in place
JavaScript
624
star
5

Melopy

Python music library
Python
237
star
6

rubycards

Ruby playing cards library
Ruby
149
star
7

deepdive

deepdive
TypeScript
109
star
8

uptodate

Keep your timestamps up to date
JavaScript
88
star
9

ocaml-data-structures

Some data structures and algorithms written in OCaml
OCaml
67
star
10

notes

Static site generator from a Notion DB
JavaScript
63
star
11

tinman

A tiny static-ready blog engine based on the toto library
JavaScript
34
star
12

magic-editor

LLM-powered writing experiments
TypeScript
33
star
13

hashart

an experiment in turing SHA-256 hashes into pixels
JavaScript
28
star
14

alock

Arbitrary locking mechanism for asynchronous operations
JavaScript
28
star
15

compiler.lean

A formally verified compiler for a simple language with numbers and sums
Lean
25
star
16

ocaml-web-framework

An HTTP server and framework written from scratch in OCaml
OCaml
25
star
17

twitter

See what’s happening in the world right now
24
star
18

magic-hotline

A web server which generates its HTML using ChatGPT, using only the URL
JavaScript
22
star
19

programthis

Solutions for the discussions on http://programthis.net
C
21
star
20

98.css-badges

badges for 98.css
JavaScript
19
star
21

lispjs

Let's compile Lisp into JavaScript using JavaScript
JavaScript
18
star
22

jordanscales.com

My homepage
HTML
17
star
23

scheme-to-js

a scheme->js compiler written in scheme
Scheme
17
star
24

thatjdanisso.cool

My blog
JavaScript
15
star
25

reactme

a little server to share react components
JavaScript
15
star
26

oeis

On-Line Encyclopedia of Integer Sequences gem
Ruby
14
star
27

jscal.es

source code for my blog, jscal.es
Ruby
13
star
28

reactive-js

How to invent reactive JavaScript
JavaScript
11
star
29

topological-sort

An implementation of Kahn's algorithm for topological sorting
JavaScript
11
star
30

away-message

AOL Instant Messenger "Away Message" simulator
TypeScript
10
star
31

notion-automations

automating notion in various ways
JavaScript
10
star
32

fizzbuzz-polyglot

An experiment in writing FizzBuzz in every language, each with its own Docker container
Lua
10
star
33

notion-mailboxes

What if notion blocks had email?
JavaScript
9
star
34

wordle.ml

Cheating at the game Wordle with OCaml
OCaml
8
star
35

nodeschool

My solutions for nodeschool.io
JavaScript
7
star
36

chessnet

lichess games over telnet
JavaScript
7
star
37

j-by-example

Some programs to learn the J programming language
J
6
star
38

friend-ratings

My 2-hour personal jam project. Amazon ratings for your friends.
Ruby
6
star
39

tileswap

Processing code to rearrange images to draw other images
HTML
6
star
40

ilictronix

The new ilictronix.com
Ruby
6
star
41

cleaver-retro

A dark retro theme for cleaver
CSS
6
star
42

lambda

playing around with the lambda calculus
OCaml
6
star
43

haskell-basic

A TinyBASIC interpreter written in Haskell
Haskell
5
star
44

try-j

J
5
star
45

melodica

a fun way to interact with the WebAudio API
JavaScript
5
star
46

j

Some code examples for the J programming language
J
5
star
47

try-ocaml

OCaml
5
star
48

curta

Simulator for a Curta Type I mechanical calculator
JavaScript
5
star
49

bs-redux-example

An experiment in writing Redux reducers using OCaml
JavaScript
5
star
50

wikidata-family-tree

Ancestry on wikidata
JavaScript
4
star
51

notion-script-blocks

script blocks in notion
JavaScript
4
star
52

gameoflife-factory

a webapp to make game of life GIFs
JavaScript
4
star
53

bismuth

An experimental Scheme
OCaml
4
star
54

code

This is my code.
Python
4
star
55

scheme-in-48-hours

My code for the "Write Yourself a Scheme in 48 Hours" eBook – http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
Haskell
4
star
56

parser.ml

"Functional Pearls" parsing in OCaml
OCaml
4
star
57

ocaml-micro

An experiment in running zeit/micro using ocaml + bucklescript
OCaml
4
star
58

artfile-web

ArtFile.bin extractor
TypeScript
4
star
59

Billiards.sb

Making a billiards game with Microsoft SmallBasic - http://smallbasic.com/
3
star
60

collatz.now.sh

generating SVGs from Collatz sequences
OCaml
3
star
61

notion-for-each-row

For each row in a Notion database, run a JavaScript function
JavaScript
3
star
62

board-next

Chess boards as a service using pgn-to-svg
TypeScript
3
star
63

ocaml-rationals

Rational numbers in OCaml
OCaml
3
star
64

32x32

JavaScript
3
star
65

murray

A chrome extension to make Bill Murray pop up in your Facebook threads (rarely)
JavaScript
3
star
66

stackjs

Playing around with function composition and stack-based languages
JavaScript
3
star
67

basic2020

BASIC 2020
JavaScript
3
star
68

gameoflife-3d

JavaScript
2
star
69

wordart

2
star
70

trackd

My entry for the 2014 Static Showdown
JavaScript
2
star
71

nim

The game of nim running over telnet
JavaScript
2
star
72

ocaml-calculator-game

Calculator: The Game solver
OCaml
2
star
73

tabindex

tab index visualization tool
JavaScript
2
star
74

word-by-word

Creating a story one word at a time.
JavaScript
2
star
75

bucklescript-vercel-example

OCaml (Bucklescript) + Vercel
Standard ML
2
star
76

99problems

I got 99 problems and haskell is a few of them.
Haskell
2
star
77

jupyter-notebooks

Jupyter Notebook
2
star
78

cs370-team-programming

CS370 Creative Problem Solving and Team Programming
C
2
star
79

adventofcode

Solutions for http://adventofcode.com/
Racket
2
star
80

ocaml-tictactoe

Playing around with some OCaml + Bucklescript + Express + Socket.io
OCaml
2
star
81

markov.rb

Simple Markov generator to produce realistic-looking names.
JavaScript
2
star
82

pgn-to-svg

Generates an SVG from PGN
TypeScript
1
star
83

factor-docker

Learning what this Docker thing is by way of a Factor web server
Factor
1
star
84

audio-graphing

Graph plotting questions without the graphs
JavaScript
1
star
85

picross

Interactive Picross element to experiment with React + Redux + redux-devtools
JavaScript
1
star
86

bismuth-ui

an experiment in structured editing
JavaScript
1
star
87

mockingbird.lean

Solutions to "To Mock a Mockingbird" using the Lean theorem prover
Lean
1
star
88

factor-work

Factor
1
star
89

notionml

OCaml
1
star
90

sabriel

Debrief tool
JavaScript
1
star
91

nodemorse

Real-time telegraph simulator written in node.js & coffeescript
CoffeeScript
1
star
92

notion-augment

Augment a Notion database on command
JavaScript
1
star
93

getxword

Fetches the NYTimes Crossword
Shell
1
star
94

combinatorial-games

An exploration of evaluating the results of games without chance (Nim, Tic-Tac-Toe) under perfect play.
OCaml
1
star
95

LightsOut

Lights Out! using JavaScript & HTML5 Canvas
JavaScript
1
star
96

gamejam

A (purely) HTML clicking game made in a 1-hour Game Jam for Stevens Game Development Club
JavaScript
1
star
97

rosalind.bqn

rosalind.info
1
star
98

99-ocaml-problems

https://ocaml.org/learn/tutorials/99problems.html
OCaml
1
star
99

recursion-lab

JavaScript
1
star
100

pixel

JavaScript
1
star