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

Commit

Permalink
Add core functionality and css tweeks to embedabble:
Browse files Browse the repository at this point in the history
 - 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
taylorjdawson committed Jan 20, 2020
1 parent b6663de commit ed9c75a
Show file tree
Hide file tree
Showing 17 changed files with 12,995 additions and 7,242 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.gitignore
/dist

This comment has been minimized.

Copy link
@alexanderatallah

alexanderatallah Jan 20, 2020

Contributor

nit: usually we omit the starting slash, if it works without that

.git
/example
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# .prettierrc

This comment has been minimized.

Copy link
@alexanderatallah

alexanderatallah Jan 20, 2020

Contributor

nit: can remove this

semi: false
useTabs: false
35 changes: 32 additions & 3 deletions README.md
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.

Copy link
@alexanderatallah

alexanderatallah Jan 20, 2020

Contributor

what's the default?


`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.

Copy link
@alexanderatallah

alexanderatallah Jan 20, 2020

Contributor

reminder: typescript checking the repo. (e.g. why didn't the misspelled "acount" get caught)

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.
14 changes: 7 additions & 7 deletions babel.config.js
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}
Loading

0 comments on commit ed9c75a

Please sign in to comment.