GithubHelp home page GithubHelp logo

pilhuhn / asciidoctor-backends Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asciidoctor/asciidoctor-backends

0.0 2.0 0.0 185 KB

Backends (i.e., templates) for Asciidoctor, a Ruby port of AsciiDoc.

Home Page: http://asciidoctor.org

Ruby 100.00%

asciidoctor-backends's Introduction

Asciidoctor Backends

This repository hosts an assortment of backends (i.e., templates) for Asciidoctor, a pure Ruby port of the AsciiDoc markup language.

In this repository, you’ll find replicas of both the html5 and docbook45 backends from AsciiDoc (and Asciidoctor) written in both Haml and Slim, as well as backends for generating HTML5 presentations from AsciiDoc.

General Usage Instructions

Coming soon…​

deck.js Backend

The deck.js backend is a collection of Haml templates which transform an AsciiDoc document to HTML5 slides animated by deck.js.

Installation

First, you should download (or git clone) the asciidoctor-backends repository to a convenient location.

git clone git://github.com/asciidoctor/asciidoctor-backends.git

Then from your working directory (that is where your AsciiDoc document resides) you must create a deck.js directory and copy there the deck.js file with its directories (extensions, themes, …​). You could also just clone the [deck.js] repository.

git clone git://github.com/imakewebthings/deck.js.git

If you are planning to split your slides you also need to copy to extensions directory the deck.split.js file which can be downloaded from GitHub.

Also if you want to use the fullscreen photo feature you must create an images directory.

Settings

There are some attributes that can be set at the top of the document which they are specific of deckjs backend.

Attribute Description

:deckjs_theme: <theme>

where you set the deck.js theme. For example: web-2.0

:deckjs_transition: <type>

where you set the kind of transition. For example: horizontal-slide

:customjs: <javascript location>

where you set a custom javascript file. It can be used as a deck.js custom configuration.

:customcss: <css location>

where you set a custom css file.

:navigation:

the presence of this attribute makes deck.js to render a back/next icons.

:status:

the presence of this attribute makes deck.js to render current slide and total number of slides.

:split:

with this attribute we are registering the deck.split.js file.

Note
You can also specify a custom stylesheet using the stylesheet attribute, which can be used to customize AsciiDoc elements like section, paragraph, images, etc…​

Examples

Let’s see some examples of deckjs backend features:

= Title Slide
Presenter Name

== Slide One

Foo

Bar

World

[canvas-image="./images/cosplay.jpg"]
== Slide Two

[role="canvas-caption", position="center-up"]
Hello World - Good Bye Cruel World

In previous snippet we are creating a slide without a title (Slide One will not be shown), but a fullscreen image as background will be embedded, and centered at top of the slide and over the image the message ``Hello World - Good Bye Cruel World''.

Some things to consider:

  • canvas-image attribute receives as parameter the location of image we want to use and always must go before section.

  • if you are planning to add a message over the image, you can do it as usually, but probably won’t be read good, using position attribute which positions text into the slide (bottom-left, top-left, bottom-right, top-right, center-up, center-down) and canvas-caption role will improve so much how text is rendered.

== Another Slide

[options="step"]
That's all.

[options="step"]
My Folks

In previous example we are creating one slide which instead of showing both paragraphs at the same time, will be presented each time you try to go to next slide.

And the same can be applied to lists, images, quotes, code:

== Yet Another Slide

[options="step"]
* A
* B
* C

In this case each bullet will appear to screen each time you try to go to next slide.

Warning
The original deckjs backend for AsciiDoc used the option name 'incremental' instead of 'step'. We’ve changed it here to save you some typing :)

Rendering

First, make sure Asciidoctor is installed:

gem install asciidoctor

Then, to render your presentation as HTML5, simply execute the command:

asciidoctor -T <backend directory> <asciidoc file>

Stay Connected

If you need any other feature supported by deckjs to be ported to this backend, any way to make it better or you find any bug do not hesitate to open an issue.

asciidoctor-backends's People

Contributors

lightguard avatar lordofthejars avatar mojavelinux avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.