Use .class instead of class="class"
This commit is contained in:
parent
e69f64f952
commit
a1f867025b
32
src/vn.rs
32
src/vn.rs
@ -28,10 +28,10 @@ fn render_scene(settings: &PlayerSettings, name: &str) -> Markup {
|
||||
|
||||
fn navigation_controls(total_scenes: usize) -> Markup {
|
||||
html! {
|
||||
div class="nav-controls" {
|
||||
button class="nav-button" onclick="prev()" { "←" }
|
||||
div .nav-controls {
|
||||
button .nav-button onclick="prev()" { "←" }
|
||||
span id="section-counter" { "1/" (total_scenes) }
|
||||
button class="nav-button" onclick="next()" { "→" }
|
||||
button .nav-button onclick="next()" { "→" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -41,22 +41,22 @@ fn generate_html(scenes: Vec<Markup>, sections: Vec<Markup>) -> Markup {
|
||||
|
||||
html! {
|
||||
div id="story-container" {
|
||||
div class="textbox-container" {
|
||||
div class="scene-container" {
|
||||
div .textbox-container {
|
||||
div .scene-container {
|
||||
@for (index, scene) in scenes.iter().enumerate() {
|
||||
div class="scene-section"
|
||||
div .scene-section
|
||||
data-section-index=(index)
|
||||
style=(format!("display: {};", if index == 0 { "block" } else { "none" })) {
|
||||
div class="scene-content" {
|
||||
div .scene-content {
|
||||
(scene)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div class="textbox-content" {
|
||||
div .textbox-content {
|
||||
@for (index, section) in sections.into_iter().enumerate() {
|
||||
div class="story-section"
|
||||
div .story-section
|
||||
data-section-index=(index)
|
||||
style=(format!("display: {};", if index == 0 { "block" } else { "none" })) {
|
||||
(section)
|
||||
@ -358,16 +358,16 @@ pub fn render_novel(
|
||||
|
||||
if let Some(_named_multilinear_info) = named_multilinear_info {
|
||||
let choices_html = html! {
|
||||
div class="choices-section" {
|
||||
div .choices-section {
|
||||
@for (i, dialog_sequence) in dialogs.iter().enumerate() {
|
||||
@if let Some(block) = dialog_sequence.blocks.first() {
|
||||
form method="POST" {
|
||||
input type="hidden" name="progress" value=(progress);
|
||||
input type="hidden" name="choice" value=(i);
|
||||
button type="submit" class="choice-button" {
|
||||
fieldset class="choice-box" {
|
||||
button type="submit" .choice-button {
|
||||
fieldset .choice-box {
|
||||
@if !block.name.is_empty() {
|
||||
legend class="choice-name" { (block.name) }
|
||||
legend .choice-name { (block.name) }
|
||||
}
|
||||
(block.lines[0].text)
|
||||
}
|
||||
@ -454,11 +454,11 @@ fn render_dialog_block(block: &dialogi::DialogBlock<Parameter>, start_level: usi
|
||||
);
|
||||
|
||||
html! {
|
||||
fieldset class="visual-novel-box" {
|
||||
fieldset .visual-novel-box {
|
||||
@if !block.name.is_empty() {
|
||||
legend class="character-name" { (block.name) }
|
||||
legend .character-name { (block.name) }
|
||||
}
|
||||
div class="dialog-content" {
|
||||
div .dialog-content {
|
||||
@match String::from_utf8(content) {
|
||||
Ok(text) => (maud::PreEscaped(text)),
|
||||
Err(e) => (maud::PreEscaped(format!("Error: {}", e))),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user