3.2.1 • Published 5 years ago

awezapopup v3.2.1

Weekly downloads
1
License
GPL-3.0-only
Repository
-
Last release
5 years ago

npm.io CircleCI

Aweza Popup

A popup for the Aweza platform based on tippy.js

Install

Yarn

yarn add awezapopup

NPM

npm install --save awezapopup

CDN

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/awezapopup@3.1.7/dist/aweza-popup.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css"/>
<script src="https://cdn.jsdelivr.net/npm/awezapopup@3.1.7/dist/aweza-popup.min.js"></script>

Usage

AwezaPopup(options)

Options

  • dataUrl: The URL of the Aweza API (optional)
  • headers: An object containing custom request headers. Required for Authentication.
  • preferLang: The two digit ISO 639-1 language code of the prefered language to translate to.

Examples

Using modules + SASS

import AwezaPopup from 'awezapopup';

AwezaPopup({
  headers: {
    "AWEZA-KEY": 'a9e4........d302',
    "AWEZA-SECRET": '07ecf........b375'
  }
})
@import "~awezapopup/dist/aweza-popup.min.css";
@import "~katex/dist/katex.min.css";

Using CDN

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/awezapopup@3.1.7/dist/aweza-popup.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css"/>
<script src="https://cdn.jsdelivr.net/npm/awezapopup@3.1.7/dist/aweza-popup.min.js"></script>
<script>
    window.AwezaPopup({
      headers: {
        "AWEZA-KEY": 'a9e4........d302',
        "AWEZA-SECRET": '07ecf........b375'
      }
    })
</script>

Awezification

Wrap the target in a span with a data-aweza attribute where the value is the ID of the term

<span data-aweza="3">Road</span>

Development

To run the file watchers and a php dev server, use the script provided

./dev.sh
3.2.1

5 years ago

3.2.0

5 years ago

3.1.7

5 years ago

3.1.6

5 years ago

3.1.5

5 years ago

3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.3

6 years ago

1.0.1

6 years ago