1 module uim.bootstrap.bs4.components.cards.card;
2 
3 import uim.bootstrap;
4 
5 class DBS4Card : DBS4Obj {
6 	mixin(H5This!("DIV", ["card"]));
7 
8 	O block(this O)()	{
9 		return this.classes("card-block");
10 	}
11 	unittest {
12 		assert(Assert(BS4Card.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(BS4Card.inverse, `<div class="card card-inverse"></div>`));
20 	}
21 
22 	/// Add Image
23 	mixin(MyContent!("image", "BS4CardImage"));
24 	unittest {
25 		assert(Assert(BS4Card.image, `<div class="card"><img class="card-img-top"></div>`));
26 	}
27 	/// Add card body
28 	mixin(MyContent!("body_", "BS4CardBody"));
29 	unittest {
30 		assert(Assert(BS4Card.body_, `<div class="card"><div class="card-body"></div></div>`));
31 	}
32 
33 	/// Add card footer
34 	mixin(MyContent!("footer", "BS4CardFooter"));
35 	unittest {
36 		assert(Assert(BS4Card.footer, `<div class="card"><div class="card-footer"></div></div>`));
37 	}
38 
39 	/// Add card header
40 	mixin(MyContent!("header", "BS4CardHeader"));
41 	unittest {
42 		assert(Assert(BS4Card.header, `<div class="card"><div class="card-header"></div></div>`));
43 	}
44 
45 	/// Add card image overlay
46 	mixin(MyContent!("overlay", "BS4CardOverlay"));
47 	unittest {
48 		assert(Assert(BS4Card.overlay, `<div class="card"><div class="card-img-overlay"></div></div>`));
49 	}
50 }
51 
52 mixin(H5Calls!"BS4Card");
53 unittest {
54 	assert(Assert(BS4Card, `<div class="card"></div>`));
55 	assert(Assert(BS4Card.block.inverse, `<div class="card card-block card-inverse"></div>`));
56 }