diff --git a/crates/fractal-engine/src/color.rs b/crates/fractal-engine/src/color.rs index 719094d..b289c61 100644 --- a/crates/fractal-engine/src/color.rs +++ b/crates/fractal-engine/src/color.rs @@ -11,9 +11,9 @@ pub fn ocean_palette(root_index: u8, iterations: u32, max_iterations: u32) -> (u // Ocean theme colors for each root basin let (r, g, b) = match root_index { - 0 => (0.05, 0.25, 0.55), // Deep ocean blue - 1 => (0.0, 0.45, 0.50), // Teal - 2 => (0.15, 0.55, 0.65), // Cyan/turquoise + 0 => (0.05, 0.25, 0.55), // Deep ocean blue + 1 => (0.0, 0.45, 0.50), // Teal + 2 => (0.15, 0.55, 0.65), // Cyan/turquoise _ => (0.05, 0.25, 0.55), }; diff --git a/crates/fractal-engine/src/newton.rs b/crates/fractal-engine/src/newton.rs index 8274e0c..c69a4b5 100644 --- a/crates/fractal-engine/src/newton.rs +++ b/crates/fractal-engine/src/newton.rs @@ -16,9 +16,9 @@ pub fn compute(z_re: f64, z_im: f64, time: f64) -> (u8, u32) { // The three roots of z^3 - 1 const ROOTS: [(f64, f64); 3] = [ - (1.0, 0.0), // 1 - (-0.5, 0.866025403784439), // e^(2πi/3) - (-0.5, -0.866025403784439), // e^(4πi/3) + (1.0, 0.0), // 1 + (-0.5, 0.866025403784439), // e^(2πi/3) + (-0.5, -0.866025403784439), // e^(4πi/3) ]; for iter in 0..MAX_ITERATIONS { diff --git a/crates/fractal-engine/src/wasm.rs b/crates/fractal-engine/src/wasm.rs index 2c90318..29d23ea 100644 --- a/crates/fractal-engine/src/wasm.rs +++ b/crates/fractal-engine/src/wasm.rs @@ -7,7 +7,9 @@ use crate::newton::compute; const MAX_ITERATIONS: u32 = 32; /// Get the canvas element and 2D context -fn get_canvas_and_context(canvas_id: &str) -> Result<(HtmlCanvasElement, CanvasRenderingContext2d), JsValue> { +fn get_canvas_and_context( + canvas_id: &str, +) -> Result<(HtmlCanvasElement, CanvasRenderingContext2d), JsValue> { let window = web_sys::window().ok_or("no window")?; let document = window.document().ok_or("no document")?; let canvas = document @@ -66,7 +68,8 @@ pub fn render_fractal_animated(canvas_id: &str, time: f64, scale: u32) -> Result // Create ImageData at reduced size let clamped = wasm_bindgen::Clamped(&pixels[..]); - let image_data = ImageData::new_with_u8_clamped_array_and_sh(clamped, width as u32, height as u32)?; + let image_data = + ImageData::new_with_u8_clamped_array_and_sh(clamped, width as u32, height as u32)?; // Scale up when drawing to canvas if scale > 1 { @@ -89,8 +92,10 @@ pub fn render_fractal_animated(canvas_id: &str, time: f64, scale: u32) -> Result )?; context.draw_image_with_html_canvas_element_and_dw_and_dh( &temp_canvas, - 0.0, 0.0, - canvas_width as f64, canvas_height as f64 + 0.0, + 0.0, + canvas_width as f64, + canvas_height as f64, )?; } else { context.put_image_data(&image_data, 0.0, 0.0)?; diff --git a/forgejo/start-forgejo.sh b/forgejo/start-forgejo.sh index 660147f..a434592 100755 --- a/forgejo/start-forgejo.sh +++ b/forgejo/start-forgejo.sh @@ -2,17 +2,18 @@ WEB_UI_PORT=3001 SSH_PORT=2223 +DATA_DIR=/home/deploy/forgejo/data docker run -d \ --name forgejo \ - -p ${WEB_UI_PORT}:3000 \ + -p 127.0.0.1:${WEB_UI_PORT}:3000 \ -p ${SSH_PORT}:22 \ - -v ~/forgejo/data:/data \ + -v ${DATA_DIR}:/data \ -v /etc/timezone:/etc/timezone:ro \ -v /etc/localtime:/etc/localtime:ro \ - --restart always \ + --restart always \ codeberg.org/forgejo/forgejo:9 echo "Forgejo started on:" -echo " Web UI: http://zachery.lol:${WEB_UI_PORT}" +echo " Web UI: http://127.0.0.1:${WEB_UI_PORT} (proxied at https://zachery.lol/code/)" echo " ssh port: ${SSH_PORT}" diff --git a/nginx-setup/zachery.lol b/nginx-setup/zachery.lol index 51cf40d..fe646ac 100644 --- a/nginx-setup/zachery.lol +++ b/nginx-setup/zachery.lol @@ -33,8 +33,8 @@ server { listen 443 ssl; # managed by Certbot listen [::]:443 ssl ipv6only=on; # managed by Certbot - ssl_certificate /etc/letsencrypt/live/zachery.lol/fullchain.pem; # managed by Certbot - ssl_certificate_key /etc/letsencrypt/live/zachery.lol/privkey.pem; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/zachery.lol-0001/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/zachery.lol-0001/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } diff --git a/routes/contact/index.html b/routes/contact/index.html index 0e2d27e..077a289 100644 --- a/routes/contact/index.html +++ b/routes/contact/index.html @@ -117,6 +117,8 @@ } } + +
@@ -135,15 +137,7 @@ - + +