now there are items and a bit of style to the library

This commit is contained in:
Chris Cochrun 2025-01-15 14:31:48 -06:00
parent 929b0a33d1
commit 40580a6e7a
7 changed files with 131 additions and 9 deletions

View file

@ -10,6 +10,8 @@ use tracing::error;
use crate::{Background, Slide, SlideBuilder, TextAlignment};
use super::{
content::Content,
kinds::ServiceItemKind,
model::{get_db, LibraryKind, Model},
service_items::ServiceTrait,
};
@ -34,6 +36,16 @@ pub struct Presentation {
pub kind: PresKind,
}
impl Content for Presentation {
fn title(&self) -> String {
self.title.clone()
}
fn kind(&self) -> ServiceItemKind {
ServiceItemKind::Presentation(self.clone())
}
}
impl From<Value> for Presentation {
fn from(value: Value) -> Self {
Self::from(&value)