Skip to main content

euv_docs/
lib.rs

1mod component;
2mod data;
3mod router;
4
5mod generated {
6    include!(concat!(env!("OUT_DIR"), "/docs_gen.rs"));
7}
8
9pub use std::{cell::RefCell, fmt::Debug, rc::Rc};
10
11pub(crate) use {
12    component::*,
13    data::*,
14    js_sys::{Promise, decode_uri_component, eval},
15    router::*,
16    web_sys::{Event, HtmlInputElement, KeyboardEvent, Location, window},
17};
18
19use {
20    crate::generated::*,
21    euv::{wasm_bindgen::prelude::*, web_sys::*, *},
22    euv_ui::*,
23    wasm_bindgen_futures::{JsFuture, spawn_local},
24};
25
26#[wasm_bindgen]
27pub fn main() {
28    console_error_panic_hook::set_once();
29    inject_app_global_css();
30    Css::inject_css(EUV_MD_CSS);
31    Css::inject_css(
32        ".md-body h1, .md-body h2, .md-body h3, .md-body h4, .md-body h5, .md-body h6 { padding-left: 0 !important; } \
33         .md-body .header-anchor, .md-body h1:hover .header-anchor, .md-body h2:hover .header-anchor, .md-body h3:hover .header-anchor, .md-body h4:hover .header-anchor, .md-body h5:hover .header-anchor, .md-body h6:hover .header-anchor { display: none !important; } \
34         .c_euv_sidebar_group_title { padding: 0.4rem 1.25rem !important; box-sizing: border-box !important; } \
35         .c_euv_sidebar_children { padding: 0 !important; margin: 0 !important; } \
36         .c_euv_sidebar_link { display: block !important; padding: 0.4rem 1.25rem !important; } \
37         .c_euv_sidebar_link:hover { font-weight: 700 !important; background: var(--accent-muted, rgba(0,0,0,0.05)) !important; } \
38         .c_app_main { padding-top: 1.5rem !important; } \
39         .c_feature_card { border: 1px dashed var(--foreground, #000) !important; border-radius: 0 !important; padding: 1rem !important; background: transparent !important; } \
40         .c_home_btn_secondary { background: #fff !important; color: #000 !important; border-color: #fff !important; } \
41         .c_home_btn_secondary:hover { border-color: #000 !important; }",
42    );
43    App::mount("#app", app);
44}