Handle challenges with no Japanese content like #59

This commit is contained in:
Elnu 2023-07-01 12:52:52 -07:00
parent fd6619320e
commit 811afd0333
2 changed files with 3 additions and 1 deletions

View file

@ -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>,

View file

@ -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