Added some animations
This commit is contained in:
parent
4f7836d296
commit
0c7bc1c2b1
2 changed files with 22 additions and 21 deletions
|
|
@ -11,8 +11,8 @@ fn greet(name: &str) -> String {
|
|||
#[tauri::command]
|
||||
fn parse_markdown(document: &str) -> String {
|
||||
let mut rendered_markdown: String = String::new();
|
||||
tauri::Builder::default().setup(move |app| {
|
||||
let webview = app.get_webview_window("main").unwrap();
|
||||
// tauri::Builder::default().setup(move |app| {
|
||||
// let webview = app.get_webview_window("main").unwrap();
|
||||
let arena = Arena::new();
|
||||
|
||||
// Parse the document into a root `AstNode`
|
||||
|
|
@ -25,16 +25,16 @@ fn parse_markdown(document: &str) -> String {
|
|||
for node in root.descendants() {
|
||||
if let NodeValue::Image(ref mut image_node) = node.data.borrow_mut().value {
|
||||
// image_node.url = format!("file://{}", image_node.url);
|
||||
println!("{:?}", webview.eval(&image_node.url));
|
||||
// println!("{:?}", webview.eval(&image_node.url));
|
||||
}
|
||||
}
|
||||
let mut html = vec![];
|
||||
format_html(root, &options, &mut html).unwrap();
|
||||
println!("{}", String::from_utf8(html.clone()).unwrap());
|
||||
rendered_markdown = String::from_utf8(html).unwrap();
|
||||
Ok(())
|
||||
});
|
||||
return "".to_owned();
|
||||
// Ok(())
|
||||
// });
|
||||
return rendered_markdown.to_owned();
|
||||
// String::from_str("lololo").unwrap()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,5 +128,6 @@ ul li {
|
|||
#sidebar {
|
||||
visibility: visible;
|
||||
width: var(--sidebar-width);
|
||||
transition: all 0.1s ease-out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue