Skip to content

Commit

Permalink
Fix the servo example
Browse files Browse the repository at this point in the history
Signed-off-by: koko <[email protected]>
  • Loading branch information
kokoISnoTarget committed Nov 1, 2024
1 parent d77de3e commit b4a3e1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions examples/assets/servo.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<meta property="og:logo" content="/img/servo-symbol-color-no-container.png">
<meta property="og:url" content="/">

<link rel="stylesheet" href="file:///Users/nico/code/oss/blitz/examples/assets/servo.css">
<link rel="stylesheet" href="servo.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans:300,400,600,700|Fira+Mono:300,400,600,700|Fire+Sans:100,200,300,400,500,600,700">
<link rel="shortcut icon" href="/img/servo-symbol-color-no-container.png">
Expand All @@ -36,7 +36,7 @@
<div class="container">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<img src="/img/servo-color-negative-no-container.png" alt="Home">
<img src="servo-color-negative-no-container.png" alt="Home">
</a>

<a role="button" class="navbar-burger" data-target="navbar-menu" aria-label="menu" aria-expanded="false">
Expand Down
5 changes: 4 additions & 1 deletion examples/servo.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
use dioxus_native::Config;
use std::path::Path;

fn main() {
let dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples/assets/servo.html");
let url = format!("file://{}", dir.display());
dioxus_native::launch_static_html_cfg(
include_str!("./assets/servo.html"),
Config {
stylesheets: Vec::new(),
base_url: Some(String::from("https://servo.org/")),
base_url: Some(url),
},
);
}

0 comments on commit b4a3e1b

Please sign in to comment.