Giter VIP home page Giter VIP logo

ad-customisation's Introduction

AD Customisation

Overview

This project is a simple canvas-like editor implemented using React for the UI and vanilla HTML Canvas with Classes and OOP concepts for the canvas functionality. Users can select an image to be placed within a mask on the canvas, change the caption text, modify the call to action (CTA) text, and adjust the background color of the template.

Features

  • Users can select an image to be placed within a mask on the canvas.
  • Caption text can be changed by the users.
  • Call to action (CTA) text can be modified with a text input.
  • Users can change the background color of the template.
  • The canvas implementation is done using Classes and OOP concepts.
  • No external libraries like fabric.js are used.
  • The UI is designed using React functional components.
  • Tailwind CSS is used for styling.

Template JSON Data

The template data is provided in JSON format, including information about the caption, CTA, image mask, and URLs for mask, mask stroke, and design pattern.

Instructions

  1. Clone the repository.
  2. Install dependencies with npm install.
  3. Run the development server with npm start.
  4. Open your browser and navigate to http://localhost:3000.

Canvas Implementation Logic

The canvas height and width are set to 1080px * 1080px, and CSS or inline styles are used to scale down the canvas for display. The original canvas dimensions are kept as 1080 x 1080. The canvas functionality is implemented using OOP concepts and Classes.

Template Data Breakdown

  • Caption: The main caption text within the image.

    • Text
    • Position
    • Font Size
    • Alignment
    • Text Color
    • Max Characters Per Line
  • CTA: The call to action part of the template.

    • Text
    • Position
    • Font Size
    • Text Color
    • Background Color
    • Wrap Length
  • Image Mask: The mask area within which the user-selected image is displayed.

  • URLs: URLs for mask, mask stroke, and design pattern.

Preview

  • Template Background: The default background color and the option for users to change it.

Order of Elements

Elements are considered as layers, with the background color being the first layer and the text being the last layer. The order of elements is: background color < design pattern < mask < mask stroke < text.

ad-customisation's People

Contributors

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