Add style

This commit is contained in:
Luc Mcgrady 2025-10-04 17:08:43 +01:00
parent aa42d87558
commit 0db28a7101
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C

View file

@ -396,11 +396,12 @@ impl crate::services::SchedulerService for Collection {
let cid = next_card.card.id;
let render = self.render_existing_card(cid, false, false)?;
let style = format!("<style>{}</style>", render.css);
Ok(NextCardDataResponse {
next_card: Some(NextCardData {
front: render.question().to_string(),
back: render.answer().to_string(),
front: [style.clone(), render.question().to_string()].concat(),
back: [style, render.answer().to_string()].concat(),
states: Some(next_card.states.clone().into()),
}),