source in github

This commit is contained in:
Guilleag01
2025-09-21 22:11:09 +02:00
parent 1fa789fc88
commit 810d4e5994
7 changed files with 47 additions and 47 deletions

7
dist/index.html vendored
View File

@@ -4,6 +4,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simplex Optimizer</title> <title>Simplex Optimizer</title>
<style> <style>
/* --- Light Theme (default) --- */ /* --- Light Theme (default) --- */
@@ -338,15 +339,15 @@
} }
</style> </style>
<link rel="modulepreload" href="/simplex_web-c17f0d3b3483d1df.js" crossorigin="anonymous" integrity="sha384-N6NbmI2kXhtLKxU84HCP168wd/JaKiw9gvaTItFQ73ibm8plWJNvdpDLLXdRWPXp"><link rel="preload" href="/simplex_web-c17f0d3b3483d1df_bg.wasm" crossorigin="anonymous" integrity="sha384-3HZCB6oIMDFCv9h2J2OUGzBwI1zybrRD7BgPyGTDAFMv1FD8m8p2/25UfdwG3mYx" as="fetch" type="application/wasm"></head> <link rel="modulepreload" href="/simplex_web-678e6d27fa09c665.js" crossorigin="anonymous" integrity="sha384-jLsG/i5rhprifngulT1z1YIwB1qvFSKIPhhIlTBchM7UuLGFmxeYIgWRGtZRQMqL"><link rel="preload" href="/simplex_web-678e6d27fa09c665_bg.wasm" crossorigin="anonymous" integrity="sha384-waSdPUoWT1KI3EIzZeCg71qrYUKlVW0ZumxbfGJa5lVaTig8XWxlR1wYaxRF2Nk3" as="fetch" type="application/wasm"></head>
<body> <body>
<script type="module"> <script type="module">
import init, * as bindings from '/simplex_web-c17f0d3b3483d1df.js'; import init, * as bindings from '/simplex_web-678e6d27fa09c665.js';
const wasm = await init({ module_or_path: '/simplex_web-c17f0d3b3483d1df_bg.wasm' }); const wasm = await init({ module_or_path: '/simplex_web-678e6d27fa09c665_bg.wasm' });
window.wasmBindings = bindings; window.wasmBindings = bindings;

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 28.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 97.6 96" style="enable-background:new 0 0 97.6 96;" xml:space="preserve">
<style type="text/css">
.st0{fill:#1B1F24;}
</style>
<path class="st0" d="M48.9,0C21.8,0,0,22,0,49.2C0,71,14,89.4,33.4,95.9c2.4,0.5,3.3-1.1,3.3-2.4c0-1.1-0.1-5.1-0.1-9.1
c-13.6,2.9-16.4-5.9-16.4-5.9c-2.2-5.7-5.4-7.2-5.4-7.2c-4.4-3,0.3-3,0.3-3c4.9,0.3,7.5,5.1,7.5,5.1c4.4,7.5,11.4,5.4,14.2,4.1
c0.4-3.2,1.7-5.4,3.1-6.6c-10.8-1.1-22.2-5.4-22.2-24.3c0-5.4,1.9-9.8,5-13.2c-0.5-1.2-2.2-6.3,0.5-13c0,0,4.1-1.3,13.4,5.1
c3.9-1.1,8.1-1.6,12.2-1.6s8.3,0.6,12.2,1.6c9.3-6.4,13.4-5.1,13.4-5.1c2.7,6.8,1,11.8,0.5,13c3.2,3.4,5,7.8,5,13.2
c0,18.9-11.4,23.1-22.3,24.3c1.8,1.5,3.3,4.5,3.3,9.1c0,6.6-0.1,11.9-0.1,13.5c0,1.3,0.9,2.9,3.3,2.4C83.6,89.4,97.6,71,97.6,49.2
C97.7,22,75.8,0,48.9,0z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 28.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 97.6 96" style="enable-background:new 0 0 97.6 96;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<path class="st0" d="M48.9,0C21.8,0,0,22,0,49.2C0,71,14,89.4,33.4,95.9c2.4,0.5,3.3-1.1,3.3-2.4c0-1.1-0.1-5.1-0.1-9.1
c-13.6,2.9-16.4-5.9-16.4-5.9c-2.2-5.7-5.4-7.2-5.4-7.2c-4.4-3,0.3-3,0.3-3c4.9,0.3,7.5,5.1,7.5,5.1c4.4,7.5,11.4,5.4,14.2,4.1
c0.4-3.2,1.7-5.4,3.1-6.6c-10.8-1.1-22.2-5.4-22.2-24.3c0-5.4,1.9-9.8,5-13.2c-0.5-1.2-2.2-6.3,0.5-13c0,0,4.1-1.3,13.4,5.1
c3.9-1.1,8.1-1.6,12.2-1.6s8.3,0.6,12.2,1.6c9.3-6.4,13.4-5.1,13.4-5.1c2.7,6.8,1,11.8,0.5,13c3.2,3.4,5,7.8,5,13.2
c0,18.9-11.4,23.1-22.3,24.3c1.8,1.5,3.3,4.5,3.3,9.1c0,6.6-0.1,11.9-0.1,13.5c0,1.3,0.9,2.9,3.3,2.4C83.6,89.4,97.6,71,97.6,49.2
C97.7,22,75.8,0,48.9,0z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -4,6 +4,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link data-trunk rel="copy-dir" href="img">
<title>Simplex Optimizer</title> <title>Simplex Optimizer</title>
<style> <style>
/* --- Light Theme (default) --- */ /* --- Light Theme (default) --- */

View File

@@ -159,6 +159,19 @@ impl Component for App {
// <button onclick={change_theme}>{"Add"}</button> // <button onclick={change_theme}>{"Add"}</button>
<header class="header"> <header class="header">
<h1>{"Simplex optimizer"}</h1> <h1>{"Simplex optimizer"}</h1>
// <div>
// {"Source in "}
// <a href="https://github.com/Guilleag01/simplex_web">{"github"}</a>
// </div>
<div style="display: flex; align-items: center; gap: 8px;">
<span><b>{"Source in"}</b></span>
<a href="https://github.com/Guilleag01/simplex_web" target="_blank">
<img src={if self.theme == "" {"img/GitHub_Invertocat_Dark.svg"} else {"img/GitHub_Invertocat_Light.svg"}}
alt="GitHub Logo"
style="width: 24px; height: 24px;"/>
</a>
</div>
<button onclick={change_theme} id="theme-toggle" class="theme-btn" title="Toggle Dark/Light Mode"> <button onclick={change_theme} id="theme-toggle" class="theme-btn" title="Toggle Dark/Light Mode">
{ if self.theme == "".to_string() { "🌙" } else { "☀️" } } { if self.theme == "".to_string() { "🌙" } else { "☀️" } }
</button> </button>
@@ -269,8 +282,8 @@ impl Component for App {
} }
} }
</div> </div>
</div>
</div>
</div> </div>
</div> </div>
} }

View File

@@ -1,6 +1,5 @@
pub mod app; pub mod app;
pub mod constraint_input; pub mod constraint_input;
pub mod math;
pub mod simplex; pub mod simplex;
pub mod target_input; pub mod target_input;
pub mod variable_input; pub mod variable_input;

View File

@@ -1,42 +0,0 @@
// use wasm_bindgen::prelude::*;
// use web_sys::window;
// use yew::prelude::*;
// #[wasm_bindgen]
// extern "C" {
// fn renderMath();
// }
// #[function_component(Math)]
// pub fn math(props: &Props) -> Html {
// let formula = &props.formula;
// // Trigger MathJax typesetting when component mounts
// {
// let formula = formula.clone();
// use_effect(|| {
// if let Some(window) = window() {
// let _ = window.eval("renderMath()");
// }
// })
// // use_effect_with_deps(
// // move |_| {
// // if let Some(window) = window() {
// // let _ = window.eval("MathJax.typesetPromise()");
// // }
// // || ()
// // },
// // formula,
// // );
// }
// html! {
// <p>{ formula }</p> // You can use <div> or <span> depending on display mode
// }
// }
// #[derive(Properties, PartialEq, Clone)]
// pub struct Props {
// pub formula: String,
// }