Giter Site home page Giter Site logo

airppt-renderer's Introduction

Project Overview

Wouldn't it be great if we could use a slideshow canvas as WSIWYG editor to rapidly design and ship UIs or start coding?

Airppt was built from the ground up to utilize the design elements of PPT presentations and reuse them anywhere. It is built with modularity, extensibility and flexibility in mind whilst abstracting a lot of the complexity. It's not a direct PPTX -> HTML converter; more like PPTX -> JSON -> HTML instead.

I'd also love for you to contribute. New to open source? I'm happy to walkthrough how to close your first issue. Pick a time that works best for you.

airppt-renderer

The renderer is a module designed to convert from standardized airppt JSON powerpoint elements to HTML/CSS.

You can see all of the implemented renderers here. They can be either a Shape or a Speciality type.

The gist of a renderer is to convert a valid PowerpointElement with the correct HTML and CSS.

Each specific renderer is an implemention of an abstract renderer class as follows. We determine which specific renderer to use at runtime depending on the element type:

abstract class ElementRenderer {
	//jquery is available for your use
	protected $ = jquery(new jsdom.JSDOM().window);

	//beautify is available to make your CSS clean
	protected beautify = textBeautify;

	//See Interface Definitions Below
	constructor(
		protected scaler: GridScaler,
		protected element: PowerpointElement,
		protected powerpointDetails: PowerpointDetails,
		protected rendererOptions: RendererOptions
	);

	//each renderer MUST implement these
	public abstract getHTML(): string;
	public abstract getCSS(): string;

	//You SHOULD call this and return it as part of your getCSS implementation
	protected getPositionCSS() {}

	//useful function that converts powerpoint tiff image paths
	protected getOutputImagePath(tiffPath) {}
}

airppt-renderer's People

Contributors

rlingineni 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.