Take me over?The maintainer of this distribution is looking for someone to take over! If you're interested then please contact them via email.
- TECHNOLOGIES USED
- SOURCE REPOSITORY
- COPYRIGHT AND LICENSE
App::MojoSlides - Write your presentations in Perl and Mojolicious!
$ mojo_slides mypresentation.pl daemon
This application lets you write presentations using the simple Perlish syntax that Mojo::Template provides for Mojolicious. It follows a similar model to LaTeX Beamer in structure and usage, though it is not nearly as full featured.
This software is in alpha form at best. It may eat baby kittens at any moment.
Each presentation needs a configuration file. This file is loaded by the
mojo_slides application via Mojolicious::Plugin::Config, and as such may use any functionality it provides. Additionally, when the file is loaded one helper
presentation_file will have been added which can be used to reference the file and its path (see more below).
The file must evaluate to a hash reference, as all Mojolicious config files must. The application will look for several keys which establish the presentation.
A hash reference used to create the App::MojoSlides::Slides object which organizes the slide order, etc. See that module for documentation on how to use it. Usually this value will be a number, representing the ordinal number of the last slide in the case of numbered templates, or else an array reference of the names of the templates in display order.
If true, it will load Mojolicious::Plugin::PPI to allow code highlighting using that plugin. The API for this key is still influx, but that much is probably not going to change.
Use this key to specify which directories contain your slides. Your slides are actually Mojolicious Templates (see Mojolicious::Guides::Rendering and Mojo::Template for more on that). This key takes a string or arrayref of strings which are prepended to the app's template directories.
If true, the bootstrap-theme.min.css file will be included in the default layout.
If true (by default), wrap lots more html tags into tag helpers from App::MojoSlides::MoreTagHelpers.
The name of the template to be included as the header or footer. Defaults to
ms_footerrespectively. Set to
undefto not include any template.
A code reference that is called as a method against the application as late as possible in the setup method. This lets you do any final actions that need to be done after the configuration has been loaded.
Emulating Mojolicious::Lite, you may also include slides (templates) in the
__DATA__ section of your configuration file!
As I have said, the slides are just Mojolicious Templates, and such they have certain structure. If you don't understand that, go read about it in the Mojolicious::Guides.
The basic layout uses the standard
title helper to set both the webpage title and a centered
h1 at the top of the page. Other helpers are provided, such as:
Each returns the slide number for the slide in question.
nextare smart enough to not leave the expected bounds of
%= row begin row contents % end
Creates a div with the Bootstrap
rowclass. Takes a string or template block like Mojolicious'
taghelper does, though you probably mean block.
%= column 6 => begin column contents % end %= column [3, 'offset-3'] => begin column contents % end
Creates a div of a given width (a number out of 12, see Bootstrap). Takes that width and a string or template block, though again, you probably mean block. To give more than one class, pass an array reference. Each class is prepended by
%= overlay '2-4' => begin Stuff to show only on increments 2 through 4 % end
Creates a div with the attribute
ms_overlaywhich the css/js bits of the system use for incrementing slides. The syntax of the specification follows LaTeX Beamer, which is like
2-to show an item from increment 2 onwards and so on.
ms_overlay="2-4"to nearly any HTML tag will work as expect too!
%= vspace '50px' <div style="min-height: 50px;"></div>
Adds a section of vertical space of a given height.
Plus the tag helpers from App::MojoSlides::MoreTagHelpers if the configuration option is true.
- if desired for Perl code highlighting
This module is dedicated to the organizers and attendees of YAPC::Brazil 2013. They were kind enough to invite me as their keynote speaker and in turn I wrote this application to present that talk, so I owe them a debt of thanks on both accounts.
Joel Berger, <email@example.com>
Copyright (C) 2013 by Joel Berger
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.