# Embeds

Two widgets show internacia-db data on other sites. Each widget is a small page on this site: put it in an `<iframe>`, or add the `<internacia-embed>` element, which sizes the frame to its content. Every widget links to its card and shows the data version and licence.

## Membership map of an organization or grouping

`https://internacia.io/embed/blocks/{id}/`, with the intblock ID in lowercase. The map colours member countries and territories by status; each one has a tooltip and can be reached with the keyboard. Offered for every intblock whose roster has countries or territories on the map; the card has the code under "Embed this map".

```html
<iframe src="https://internacia.io/embed/blocks/eu/" title="European Union (EU): membership map (Internacia)" width="100%" height="480" style="border:0" loading="lazy"></iframe>
```

## Memberships of a country

`https://internacia.io/embed/countries/{code}/`, with the ISO 3166-1 alpha-2 code in lowercase. Current memberships, grouped by block type, largest groups first. Offered for every country or territory with current memberships.

```html
<iframe src="https://internacia.io/embed/countries/fr/" title="France: memberships in international organizations (Internacia)" width="100%" height="480" style="border:0" loading="lazy"></iframe>
```

## Web component

```html
<script src="https://internacia.io/embed/widget.js" defer></script>
<internacia-embed block="EU"><a href="https://internacia.io/blocks/eu/">European Union (EU) on Internacia</a></internacia-embed>
```

- `block="ID"` or `country="CODE"` selects the widget.
- `theme="light"` or `theme="dark"` fixes the colour theme; by default the widget follows the reader's system setting.
- The link inside the element is shown until the script runs, and stays if scripts are blocked.

A plain iframe is 480 pixels high by default; change `height` to fit your page. For a fixed theme in an iframe, add `?theme=light` or `?theme=dark` to its URL.

## Attribution

Keep the widget's footer visible. The data are CC BY 4.0 (internacia-db by Dateno); country centroids, used for the dots of small territories, are ODbL 1.0 (mledoze/countries); the base map is Natural Earth (public domain), and its boundaries do not imply endorsement.

## Privacy

Widgets set no cookies, use no storage and load nothing from other hosts. The only message a widget sends to the page around it is its height and title, which the web component uses to size the frame.
