From 715267a8628b92fb3e488a3136d53b0b77a8ce2e Mon Sep 17 00:00:00 2001 From: 0xmegalodon Date: Wed, 11 Sep 2024 11:37:13 +0700 Subject: [PATCH 1/2] -: update code white paper --- .../dapp/components/WhitePaperModal/index.tsx | 71 ++++++++++++++++++- .../WhitePaperModal/styles.module.scss | 36 +++++++++- src/services/api/dapp/whitePapers/index.ts | 17 +++++ 3 files changed, 120 insertions(+), 4 deletions(-) diff --git a/src/modules/blockchains/dapp/components/WhitePaperModal/index.tsx b/src/modules/blockchains/dapp/components/WhitePaperModal/index.tsx index e0a026c6d..1e55892ab 100644 --- a/src/modules/blockchains/dapp/components/WhitePaperModal/index.tsx +++ b/src/modules/blockchains/dapp/components/WhitePaperModal/index.tsx @@ -76,7 +76,72 @@ const WhitePaperModal = (props: IProps) => { setIsDownloadingHtml(true); const htmlString = await convertMarkdownToHtml(markdownString); - const blob = new Blob([htmlString], { type: 'text/html' }); + + const htmlContent = ` + + + + + + ${tokenInfo?.token?.symbol} White Paper + + + + ${htmlString} + + + `; + + const blob = new Blob([htmlContent], { type: 'text/html' }); const url = URL.createObjectURL(blob); @@ -167,13 +232,13 @@ const WhitePaperModal = (props: IProps) => { isDisabled={isAllDisabled} isLoading={isDownloadingHtml} >Download Html - + >Download PDF*/} diff --git a/src/modules/blockchains/dapp/components/WhitePaperModal/styles.module.scss b/src/modules/blockchains/dapp/components/WhitePaperModal/styles.module.scss index ba939cc02..b9fb1480f 100644 --- a/src/modules/blockchains/dapp/components/WhitePaperModal/styles.module.scss +++ b/src/modules/blockchains/dapp/components/WhitePaperModal/styles.module.scss @@ -11,13 +11,47 @@ color: black; padding: 40px 80px; + h1 { + font-size: 32px; + font-weight: 700; + white-space: pre-wrap; + } + + h2 { + font-weight: 700; + font-size: 20px; + } + + h3 { + font-size: 18px; + font-weight: bold; + } + + h4 { + font-size: 16px; + font-weight: bold; + } + + h5 { + font-size: 14px; + font-weight: bold; + } + p { margin-top: 4px; margin-bottom: 4px; } ul { - padding-inline-start: 20px; + padding-inline-start: 40px; + } + ol { + padding-inline-start: 40px; + } + + a { + color: #0d87ff; + text-decoration: underline; } } diff --git a/src/services/api/dapp/whitePapers/index.ts b/src/services/api/dapp/whitePapers/index.ts index e50a1497d..a2bf5c0ca 100644 --- a/src/services/api/dapp/whitePapers/index.ts +++ b/src/services/api/dapp/whitePapers/index.ts @@ -2,6 +2,7 @@ import CDappApiClient from '@/services/api/dapp/dapp.client'; import { setWhitePapers } from '@/stores/states/dapp/reducer'; import { useAppDispatch } from '@/stores/hooks'; import { IWhitePaper } from '@/services/api/dapp/whitePapers/interface'; +import axios from 'axios'; class CWhitePaperAPI { private api = new CDappApiClient().api; @@ -29,6 +30,22 @@ class CWhitePaperAPI { const data: any = await this.api.get(this.getUrl(`detail/${id}`)); return data; }; + + testCreateWhitePaper = async (content: string): Promise => { + return axios.post('https://fxz7dxfvi58xv2-8000.proxy.runpod.net/v1/chat/completions', + { + "model": "meta-llama/Meta-Llama-3.1-70B-Instruct", + "stream": false, + "messages":[ + {"role": "user", "content": content} + ]}, + { + headers: { + 'Authorization': 'Bearer d50b6ba5169ea538a71fe7b0685b755823a3746934fa3cc4', + 'Content-Type': 'application/json', + } + }); + } } export default CWhitePaperAPI; From 824239afb0f9f06f312b4dc18820c2bc4f457bb5 Mon Sep 17 00:00:00 2001 From: 0xmegalodon Date: Wed, 11 Sep 2024 11:41:09 +0700 Subject: [PATCH 2/2] -: update --- src/services/api/dapp/whitePapers/index.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/services/api/dapp/whitePapers/index.ts b/src/services/api/dapp/whitePapers/index.ts index a2bf5c0ca..e50a1497d 100644 --- a/src/services/api/dapp/whitePapers/index.ts +++ b/src/services/api/dapp/whitePapers/index.ts @@ -2,7 +2,6 @@ import CDappApiClient from '@/services/api/dapp/dapp.client'; import { setWhitePapers } from '@/stores/states/dapp/reducer'; import { useAppDispatch } from '@/stores/hooks'; import { IWhitePaper } from '@/services/api/dapp/whitePapers/interface'; -import axios from 'axios'; class CWhitePaperAPI { private api = new CDappApiClient().api; @@ -30,22 +29,6 @@ class CWhitePaperAPI { const data: any = await this.api.get(this.getUrl(`detail/${id}`)); return data; }; - - testCreateWhitePaper = async (content: string): Promise => { - return axios.post('https://fxz7dxfvi58xv2-8000.proxy.runpod.net/v1/chat/completions', - { - "model": "meta-llama/Meta-Llama-3.1-70B-Instruct", - "stream": false, - "messages":[ - {"role": "user", "content": content} - ]}, - { - headers: { - 'Authorization': 'Bearer d50b6ba5169ea538a71fe7b0685b755823a3746934fa3cc4', - 'Content-Type': 'application/json', - } - }); - } } export default CWhitePaperAPI;