Git Product home page Git Product logo

html-generator-npm's Introduction

html-generator-npm v1.0.3

A Node.js package that generates HTML code from the server side.

Installation

Using npm: npm i html-generator-npm

Usage

var htmlGenerator = require('html-generator-npm') //include the package

htmlGenerator.initiateFile() //initiate file
htmlGenerator.appendParagraph("Hello World", "text-left") //add a left aligned paragraph
htmlGenerator.endFile() //close all the tags using endFile()
//htmlGenerator.formatFile() //format using toris-format

Functions

  • initiateFile(): must be called first, initiates the file with basic HTML tags
  • appendButton(text, color): text to be written on the button, color must be written in bootstrap class name format i.e. btn-primary
  • appendHeading(text, heading): text must be the heading content, heading must specify the number i.e "1" for "h1" in HTML
  • appendInputField(type, placeholder): type is the type of input (email, password, etc), placeholder text
  • appendCard(cardTitle, cardImageURL, cardBody, width): width must be in px
  • appendParagraph(text, alignment): text to be written in the paragraph, alignment must be written in bootstrap class name format i.e. text-left
  • appendIframe(url, height, width): url that you want to add in the iframe, height and width of the iframe
  • endFile(): must be called towards the end, closes the basic HTML tags
  • formatFile(): must be called last; uses a dependency, toris-format

Contribution

  • This is an open-source project, and shall continue to remain so! Make a pull request! All contributions are welcome :D
  • For major changes, please open an issue first to discuss what you would like to change.

License

MIT

html-generator-npm's People

Contributors

albatrosspreacher avatar

Stargazers

 avatar  avatar

Watchers

 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.