A HTML based presentation framework for Elixir.
Why use Presentex?
- It has very simple understandable HTML, CSS and JavaScript
- It works offline
- It has only three dependencies
- jQuery
- highlight.js
- flowtype.js
- It has a very simple way to provide Elixir code samples
- It uses a larger default font size than most presentation frameworks
- All slides are generated from Elixir data structures
- presentex: LICENSE
- highlight.js: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
- jQuery: https://github.com/jquery/jquery/blob/master/LICENSE.txt
- flowtype.js: https://github.com/simplefocus/FlowType.JS/blob/master/LICENSE.txt
Add the dependency to your mix.exs file:
defp deps do
[{:presentex, "~> 0.0.10"}]
end
Make sure that you do not use version 0.0.1, it will not work.
Do *NOT* use version 0.0.1, it is known to be buggy.
You can create Presentex presentations using the standard Elixir tool mix.
- Create a mix project if you don't have one already
- Create a file with the content of your slides
- Run
mix gen.presentation <output-dir> <slide-content-file>
Then simply open the /index.html file in your browser. No internet connection is required.
The slides all belong in one file. They are separated by commas.
View a sample slide file at test/sample_slides.ex
The generated output of test/sample_slides.ex is also checked in under the sample directory.
The slide types are:
[title: "Elixir for noobs", subtitle: "A better way to program"]
[heading: "New Features"]
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua."
["Improved error handling", "Fixed memory leak in mysql driver",
"Added UTF-8 support in library"]
[blockquote: "To code, or not to code. That is a dumb question.",
author: "Bryan Weber"]
There are three different ways to include Elixir code.
Source.code(
defmodule Ticket do
def process(tkt, new_status) do
tkt
|> Workflow.Engine.status
|> Workflow.Engine.transition new_status
end
end
)
[elixir: """
defmodule Foo do
def bar do
IO.puts "quux"
end
end
"""]
[code: """
defmodule Foo do
def bar do
IO.puts "quux"
end
end
"""]
The list of supported languages can be found at highlight.js
[code: """
PrepareAlarm = fun(Room) ->
io:format("Alarm set in ~s.~n",[Room]),
fun() -> io:format(
"Alarm tripped in ~s! Call Batman!~n",
[Room])
end
end.
""", lang: "erlang"]
<div>
<blink>We don't miss these days...</blink>
</div>
Changing title only slide type to heading.
Changing default style from 'idea' to 'tomorrow'.
Fixing the font sizes to not be quite so large.
Fixing the css so flowtype.js actually resizes text.
Added flowtype.js for smarter font size handling.
Fixed a formatting issue with Elixir source code.
Added documentation
Added [elixir: "
Added mix task that generates the presentation based on the slides input.
Buggy release, do NOT use this version.