diff --git a/build/configure/src/web.rs b/build/configure/src/web.rs
index 2312eb541..52e096177 100644
--- a/build/configure/src/web.rs
+++ b/build/configure/src/web.rs
@@ -394,7 +394,7 @@ fn build_and_check_editor(build: &mut Build) -> Result<()> {
}
fn build_and_check_reviewer(build: &mut Build) -> Result<()> {
- let reviewer_deps = inputs![":ts:lib", glob!("ts/reviewer/**")];
+ let reviewer_deps = inputs![":ts:lib", glob!("ts/reviewer/**"),];
build.add(
"ts:reviewer:reviewer.js",
EsbuildScript {
@@ -410,7 +410,7 @@ fn build_and_check_reviewer(build: &mut Build) -> Result<()> {
CompileSass {
input: inputs!["ts/reviewer/reviewer.scss"],
output: "ts/reviewer/reviewer.css",
- deps: ":sass".into(),
+ deps: inputs![":sass", "ts/image-occlusion/review.scss"],
load_paths: vec!["."],
},
)?;
diff --git a/rslib/src/image_occlusion/image_occlusion_styling.css b/rslib/src/image_occlusion/image_occlusion_styling.css
deleted file mode 100644
index ac8a7e25b..000000000
--- a/rslib/src/image_occlusion/image_occlusion_styling.css
+++ /dev/null
@@ -1,41 +0,0 @@
-.image-occlusion-canvas {
- --inactive-shape-color: #ffeba2;
- --active-shape-color: #ff8e8e;
- --inactive-shape-border: 1px #212121;
- --active-shape-border: 1px #212121;
-}
-
-.card {
- font-family: arial;
- font-size: 20px;
- text-align: center;
- color: black;
- background-color: white;
-}
-
-.cloze {
- font-weight: bold;
- color: blue;
-}
-
-.nightMode .cloze {
- color: lightblue;
-}
-
-#container {
- position: relative;
-}
-
-img {
- position: absolute;
- top: 0;
- left: 50%;
- transform: translate(-50%, 0);
-}
-
-#canvas {
- position: absolute;
- top: 0;
- left: 50%;
- transform: translate(-50%, 0);
-}
diff --git a/rslib/src/image_occlusion/imagedata.rs b/rslib/src/image_occlusion/imagedata.rs
index 9e103f27b..bf85448c6 100644
--- a/rslib/src/image_occlusion/imagedata.rs
+++ b/rslib/src/image_occlusion/imagedata.rs
@@ -47,10 +47,7 @@ impl Collection {
let mgr = MediaManager::new(&self.media_folder, &self.media_db)?;
let actual_image_name_after_adding = mgr.add_file(&image_filename, &image_bytes)?;
- let image_tag = format!(
- r#""#,
- &actual_image_name_after_adding
- );
+ let image_tag = format!(r#"
"#, &actual_image_name_after_adding);
let current_deck = self.get_current_deck()?;
self.transact(Op::ImageOcclusion, |col| {
diff --git a/rslib/src/image_occlusion/notetype.css b/rslib/src/image_occlusion/notetype.css
new file mode 100644
index 000000000..359781dbb
--- /dev/null
+++ b/rslib/src/image_occlusion/notetype.css
@@ -0,0 +1,14 @@
+#image-occlusion-canvas {
+ --inactive-shape-color: #ffeba2;
+ --active-shape-color: #ff8e8e;
+ --inactive-shape-border: 1px #212121;
+ --active-shape-border: 1px #212121;
+}
+
+.card {
+ font-family: arial;
+ font-size: 20px;
+ text-align: center;
+ color: black;
+ background-color: white;
+}
diff --git a/rslib/src/image_occlusion/notetype.rs b/rslib/src/image_occlusion/notetype.rs
index e0e2febb7..a192e0083 100644
--- a/rslib/src/image_occlusion/notetype.rs
+++ b/rslib/src/image_occlusion/notetype.rs
@@ -51,7 +51,7 @@ impl Collection {
}
pub(crate) fn image_occlusion_notetype(tr: &I18n) -> Notetype {
- const IMAGE_CLOZE_CSS: &str = include_str!("image_occlusion_styling.css");
+ const IMAGE_CLOZE_CSS: &str = include_str!("notetype.css");
let mut nt = empty_stock(
NotetypeKind::Cloze,
OriginalStockKind::ImageOcclusion,
@@ -71,31 +71,29 @@ pub(crate) fn image_occlusion_notetype(tr: &I18n) -> Notetype {
let err_loading = tr.notetypes_error_loading_image_occlusion();
let qfmt = format!(
- "\
-{{{{#{header}}}}}