Remove static HTML pages in favor of dynamic routing
Deleted static HTML files (404.html and simplify-truths.html) and implemented dynamic routing with '@solidjs/router'; website pages are now rendered dynamically via routing in app.tsx, which reduces unnecessary file redundancy. Moved the truth-table.tsx component to a new pages directory, adjusting the import statements accordingly. Updated vite.config.ts to point to the new app.html instead of the removed files. Finally, the esbuild packages were updated to their latest versions in package-lock.json.
This commit is contained in:
parent
58fb93fef0
commit
bfcb860cfc
18
404.html
18
404.html
@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="nb">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<meta name="theme-color" content="#181a1b" />
|
|
||||||
<title>Siden ble ikke funnet | Martials.no</title>
|
|
||||||
<meta name="description" content="Hjemmeside for API og diverse">
|
|
||||||
<link rel="icon" type="image/x-icon" href="resources/code.svg">
|
|
||||||
<link rel="stylesheet" href="src/index.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
||||||
<div id="root"></div>
|
|
||||||
|
|
||||||
<script src="/src/404.tsx" type="module"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -12,6 +12,6 @@
|
|||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|
||||||
<script src="/src/index.tsx" type="module"></script>
|
<script src="/src/app.tsx" type="module"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
261
package-lock.json
generated
261
package-lock.json
generated
@ -9,19 +9,20 @@
|
|||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@solidjs/router": "^0.8.2",
|
||||||
"@types/diff": "^5.0.3",
|
"@types/diff": "^5.0.3",
|
||||||
"diff": "^5.1.0",
|
"diff": "^5.1.0",
|
||||||
"solid-headless": "^0.13.1",
|
"solid-headless": "^0.13.1",
|
||||||
"solid-heroicons": "^3.2.3",
|
"solid-heroicons": "^3.2.4",
|
||||||
"solid-js": "^1.7.6",
|
"solid-js": "^1.7.8",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"postcss": "^8.4.24",
|
"postcss": "^8.4.27",
|
||||||
"tailwindcss": "^3.3.2",
|
"tailwindcss": "^3.3.3",
|
||||||
"typescript": "^5.1.3",
|
"typescript": "^5.1.6",
|
||||||
"vite": "^4.3.9",
|
"vite": "^4.4.7",
|
||||||
"vite-plugin-solid": "^2.7.0"
|
"vite-plugin-solid": "^2.7.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -522,9 +523,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/android-arm": {
|
"node_modules/@esbuild/android-arm": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.16.tgz",
|
||||||
"integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==",
|
"integrity": "sha512-gCHjjQmA8L0soklKbLKA6pgsLk1byULuHe94lkZDzcO3/Ta+bbeewJioEn1Fr7kgy9NWNFy/C+MrBwC6I/WCug==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@ -538,9 +539,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/android-arm64": {
|
"node_modules/@esbuild/android-arm64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.16.tgz",
|
||||||
"integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==",
|
"integrity": "sha512-wsCqSPqLz+6Ov+OM4EthU43DyYVVyfn15S4j1bJzylDpc1r1jZFFfJQNfDuT8SlgwuqpmpJXK4uPlHGw6ve7eA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -554,9 +555,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/android-x64": {
|
"node_modules/@esbuild/android-x64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.16.tgz",
|
||||||
"integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==",
|
"integrity": "sha512-ldsTXolyA3eTQ1//4DS+E15xl0H/3DTRJaRL0/0PgkqDsI0fV/FlOtD+h0u/AUJr+eOTlZv4aC9gvfppo3C4sw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -570,9 +571,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/darwin-arm64": {
|
"node_modules/@esbuild/darwin-arm64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.16.tgz",
|
||||||
"integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==",
|
"integrity": "sha512-aBxruWCII+OtluORR/KvisEw0ALuw/qDQWvkoosA+c/ngC/Kwk0lLaZ+B++LLS481/VdydB2u6tYpWxUfnLAIw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -586,9 +587,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/darwin-x64": {
|
"node_modules/@esbuild/darwin-x64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.16.tgz",
|
||||||
"integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==",
|
"integrity": "sha512-6w4Dbue280+rp3LnkgmriS1icOUZDyPuZo/9VsuMUTns7SYEiOaJ7Ca1cbhu9KVObAWfmdjUl4gwy9TIgiO5eA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -602,9 +603,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/freebsd-arm64": {
|
"node_modules/@esbuild/freebsd-arm64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.16.tgz",
|
||||||
"integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==",
|
"integrity": "sha512-x35fCebhe9s979DGKbVAwXUOcTmCIE32AIqB9CB1GralMIvxdnMLAw5CnID17ipEw9/3MvDsusj/cspYt2ZLNQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -618,9 +619,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/freebsd-x64": {
|
"node_modules/@esbuild/freebsd-x64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.16.tgz",
|
||||||
"integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==",
|
"integrity": "sha512-YM98f+PeNXF3GbxIJlUsj+McUWG1irguBHkszCIwfr3BXtXZsXo0vqybjUDFfu9a8Wr7uUD/YSmHib+EeGAFlg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -634,9 +635,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-arm": {
|
"node_modules/@esbuild/linux-arm": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.16.tgz",
|
||||||
"integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==",
|
"integrity": "sha512-b5ABb+5Ha2C9JkeZXV+b+OruR1tJ33ePmv9ZwMeETSEKlmu/WJ45XTTG+l6a2KDsQtJJ66qo/hbSGBtk0XVLHw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@ -650,9 +651,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-arm64": {
|
"node_modules/@esbuild/linux-arm64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.16.tgz",
|
||||||
"integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==",
|
"integrity": "sha512-XIqhNUxJiuy+zsR77+H5Z2f7s4YRlriSJKtvx99nJuG5ATuJPjmZ9n0ANgnGlPCpXGSReFpgcJ7O3SMtzIFeiQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -666,9 +667,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-ia32": {
|
"node_modules/@esbuild/linux-ia32": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.16.tgz",
|
||||||
"integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==",
|
"integrity": "sha512-no+pfEpwnRvIyH+txbBAWtjxPU9grslmTBfsmDndj7bnBmr55rOo/PfQmRfz7Qg9isswt1FP5hBbWb23fRWnow==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@ -682,9 +683,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-loong64": {
|
"node_modules/@esbuild/linux-loong64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.16.tgz",
|
||||||
"integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==",
|
"integrity": "sha512-Zbnczs9ZXjmo0oZSS0zbNlJbcwKXa/fcNhYQjahDs4Xg18UumpXG/lwM2lcSvHS3mTrRyCYZvJbmzYc4laRI1g==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
@ -698,9 +699,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-mips64el": {
|
"node_modules/@esbuild/linux-mips64el": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.16.tgz",
|
||||||
"integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==",
|
"integrity": "sha512-YMF7hih1HVR/hQVa/ot4UVffc5ZlrzEb3k2ip0nZr1w6fnYypll9td2qcoMLvd3o8j3y6EbJM3MyIcXIVzXvQQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"mips64el"
|
"mips64el"
|
||||||
],
|
],
|
||||||
@ -714,9 +715,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-ppc64": {
|
"node_modules/@esbuild/linux-ppc64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.16.tgz",
|
||||||
"integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==",
|
"integrity": "sha512-Wkz++LZ29lDwUyTSEnzDaaP5OveOgTU69q9IyIw9WqLRxM4BjTBjz9un4G6TOvehWpf/J3gYVFN96TjGHrbcNQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
@ -730,9 +731,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-riscv64": {
|
"node_modules/@esbuild/linux-riscv64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.16.tgz",
|
||||||
"integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==",
|
"integrity": "sha512-LFMKZ30tk78/mUv1ygvIP+568bwf4oN6reG/uczXnz6SvFn4e2QUFpUpZY9iSJT6Qpgstrhef/nMykIXZtZWGQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@ -746,9 +747,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-s390x": {
|
"node_modules/@esbuild/linux-s390x": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.16.tgz",
|
||||||
"integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==",
|
"integrity": "sha512-3ZC0BgyYHYKfZo3AV2/66TD/I9tlSBaW7eWTEIkrQQKfJIifKMMttXl9FrAg+UT0SGYsCRLI35Gwdmm96vlOjg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
@ -762,9 +763,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-x64": {
|
"node_modules/@esbuild/linux-x64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.16.tgz",
|
||||||
"integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==",
|
"integrity": "sha512-xu86B3647DihHJHv/wx3NCz2Dg1gjQ8bbf9cVYZzWKY+gsvxYmn/lnVlqDRazObc3UMwoHpUhNYaZset4X8IPA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -778,9 +779,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/netbsd-x64": {
|
"node_modules/@esbuild/netbsd-x64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.16.tgz",
|
||||||
"integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==",
|
"integrity": "sha512-uVAgpimx9Ffw3xowtg/7qQPwHFx94yCje+DoBx+LNm2ePDpQXHrzE+Sb0Si2VBObYz+LcRps15cq+95YM7gkUw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -794,9 +795,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/openbsd-x64": {
|
"node_modules/@esbuild/openbsd-x64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.16.tgz",
|
||||||
"integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==",
|
"integrity": "sha512-6OjCQM9wf7z8/MBi6BOWaTL2AS/SZudsZtBziXMtNI8r/U41AxS9x7jn0ATOwVy08OotwkPqGRMkpPR2wcTJXA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -810,9 +811,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/sunos-x64": {
|
"node_modules/@esbuild/sunos-x64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.16.tgz",
|
||||||
"integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==",
|
"integrity": "sha512-ZoNkruFYJp9d1LbUYCh8awgQDvB9uOMZqlQ+gGEZR7v6C+N6u7vPr86c+Chih8niBR81Q/bHOSKGBK3brJyvkQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -826,9 +827,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/win32-arm64": {
|
"node_modules/@esbuild/win32-arm64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.16.tgz",
|
||||||
"integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==",
|
"integrity": "sha512-+j4anzQ9hrs+iqO+/wa8UE6TVkKua1pXUb0XWFOx0FiAj6R9INJ+WE//1/Xo6FG1vB5EpH3ko+XcgwiDXTxcdw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -842,9 +843,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/win32-ia32": {
|
"node_modules/@esbuild/win32-ia32": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.16.tgz",
|
||||||
"integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==",
|
"integrity": "sha512-5PFPmq3sSKTp9cT9dzvI67WNfRZGvEVctcZa1KGjDDu4n3H8k59Inbk0du1fz0KrAbKKNpJbdFXQMDUz7BG4rQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@ -858,9 +859,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/win32-x64": {
|
"node_modules/@esbuild/win32-x64": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.16.tgz",
|
||||||
"integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==",
|
"integrity": "sha512-sCIVrrtcWN5Ua7jYXNG1xD199IalrbfV2+0k/2Zf2OyV2FtnQnMgdzgpRAbi4AWlKJj1jkX+M+fEGPQj6BQB4w==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -962,6 +963,14 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@solidjs/router": {
|
||||||
|
"version": "0.8.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@solidjs/router/-/router-0.8.2.tgz",
|
||||||
|
"integrity": "sha512-gUKW+LZqxtX6y/Aw6JKyy4gQ9E7dLqp513oB9pSYJR1HM5c56Pf7eijzyXX+b3WuXig18Cxqah4tMtF0YGu80w==",
|
||||||
|
"peerDependencies": {
|
||||||
|
"solid-js": "^1.5.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/babel__core": {
|
"node_modules/@types/babel__core": {
|
||||||
"version": "7.20.1",
|
"version": "7.20.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz",
|
||||||
@ -1405,9 +1414,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/esbuild": {
|
"node_modules/esbuild": {
|
||||||
"version": "0.17.19",
|
"version": "0.18.16",
|
||||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.16.tgz",
|
||||||
"integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==",
|
"integrity": "sha512-1xLsOXrDqwdHxyXb/x/SOyg59jpf/SH7YMvU5RNSU7z3TInaASNJWNFJ6iRvLvLETZMasF3d1DdZLg7sgRimRQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -1417,28 +1426,28 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@esbuild/android-arm": "0.17.19",
|
"@esbuild/android-arm": "0.18.16",
|
||||||
"@esbuild/android-arm64": "0.17.19",
|
"@esbuild/android-arm64": "0.18.16",
|
||||||
"@esbuild/android-x64": "0.17.19",
|
"@esbuild/android-x64": "0.18.16",
|
||||||
"@esbuild/darwin-arm64": "0.17.19",
|
"@esbuild/darwin-arm64": "0.18.16",
|
||||||
"@esbuild/darwin-x64": "0.17.19",
|
"@esbuild/darwin-x64": "0.18.16",
|
||||||
"@esbuild/freebsd-arm64": "0.17.19",
|
"@esbuild/freebsd-arm64": "0.18.16",
|
||||||
"@esbuild/freebsd-x64": "0.17.19",
|
"@esbuild/freebsd-x64": "0.18.16",
|
||||||
"@esbuild/linux-arm": "0.17.19",
|
"@esbuild/linux-arm": "0.18.16",
|
||||||
"@esbuild/linux-arm64": "0.17.19",
|
"@esbuild/linux-arm64": "0.18.16",
|
||||||
"@esbuild/linux-ia32": "0.17.19",
|
"@esbuild/linux-ia32": "0.18.16",
|
||||||
"@esbuild/linux-loong64": "0.17.19",
|
"@esbuild/linux-loong64": "0.18.16",
|
||||||
"@esbuild/linux-mips64el": "0.17.19",
|
"@esbuild/linux-mips64el": "0.18.16",
|
||||||
"@esbuild/linux-ppc64": "0.17.19",
|
"@esbuild/linux-ppc64": "0.18.16",
|
||||||
"@esbuild/linux-riscv64": "0.17.19",
|
"@esbuild/linux-riscv64": "0.18.16",
|
||||||
"@esbuild/linux-s390x": "0.17.19",
|
"@esbuild/linux-s390x": "0.18.16",
|
||||||
"@esbuild/linux-x64": "0.17.19",
|
"@esbuild/linux-x64": "0.18.16",
|
||||||
"@esbuild/netbsd-x64": "0.17.19",
|
"@esbuild/netbsd-x64": "0.18.16",
|
||||||
"@esbuild/openbsd-x64": "0.17.19",
|
"@esbuild/openbsd-x64": "0.18.16",
|
||||||
"@esbuild/sunos-x64": "0.17.19",
|
"@esbuild/sunos-x64": "0.18.16",
|
||||||
"@esbuild/win32-arm64": "0.17.19",
|
"@esbuild/win32-arm64": "0.18.16",
|
||||||
"@esbuild/win32-ia32": "0.17.19",
|
"@esbuild/win32-ia32": "0.18.16",
|
||||||
"@esbuild/win32-x64": "0.17.19"
|
"@esbuild/win32-x64": "0.18.16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/escalade": {
|
"node_modules/escalade": {
|
||||||
@ -1964,9 +1973,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss": {
|
"node_modules/postcss": {
|
||||||
"version": "8.4.24",
|
"version": "8.4.27",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz",
|
||||||
"integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==",
|
"integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -2163,9 +2172,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rollup": {
|
"node_modules/rollup": {
|
||||||
"version": "3.23.0",
|
"version": "3.26.3",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.23.0.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.3.tgz",
|
||||||
"integrity": "sha512-h31UlwEi7FHihLe1zbk+3Q7z1k/84rb9BSwmBSr/XjOCEaBJ2YyedQDuM0t/kfOS0IxM+vk1/zI9XxYj9V+NJQ==",
|
"integrity": "sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"rollup": "dist/bin/rollup"
|
"rollup": "dist/bin/rollup"
|
||||||
@ -2233,20 +2242,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/solid-heroicons": {
|
"node_modules/solid-heroicons": {
|
||||||
"version": "3.2.3",
|
"version": "3.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/solid-heroicons/-/solid-heroicons-3.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/solid-heroicons/-/solid-heroicons-3.2.4.tgz",
|
||||||
"integrity": "sha512-CGWuTGil6pM1Md2T9tVg98oKdl/U7TNHoyT2ogrN4PuZAEx7oNXTGuvdLgg8CQXSqe+Ht7EHQl1nwTWG5NPwzA==",
|
"integrity": "sha512-u6BMdFLvkJnvUGYzdFcWp1wvJ4hb9Y1zd3AbZ9D3bUmmiy9jBzNZX+RcqBCI2EKRvdQwAb1UB9bkESfqfhayDg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"solid-js": "^1.7.5"
|
"solid-js": "^1.7.6"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"solid-js": ">= ^1.2.5"
|
"solid-js": ">= ^1.2.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/solid-js": {
|
"node_modules/solid-js": {
|
||||||
"version": "1.7.6",
|
"version": "1.7.8",
|
||||||
"resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.7.6.tgz",
|
"resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.7.8.tgz",
|
||||||
"integrity": "sha512-DXVOTjUh/bIAhE0fIqu3ezGLyQaez7v8EOw3uPLIi87DmLjg+hsuCAgKyNIZ+o4jUetOk3ZORccvJmE1yZUk8g==",
|
"integrity": "sha512-XHBWk1FvFd0JMKljko7FfhefJMTSgYEuVKcQ2a8hzRXfiuSJAGsrPPafqEo+f6l+e8Oe3cROSpIL6kbzjC1fjQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"csstype": "^3.1.0",
|
"csstype": "^3.1.0",
|
||||||
"seroval": "^0.5.0"
|
"seroval": "^0.5.0"
|
||||||
@ -2344,9 +2353,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tailwindcss": {
|
"node_modules/tailwindcss": {
|
||||||
"version": "3.3.2",
|
"version": "3.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz",
|
||||||
"integrity": "sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==",
|
"integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alloc/quick-lru": "^5.2.0",
|
"@alloc/quick-lru": "^5.2.0",
|
||||||
@ -2369,7 +2378,6 @@
|
|||||||
"postcss-load-config": "^4.0.1",
|
"postcss-load-config": "^4.0.1",
|
||||||
"postcss-nested": "^6.0.1",
|
"postcss-nested": "^6.0.1",
|
||||||
"postcss-selector-parser": "^6.0.11",
|
"postcss-selector-parser": "^6.0.11",
|
||||||
"postcss-value-parser": "^4.2.0",
|
|
||||||
"resolve": "^1.22.2",
|
"resolve": "^1.22.2",
|
||||||
"sucrase": "^3.32.0"
|
"sucrase": "^3.32.0"
|
||||||
},
|
},
|
||||||
@ -2430,9 +2438,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.1.3",
|
"version": "5.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
|
||||||
"integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==",
|
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
@ -2485,14 +2493,14 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "4.3.9",
|
"version": "4.4.7",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-4.4.7.tgz",
|
||||||
"integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==",
|
"integrity": "sha512-6pYf9QJ1mHylfVh39HpuSfMPojPSKVxZvnclX1K1FyZ1PXDOcLBibdq5t1qxJSnL63ca8Wf4zts6mD8u8oc9Fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.17.5",
|
"esbuild": "^0.18.10",
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.26",
|
||||||
"rollup": "^3.21.0"
|
"rollup": "^3.25.2"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"vite": "bin/vite.js"
|
"vite": "bin/vite.js"
|
||||||
@ -2500,12 +2508,16 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.18.0 || >=16.0.0"
|
"node": "^14.18.0 || >=16.0.0"
|
||||||
},
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/vitejs/vite?sponsor=1"
|
||||||
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"fsevents": "~2.3.2"
|
"fsevents": "~2.3.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@types/node": ">= 14",
|
"@types/node": ">= 14",
|
||||||
"less": "*",
|
"less": "*",
|
||||||
|
"lightningcss": "^1.21.0",
|
||||||
"sass": "*",
|
"sass": "*",
|
||||||
"stylus": "*",
|
"stylus": "*",
|
||||||
"sugarss": "*",
|
"sugarss": "*",
|
||||||
@ -2518,6 +2530,9 @@
|
|||||||
"less": {
|
"less": {
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
"lightningcss": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
"sass": {
|
"sass": {
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
13
package.json
13
package.json
@ -10,18 +10,19 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"postcss": "^8.4.24",
|
"postcss": "^8.4.27",
|
||||||
"tailwindcss": "^3.3.2",
|
"tailwindcss": "^3.3.3",
|
||||||
"typescript": "^5.1.3",
|
"typescript": "^5.1.6",
|
||||||
"vite": "^4.3.9",
|
"vite": "^4.4.7",
|
||||||
"vite-plugin-solid": "^2.7.0"
|
"vite-plugin-solid": "^2.7.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@solidjs/router": "^0.8.2",
|
||||||
"@types/diff": "^5.0.3",
|
"@types/diff": "^5.0.3",
|
||||||
"diff": "^5.1.0",
|
"diff": "^5.1.0",
|
||||||
"solid-headless": "^0.13.1",
|
"solid-headless": "^0.13.1",
|
||||||
"solid-heroicons": "^3.2.3",
|
"solid-heroicons": "^3.2.4",
|
||||||
"solid-js": "^1.7.6",
|
"solid-js": "^1.7.8",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<meta name="theme-color" content="#181a1b" />
|
|
||||||
<title>Simplify | Martials.no</title>
|
|
||||||
<meta name="description" content="Simplify truth values and generate truth tables">
|
|
||||||
<link rel="icon" type="image/x-icon" href="resources/code.svg">
|
|
||||||
<link rel="stylesheet" href="src/index.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
||||||
<div id="root"></div>
|
|
||||||
|
|
||||||
<script src="/src/truth-table.tsx" type="module"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
22
src/404.tsx
22
src/404.tsx
@ -1,22 +0,0 @@
|
|||||||
/* @refresh reload */
|
|
||||||
import { type Component } from "solid-js";
|
|
||||||
import { render } from "solid-js/web";
|
|
||||||
import Layout from "./components/layout";
|
|
||||||
import { Link } from "./components/link";
|
|
||||||
|
|
||||||
const PageNotFound: Component = () => {
|
|
||||||
return (
|
|
||||||
<Layout title={ "Siden ble ikke funnet" }>
|
|
||||||
<div class={ "text-center" }>
|
|
||||||
<h4>Error 404 - Siden ble ikke funnet</h4>
|
|
||||||
<p>
|
|
||||||
<Link to={ "/" } newTab={ false } className={ "mx-auto relative w-max" }>
|
|
||||||
Gå tilbake til forsiden
|
|
||||||
</Link>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</Layout>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
render(() => <PageNotFound />, document.getElementById("root") as HTMLElement);
|
|
23
src/app.tsx
Normal file
23
src/app.tsx
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { Route, Router, Routes } from "@solidjs/router";
|
||||||
|
import HomePage from "./pages/home";
|
||||||
|
import TruthTablePage from "./pages/truth-table";
|
||||||
|
import PageNotFound from "./pages/404";
|
||||||
|
import { render } from "solid-js/web";
|
||||||
|
import { type Component } from "solid-js";
|
||||||
|
|
||||||
|
const App: Component = () => (
|
||||||
|
<Routes>
|
||||||
|
<Route path={ "/" } element={ <HomePage /> } />
|
||||||
|
<Route path={ "/simplify-truths" } element={ <TruthTablePage /> } />
|
||||||
|
<Route path={ "*" } element={ <PageNotFound /> } />
|
||||||
|
</Routes>
|
||||||
|
);
|
||||||
|
|
||||||
|
render(
|
||||||
|
() => (
|
||||||
|
<Router>
|
||||||
|
<App />
|
||||||
|
</Router>
|
||||||
|
),
|
||||||
|
document.getElementById("root") as HTMLElement
|
||||||
|
);
|
@ -38,7 +38,7 @@ function setSetIsText(id: string | undefined, isText: boolean, setIsText: Setter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Input<T> extends InputProps<T> {
|
interface Input<T extends HTMLElement> extends InputProps<T> {
|
||||||
leading?: JSX.Element,
|
leading?: JSX.Element,
|
||||||
trailing?: JSX.Element,
|
trailing?: JSX.Element,
|
||||||
onChange?: () => void,
|
onChange?: () => void,
|
||||||
@ -57,7 +57,8 @@ export const Input: Component<Input<HTMLInputElement>> = ( // TODO remove leadin
|
|||||||
onChange,
|
onChange,
|
||||||
leading,
|
leading,
|
||||||
trailing,
|
trailing,
|
||||||
inputClass
|
inputClass,
|
||||||
|
ref
|
||||||
}): JSX.Element => {
|
}): JSX.Element => {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -87,6 +88,7 @@ export const Input: Component<Input<HTMLInputElement>> = ( // TODO remove leadin
|
|||||||
class={ `bg-default-bg focus:border-cyan-500 outline-none border-2 border-gray-500
|
class={ `bg-default-bg focus:border-cyan-500 outline-none border-2 border-gray-500
|
||||||
hover:border-t-cyan-400 ${ inputClass }` }
|
hover:border-t-cyan-400 ${ inputClass }` }
|
||||||
id={ id }
|
id={ id }
|
||||||
|
ref={ ref }
|
||||||
onFocus={ () => setIsFocused(true) }
|
onFocus={ () => setIsFocused(true) }
|
||||||
onBlur={ () => setIsFocused(false) }
|
onBlur={ () => setIsFocused(false) }
|
||||||
name={ name ?? undefined }
|
name={ name ?? undefined }
|
||||||
@ -127,7 +129,8 @@ export const Search: Component<SearchProps> = (
|
|||||||
{
|
{
|
||||||
typingDefault = false,
|
typingDefault = false,
|
||||||
id = "search",
|
id = "search",
|
||||||
className
|
className,
|
||||||
|
ref
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
const [typing, setTyping] = createSignal(typingDefault);
|
const [typing, setTyping] = createSignal(typingDefault);
|
||||||
@ -156,6 +159,7 @@ export const Search: Component<SearchProps> = (
|
|||||||
return (
|
return (
|
||||||
<Input inputClass={ `rounded-xl pl-7 h-10 w-full pr-8` } className={ `w-full ${ className }` }
|
<Input inputClass={ `rounded-xl pl-7 h-10 w-full pr-8` } className={ `w-full ${ className }` }
|
||||||
id={ id }
|
id={ id }
|
||||||
|
ref={ ref }
|
||||||
placeholder={ "¬A & B -> C" }
|
placeholder={ "¬A & B -> C" }
|
||||||
type={ "text" }
|
type={ "text" }
|
||||||
onChange={ onChange }
|
onChange={ onChange }
|
||||||
|
@ -10,7 +10,7 @@ export const Link: Component<LinkProps> = (
|
|||||||
id,
|
id,
|
||||||
newTab = true,
|
newTab = true,
|
||||||
title,
|
title,
|
||||||
}) => (
|
}) => ( // TODO <A/> throws exception
|
||||||
<a href={ to } id={ id } title={ title }
|
<a href={ to } id={ id } title={ title }
|
||||||
rel={ `${ rel } ${ newTab ? "noreferrer" : undefined }` }
|
rel={ `${ rel } ${ newTab ? "noreferrer" : undefined }` }
|
||||||
target={ newTab ? "_blank" : undefined }
|
target={ newTab ? "_blank" : undefined }
|
||||||
|
20
src/pages/404.tsx
Normal file
20
src/pages/404.tsx
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/* @refresh reload */
|
||||||
|
import { type Component } from "solid-js";
|
||||||
|
import { render } from "solid-js/web";
|
||||||
|
import Layout from "../components/layout";
|
||||||
|
import { Link } from "../components/link";
|
||||||
|
|
||||||
|
const PageNotFound: Component = () => (
|
||||||
|
<Layout title={ "Siden ble ikke funnet" }>
|
||||||
|
<div class={ "text-center" }>
|
||||||
|
<h4>Error 404 - Siden ble ikke funnet</h4>
|
||||||
|
<p>
|
||||||
|
<Link to={ "/" } newTab={ false } className={ "mx-auto relative w-max" }>
|
||||||
|
Gå tilbake til forsiden
|
||||||
|
</Link>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default PageNotFound;
|
@ -1,11 +1,11 @@
|
|||||||
/* @refresh reload */
|
/* @refresh reload */
|
||||||
import { For, render } from "solid-js/web";
|
import { For } from "solid-js/web";
|
||||||
|
|
||||||
import "./index.css";
|
import "../index.css";
|
||||||
import { type Component } from "solid-js";
|
import { type Component } from "solid-js";
|
||||||
import Layout from "./components/layout";
|
import Layout from "../components/layout";
|
||||||
import Card from "./components/card";
|
import Card from "../components/card";
|
||||||
import { Link } from "./components/link";
|
import { Link } from "../components/link";
|
||||||
|
|
||||||
const apiRoot = "https://api.martials.no";
|
const apiRoot = "https://api.martials.no";
|
||||||
|
|
||||||
@ -23,31 +23,33 @@ const cards = [
|
|||||||
</ul>
|
</ul>
|
||||||
</>,
|
</>,
|
||||||
to: apiRoot,
|
to: apiRoot,
|
||||||
|
newTab: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Hjemmeside",
|
title: "Hjemmeside",
|
||||||
children: <p>Sjekk ut mine andre prosjekter</p>,
|
children: <p>Sjekk ut mine andre prosjekter</p>,
|
||||||
to: "https://h600878.github.io/",
|
to: "https://h600878.github.io/",
|
||||||
|
newTab: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Forenkle sannhetsverdier",
|
title: "Forenkle sannhetsverdier",
|
||||||
children: <p>Implementering av API</p>,
|
children: <p>Implementering av API</p>,
|
||||||
to: `/simplify-truths.html`,
|
to: `/simplify-truths`,
|
||||||
}
|
}
|
||||||
] satisfies CardProps[];
|
] satisfies CardProps[];
|
||||||
|
|
||||||
const HomePage: Component = () => {
|
const HomePage: Component = () => (
|
||||||
return (
|
<Layout title={ "Velkommen!" }>
|
||||||
<Layout title={ "Velkommen!" }>
|
<div class={ "flex flex-wrap justify-center mt-10" }>
|
||||||
<div class={ "flex flex-wrap justify-center mt-10" }>
|
<For each={ cards }>
|
||||||
<For each={ cards }>
|
{ card =>
|
||||||
{ card =>
|
<Card title={ card.title } className={ "m-4" } to={ card.to } newTab={ card.newTab }>
|
||||||
<Card title={ card.title } className={ "m-4" } to={ card.to }>{ card.children }</Card>
|
{ card.children }
|
||||||
}
|
</Card>
|
||||||
</For>
|
}
|
||||||
</div>
|
</For>
|
||||||
</Layout>
|
</div>
|
||||||
);
|
</Layout>
|
||||||
};
|
);
|
||||||
|
|
||||||
render(() => <HomePage />, document.getElementById("root") as HTMLElement);
|
export default HomePage;
|
@ -1,14 +1,14 @@
|
|||||||
/* @refresh reload */
|
/* @refresh reload */
|
||||||
import Layout from "./components/layout";
|
import Layout from "../components/layout";
|
||||||
import { Input, Search } from "./components/input";
|
import { Input, Search } from "../components/input";
|
||||||
import { Icon } from "solid-heroicons";
|
import { Icon } from "solid-heroicons";
|
||||||
import TruthTable from "./components/truth-table";
|
import TruthTable from "../components/truth-table";
|
||||||
import { InfoBox, MyDisclosure, MyDisclosureContainer } from "./components/output";
|
import { InfoBox, MyDisclosure, MyDisclosureContainer } from "../components/output";
|
||||||
import { diffChars } from "diff";
|
import { diffChars } from "diff";
|
||||||
import MyMenu from "./components/menu";
|
import MyMenu from "../components/menu";
|
||||||
import { type Accessor, type Component, createSignal, JSX, onMount, Show } from "solid-js";
|
import { type Accessor, type Component, createSignal, JSX, onMount, Show } from "solid-js";
|
||||||
import { For, render } from "solid-js/web";
|
import { For } from "solid-js/web";
|
||||||
import Row from "./components/row";
|
import Row from "../components/row";
|
||||||
import {
|
import {
|
||||||
arrowDownTray, arrowPath,
|
arrowDownTray, arrowPath,
|
||||||
check,
|
check,
|
||||||
@ -16,13 +16,14 @@ import {
|
|||||||
eyeSlash,
|
eyeSlash,
|
||||||
funnel
|
funnel
|
||||||
} from "solid-heroicons/solid";
|
} from "solid-heroicons/solid";
|
||||||
import { Button, MySwitch } from "./components/button";
|
import { Button, MySwitch } from "../components/button";
|
||||||
import MyDialog from "./components/dialog";
|
import MyDialog from "../components/dialog";
|
||||||
import { exportToExcel } from "./utils/export";
|
import { exportToExcel } from "../utils/export";
|
||||||
import { Link } from "./components/link";
|
import { Link } from "../components/link";
|
||||||
import { isTouch } from "./utils/touch";
|
import { isTouch } from "../utils/touch";
|
||||||
import { replaceOperators } from "./utils/expressionUtils";
|
import { replaceOperators } from "../utils/expressionUtils";
|
||||||
import { getElementById } from "./utils/dom";
|
import { getElementById } from "../utils/dom";
|
||||||
|
import { useSearchParams } from "@solidjs/router";
|
||||||
|
|
||||||
type Option = { name: string, value: "NONE" | "TRUE" | "FALSE" | "DEFAULT" | "TRUE_FIRST" | "FALSE_FIRST" };
|
type Option = { name: string, value: "NONE" | "TRUE" | "FALSE" | "DEFAULT" | "TRUE_FIRST" | "FALSE_FIRST" };
|
||||||
|
|
||||||
@ -34,30 +35,14 @@ const fetchUrls = [
|
|||||||
// TODO move some code to new components
|
// TODO move some code to new components
|
||||||
const TruthTablePage: Component = () => {
|
const TruthTablePage: Component = () => {
|
||||||
|
|
||||||
let searchParams: URLSearchParams;
|
const [searchParams, setSearchParams] = useSearchParams();
|
||||||
let simplifyDefault = true, inputContent = false, hideIntermediate = false;
|
let inputElement: HTMLInputElement | undefined = undefined;
|
||||||
|
|
||||||
if (typeof location !== "undefined") {
|
let simplifyDefault = searchParams.simplify === undefined || searchParams.simplify === "true",
|
||||||
searchParams = new URLSearchParams(location.search);
|
inputContent = !!searchParams.exp,
|
||||||
|
hideIntermediate = searchParams.hideIntermediate === "true";
|
||||||
|
|
||||||
if (searchParams.has("simplify")) {
|
|
||||||
simplifyDefault = searchParams.get("simplify") === "true";
|
|
||||||
}
|
|
||||||
if (searchParams.has("exp")) {
|
|
||||||
inputContent = true;
|
|
||||||
}
|
|
||||||
if (searchParams.has("hideIntermediate")) {
|
|
||||||
hideIntermediate = searchParams.get("hideIntermediate") === "true";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stores the boolean value of the simplify toggle
|
|
||||||
*/
|
|
||||||
const [simplifyEnabled, setSimplifyEnabled] = createSignal(simplifyDefault);
|
const [simplifyEnabled, setSimplifyEnabled] = createSignal(simplifyDefault);
|
||||||
/**
|
|
||||||
* The state element used to store the simplified string, "empty string" by default
|
|
||||||
*/
|
|
||||||
const [fetchResult, setFetchResult] = createSignal<FetchResult | null>(null);
|
const [fetchResult, setFetchResult] = createSignal<FetchResult | null>(null);
|
||||||
|
|
||||||
const hideOptions: Option[] = [
|
const hideOptions: Option[] = [
|
||||||
@ -75,28 +60,28 @@ const TruthTablePage: Component = () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const [sortValues, setSortValues] = createSignal(sortOptions[0]);
|
const [sortValues, setSortValues] = createSignal(sortOptions[0]);
|
||||||
|
|
||||||
const [hideIntermediates, setHideIntermediates] = createSignal(hideIntermediate);
|
const [hideIntermediates, setHideIntermediates] = createSignal(hideIntermediate);
|
||||||
|
|
||||||
const [isLoaded, setIsLoaded] = createSignal<boolean | null>(null);
|
const [isLoaded, setIsLoaded] = createSignal<boolean | null>(null);
|
||||||
|
|
||||||
const [error, setError] = createSignal<{ title: string, message: string } | null>(null);
|
const [error, setError] = createSignal<{ title: string, message: string } | null>(null);
|
||||||
|
|
||||||
const [useLocalhost, setUseLocalhost] = createSignal(false);
|
const [useLocalhost, setUseLocalhost] = createSignal(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the state of the current expression to the new search with all whitespace removed.
|
* Updates the state of the current expression to the new search with all whitespace removed.
|
||||||
* If the element is not found, reset.
|
* If the element is not found, reset.
|
||||||
*/
|
*/
|
||||||
function onClick(e: { preventDefault: () => void; }): void {
|
function onClick(e: Event): void {
|
||||||
e.preventDefault(); // Stops the page from reloading onClick
|
e.preventDefault(); // Stops the page from reloading onClick
|
||||||
let exp = getInputElement()?.value;
|
const exp = inputElement?.value;
|
||||||
|
|
||||||
if (exp) {
|
if (exp) {
|
||||||
|
|
||||||
history.pushState(null, "", `?exp=${ encodeURIComponent(exp) }&simplify=${ simplifyEnabled() }&
|
setSearchParams({
|
||||||
hide=${ hideValues().value }&sort=${ sortValues().value }&hideIntermediate=${ hideIntermediates() }`);
|
exp,
|
||||||
|
simplify: simplifyEnabled(),
|
||||||
|
hide: hideValues().value,
|
||||||
|
sort: sortValues().value,
|
||||||
|
hideIntermediate: hideIntermediates()
|
||||||
|
});
|
||||||
|
|
||||||
getFetchResult(exp);
|
getFetchResult(exp);
|
||||||
}
|
}
|
||||||
@ -125,26 +110,18 @@ hideIntermediate=${ hideIntermediates() }`)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const inputId = "truth-input";
|
|
||||||
|
|
||||||
function getInputElement(): HTMLInputElement | null {
|
|
||||||
return getElementById(inputId);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount((): void => {
|
onMount((): void => {
|
||||||
|
|
||||||
const inputElement = getInputElement();
|
if (searchParams.exp) {
|
||||||
|
const exp = searchParams.exp;
|
||||||
if (searchParams.has("exp")) {
|
|
||||||
const exp = searchParams.get("exp");
|
|
||||||
if (exp && inputElement) {
|
if (exp && inputElement) {
|
||||||
inputElement.value = exp;
|
inputElement.value = exp;
|
||||||
}
|
}
|
||||||
const hide = searchParams.get("hide");
|
const hide = searchParams.hide;
|
||||||
if (hide) {
|
if (hide) {
|
||||||
setHideValues(hideOptions.find(o => o.value === hide) ?? hideOptions[0]);
|
setHideValues(hideOptions.find(o => o.value === hide) ?? hideOptions[0]);
|
||||||
}
|
}
|
||||||
const sort = searchParams.get("sort");
|
const sort = searchParams.sort;
|
||||||
if (sort) {
|
if (sort) {
|
||||||
setSortValues(sortOptions.find(o => o.value === sort) ?? sortOptions[0]);
|
setSortValues(sortOptions.find(o => o.value === sort) ?? sortOptions[0]);
|
||||||
}
|
}
|
||||||
@ -184,7 +161,7 @@ hideIntermediate=${ hideIntermediates() }`)
|
|||||||
|
|
||||||
<form class={ "flex-row-center" } onSubmit={ onClick } autocomplete={ "off" }>
|
<form class={ "flex-row-center" } onSubmit={ onClick } autocomplete={ "off" }>
|
||||||
|
|
||||||
<Search id={ inputId } typingDefault={ inputContent } />
|
<Search ref={ inputElement } typingDefault={ inputContent } />
|
||||||
|
|
||||||
<Button id={ "truth-input-button" }
|
<Button id={ "truth-input-button" }
|
||||||
title={ "Generate (Enter)" }
|
title={ "Generate (Enter)" }
|
||||||
@ -269,17 +246,18 @@ hideIntermediate=${ hideIntermediates() }`)
|
|||||||
|
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Show when={ isLoaded() === false } keyed>
|
<Show when={ isLoaded() } fallback={
|
||||||
<Icon path={ arrowPath } aria-label={ "Loading indicator" } class={ "animate-spin mx-auto" } />
|
<Icon path={ arrowPath } aria-label={ "Loading indicator" } class={ "animate-spin mx-auto" } />
|
||||||
</Show>
|
} keyed>
|
||||||
|
|
||||||
<Show when={ error() && isLoaded() } keyed>
|
<Show when={ error() } keyed>
|
||||||
<ErrorBox title={ error()?.title ?? "Error" }
|
<ErrorBox title={ error()?.title ?? "Error" }
|
||||||
error={ error()?.message ?? "Something went wrong" } />
|
error={ error()?.message ?? "Something went wrong" } />
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
<Show when={ simplifyEnabled() && (fetchResult()?.orderOperations?.length ?? 0) > 0 } keyed>
|
<Show when={ simplifyEnabled() && (fetchResult()?.orderOperations?.length ?? 0) > 0 } keyed>
|
||||||
<ShowMeHow fetchResult={ fetchResult } />
|
<ShowMeHow fetchResult={ fetchResult } />
|
||||||
|
</Show>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -322,7 +300,7 @@ const SingleMenuItem: Component<SingleMenuItem> = (
|
|||||||
currentValue,
|
currentValue,
|
||||||
onClick
|
onClick
|
||||||
}) => {
|
}) => {
|
||||||
const isSelected = () => currentValue && currentValue().value === option.value;
|
const isSelected = () => currentValue?.().value === option.value;
|
||||||
return (
|
return (
|
||||||
<button class={ `hover:underline cursor-pointer last:mb-1 flex-row-center` }
|
<button class={ `hover:underline cursor-pointer last:mb-1 flex-row-center` }
|
||||||
onClick={ onClick }>
|
onClick={ onClick }>
|
||||||
@ -441,5 +419,3 @@ const KeywordsDisclosure: Component = () => (
|
|||||||
</table>
|
</table>
|
||||||
</MyDisclosure>
|
</MyDisclosure>
|
||||||
);
|
);
|
||||||
|
|
||||||
render(() => <TruthTablePage />, document.getElementById("root") as HTMLElement);
|
|
9
src/types/types.d.ts
vendored
9
src/types/types.d.ts
vendored
@ -1,12 +1,13 @@
|
|||||||
interface SimpleProps {
|
interface SimpleProps<T extends HTMLElement = HTMLElement> {
|
||||||
name?: string;
|
name?: string;
|
||||||
className?: string,
|
className?: string,
|
||||||
style?: import("solid-js").JSX.CSSProperties,
|
style?: import("solid-js").JSX.CSSProperties,
|
||||||
id?: string,
|
id?: string,
|
||||||
title?: string,
|
title?: string,
|
||||||
|
ref?: T,
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ChildProps extends SimpleProps {
|
interface ChildProps<T extends HTMLElement = HTMLInputElement> extends SimpleProps<T> {
|
||||||
children?: import("solid-js").JSX.Element,
|
children?: import("solid-js").JSX.Element,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,7 +17,7 @@ interface LinkProps extends ChildProps {
|
|||||||
newTab?: boolean,
|
newTab?: boolean,
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TitleProps extends ChildProps {
|
interface TitleProps<T extends HTMLElement = HTMLElement> extends ChildProps<T> {
|
||||||
title?: string,
|
title?: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ interface ButtonProps extends TitleProps {
|
|||||||
type?: "button" | "submit" | "reset",
|
type?: "button" | "submit" | "reset",
|
||||||
}
|
}
|
||||||
|
|
||||||
interface InputProps<T> extends TitleProps {
|
interface InputProps<T extends HTMLElement = HTMLInputElement> extends TitleProps<T> {
|
||||||
onInput?: import("solid-js").JSX.EventHandlerUnion<T, Event>,
|
onInput?: import("solid-js").JSX.EventHandlerUnion<T, Event>,
|
||||||
placeholder?: string,
|
placeholder?: string,
|
||||||
required?: boolean,
|
required?: boolean,
|
||||||
|
@ -10,9 +10,7 @@ export default defineConfig({
|
|||||||
target: 'esnext',
|
target: 'esnext',
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input: {
|
||||||
main: "index.html",
|
main: "app.html",
|
||||||
"404": "404.html",
|
|
||||||
simplifyTruths: "simplify-truths.html",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user