1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

Fixed marketplace-customisation broken image links

This commit is contained in:
Anamaria Loznianu 2023-04-06 15:56:50 +03:00
parent ea169752dc
commit e47e83617d
2 changed files with 25 additions and 25 deletions

View File

@ -28,25 +28,25 @@ Its now time to open up your favorite code editor and start getting stuck int
Lets start by searching and replacing “Ocean Marketplace”. In VS Code there is a magnifying glass symbol in the left-hand panel (arrow 1 in the image below) that will open up the interface for searching and replacing text. Type “Ocean Marketplace” into the first textbox, and the name of your marketplace into the second textbox (arrow 2). To make things simple, there is a button to the right of the second textbox (arrow 3) that will replace all instances at once. You can take a moment to review all the text youre changing if you wish, and then click this button.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-3.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-3.png)
Next up, we need to repeat the process but this time well be searching and replacing “Ocean Market”. As you can see in the screenshot below, we have called our fork “Crypto Photos Market”.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-4.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-4.png)
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-4.1.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-4.1.png)
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-4.2.jpg)
![Market Customisation](../../.gitbook/assets/market/market-customisation-4.2.jpg)
Now lets change the tagline of your site. Open up the folder called “content” and then open the file called “site.json”.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-5.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-5.png)
On line 3 in this file you can enter the tagline that you want for your marketplace.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-6.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-6.png)
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-6.1.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-6.1.png)
## Change the Logo
@ -60,7 +60,7 @@ Delete the “logo.svg” file from that folder and paste your own logo in the s
At this point, its a good idea to check how things are looking. First check that you have saved all of your changes, then cancel the build thats running in your terminal (Ctrl + C OR Cmnd + C) and start it again `npm start`. Once the build has finished, navigate to http://localhost:8000/ and see how things look.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-7.1.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-7.1.png)
Awesome! Our logo is looking great!
@ -78,18 +78,18 @@ src/components/App/index.module.css
Youll notice in the screenshot above that we are setting our “wave” background on line 3. Here, youll want to use your own background color or image. For this example, well use an SVG background from [here](https://www.svgbackgrounds.com/). First, we save the new background image into the src/images/ folder (same folder as the logo), then we change the CSS to the file location of the new background (see line 3 in the image below).
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-8.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-8.png)
If we save this file and view the site at this point, we get a white section at the top (see image below). And youll also notice that the background doesnt fill all the way down to the bottom of the screen.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-10.1.png)
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-10.2.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-10.1.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-10.2.png)
To fix this, we need to change the starting position of the background image and change it from no-repeat to repeat. We can do this on line 3.
When we view our marketplace, we can see that the new background starts at the top and fills the whole page. Perfect!
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-11.1.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-11.1.png)
## Brand Colors
@ -97,7 +97,7 @@ Next up, lets change the background colors to match your individual style. Op
You can change these colors as much as you wish until youre happy with how everything looks. Each time you save your changes, the site will immediately update so you can see how things look. You can see the styles chosen for this example in the image below.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-12.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-12.png)
## Change Fonts
@ -111,41 +111,41 @@ If you are importing fonts, such as from Google fonts, you need to make sure tha
As with the color changes, its a good idea to save the file with each change and check if the site is looking the way that you expected it to. You can see our eclectic choices below.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-13.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-13.png)
## Customize the Publish Form
Lets head to the publish page to see what it looks like with our new styling - so far, so good. But there is one major issue, the publish form is still telling people to publish datasets. On our new marketplace, we want people to publish and sell their photos, so were going to have to make some changes here.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-14.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-14.png)
Open up the index.json file from content/publish/index.json - here we change the text to explain that this form is for publishing photos.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-15.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-15.png)
Additionally, the asset type current says dataset, and we need to change this so that it says photo. The simplest way to do this is to change the title of the asset type without changing anything else. Ocean can handle selling any digital asset that can be accessed via a URL, so no further changes are needed to accommodate selling photos.
Open up src/components/Publish/Metadata/index.tsx and change line 28 so that it says Photo
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-18.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-18.png)
Great, now our publish page explains that users should be publishing photos and photo is provided as an asset type option. Well also leave algorithm as an option in case some data scientists want to do some analysis or image transformation on the photos.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-19.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-19.png)
There is one more thing that is fun to change before we move away from the publish form. Youll notice that Ocean Market V4 now has a cool SVG generation feature that creates the images for the Data NFT. It creates a series of pink waves. Lets change this so that it uses our brand colors in the waves!
Open up /src/@utils/SvgWaves.ts and have a look at lines 27 to 30 where the colors are specified. Currently, the pink color is the one used in the svg generator. You can replace this with your own brand color:
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-21.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-21.png)
If youre interested in doing some further customization, take a look at lines 53 to 64. You can change these properties to alter how the image looks. Feel free to play around with it. Weve increased the number of layers from 4 to 5.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-22.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-22.png)
And now your customized publish page is ready for your customers:
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-20.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-20.png)
## Change the Fee Address
@ -153,7 +153,7 @@ At this point, we have made a lot of changes and hopefully youre happy with t
When someone sets the pricing for their photos in your marketplace, they are informed that a commission will be sent to the owner of the marketplace. You see that at the moment this fee is set to zero, so youll want to increase that. And in order to receive the fees youll you need to set the address that you want to recieve these fees in.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-23.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-23.png)
This important step is the last thing that we will change in this guide. To set the marketplace fees and address, youll need to save them as environmental variables. Create a new file called .env in the root of your repository.
@ -175,8 +175,8 @@ Go to [Fees page](https://docs.oceanprotocol.com/concepts/fees/) to know more de
It is important that the file is saved in the right place at the root of your repository, your file structure should look the same as below.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-24.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-24.png)
Now thats it; you now have a fully functioning photo marketplace that operates over the blockchain. Everytime someone uses it, you will receive revenue.
![Market Customisation](../../.gitbook/assets/market-customisation/market-customisation-25.png)
![Market Customisation](../../.gitbook/assets/market/market-customisation-25.png)

View File

@ -9,7 +9,7 @@ To publish on the Ocean Marketplace, publishers must first host their assets. It
On Ocean Marketplace, a publisher must provide the asset information during the publish step in the field shown in the below image. The information is a `link` for a classic URL, a `transaction ID` for a file stored on Arweave or a `CID` for an IPFS file.
![Publish - File URL field](../.gitbook/assets/marketplace-publish-file-field.png)
![Publish - File URL field](../.gitbook/assets/market/marketplace-publish-file-field.png)
Publishers can choose any hosting service of their choice. The below section explains how to use commonly used hosting services with Ocean Marketplace.