Handle challenges with no Japanese content like #59

rust
Elnu 1 year ago
parent fd6619320e
commit 811afd0333

@ -8,7 +8,7 @@ use crate::{prelude::*};
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub struct Challenge { pub struct Challenge {
pub japanese: Vec<Vec<Vec<ChallengeWord>>>, pub japanese: Option<Vec<Vec<Vec<ChallengeWord>>>>,
pub english: Option<Vec<String>>, pub english: Option<Vec<String>>,
pub song: Option<Song>, pub song: Option<Song>,
pub youtube: Option<String>, pub youtube: Option<String>,

@ -67,6 +67,7 @@
<div> <div>
<div> <div>
<h1>Welcome to Tegaki Tuesday #{{ challenge }}!</h1> <h1>Welcome to Tegaki Tuesday #{{ challenge }}!</h1>
{% if content.japanese %}
<div lang="ja"> <div lang="ja">
<script> <script>
let kyujitai = false; let kyujitai = false;
@ -98,6 +99,7 @@
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
</div> </div>
{% endif %}
{% if content.translation %} {% if content.translation %}
<p> <p>
Translation Translation

Loading…
Cancel
Save