From e66e835d5111ab6914afbf58db53902414625f6d Mon Sep 17 00:00:00 2001 From: Fadi Shawki Date: Tue, 23 Apr 2024 21:00:23 +0200 Subject: [PATCH] Move some stuff around --- .../src/@orbitmines/Visualization.tsx | 303 ---------------- orbitmines.com/src/index.tsx | 2 +- .../JetBrainsMono/JetBrainsMono-2.242.zip | Bin .../JetBrains Mono NL SemiBold_Italic.json | 0 .../JetBrains Mono NL SemiBold_Regular.json | 0 .../json/JetBrains Mono NL Thin_Italic.json | 0 .../json/JetBrains Mono NL Thin_Regular.json | 0 .../json/JetBrains Mono NL_Regular.json | 0 .../json/JetBrains Mono SemiBold_Italic.json | 0 .../json/JetBrains Mono SemiBold_Regular.json | 0 .../json/JetBrains Mono Thin_Italic.json | 0 .../json/JetBrains Mono Thin_Regular.json | 0 .../json/JetBrains Mono_Regular.json | 0 .../JetBrainsMono/ttf/JetBrainsMono-Bold.ttf | Bin .../ttf/JetBrainsMono-BoldItalic.ttf | Bin .../ttf/JetBrainsMono-ExtraBold.ttf | Bin .../ttf/JetBrainsMono-ExtraBoldItalic.ttf | Bin .../ttf/JetBrainsMono-ExtraLight.ttf | Bin .../ttf/JetBrainsMono-ExtraLightItalic.ttf | Bin .../ttf/JetBrainsMono-Italic.ttf | Bin .../JetBrainsMono/ttf/JetBrainsMono-Light.ttf | Bin .../ttf/JetBrainsMono-LightItalic.ttf | Bin .../ttf/JetBrainsMono-Medium.ttf | Bin .../ttf/JetBrainsMono-MediumItalic.ttf | Bin .../ttf/JetBrainsMono-Regular.ttf | Bin .../ttf/JetBrainsMono-SemiBold.ttf | Bin .../ttf/JetBrainsMono-SemiBoldItalic.ttf | Bin .../JetBrainsMono/ttf/JetBrainsMono-Thin.ttf | Bin .../ttf/JetBrainsMono-ThinItalic.ttf | Bin .../ttf/JetBrainsMonoNL-Bold.ttf | Bin .../ttf/JetBrainsMonoNL-BoldItalic.ttf | Bin .../ttf/JetBrainsMonoNL-ExtraBold.ttf | Bin .../ttf/JetBrainsMonoNL-ExtraBoldItalic.ttf | Bin .../ttf/JetBrainsMonoNL-ExtraLight.ttf | Bin .../ttf/JetBrainsMonoNL-ExtraLightItalic.ttf | Bin .../ttf/JetBrainsMonoNL-Italic.ttf | Bin .../ttf/JetBrainsMonoNL-Light.ttf | Bin .../ttf/JetBrainsMonoNL-LightItalic.ttf | Bin .../ttf/JetBrainsMonoNL-Medium.ttf | Bin .../ttf/JetBrainsMonoNL-MediumItalic.ttf | Bin .../ttf/JetBrainsMonoNL-Regular.ttf | Bin .../ttf/JetBrainsMonoNL-SemiBold.ttf | Bin .../ttf/JetBrainsMonoNL-SemiBoldItalic.ttf | Bin .../ttf/JetBrainsMonoNL-Thin.ttf | Bin .../ttf/JetBrainsMonoNL-ThinItalic.ttf | Bin .../variable/JetBrainsMono-Italic[wght].ttf | Bin .../variable/JetBrainsMono[wght].ttf | Bin .../webfonts/JetBrainsMono-Bold.woff2 | Bin .../webfonts/JetBrainsMono-BoldItalic.woff2 | Bin .../webfonts/JetBrainsMono-ExtraBold.woff2 | Bin .../JetBrainsMono-ExtraBoldItalic.woff2 | Bin .../webfonts/JetBrainsMono-ExtraLight.woff2 | Bin .../JetBrainsMono-ExtraLightItalic.woff2 | Bin .../webfonts/JetBrainsMono-Italic.woff2 | Bin .../webfonts/JetBrainsMono-Light.woff2 | Bin .../webfonts/JetBrainsMono-LightItalic.woff2 | Bin .../webfonts/JetBrainsMono-Medium.woff2 | Bin .../webfonts/JetBrainsMono-MediumItalic.woff2 | Bin .../webfonts/JetBrainsMono-Regular.woff2 | Bin .../webfonts/JetBrainsMono-SemiBold.woff2 | Bin .../JetBrainsMono-SemiBoldItalic.woff2 | Bin .../webfonts/JetBrainsMono-Thin.woff2 | Bin .../webfonts/JetBrainsMono-ThinItalic.woff2 | Bin .../{layout/font/styles => fonts}/font.scss | 2 +- .../src/lib/{layout/styles => }/index.scss | 8 +- orbitmines.com/src/lib/index.ts | 4 - orbitmines.com/src/lib/layout/font/Font.tsx | 3 - .../font/fonts/JetBrainsMono/JetBrainsMono.ts | 16 - .../font/fonts/blueprintjs/BlueprintIcons.ts | 12 - .../src/lib/layout/icons/CustomIcon.tsx | 86 ----- orbitmines.com/src/lib/paper/Paper.tsx | 122 ++++++- .../styles => paper}/blueprintjs.scss | 0 .../flexbox/styles => paper}/flexbox.scss | 0 .../lib/{layout/styles => paper}/spacing.scss | 0 .../src/lib/paper/views/ExportablePaper.tsx | 3 +- orbitmines.com/src/routes/Root.tsx | 6 +- .../archive/2024.02.NGI.GrantProposal.tsx | 16 +- .../2024.02.OrbitMines_as_a_Game_Project.tsx | 21 +- .../routes/papers/2022.OnIntelligibility.tsx | 14 +- .../src/routes/papers/2023.OnOrbits.tsx | 322 +++++++++++++++++- .../src/routes/profiles/Profile.tsx | 30 +- .../profiles/fadi-shawki/FadiShawki.tsx | 3 +- 82 files changed, 488 insertions(+), 485 deletions(-) delete mode 100644 orbitmines.com/src/@orbitmines/Visualization.tsx rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/JetBrainsMono-2.242.zip (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Italic.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Regular.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Italic.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Regular.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono NL_Regular.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Italic.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Regular.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono Thin_Italic.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono Thin_Regular.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/json/JetBrains Mono_Regular.json (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-Bold.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-BoldItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBold.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBoldItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLight.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLightItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-Italic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-Light.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-LightItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-Medium.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-MediumItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBold.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBoldItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-Thin.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMono-ThinItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Bold.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-BoldItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBold.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBoldItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLight.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLightItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Italic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Light.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-LightItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Medium.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-MediumItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Regular.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBold.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBoldItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Thin.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ThinItalic.ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/variable/JetBrainsMono-Italic[wght].ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/variable/JetBrainsMono[wght].ttf (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-Bold.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-BoldItalic.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBold.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBoldItalic.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLight.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLightItalic.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-Italic.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-Light.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-LightItalic.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-Medium.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-MediumItalic.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-Regular.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBold.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBoldItalic.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-Thin.woff2 (100%) rename orbitmines.com/src/lib/{layout/font => }/fonts/JetBrainsMono/webfonts/JetBrainsMono-ThinItalic.woff2 (100%) rename orbitmines.com/src/lib/{layout/font/styles => fonts}/font.scss (92%) rename orbitmines.com/src/lib/{layout/styles => }/index.scss (59%) delete mode 100755 orbitmines.com/src/lib/index.ts delete mode 100755 orbitmines.com/src/lib/layout/font/Font.tsx delete mode 100755 orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/JetBrainsMono.ts delete mode 100755 orbitmines.com/src/lib/layout/font/fonts/blueprintjs/BlueprintIcons.ts delete mode 100755 orbitmines.com/src/lib/layout/icons/CustomIcon.tsx rename orbitmines.com/src/lib/{layout/styles/blueprintjs/styles => paper}/blueprintjs.scss (100%) rename orbitmines.com/src/lib/{layout/flexbox/styles => paper}/flexbox.scss (100%) rename orbitmines.com/src/lib/{layout/styles => paper}/spacing.scss (100%) diff --git a/orbitmines.com/src/@orbitmines/Visualization.tsx b/orbitmines.com/src/@orbitmines/Visualization.tsx deleted file mode 100644 index 514bcfd..0000000 --- a/orbitmines.com/src/@orbitmines/Visualization.tsx +++ /dev/null @@ -1,303 +0,0 @@ -import React, {useCallback, useEffect, useRef, useState} from 'react'; -import {Canvas} from "@react-three/fiber"; -import {ACESFilmicToneMapping, SRGBColorSpace} from "three"; -import WEBGL from "three/examples/jsm/capabilities/WebGL"; -import {useSearchParams} from "react-router-dom"; -import {toPng} from "html-to-image"; -import {Button} from "@blueprintjs/core"; -import isWebGLAvailable = WEBGL.isWebGLAvailable; -import {Children, Col, PaperProps, Row} from "../lib/paper/Paper"; - -export const NoWebGL = () => { - return
No WebGL
-} - -export type VisualizationProps = { - context: Omit, - alt: string, -} - -const Visualization = ({}: { }) => { - return - - -} - -export const CachedVisualizationCanvas = ( - { - alt, - context, - children, - ...props - }: React.HTMLAttributes & Children & VisualizationProps -) => { - const ref = useRef(null); - const [useImage, setUseImage] = useState(true); - let generate; - try { - const [params] = useSearchParams(); - - generate = params.get('generate'); - } catch (e) { - generate = 'pdf'; - } - - const exportPng = useCallback(() => { - if (ref === null) - return; - - toPng(ref.current, { - cacheBust: true, - // backgroundColor: '#1C2127' - }) - .then((dataUrl) => { - const link = document.createElement('a') - link.download = `${alt}.png` - link.href = dataUrl - link.click() - }) - .catch((err) => { - console.log(err) - }); - }, [ref]); - - if (context.link === undefined) - throw 'Cannot have the paper\'s link be undefined when using a cached canvas.' - - const canvasUrl = `${context.link.replace("https://orbitmines.com", "")}/images/${alt}.png`; - - useEffect(() => { - // Just a quick hack to check if it's loaded (could draw it on the canvas from here, ?) - - const img = new Image(); - img.src = canvasUrl; - img.onerror = () => { - setUseImage(false); - }; - }, []); - - if (useImage) { - return - - - } - - return
-
- - {children} - -
- {generate === 'canvas' ? - {/* eslint-disable-next-line react/jsx-no-undef */} -
-} - -export const CanvasContainer = ({ - children, - ...props - }: React.HTMLAttributes & Children) => (
- {children} -
) - -export const ThreeJS = ({ref, children}: Children & { ref?: React.MutableRefObject}) => { - // https://threejs.org/docs/#manual/en/introduction/WebGL-compatibility-check - if (!isWebGLAvailable()) - return ; - - // console.log('webgl2', isWebGLAvailable()); - - /* - https://docs.pmnd.rs/react-three-fiber/api/canvas - - Sets up a Scene and a Camera, the basic building blocks necessary for rendering - - Renders our scene every frame, you do not need a traditional render-loop - - - Canvas is responsive to fit the parent node, so you can control how big it is by changing the parents width and height, in this case #canvas-container. - */ - return - {children} - - {/*/!* https://threejs.org/docs/#api/en/objects/Mesh *!/*/} - {/**/} - {/* /!**/} - {/* https://threejs.org/docs/#api/en/lights/AmbientLight*/} - {/* - This light globally illuminates all objects in the scene equally.*/} - {/* - This light cannot be used to cast shadows as it does not have a direction.*/} - {/* *!/*/} - - {/* /!* https://threejs.org/docs/#api/en/lights/DirectionalLight *!/*/} - {/* /!**!/*/} - - {/* /!* https://threejs.org/docs/#api/en/geometries/BoxGeometry *!/*/} - {/* */} - - {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} - {/* */} - {/**/} - - {/**/} - - {/* https://docs.pmnd.rs/react-postprocessing/selection */} - {/**/} - {/* /!* https://docs.pmnd.rs/react-postprocessing/effect-composer *!/*/} - {/* */} - {/* */} - {/* */} - {/**/} - - {/**/} - - {/**/} - - {/**/} - - {/**/} - - {/**/} - {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} - {/* */} - {/**/} - {/**/} - {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} - {/* */} - {/**/} - {/**/} - {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} - {/* */} - {/**/} - - {/**/} - {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} - {/* */} - {/**/} - - {/**/} - - -} - -export const VisualizationCanvas = ( - { - children, - ...props - }: React.HTMLAttributes & Children -) => { - - return ( - // ThreeJS: https://threejs.org/ - // React Three Fiber: https://docs.pmnd.rs/react-three-fiber/api/objects - // https://github.com/pmndrs/drei#readme - - {children} - - ); -}; - -export default Visualization; \ No newline at end of file diff --git a/orbitmines.com/src/index.tsx b/orbitmines.com/src/index.tsx index 12268f3..c261ca1 100755 --- a/orbitmines.com/src/index.tsx +++ b/orbitmines.com/src/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import './lib/layout/styles/index.scss'; +import './lib/index.scss'; import App from './App'; import { BrowserRouter } from 'react-router-dom'; diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/JetBrainsMono-2.242.zip b/orbitmines.com/src/lib/fonts/JetBrainsMono/JetBrainsMono-2.242.zip similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/JetBrainsMono-2.242.zip rename to orbitmines.com/src/lib/fonts/JetBrainsMono/JetBrainsMono-2.242.zip diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Italic.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Italic.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Italic.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Italic.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Regular.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Regular.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Regular.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL SemiBold_Regular.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Italic.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Italic.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Italic.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Italic.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Regular.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Regular.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Regular.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL Thin_Regular.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL_Regular.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL_Regular.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono NL_Regular.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono NL_Regular.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Italic.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Italic.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Italic.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Italic.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Regular.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Regular.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Regular.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono SemiBold_Regular.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono Thin_Italic.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono Thin_Italic.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono Thin_Italic.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono Thin_Italic.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono Thin_Regular.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono Thin_Regular.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono Thin_Regular.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono Thin_Regular.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono_Regular.json b/orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono_Regular.json similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/json/JetBrains Mono_Regular.json rename to orbitmines.com/src/lib/fonts/JetBrainsMono/json/JetBrains Mono_Regular.json diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Bold.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Bold.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Bold.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Bold.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-BoldItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-BoldItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-BoldItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-BoldItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBold.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBold.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBold.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBold.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBoldItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBoldItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBoldItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraBoldItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLight.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLight.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLight.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLight.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLightItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLightItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLightItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ExtraLightItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Italic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Italic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Italic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Italic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Light.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Light.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Light.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Light.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-LightItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-LightItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-LightItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-LightItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Medium.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Medium.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Medium.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Medium.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-MediumItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-MediumItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-MediumItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-MediumItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBold.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBold.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBold.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBold.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBoldItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBoldItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBoldItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBoldItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Thin.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Thin.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-Thin.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-Thin.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ThinItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ThinItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMono-ThinItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMono-ThinItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Bold.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Bold.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Bold.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Bold.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-BoldItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-BoldItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-BoldItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-BoldItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBold.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBold.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBold.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBold.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBoldItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBoldItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBoldItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraBoldItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLight.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLight.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLight.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLight.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLightItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLightItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLightItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ExtraLightItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Italic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Italic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Italic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Italic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Light.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Light.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Light.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Light.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-LightItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-LightItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-LightItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-LightItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Medium.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Medium.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Medium.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Medium.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-MediumItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-MediumItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-MediumItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-MediumItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Regular.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Regular.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Regular.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Regular.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBold.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBold.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBold.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBold.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBoldItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBoldItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBoldItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-SemiBoldItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Thin.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Thin.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Thin.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-Thin.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ThinItalic.ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ThinItalic.ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ThinItalic.ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/ttf/JetBrainsMonoNL-ThinItalic.ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/variable/JetBrainsMono-Italic[wght].ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/variable/JetBrainsMono-Italic[wght].ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/variable/JetBrainsMono-Italic[wght].ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/variable/JetBrainsMono-Italic[wght].ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/variable/JetBrainsMono[wght].ttf b/orbitmines.com/src/lib/fonts/JetBrainsMono/variable/JetBrainsMono[wght].ttf similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/variable/JetBrainsMono[wght].ttf rename to orbitmines.com/src/lib/fonts/JetBrainsMono/variable/JetBrainsMono[wght].ttf diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Bold.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Bold.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Bold.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Bold.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-BoldItalic.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-BoldItalic.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-BoldItalic.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-BoldItalic.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBold.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBold.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBold.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBold.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBoldItalic.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBoldItalic.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBoldItalic.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraBoldItalic.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLight.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLight.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLight.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLight.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLightItalic.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLightItalic.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLightItalic.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ExtraLightItalic.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Italic.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Italic.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Italic.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Italic.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Light.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Light.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Light.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Light.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-LightItalic.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-LightItalic.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-LightItalic.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-LightItalic.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Medium.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Medium.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Medium.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Medium.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-MediumItalic.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-MediumItalic.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-MediumItalic.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-MediumItalic.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Regular.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Regular.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Regular.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Regular.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBold.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBold.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBold.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBold.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBoldItalic.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBoldItalic.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBoldItalic.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-SemiBoldItalic.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Thin.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Thin.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-Thin.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-Thin.woff2 diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ThinItalic.woff2 b/orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ThinItalic.woff2 similarity index 100% rename from orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/webfonts/JetBrainsMono-ThinItalic.woff2 rename to orbitmines.com/src/lib/fonts/JetBrainsMono/webfonts/JetBrainsMono-ThinItalic.woff2 diff --git a/orbitmines.com/src/lib/layout/font/styles/font.scss b/orbitmines.com/src/lib/fonts/font.scss similarity index 92% rename from orbitmines.com/src/lib/layout/font/styles/font.scss rename to orbitmines.com/src/lib/fonts/font.scss index 8563127..926d63c 100755 --- a/orbitmines.com/src/lib/layout/font/styles/font.scss +++ b/orbitmines.com/src/lib/fonts/font.scss @@ -12,7 +12,7 @@ $fonts: ( $font-weight: map-get($options, font-weight); $font-style: map-get($options, font-style); - $file: '../fonts/#{$name}/ttf/#{$file-name}'; + $file: './#{$name}/ttf/#{$file-name}'; @font-face{ font-family: $name; diff --git a/orbitmines.com/src/lib/layout/styles/index.scss b/orbitmines.com/src/lib/index.scss similarity index 59% rename from orbitmines.com/src/lib/layout/styles/index.scss rename to orbitmines.com/src/lib/index.scss index c9a609f..a357a24 100755 --- a/orbitmines.com/src/lib/layout/styles/index.scss +++ b/orbitmines.com/src/lib/index.scss @@ -1,8 +1,8 @@ -@import "./blueprintjs/styles/blueprintjs"; -@import "../../layout/flexbox/styles/flexbox"; -@import "../font/styles/font"; +@import "paper/blueprintjs"; +@import "paper/flexbox"; +@import "fonts/font"; -@import "../../layout/styles/spacing"; +@import "paper/spacing"; @import "~@blueprintjs/core/lib/scss/variables"; diff --git a/orbitmines.com/src/lib/index.ts b/orbitmines.com/src/lib/index.ts deleted file mode 100755 index 36cc107..0000000 --- a/orbitmines.com/src/lib/index.ts +++ /dev/null @@ -1,4 +0,0 @@ - -export { - -} \ No newline at end of file diff --git a/orbitmines.com/src/lib/layout/font/Font.tsx b/orbitmines.com/src/lib/layout/font/Font.tsx deleted file mode 100755 index 233c169..0000000 --- a/orbitmines.com/src/lib/layout/font/Font.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import {BulkLoad, SingleLoad} from "@react-pdf/types"; - -export type FontFamily = SingleLoad | BulkLoad; diff --git a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/JetBrainsMono.ts b/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/JetBrainsMono.ts deleted file mode 100755 index e4b97ee..0000000 --- a/orbitmines.com/src/lib/layout/font/fonts/JetBrainsMono/JetBrainsMono.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {FontFamily} from "../../Font"; - -import JetBrainsMonoRegular from './ttf/JetBrainsMono-Regular.ttf'; -import JetBrainsMonoSemiBold from './ttf/JetBrainsMono-SemiBold.ttf'; -import JetBrainsMonoBold from './ttf/JetBrainsMono-Bold.ttf'; - -const JetBrainsMono: FontFamily = { - family: 'JetBrainsMono, monospace', - fonts: [ - {src: JetBrainsMonoRegular, fontWeight: 'normal', fontStyle: 'normal'}, - {src: JetBrainsMonoSemiBold, fontWeight: 'semibold', fontStyle: 'normal'}, - {src: JetBrainsMonoBold, fontWeight: 'bold', fontStyle: 'normal'}, - ] -} - -export default JetBrainsMono; \ No newline at end of file diff --git a/orbitmines.com/src/lib/layout/font/fonts/blueprintjs/BlueprintIcons.ts b/orbitmines.com/src/lib/layout/font/fonts/blueprintjs/BlueprintIcons.ts deleted file mode 100755 index 1d434c0..0000000 --- a/orbitmines.com/src/lib/layout/font/fonts/blueprintjs/BlueprintIcons.ts +++ /dev/null @@ -1,12 +0,0 @@ -import {FontFamily} from "../../Font"; - -import BlueprintIcons20 from '@blueprintjs/icons/src/generated/20px/blueprint-icons-20.ttf'; - -const BlueprintIcons: FontFamily = { - family: 'blueprint-icons-20', - fonts: [ - {src: BlueprintIcons20, fontWeight: 'normal', fontStyle: 'normal'}, - ] -} - -export default BlueprintIcons; \ No newline at end of file diff --git a/orbitmines.com/src/lib/layout/icons/CustomIcon.tsx b/orbitmines.com/src/lib/layout/icons/CustomIcon.tsx deleted file mode 100755 index e99594a..0000000 --- a/orbitmines.com/src/lib/layout/icons/CustomIcon.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import React from 'react'; -import {Classes, Icon, IconSize} from "@blueprintjs/core"; -import classNames from 'classnames'; -import {uniqueId} from "lodash"; -import ORGANIZATIONS, {SVG, TOrganization} from "../../organizations/ORGANIZATIONS"; -import {SVGIconProps} from "@blueprintjs/icons"; -import {IntentProps, Props} from "@blueprintjs/core/src/common"; - -export interface IconProps extends IntentProps, Props, SVGIconProps { - icon: string; - - tagName?: keyof JSX.IntrinsicElements; - - /** Props to apply to the `SVG` element */ - svgProps?: React.HTMLAttributes; -} - -const renderSvgPaths = (svg: SVG): JSX.Element[] | null => { - const paths = svg.paths; - if (paths == null) { - return null; - } - return paths.map((path, i) => ); -} - -const CustomIcon: React.FC, "title">> = (props) => { - const { - className, - color, - htmlTitle, - intent, - size = IconSize.STANDARD, - title, - tagName = "span", - icon, - - svgProps, - ...htmlProps - } = props; - - const RenderedIcon = () => { - const organization = (ORGANIZATIONS as any)[icon] as TOrganization | undefined; - const svg = organization?.assets?.icon; - - if (!organization || !svg) { - // @ts-ignore - return - } - // render path elements, or nothing if icon name is unknown. - const paths = renderSvgPaths(svg); - - const viewBox = `0 0 ${svg.viewBox.width} ${svg.viewBox.height}`; - - return ( - {title && {title}} - {paths} - ); - } - - const classes = classNames(Classes.ICON, Classes.iconClass(icon), Classes.intentClass(intent), className); - - const titleId = uniqueId("iconTitleCustom"); - - return React.createElement( - tagName, - { - ...htmlProps, - "aria-hidden": title ? undefined : true, - className: classes, - title: htmlTitle, - }, - , - ); -}; - -export default CustomIcon; -// export {} \ No newline at end of file diff --git a/orbitmines.com/src/lib/paper/Paper.tsx b/orbitmines.com/src/lib/paper/Paper.tsx index 7e9d4f9..182bd23 100644 --- a/orbitmines.com/src/lib/paper/Paper.tsx +++ b/orbitmines.com/src/lib/paper/Paper.tsx @@ -2,16 +2,124 @@ import React, {ReactNode, useCallback, useMemo, useRef} from 'react'; import {Helmet} from "react-helmet"; import ExportablePaper, {PdfProps} from "./views/ExportablePaper"; import {useLocation, useNavigate, useSearchParams} from "react-router-dom"; -import JetBrainsMono from "../layout/font/fonts/JetBrainsMono/JetBrainsMono"; -import ORGANIZATIONS, {Content, ExternalProfile, TOrganization, TProfile} from "../organizations/ORGANIZATIONS"; -import _ from "lodash"; -import {Button, Divider, H1, H3, H4, H6, Intent, Popover, Tag} from "@blueprintjs/core"; -import CustomIcon from "../layout/icons/CustomIcon"; +import ORGANIZATIONS, {Content, ExternalProfile, SVG, TOrganization, TProfile} from "../organizations/ORGANIZATIONS"; +import _, {uniqueId} from "lodash"; +import {Button, Classes, Divider, H1, H3, H4, H6, Icon, IconSize, Intent, Popover, Tag} from "@blueprintjs/core"; import {toJpeg} from "html-to-image"; -import {CanvasContainer} from "../../@orbitmines/Visualization"; import classNames from "classnames"; import {PROFILES} from "../../routes/profiles/profiles"; import {Highlight, Prism, themes} from "prism-react-renderer"; +import {IntentProps, Props} from "@blueprintjs/core/src/common"; +import {SVGIconProps} from "@blueprintjs/icons"; +import {CanvasContainer} from "../../routes/papers/2023.OnOrbits"; + +import _BlueprintIcons16 from '@blueprintjs/icons/src/generated/16px/blueprint-icons-16.ttf'; +import _BlueprintIcons20 from '@blueprintjs/icons/src/generated/20px/blueprint-icons-20.ttf'; +import {BulkLoad, SingleLoad} from "@react-pdf/types"; +import JetBrainsMonoRegular from "../fonts/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf"; +import JetBrainsMonoSemiBold from "../fonts/JetBrainsMono/ttf/JetBrainsMono-SemiBold.ttf"; +import JetBrainsMonoBold from "../fonts/JetBrainsMono/ttf/JetBrainsMono-Bold.ttf"; + +export type FontFamily = SingleLoad | BulkLoad; + + +export const BlueprintIcons16: FontFamily = { + family: 'blueprint-icons-16', + fonts: [ + {src: _BlueprintIcons16, fontWeight: 'normal', fontStyle: 'normal'}, + ] +} +export const BlueprintIcons20: FontFamily = { + family: 'blueprint-icons-20', + fonts: [ + {src: _BlueprintIcons20, fontWeight: 'normal', fontStyle: 'normal'}, + ] +} + +export const JetBrainsMono: FontFamily = { + family: 'JetBrainsMono, monospace', + fonts: [ + {src: JetBrainsMonoRegular, fontWeight: 'normal', fontStyle: 'normal'}, + {src: JetBrainsMonoSemiBold, fontWeight: 'semibold', fontStyle: 'normal'}, + {src: JetBrainsMonoBold, fontWeight: 'bold', fontStyle: 'normal'}, + ] +} + +export interface IconProps extends IntentProps, Props, SVGIconProps { + icon: string; + + tagName?: keyof JSX.IntrinsicElements; + + /** Props to apply to the `SVG` element */ + svgProps?: React.HTMLAttributes; +} + +export const renderSvgPaths = (svg: SVG): JSX.Element[] | null => { + const paths = svg.paths; + if (paths == null) { + return null; + } + return paths.map((path, i) => ); +} + +export const CustomIcon: React.FC, "title">> = (props) => { + const { + className, + color, + htmlTitle, + intent, + size = IconSize.STANDARD, + title, + tagName = "span", + icon, + + svgProps, + ...htmlProps + } = props; + + const RenderedIcon = () => { + const organization = (ORGANIZATIONS as any)[icon] as TOrganization | undefined; + const svg = organization?.assets?.icon; + + if (!organization || !svg) { + // @ts-ignore + return + } + // render path elements, or nothing if icon name is unknown. + const paths = renderSvgPaths(svg); + + const viewBox = `0 0 ${svg.viewBox.width} ${svg.viewBox.height}`; + + return ( + {title && {title}} + {paths} + ); + } + + const classes = classNames(Classes.ICON, Classes.iconClass(icon), Classes.intentClass(intent), className); + + const titleId = uniqueId("iconTitleCustom"); + + return React.createElement( + tagName, + { + ...htmlProps, + "aria-hidden": title ? undefined : true, + className: classes, + title: htmlTitle, + }, + , + ); +}; // export const getClass = (className: string) => (styles && styles[className]) ? styles[className] : className; @@ -802,7 +910,7 @@ export const ThumbnailPage = () => { subtitle, date, pdf: { - fonts: [ JetBrainsMono ], + fonts: [JetBrainsMono, BlueprintIcons20, BlueprintIcons16], }, organizations: [ORGANIZATIONS.orbitmines_research], authors: [{ diff --git a/orbitmines.com/src/lib/layout/styles/blueprintjs/styles/blueprintjs.scss b/orbitmines.com/src/lib/paper/blueprintjs.scss similarity index 100% rename from orbitmines.com/src/lib/layout/styles/blueprintjs/styles/blueprintjs.scss rename to orbitmines.com/src/lib/paper/blueprintjs.scss diff --git a/orbitmines.com/src/lib/layout/flexbox/styles/flexbox.scss b/orbitmines.com/src/lib/paper/flexbox.scss similarity index 100% rename from orbitmines.com/src/lib/layout/flexbox/styles/flexbox.scss rename to orbitmines.com/src/lib/paper/flexbox.scss diff --git a/orbitmines.com/src/lib/layout/styles/spacing.scss b/orbitmines.com/src/lib/paper/spacing.scss similarity index 100% rename from orbitmines.com/src/lib/layout/styles/spacing.scss rename to orbitmines.com/src/lib/paper/spacing.scss diff --git a/orbitmines.com/src/lib/paper/views/ExportablePaper.tsx b/orbitmines.com/src/lib/paper/views/ExportablePaper.tsx index debb082..63f43e2 100755 --- a/orbitmines.com/src/lib/paper/views/ExportablePaper.tsx +++ b/orbitmines.com/src/lib/paper/views/ExportablePaper.tsx @@ -2,9 +2,8 @@ import React, {Fragment, ReactNode, useCallback, useState} from "react"; import _ from "lodash"; import {Document, Font, Image, Link, Page, Path, PDFViewer, Svg, Text, View} from "@react-pdf/renderer"; import DereferenceHtml from "../../pdf/DereferenceHtml"; -import {FontFamily} from "../../layout/font/Font"; import {DereferencedElementRenderer} from "../../pdf/dereferenceHtmlElement"; -import {PaperContent, PaperProps} from "../Paper"; +import {FontFamily, PaperContent, PaperProps} from "../Paper"; import {useSearchParams} from "react-router-dom"; const renderPdfRendererElement: DereferencedElementRenderer = (element: Element, parent: Element | undefined, initialProps: any) => { diff --git a/orbitmines.com/src/routes/Root.tsx b/orbitmines.com/src/routes/Root.tsx index c7a2f22..18080d7 100644 --- a/orbitmines.com/src/routes/Root.tsx +++ b/orbitmines.com/src/routes/Root.tsx @@ -1,15 +1,13 @@ import React from 'react'; import logo from "../lib/organizations/orbitmines/logo/orbitmines.logo.3000x1000.png"; import {H3, Tag} from "@blueprintjs/core"; -import CustomIcon from "../lib/layout/icons/CustomIcon"; import ORGANIZATIONS from "../lib/organizations/ORGANIZATIONS"; import {PROFILES} from "./profiles/profiles"; import {Helmet} from "react-helmet"; import {ON_INTELLIGIBILITY} from "./papers/2022.OnIntelligibility"; -import {ON_ORBITS} from "./papers/2023.OnOrbits"; -import {CanvasContainer} from "../@orbitmines/Visualization"; +import {CanvasContainer, ON_ORBITS} from "./papers/2023.OnOrbits"; import {_2024_02_ORBITMINES_AS_A_GAME_PROJECT} from "./archive/2024.02.OrbitMines_as_a_Game_Project"; -import {Author, Layer, pageStyles, Reference, Col, Row} from "../lib/paper/Paper"; +import {Author, Layer, pageStyles, Reference, Col, Row, CustomIcon} from "../lib/paper/Paper"; const Root = () => { diff --git a/orbitmines.com/src/routes/archive/2024.02.NGI.GrantProposal.tsx b/orbitmines.com/src/routes/archive/2024.02.NGI.GrantProposal.tsx index ff35430..80d9b6c 100644 --- a/orbitmines.com/src/routes/archive/2024.02.NGI.GrantProposal.tsx +++ b/orbitmines.com/src/routes/archive/2024.02.NGI.GrantProposal.tsx @@ -1,10 +1,18 @@ import React from 'react'; -import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; import ORGANIZATIONS, {Content, Viewed} from "../../lib/organizations/ORGANIZATIONS"; -import Paper, {Arc, BR, PaperProps, Link, useCounter, Reference, Section, renderable, Row} from "../../lib/paper/Paper"; +import Paper, { + Arc, + BR, + PaperProps, + Link, + useCounter, + Reference, + Section, + renderable, + Row, JetBrainsMono, BlueprintIcons20, BlueprintIcons16 +} from "../../lib/paper/Paper"; import {PROFILES} from "../profiles/profiles"; import REFERENCES from "../profiles/fadi-shawki/fadi_shawki"; -import BlueprintIcons from "../../lib/layout/font/fonts/blueprintjs/BlueprintIcons"; export const _2024_02_NGI_GRANT_PROPOSAL: Content = { reference: { @@ -39,7 +47,7 @@ const _2024_02_NGI_GrantProposal = () => { A grant proposal to through . In contrast to my previous application, which I realized was quite naive after a conversation with at : Hopefully this will serve as a concrete target problem to solve. ), pdf: { - fonts: [JetBrainsMono, BlueprintIcons], + fonts: [JetBrainsMono, BlueprintIcons20, BlueprintIcons16], }, Reference: (props: {}) => (<>), references: referenceCounter diff --git a/orbitmines.com/src/routes/archive/2024.02.OrbitMines_as_a_Game_Project.tsx b/orbitmines.com/src/routes/archive/2024.02.OrbitMines_as_a_Game_Project.tsx index 7108519..02f5e4f 100644 --- a/orbitmines.com/src/routes/archive/2024.02.OrbitMines_as_a_Game_Project.tsx +++ b/orbitmines.com/src/routes/archive/2024.02.OrbitMines_as_a_Game_Project.tsx @@ -1,12 +1,21 @@ import React from 'react'; -import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; import ORGANIZATIONS, {Content, Viewed} from "../../lib/organizations/ORGANIZATIONS"; import {useNavigate} from "react-router-dom"; -import Paper, {Arc, BR, PaperProps, Author, Reference, Section, useCounter, Col, Row} from "../../lib/paper/Paper"; +import Paper, { + Arc, + Author, BlueprintIcons16, BlueprintIcons20, + BR, + Col, + CustomIcon, JetBrainsMono, + PaperProps, + Reference, + Row, + Section, + useCounter +} from "../../lib/paper/Paper"; import {PROFILES} from "../profiles/profiles"; -import BlueprintIcons from "../../lib/layout/font/fonts/blueprintjs/BlueprintIcons"; -import CustomIcon from "../../lib/layout/icons/CustomIcon"; -import {CanvasContainer} from "../../@orbitmines/Visualization"; +import WEBGL from "three/examples/jsm/capabilities/WebGL"; +import {CanvasContainer} from "../papers/2023.OnOrbits"; export const _2024_02_ORBITMINES_AS_A_GAME_PROJECT: Content = { reference: { @@ -44,7 +53,7 @@ const _2024_02_OrbitMines_as_a_Game_Project = () => { ..._2024_02_ORBITMINES_AS_A_GAME_PROJECT.reference, subtitle: "A comprehensive guide on how to be frustrated with pixels. An open call for funding, collaboration or anyone curious to learn more.", pdf: { - fonts: [JetBrainsMono, BlueprintIcons], + fonts: [JetBrainsMono, BlueprintIcons20, BlueprintIcons16], }, Reference: (props: {}) => (<>), references: referenceCounter diff --git a/orbitmines.com/src/routes/papers/2022.OnIntelligibility.tsx b/orbitmines.com/src/routes/papers/2022.OnIntelligibility.tsx index 88b6b85..cf264d8 100755 --- a/orbitmines.com/src/routes/papers/2022.OnIntelligibility.tsx +++ b/orbitmines.com/src/routes/papers/2022.OnIntelligibility.tsx @@ -1,10 +1,18 @@ import React from 'react'; -import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; import REFERENCES from "../profiles/fadi-shawki/fadi_shawki"; import ORGANIZATIONS, {Content, Viewed} from "../../lib/organizations/ORGANIZATIONS"; import {useNavigate} from "react-router-dom"; -import Paper, {BR, PaperProps, Reference, Section, useCounter, CodeBlock, Row} from "../../lib/paper/Paper"; +import Paper, { + BR, + PaperProps, + Reference, + Section, + useCounter, + CodeBlock, + Row, + JetBrainsMono, BlueprintIcons20, BlueprintIcons16 +} from "../../lib/paper/Paper"; import {PROFILES} from "../profiles/profiles"; const { @@ -55,7 +63,7 @@ const OnIntelligibility = () => { const paper: Omit = { ...ON_INTELLIGIBILITY.reference, pdf: { - fonts: [ JetBrainsMono ], + fonts: [JetBrainsMono, BlueprintIcons20, BlueprintIcons16], }, Reference: (props: {}) => (<>), references: referenceCounter diff --git a/orbitmines.com/src/routes/papers/2023.OnOrbits.tsx b/orbitmines.com/src/routes/papers/2023.OnOrbits.tsx index 2986fd5..21fe3a5 100644 --- a/orbitmines.com/src/routes/papers/2023.OnOrbits.tsx +++ b/orbitmines.com/src/routes/papers/2023.OnOrbits.tsx @@ -1,15 +1,31 @@ -import React from 'react'; -import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; +import React, {useCallback, useEffect, useRef, useState} from 'react'; import ORGANIZATIONS, {Content, Viewed} from "../../lib/organizations/ORGANIZATIONS"; -import {useNavigate} from "react-router-dom"; -import Paper, {BR, PaperProps, Arc, HorizontalLine, Link, useCounter, Reference, Section, Block, renderable, Row} from "../../lib/paper/Paper"; +import {useNavigate, useSearchParams} from "react-router-dom"; +import Paper, { + BR, + PaperProps, + Arc, + HorizontalLine, + Link, + useCounter, + Reference, + Section, + Block, + renderable, + Row, + Children, Col, JetBrainsMono, BlueprintIcons20, BlueprintIcons16 +} from "../../lib/paper/Paper"; import {PROFILES} from "../profiles/profiles"; import {ON_INTELLIGIBILITY} from "./2022.OnIntelligibility"; -import {Divider, Intent, Tag} from "@blueprintjs/core"; +import {Button, Divider, Intent, Tag} from "@blueprintjs/core"; import {CatmullRomLine, Center, Circle, QuadraticBezierLine, Torus} from "@react-three/drei"; import REFERENCES from "../profiles/fadi-shawki/fadi_shawki"; -import {CachedVisualizationCanvas} from '../../@orbitmines/Visualization'; import _ from 'lodash'; +import {toPng} from "html-to-image"; +import {Canvas} from "@react-three/fiber"; +import {ACESFilmicToneMapping, SRGBColorSpace} from "three"; +import WEBGL from "three/examples/jsm/capabilities/WebGL"; +import isWebGLAvailable = WEBGL.isWebGLAvailable; export const ON_ORBITS: Content = { reference: { @@ -66,7 +82,7 @@ const OnOrbits = () => { A preliminary exploration through the world of possible inconsistencies. Originally intended as a more technical continuation of earlier thoughts on intelligibility {OnIntelligibilityReference}. ), pdf: { - fonts: [ JetBrainsMono ], + fonts: [JetBrainsMono, BlueprintIcons20, BlueprintIcons16], }, Reference: (props: {}) => (<>), references: referenceCounter @@ -4134,3 +4150,295 @@ const torus = { const add = (a: number[], b: number[]): [number, number, number] => [a[0] + b[0], a[1] + b[1], a[2] + b[2]]; const circle = { radius: 3, color: "orange", segments: 30, } + +export const NoWebGL = () => { + return
No WebGL
+} + +export type VisualizationProps = { + context: Omit, + alt: string, +} + +const Visualization = ({}: { }) => { + return + + +} + +export const CachedVisualizationCanvas = ( + { + alt, + context, + children, + ...props + }: React.HTMLAttributes & Children & VisualizationProps +) => { + const ref = useRef(null); + const [useImage, setUseImage] = useState(true); + let generate; + try { + const [params] = useSearchParams(); + + generate = params.get('generate'); + } catch (e) { + generate = 'pdf'; + } + + const exportPng = useCallback(() => { + if (ref === null) + return; + + toPng(ref.current, { + cacheBust: true, + // backgroundColor: '#1C2127' + }) + .then((dataUrl) => { + const link = document.createElement('a') + link.download = `${alt}.png` + link.href = dataUrl + link.click() + }) + .catch((err) => { + console.log(err) + }); + }, [ref]); + + if (context.link === undefined) + throw 'Cannot have the paper\'s link be undefined when using a cached canvas.' + + const canvasUrl = `${context.link.replace("https://orbitmines.com", "")}/images/${alt}.png`; + + useEffect(() => { + // Just a quick hack to check if it's loaded (could draw it on the canvas from here, ?) + + const img = new Image(); + img.src = canvasUrl; + img.onerror = () => { + setUseImage(false); + }; + }, []); + + if (useImage) { + return + + + } + + return
+
+ + {children} + +
+ {generate === 'canvas' ? + {/* eslint-disable-next-line react/jsx-no-undef */} +
+} + +export const CanvasContainer = ({ + children, + ...props + }: React.HTMLAttributes & Children) => (
+ {children} +
) + +export const ThreeJS = ({ref, children}: Children & { ref?: React.MutableRefObject}) => { + // https://threejs.org/docs/#manual/en/introduction/WebGL-compatibility-check + if (!isWebGLAvailable()) + return ; + + // console.log('webgl2', isWebGLAvailable()); + + /* + https://docs.pmnd.rs/react-three-fiber/api/canvas + - Sets up a Scene and a Camera, the basic building blocks necessary for rendering + - Renders our scene every frame, you do not need a traditional render-loop + + - Canvas is responsive to fit the parent node, so you can control how big it is by changing the parents width and height, in this case #canvas-container. + */ + return + {children} + + {/*/!* https://threejs.org/docs/#api/en/objects/Mesh *!/*/} + {/**/} + {/* /!**/} + {/* https://threejs.org/docs/#api/en/lights/AmbientLight*/} + {/* - This light globally illuminates all objects in the scene equally.*/} + {/* - This light cannot be used to cast shadows as it does not have a direction.*/} + {/* *!/*/} + + {/* /!* https://threejs.org/docs/#api/en/lights/DirectionalLight *!/*/} + {/* /!**!/*/} + + {/* /!* https://threejs.org/docs/#api/en/geometries/BoxGeometry *!/*/} + {/* */} + + {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} + {/* */} + {/**/} + + {/**/} + + {/* https://docs.pmnd.rs/react-postprocessing/selection */} + {/**/} + {/* /!* https://docs.pmnd.rs/react-postprocessing/effect-composer *!/*/} + {/* */} + {/* */} + {/* */} + {/**/} + + {/**/} + + {/**/} + + {/**/} + + {/**/} + + {/**/} + {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} + {/* */} + {/**/} + {/**/} + {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} + {/* */} + {/**/} + {/**/} + {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} + {/* */} + {/**/} + + {/**/} + {/* /!* https://threejs.org/docs/#api/en/materials/MeshStandardMaterial *!/*/} + {/* */} + {/**/} + + {/**/} + + +} + +const VisualizationCanvas = ( + { + children, + ...props + }: React.HTMLAttributes & Children +) => { + + return ( + // ThreeJS: https://threejs.org/ + // React Three Fiber: https://docs.pmnd.rs/react-three-fiber/api/objects + // https://github.com/pmndrs/drei#readme + + {children} + + ); +}; diff --git a/orbitmines.com/src/routes/profiles/Profile.tsx b/orbitmines.com/src/routes/profiles/Profile.tsx index e3ece40..f677617 100644 --- a/orbitmines.com/src/routes/profiles/Profile.tsx +++ b/orbitmines.com/src/routes/profiles/Profile.tsx @@ -1,13 +1,17 @@ import React from 'react'; import {Helmet} from "react-helmet"; import {useLocation} from "react-router-dom"; -import {PaperProps, PaperView, Children, value} from "../../lib/paper/Paper"; -import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; +import { + PaperProps, + PaperView, + Children, + value, + JetBrainsMono, + BlueprintIcons20, + BlueprintIcons16 +} from "../../lib/paper/Paper"; import ORGANIZATIONS, {TProfile} from "../../lib/organizations/ORGANIZATIONS"; -import BlueprintIcons16 from '@blueprintjs/icons/lib/css/blueprint-icons-16.ttf'; -import BlueprintIcons20 from '@blueprintjs/icons/lib/css/blueprint-icons-20.ttf'; - const Profile = ({profile, children}: {profile: TProfile} & Children) => { const location = useLocation(); @@ -16,21 +20,7 @@ const Profile = ({profile, children}: {profile: TProfile} & Children) => { subtitle: profile.subtitle, date: profile.date, pdf: { - fonts: [ - JetBrainsMono, - { - family: 'blueprint-icons-20', - fonts: [ - {src: BlueprintIcons20, fontWeight: 'normal', fontStyle: 'normal'}, - ] - }, - { - family: 'blueprint-icons-16', - fonts: [ - {src: BlueprintIcons16, fontWeight: 'normal', fontStyle: 'normal'}, - ] - } - ], + fonts: [JetBrainsMono, BlueprintIcons20, BlueprintIcons16], }, authors: [{ ...profile, diff --git a/orbitmines.com/src/routes/profiles/fadi-shawki/FadiShawki.tsx b/orbitmines.com/src/routes/profiles/fadi-shawki/FadiShawki.tsx index b18ac5a..865f292 100755 --- a/orbitmines.com/src/routes/profiles/fadi-shawki/FadiShawki.tsx +++ b/orbitmines.com/src/routes/profiles/fadi-shawki/FadiShawki.tsx @@ -4,8 +4,7 @@ import ORGANIZATIONS, {Viewed} from "../../../lib/organizations/ORGANIZATIONS"; import {PROFILES} from "../profiles"; import Profile from "../Profile"; import {ON_INTELLIGIBILITY} from "../../papers/2022.OnIntelligibility"; -import {ON_ORBITS} from "../../papers/2023.OnOrbits"; -import {CanvasContainer} from "../../../@orbitmines/Visualization"; +import {CanvasContainer, ON_ORBITS} from "../../papers/2023.OnOrbits"; import {_2024_02_ORBITMINES_AS_A_GAME_PROJECT} from "../../archive/2024.02.OrbitMines_as_a_Game_Project"; import {Arc, Section, Reference, Category} from "../../../lib/paper/Paper";