Giter Club home page Giter Club logo

blm-generator's Introduction

Black Lives Matter <script> generator form

This application is meant to be used in combination with the BLM Banner project

It allows users to generate the injection script with a different company name and colors.

Customize the DOM Injection Root

If you'd like to embed this script on your own site, but don't want to use an element with the id="root", you can pass the element ID you'd like the script to inject into via the data-inject-id tag on the script.

<script src="dist/blm.generator.js" data-inject-id="blmRoot"></script>

NOTE: For now, you need to make sure that the element you're injecting into exists by the time this script is invoked. Generally this means putting the script at the bottom of the <body>

Customize Script URL for Injection

If you decide to fork blm-banner but want to use this app for generation still, you can specify the script URL used in the code snippet using data-script-url.

<script src="dist/blm.generator.js" data-script-url="//example.com/forked.blm.min.js"></script>

Development

First things first, run npm ci in order to install the dependencies you will need to develop the project.

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run build

Builds the bundle for production using rollup to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

blm-generator's People

Contributors

emhagman avatar msp95 avatar hariganesan avatar hijonathan avatar samhagman avatar pseudovirtual avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar  avatar  avatar  avatar

Forkers

hijonathan

blm-generator's Issues

Improvement - CORS error in local development

When testing the script generated on my local, I get a CORS error in the console, which only appears to happen for local development but not for production environments. This is likely because the origin is null when running the script locally. Ideally, the script would just say that it's working and print a helpful message telling me it's ok on my local and that it will work in production.

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.