Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #18 from taylorjdawson/feature/refferal-link
Browse files Browse the repository at this point in the history
Adds referral option
  • Loading branch information
sunwrobert authored Mar 8, 2021
2 parents 1700a4f + c3b1845 commit 805eb8a
Show file tree
Hide file tree
Showing 9 changed files with 9,115 additions and 12,283 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,56 @@
<img style="border-radius: 8px" src="assets/embedable-nfts.png" />

<br /><br />

# Embeddable NFTs

Easily embed OpenSea listings in your website!

### Component inputs

`horizontal` - If this is present, the card will be rendered horizontally.
`tokenAddress`\*- The token's contract address.

`orientationMode` - If `auto` the card will switch to vertical
`tokenId`\* - The token Id of the asset.

`horizontal` - If this is present, the card will be rendered horizontally.
mode on mobile (breakpoint is at 600px). In `manual` mode the card will be unaffected.

`orientationMode` - If `auto` the card will switch to vertical

`width` - The width of the embeddable. Ex. values `100%` `250px`. Default: `388px`

`height` - The height of the embeddable. Ex. values `40vh` `300px`. Default: `560px`

`tokenAddress`\*- The token's contract address.

`tokenId`\* - The token Id of the asset.

`network` - The name of the network the asset is on `mainnet` or `rinkeby`. Default: `mainnet`.

`referrerAddress` - The address of the referrer. Check out the [SDK docs](https://github.com/ProjectOpenSea/opensea-js#affiliate-program) to learn more about the Affiliate program.

\*Required inputs

### Usage

Add this to your `<head>` tag:

```
<script src="https://unpkg.com/embeddable-nfts/dist/nft-card.min.js"></script>
```

Then add this into your code:

```
<nft-card
tokenAddress="0x5caebd3b32e210e85ce3e9d51638b9c445481567"
tokenId="2242579050293992223"
network="mainnet"
referrerAddress="YOUR_ADDRESS_HERE"
>
</nft-card>
```

### Development

For developers looking to contribute or modify the code, or view the example use the following commands:

```bash
git clone https://github.com/ProjectOpenSea/embeddable_nfts.git
cd embeddable_nfts
Expand All @@ -47,4 +59,5 @@ For developers looking to contribute or modify the code, or view the example use
```

#### Development server

This project uses webpack for building and running a development server. Once the server starts, any changes made will trigger a rebuild after which those changes should be reflected in your browser.
Binary file added assets/embedable-nfts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
237 changes: 120 additions & 117 deletions dist/nft-card.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/nft-card.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 805eb8a

Please sign in to comment.