Skip to content

Commit

Permalink
Merge branch 'dev' into fix/#304-softbreak-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
maerzhase committed Sep 19, 2022
2 parents e5b75ff + 76b78f8 commit 8e0c1a2
Show file tree
Hide file tree
Showing 597 changed files with 17,272 additions and 9,656 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
NEXT_PUBLIC_API_ROOT = https://api.fxhash.xyz/graphql
NEXT_PUBLIC_API_FILE_ROOT = https://file-api.fxhash.xyz
NEXT_PUBLIC_API_EXTRACT = https://extract.fxhash.xyz
NEXT_PUBLIC_API_EVENTS_ROOT = https://events.fxhash.xyz
NEXT_PUBLIC_IPFS_GATEWAY = https://gateway.fxhash.xyz
NEXT_PUBLIC_IPFS_GATEWAY_SAFE = https://gateway.fxhash2.xyz
NEXT_PUBLIC_TZKT_API = https://api.tzkt.io/v1/
Expand All @@ -19,13 +20,16 @@ NEXT_PUBLIC_TZ_CT_ADDRESS_ISSUER = KT1BJC12dG17CVvPKJ1VYaNnaT5mzfnUTwXv
NEXT_PUBLIC_TZ_CT_ADDRESS_USERREGISTER = KT1Ezht4PDKZri7aVppVGT4Jkw39sesaFnww
NEXT_PUBLIC_TZ_CT_ADDRESS_TOK_MODERATION = KT18tPu7uXy9PJ97i3qCLsr7an4X6sQ5qxU7
NEXT_PUBLIC_TZ_CT_ADDRESS_USER_MODERATION = KT1Wn2kkKmdbyLWBiLXWCkE7fKj1LsLKar2A
NEXT_PUBLIC_TZ_CT_ADDRESS_ARTICLE_MODERATION = KT1A36z7nG4zPDbhjyrzhYf9SCn5ipPZeRMQ
NEXT_PUBLIC_TZ_CT_ADDRESS_TEAM_MODERATION = KT1FvGQcPxzuJkJsdWFQiGkueSNT5mqpFDrf
NEXT_PUBLIC_TZ_CT_ADDRESS_CYCLES = KT1BgD9SPfysnMz3vkfm6ZEaGFKCVcE5ay91

NEXT_PUBLIC_TZ_CT_ADDRESS_GENTK_V1 = KT1KEa8z6vWXDJrVqtMrAeDVzsvxat3kHaCE
NEXT_PUBLIC_TZ_CT_ADDRESS_GENTK_V2 = KT1U6EHmNxJTkvaWJ4ThczG4FSDaHC21ssvi
NEXT_PUBLIC_TZ_CT_ADDRESS_ARTICLES = KT1GtbuswcNMGhHF2TSuH1Yfaqn16do8Qtva
NEXT_PUBLIC_TZ_CT_ADDRESS_MARKETPLACE_V1 = KT1Xo5B7PNBAeynZPmca4bRh6LQow4og1Zb9
NEXT_PUBLIC_TZ_CT_ADDRESS_MARKETPLACE_V2 = KT1GbyoDi7H1sfXmimXpptZJuCdHMh66WS9u
NEXT_PUBLIC_TZ_CT_ADDRESS_MARKETPLACE_V3 = KT1M1NyU9X4usEimt2f3kDaijZnDMNBu42Ja
NEXT_PUBLIC_TZ_CT_ADDRESS_COLLAB_FACTORY = KT1JrUPSCt1r2MB2J7Lk2KwiWSYr3Mr414ck

NEXT_PUBLIC_TZ_CT_ADDRESS_ALLOWED_MINT_ISSUER = KT1Djz5ix2yEGmV7PMq3GYq17TvMMkd1anT2
Expand Down
11 changes: 10 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{
"extends": "next/core-web-vitals"
"plugins": [
"prettier"
],
"extends": [
"prettier",
"next/core-web-vitals"
],
"rules": {
"prettier/prettier": "error"
}
}
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": false
}
41 changes: 41 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ if (!process.env.NEXT_PUBLIC_IPFS_GATEWAY || !process.env.NEXT_PUBLIC_IPFS_GATEW
const urlGateway = new URL(process.env.NEXT_PUBLIC_IPFS_GATEWAY);
const urlGatewaySafe = new URL(process.env.NEXT_PUBLIC_IPFS_GATEWAY_SAFE);

// the main common security headers
const baseSecurityHeaders = [
{
key: "X-Frame-Options",
value: "SAMEORIGIN"
},
// Isolates the browsing context exclusively to same-origin documents.
// Cross-origin documents are not loaded in the same browsing context.
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy
{
key: 'Cross-Origin-Opener-Policy',
value: 'same-origin'
},
]

const articlesAllowedDomains = "https://*.spotify.com/ https://spotify.com https://*.youtube.com/ https://youtube.com https://*.twitter.com/ https://twitter.com"


/** @type {import('next').NextConfig} */
module.exports = withBundleAnalyzer({
reactStrictMode: true,
Expand All @@ -19,6 +37,16 @@ module.exports = withBundleAnalyzer({

async headers() {
return [
{
source: "/:path*",
headers: [
{
key: "Content-Security-Policy",
value: `frame-ancestors 'self'; frame-src ${process.env.NEXT_PUBLIC_IPFS_GATEWAY_SAFE} ${articlesAllowedDomains} 'self';`
},
...baseSecurityHeaders,
]
},
{
source: "/sandbox/worker.js",
headers: [
Expand All @@ -27,6 +55,19 @@ module.exports = withBundleAnalyzer({
value: "/"
}
]
},
{
source: "/sandbox/preview.html",
headers: [
{
key: "Content-Security-Policy",
value: ""
},
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp"
},
]
}
]
},
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"lint:fix": "next lint --fix"
},
"dependencies": {
"@apollo/client": "^3.4.16",
Expand All @@ -24,6 +25,7 @@
"classnames": "^2.3.1",
"date-fns": "^2.25.0",
"date-fns-tz": "^1.1.6",
"detect-incognito": "^1.0.0",
"echarts": "^5.2.2",
"file-type": "^16.5.3",
"formik": "^2.2.9",
Expand All @@ -50,7 +52,7 @@
"react-router-dom": "^5.3.0",
"react-simple-code-editor": "^0.11.2",
"react-textarea-autosize": "^8.3.4",
"rehype-format": "^4.0.0",
"rehype-format": "^4.0.1",
"rehype-highlight": "^5.0.0",
"rehype-katex": "^6.0.2",
"rehype-prism": "^2.1.3",
Expand Down Expand Up @@ -86,6 +88,10 @@
"@types/react-router-dom": "^5.3.1",
"eslint": "8.0.0",
"eslint-config-next": "11.1.2",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.31.8",
"prettier": "2.6.2",
"typescript": "4.4.3"
}
}
9 changes: 9 additions & 0 deletions public/images/logos/fxhash-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/articles/guide-mint-generative-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ This snippet serves 2 purposes:

The code snippet exposes 4 variables:

- `fxhash`: a random 51 characters base 58 encoded string (designed to have the same signature has a Tezos transaction hash). When someone mints a unique Token from a Generative Token, the transaction hash is hardcoded in place of the code that generates a random one.
- `fxhash`: a random 51 characters base 58 encoded string (designed to have the same signature as a Tezos transaction hash). When someone mints a unique Token from a Generative Token, the transaction hash is hardcoded in place of the code that generates a random one.
- `fxrand()`: a PRNG function that generates deterministic PRN between 0 and 1. **Simply use it instead of Math.random()**.
- `fxpreview()`: a function you can call whenever the code is ready to be captured
- `isFxpreview`: a boolean, true when the code is executed to take the capture, false otherwise
Expand Down
2 changes: 1 addition & 1 deletion src/articles/nft-article-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: 'What is fxhash ?'
---


::tezos-storage[optional descriptive text]{address="KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton" key="741172"}
::tezos-storage-pointer[optional descriptive text]{contract="KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton" path="ledger::741172"}


| Syntax | Description | Test Text |
Expand Down
6 changes: 2 additions & 4 deletions src/articles/nft-article-test2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ date: '2021-10-20'
description: 'What is fxhash ?'
---

::video[beautiful garden]{src="https://samplelib.com/lib/preview/mp4/sample-5s.mp4"}

| Syntax | Description | Test Text |
|:-------------|:---------------:|---------------:|
| Header | Title | Here's this |
| Paragraph | Text | And more |
![random image](https://picsum.photos/536/354)
Loading

0 comments on commit 8e0c1a2

Please sign in to comment.