This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add core functionality and css tweeks to embedabble:
- Web3 integration - detects whether or not asset is owned by the account - Adds ability to buy the token - Adds ability to view/manage token if it is not for sale or owned - Additional dynamic content rendering logic for price and traits - Adds more component properties for increased customisation - Fixes backface blead from asset contract name - Moves from rollup to webpack for building and running dev server - Update readme with more usage details - [WIP] Adds some linting
- Loading branch information
1 parent
b6663de
commit ed9c75a
Showing
17 changed files
with
12,995 additions
and
7,242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.gitignore | ||
/dist | ||
This comment has been minimized.
Sorry, something went wrong. |
||
.git | ||
/example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# .prettierrc | ||
This comment has been minimized.
Sorry, something went wrong. |
||
semi: false | ||
useTabs: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,43 @@ | ||
# Embeddable NFTs | ||
Easily embed OpenSea listings in your website! | ||
|
||
### Component inputs | ||
|
||
`vertical` - If this is present the card will be rendered vertically. | ||
|
||
`width` - The width of the embeddable. Ex. values `100%` `250px` | ||
|
||
`height` - The height of the embeddable. Ex. values `40vh` `300px` | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
`contractAddress`\*- The token Id of the asset. | ||
|
||
`tokenId`\* - The token Id of the asset. | ||
|
||
`network` - The name of the network the asset is on `mainnet` or `rinkeby`. Defaults to `mainnet`. | ||
|
||
\*Required inputs | ||
|
||
Example: | ||
``` | ||
<nft-card | ||
vertical | ||
width="100%" | ||
height="250px" | ||
contractAddress="0x5caebd3b32e210e85ce3e9d51638b9c445481567" | ||
tokenId="2242579050293992223" | ||
This comment has been minimized.
Sorry, something went wrong.
alexanderatallah
Contributor
|
||
network="mainnet" | ||
> | ||
</nft-card> | ||
``` | ||
|
||
### Development | ||
For developers looking to contribute or modify the code use the following commands: | ||
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 | ||
npm install | ||
npm start | ||
npm run dev:demo | ||
``` | ||
|
||
#### Development server | ||
This project uses [rollup.js](https://rollupjs.org/guide/en/) 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. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
const presets = [ | ||
"@babel/preset-typescript", | ||
'@babel/preset-typescript', | ||
[ | ||
"@babel/preset-env", | ||
'@babel/preset-env', | ||
{ | ||
"targets": "last 2 Chrome version", | ||
"modules": false | ||
targets: 'last 2 Chrome version', | ||
modules: false | ||
} | ||
] | ||
] | ||
const plugins = [ | ||
'@babel/plugin-proposal-class-properties', | ||
['@babel/proposal-decorators', { decoratorsBeforeExport: true } ], | ||
]; | ||
['@babel/proposal-decorators', {decoratorsBeforeExport: true}] | ||
] | ||
|
||
module.exports = { plugins, presets }; | ||
module.exports = {plugins, presets} |
Oops, something went wrong.
nit: usually we omit the starting slash, if it works without that