1 module uim.bootstrap.bs5.basic.components.cards.card;
2 
3 import uim.bootstrap;
4 
5 class DBS5Card : DBS5Obj {
6 	mixin(H5This!("DIV", ["card"]));
7 
8 	O block(this O)()	{
9 		return this.classes("card-block");
10 	}
11 	unittest {
12 		assert(Assert(BS5Card.block, `<div class="card card-block"></div>`));
13 	}
14 
15 	O inverse(this O)() {
16 		return this.classes("card-inverse");
17 	}
18 	unittest {
19 		assert(Assert(BS5Card.inverse, `<div class="card card-inverse"></div>`));
20 	}
21 
22 	/// Add Image
23 	mixin(MyContent!("image", "BS5CardImage"));
24 	unittest {
25 		assert(Assert(BS5Card.image, `<div class="card"><img class="card-img-top"></div>`));
26 	}
27 	/// Add card body
28 	mixin(MyContent!("body_", "BS5CardBody"));
29 	unittest {
30 		assert(Assert(BS5Card.body_, `<div class="card"><div class="card-body"></div></div>`));
31 	}
32 
33 	/// Add card footer
34 	mixin(MyContent!("footer", "BS5CardFooter"));
35 	unittest {
36 		assert(Assert(BS5Card.footer, `<div class="card"><div class="card-footer"></div></div>`));
37 	}
38 
39 	/// Add card header
40 	mixin(MyContent!("header", "BS5CardHeader"));
41 	unittest {
42 		assert(Assert(BS5Card.header, `<div class="card"><div class="card-header"></div></div>`));
43 	}
44 
45 	mixin(MyContent!("list", "BS5List"));
46 	unittest {
47 		// assert(Assert(BS5Card.header, `<div class="card"><div class="card-header"></div></div>`));
48 	}
49 
50 	/// Add card image overlay
51 	mixin(MyContent!("overlay", "BS5CardOverlay"));
52 	unittest {
53 		assert(Assert(BS5Card.overlay, `<div class="card"><div class="card-img-overlay"></div></div>`));
54 	}
55 }
56 
57 mixin(H5Calls!"BS5Card");
58 unittest {
59 	assert(Assert(BS5Card, `<div class="card"></div>`));
60 	assert(Assert(BS5Card.block.inverse, `<div class="card card-block card-inverse"></div>`));
61 }