Renamed story section to text section
This commit is contained in:
parent
5a5a5eb913
commit
b90a1255d3
@ -53,7 +53,7 @@ fn generate_html(scenes: Vec<Markup>, sections: Vec<Markup>) -> Markup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@for (index, section) in sections.into_iter().enumerate() {
|
@for (index, section) in sections.into_iter().enumerate() {
|
||||||
div .story-section
|
div .text-section
|
||||||
data-section-index=(index)
|
data-section-index=(index)
|
||||||
style=(format!("display: {};", if index == 0 { "block" } else { "none" })) {
|
style=(format!("display: {};", if index == 0 { "block" } else { "none" })) {
|
||||||
(section)
|
(section)
|
||||||
@ -276,7 +276,7 @@ fn interactive_script(total_scenes: usize) -> Markup {
|
|||||||
const totalScenes = {total_scenes};
|
const totalScenes = {total_scenes};
|
||||||
|
|
||||||
function updateSection() {{
|
function updateSection() {{
|
||||||
document.querySelectorAll('.story-section').forEach((el, index) => {{
|
document.querySelectorAll('.text-section').forEach((el, index) => {{
|
||||||
el.style.display = index === currentScene ? 'block' : 'none';
|
el.style.display = index === currentScene ? 'block' : 'none';
|
||||||
}});
|
}});
|
||||||
document.querySelectorAll('.scene-section').forEach((el, index) => {{
|
document.querySelectorAll('.scene-section').forEach((el, index) => {{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user