| 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 image
- xLeft position of the image (relative to the page)
- yTop position of the image (relative to the page)
- widthImage width
- heightImage height
options
Creates an effect or transformation layer to affect content that is rendered inside. Parameters:
- opacityoptional opacity value 0: fully transparent, 1: fully visible
- blendmodeoptional one the https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode values
- flipoptional flipping of the image (currently only y supported)
- rotaterotation values in X,Y,Z form
- yoptional 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 to- center
- valignvertical alignment in the bounding box, possible value:- top,- center,- bottom, default to- top
- fontsizeoptional font size in pixel
- coloroptional 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 the- widthvariable in the definitions section
- heightpage height, default to the- heightvariable in the definitions section
- xX position of the page in the canvas, defaults to 0
- yY position of the page in the canvas, defaults to 0
- zZ position of the page in the canvas, defaults to 0
- rxrotation of the page on the X-Axis in °, defaults to 0
- ryrotation of the page on the Y-Axis in °, defaults to 0
- rzrotation of the page on the Z-Axis in °, defaults to 0
- vxviewport position in X, defaults to- x
- vyviewport position in Y, defaults to- y
- vzviewport position in Z, defaults to- z
- vwidthviewport width, defaults to- width
- vheightviewport width, defaults to- height
- vrxrotation of the vieport on the X-Axis in °, defaults to 0
- vryrotation of the vieport on the Y-Axis in °, defaults to 0
- vrzrotation of the vieport on the Z-Axis in °, defaults to 0
- namename of the page (shown in drop down), defaults to page number
 
			