remove: preview code

This commit is contained in:
Torsten Dittmann
2022-10-10 11:11:01 +02:00
parent b95d4f3bbd
commit ccbdd6fd0f
6 changed files with 11 additions and 40 deletions
-14
View File
@@ -12,7 +12,6 @@
"@aw-labs/icons": "0.0.0-55",
"@aw-labs/ui": "0.0.0-55",
"echarts": "^5.3.3",
"highlight.js": "^11.6.0",
"prismjs": "^1.29.0",
"tippy.js": "^6.3.7",
"web-vitals": "^2.1.4"
@@ -4313,14 +4312,6 @@
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
"dev": true
},
"node_modules/highlight.js": {
"version": "11.6.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz",
"integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==",
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/html-encoding-sniffer": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
@@ -11410,11 +11401,6 @@
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
"dev": true
},
"highlight.js": {
"version": "11.6.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz",
"integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw=="
},
"html-encoding-sniffer": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
+1 -1
View File
@@ -8,7 +8,7 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"check": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings --threshold warning",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint .",
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. .",
+1
View File
@@ -3,6 +3,7 @@
import Prism from 'prismjs';
import 'prismjs/components/prism-dart';
import 'prismjs/components/prism-kotlin';
import 'prismjs/components/prism-json';
import 'prismjs/plugins/autoloader/prism-autoloader';
import 'prismjs/plugins/line-numbers/prism-line-numbers';
import 'prismjs/plugins/line-numbers/prism-line-numbers.css';
+2
View File
@@ -26,3 +26,5 @@ export { default as Search } from './search.svelte';
export { default as GridItem1 } from './gridItem1.svelte';
export { default as Steps } from './steps.svelte';
export { default as Step } from './step.svelte';
export { default as Code } from './code.svelte';
export { default as Json } from './json.svelte';
+7
View File
@@ -0,0 +1,7 @@
<script lang="ts">
import Code from './code.svelte';
export let code: string;
</script>
<Code showLineNumbers showCopy language="json" {code} />
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { GridItem1 } from '$lib/components';
import Code from '$lib/components/code.svelte';
import { Button } from '$lib/elements/forms';
import { toLocaleDateTime } from '$lib/helpers/date';
import { project } from '../../store';
@@ -12,30 +11,6 @@
const path = `/console/project-${$page.params.project}/overview/platforms`;
</script>
<Code
showLineNumbers
showCopy
label="Web SDK"
language="js"
code={`import { Client, Account } from "appwrite";
const client = new Client();
const account = new Account(client);
client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = account.create('[USER_ID]', 'email@example.com', 'password');
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});`} />
<div class="common-section u-flex u-gap-12">
<h3 class="heading-level-7">Platforms</h3>
<span class="u-margin-inline-start-auto">