| dist | ||
| public | ||
| src | ||
| .eslintrc.js | ||
| .gitignore | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| webpack.config.js | ||
Presentationmaker.js
What is
A simple(ish) tool to create presentation from XML source. For those who fight against typical presentation tools.
Features
- HTML output for use in browser
- input from XML file (either single file or embedded into HTML)
- transition between pages
- HTML in elements supported
- Custom templates, you define them, combine them and use it
- powerful calculation inside description and templates thanks to fparser
- presentation can be formatted via normal CSS
Installation
If you just want to use it, take a look at the public/index.html file. It is a good start to use it. Additionally, you need the public/presentationmaker.js script. The CSS is optional, but encouraged. It provides all the needed boilerplate to get you running.
Development
If you want to help with development or want to see live updates if you change your xml, check out the project and use
npm install
npx webpack serve
and a browser pointing to localhost:8080
Usage
The main presentation file is pure XML with a <presentation> root node. Below this there are
<defintions>
These are in the form of
<name>value<name>
Later "name" can be used via ${name} in the templates/pages
<modules>
Similar to the definitions, a <module_name>...</module_name>
Creates a module that can be used later.
The module itself can use other previously defined modules as
<module_name optional="value">optional inner content</module_name>
The parameter you add during use will be available to the module as ${optional}
Existing internal modules are
calc
Calculates a formula and stores the result in a variable for later use. Parameters:
namethe name of the variable inner text is the formular to be used to calculate the value
img
Shows an image. Parameters:
srcfile name of the imagexLeft position of the image (relative to the page)yTop position of the image (relative to the page)widthImage widthheightImage height
options
Creates an effect or transformation layer to affect content that is rendered inside. Parameters:
opacityoptional opacity value 0: fully transparent, 1: fully visibleblendmodeoptional one the https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode valuesflipoptional flipping of the image (currently only y supported)rotaterotation values in X,Y,Z formyoptional y axis to flip at Inner XML is the content to display
text
Show a text in an invisible bounding box. Parameters:
x0left side of the bounding box.y0top side of the bounding box.x1right side of the bounding box (mutally exclusive to width)y1bottom side of the bounding box (mutally exclisve to height)posshortcut to x0,y0,x1,y1 (mutually exclusive to above values)halignhorizontal alignment in the bounding box, possible values:left,center,right, defaults tocentervalignvertical alignment in the bounding box, possible value:top,center,bottom, default totopfontsizeoptional font size in pixelcoloroptional color Inside the XML is the text to display
page
This is the section for the actual pages to show. In the pages, modules, variables as well as calulation can be used. Parameters:
idoptional id of the page (useful for CSS styling)widthpage width, default to thewidthvariable in the definitions sectionheightpage height, default to theheightvariable in the definitions sectionxX position of the page in the canvas, defaults to 0yY position of the page in the canvas, defaults to 0zZ position of the page in the canvas, defaults to 0rxrotation of the page on the X-Axis in °, defaults to 0ryrotation of the page on the Y-Axis in °, defaults to 0rzrotation of the page on the Z-Axis in °, defaults to 0vxviewport position in X, defaults toxvyviewport position in Y, defaults toyvzviewport position in Z, defaults tozvwidthviewport width, defaults towidthvheightviewport width, defaults toheightvrxrotation of the vieport on the X-Axis in °, defaults to 0vryrotation of the vieport on the Y-Axis in °, defaults to 0vrzrotation of the vieport on the Z-Axis in °, defaults to 0namename of the page (shown in drop down), defaults to page number
