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)]
pub struct Challenge {
pub japanese: Vec<Vec<Vec<ChallengeWord>>>,
pub japanese: Option<Vec<Vec<Vec<ChallengeWord>>>>,
pub english: Option<Vec<String>>,
pub song: Option<Song>,
pub youtube: Option<String>,

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

Loading…
Cancel
Save