diff --git a/src/vn.rs b/src/vn.rs index 05960fe..c36fac2 100644 --- a/src/vn.rs +++ b/src/vn.rs @@ -53,7 +53,7 @@ fn generate_html(scenes: Vec, sections: Vec) -> Markup { } @for (index, section) in sections.into_iter().enumerate() { - div .story-section + div .text-section data-section-index=(index) style=(format!("display: {};", if index == 0 { "block" } else { "none" })) { (section) @@ -276,7 +276,7 @@ fn interactive_script(total_scenes: usize) -> Markup { const totalScenes = {total_scenes}; function updateSection() {{ - document.querySelectorAll('.story-section').forEach((el, index) => {{ + document.querySelectorAll('.text-section').forEach((el, index) => {{ el.style.display = index === currentScene ? 'block' : 'none'; }}); document.querySelectorAll('.scene-section').forEach((el, index) => {{