diff options
Diffstat (limited to 'src/library/container.rs')
| -rw-r--r-- | src/library/container.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/library/container.rs b/src/library/container.rs deleted file mode 100644 index 5517d927..00000000 --- a/src/library/container.rs +++ /dev/null @@ -1,26 +0,0 @@ -//! Inline- and block-level containers. - -use super::prelude::*; - -/// Size content and place it into a paragraph. -pub struct BoxNode; - -#[class] -impl BoxNode { - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Template> { - let width = args.named("width")?; - let height = args.named("height")?; - let body: LayoutNode = args.find()?.unwrap_or_default(); - Ok(Template::inline(body.sized(Spec::new(width, height)))) - } -} - -/// Place content into a separate flow. -pub struct BlockNode; - -#[class] -impl BlockNode { - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Template> { - Ok(Template::Block(args.find()?.unwrap_or_default())) - } -} |
