Giter Site home page Giter Site logo

annotator's Introduction

annotator

Got an image you want to point details out on? annotator creates embeddable HTML to help users dive in to details on a document. Here's an example.

It consists of a builder and an engine. The builder creates embeds, the engine renders embeds on to the page.

Screenshot

get started in 30 seconds

I wish to annotate an image and generate an embed

The builder is located at ./builder/index.html.

Please note: You will need to host dist/annotator.min.js yourself before putting an embed live. Read on for how to do that...

I wish to get the annotator engine working for our organisation

Get the latest version of yarn (0.21+): https://yarnpkg.com/en/

Then just run yarn in the repository folder.

This will grab the packages it needs, then use grunt to build the distributable engine. Once that's done, it'll watch for changes in engine/, rebuilding when it sees them.

The two main files to modify are engine/js/annotator.js and engine/sass/annotator.scss. It will build to the single file dist/annotator.min.js, which you can then upload to your own infrastructure.

We would recommend at minimum changing the following to your requirements:

  • builder/builder-config.js to point to your distributable
  • engine/sass/annotator.sass to meet your own styling requirements
  • engine/js/plugins/ to match your environment - analytics, image hosting, etc
  • We use the <!-- UKNF --> tag to mark our embeds as special in the BuzzFeed CMS. You probably won't need this tag, so feel free to remove it.

Be aware: annotator will add the following to the global scope of your page.

  • Styling which is applied to page objects with a parent class of .annotated_media
  • window.annotate_media and window.annotate_tools are new JS globals which may be called

annotator is powered primarily by a cut-down version of jQuery.

annotator's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

dearmortals

annotator's Issues

Support for an image hosting step

Ideally as a plugin of some kind.

BuzzFeed supports image upload as a service, and others will too; do it in as unopinionated way as possible.

Multi-embed problems

On slow networks, loading out-of-order occurs. Going to check for .last() and similar suspects not being bounded by their parent container

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.