diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..feb2325 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +VITE_TS_TOKEN= diff --git a/.gitignore b/.gitignore index 5996c5b..009bbc5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ .DS_Store dist/ types/ +.env diff --git a/README.md b/README.md index 98482be..36508e1 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,21 @@ Directly from unpkg.com ``` +## Rendering multiple banners with one slot ID + +You can render multiple banners using the same slot ID and dimensions by setting up +a banner context. This is useful when you want to run an auction with multiple results. +To do that you have to pass the attribute `context="true"` to the `topsort-banner` and +use `topsort-banner-slot` as children elements. + +```html + + + + + +``` + # Banner Attributes | Name | Type | Description | @@ -58,11 +73,17 @@ Directly from unpkg.com | category-disjunctions* | Optional String | Comma (,) separated list of category IDs, the item must match any | | search-query | Optional String | The search query of the current page | | location | Optional String | The location for geotargeting | -| new-tab | Optional Boolean | Opens the banner's link in a new tab (defaults to false) | +| new-tab | Optional Boolean | Opens the banner's link in a new tab (defaults to false) | +| context | Optional Boolean | Uses the element as a context provider to render multiple banners | \* Only one of `[category-id, category-ids, category-disjunctions]` must be set. If multiple are set, only the first will be considered, in that order. +# Banner Slot Attributes +| Name | Type | Description | +|------|--------|-----------------------------------------------------------------------------------------------------------------------| +| rank | Number | The ranking of the slot. Ranks should be sorted the same as the winning bids. The lower the rank, the higher the bid | + # Banner Behaviors | Function Name | Arg type | Return Type | Description | diff --git a/index.html b/index.html index 8fec5f4..50ac9c7 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@