|
2 | 2 | <html> |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
5 | 6 | <title>PFElements: pfe-card Demo</title> |
6 | 7 |
|
7 | 8 | <!-- uncomment the es5-adapter if you're using the umd version --> |
|
27 | 28 | <link href="../../pfelement/pfelement.min.css" rel="stylesheet"> |
28 | 29 |
|
29 | 30 | <style> |
30 | | - /* For demo only */ |
31 | | - .demo-cards { |
32 | | - display: flex; |
33 | | - flex-wrap: wrap; |
34 | | - } |
35 | | - |
36 | | - .demo-cards > * { |
37 | | - margin: 0 16px 32px; |
38 | | - width: calc(25% - 32px); |
39 | | - } |
| 31 | + /* For demo only */ |
| 32 | + .demo-cards { |
| 33 | + display: flex; |
| 34 | + flex-wrap: wrap; |
| 35 | + } |
| 36 | + |
| 37 | + .demo-cards > * { |
| 38 | + margin: 0 16px 32px; |
| 39 | + min-width: 200px; |
| 40 | + width: calc(25% - 32px); |
| 41 | + } |
| 42 | + |
| 43 | + h2[slot="pfe-card--header"] { |
| 44 | + font-size: 1.1em; |
| 45 | + font-weight: bolder; |
| 46 | + } |
| 47 | + |
| 48 | + .custom-border { |
| 49 | + --pfe-card--BorderColor: #eee; |
| 50 | + --pfe-card--BorderWeight: 1px; |
| 51 | + } |
| 52 | + |
| 53 | + .custom-header-background { |
| 54 | + --pfe-card__header--BackgroundColor: #0477a4; |
| 55 | + --pfe-card__header--Color: #fff; |
| 56 | + } |
40 | 57 | </style> |
41 | 58 |
|
42 | 59 | </head> |
43 | 60 | <body unresolved> |
44 | 61 | <h1><pfe-card></h1> |
45 | 62 | <div class="demo-cards"> |
46 | 63 |
|
47 | | - <pfe-card color="lightest"> |
48 | | - <h2 slot="header">Lightest card</h2> |
| 64 | + <pfe-card pfe-color="lightest" class="custom-border"> |
| 65 | + <h2 slot="pfe-card--header">Lightest card</h2> |
49 | 66 | <p>This is the lightest pfe-card and <a href="#">a link</a>.</p> |
50 | | - <div slot="footer"><pfe-cta priority="primary"><a href="#">Learn more</a></pfe-cta></div> |
| 67 | + <pfe-cta slot="pfe-card--footer"> |
| 68 | + <a href="#">Learn more</a> |
| 69 | + </pfe-cta> |
51 | 70 | </pfe-card> |
52 | | - <pfe-card color="light"> |
53 | | - <h2 slot="header">Light card</h2> |
54 | | - |
55 | | - <p> |
56 | | - This is the light pfe-card and <a href="#">a link</a>. |
57 | | - </p> |
58 | | - <p> |
59 | | - Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. |
60 | | - </p> |
61 | | - <p> |
62 | | - Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment. |
63 | | - </p> |
64 | | - |
65 | | - <div slot="footer"><pfe-cta priority="secondary"><a href="#">Learn more</a></pfe-cta></div> |
| 71 | + |
| 72 | + <pfe-card pfe-color="lighter"> |
| 73 | + <h2 slot="pfe-card--header">Light card</h2> |
| 74 | + <p>This is the light pfe-card and <a href="#">a link</a>.</p> |
| 75 | + <p>Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.</p> |
| 76 | + <p>Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.</p> |
| 77 | + <pfe-cta slot="pfe-card--footer"> |
| 78 | + <a href="#">Learn more</a> |
| 79 | + </pfe-cta> |
66 | 80 | </pfe-card> |
| 81 | + |
67 | 82 | <pfe-card> |
68 | | - <h2 slot="header">Default card</h2> |
| 83 | + <h2 slot="pfe-card--header">Default card</h2> |
69 | 84 | Unwrapped item. This is the default pfe-card and <a href="#">a link</a>. |
70 | | - <div slot="footer"><pfe-cta priority="secondary"><a href="#">Learn more</a></pfe-cta></div> |
| 85 | + <pfe-cta slot="pfe-card--footer"> |
| 86 | + <a href="#">Learn more</a> |
| 87 | + </pfe-cta> |
71 | 88 | </pfe-card> |
72 | | - <pfe-card color="dark"> |
73 | | - <h2 slot="header">Dark Card</h2> |
| 89 | + |
| 90 | + <pfe-card pfe-color="darker" pfe-img-src="https://www.redhat.com/files/webux/img/bandbg/bg-infrastructure-management-pattern-transparent-tile.png" style="--pfe-card__header--BackgroundColor: rgba(45,45,45,.7);"> |
| 91 | + <h2 slot="pfe-card--header">Dark Card</h2> |
74 | 92 | <p>This is the dark pfe-card and <a href="#">a link</a>.</p> |
75 | | - <div slot="footer"><pfe-cta priority="secondary" on="dark"><a href="#">Learn more</a></pfe-cta></div> |
| 93 | + <pfe-cta slot="pfe-card--footer"> |
| 94 | + <a href="#">Learn more</a> |
| 95 | + </pfe-cta> |
76 | 96 | </pfe-card> |
77 | | - <pfe-card color="darkest"> |
78 | | - <h2 slot="header">Darkest Card</h2> |
| 97 | + |
| 98 | + <pfe-card pfe-color="darkest"> |
| 99 | + <h2 slot="pfe-card--header">Darkest Card</h2> |
79 | 100 | <p>This is the darkest pfe-card and <a href="#">a link</a>.</p> |
80 | | - <div slot="footer"><pfe-cta priority="secondary" on="dark"><a href="#">Learn more</a></pfe-cta></div> |
| 101 | + <pfe-cta slot="pfe-card--footer"> |
| 102 | + <a href="#">Learn more</a> |
| 103 | + </pfe-cta> |
81 | 104 | </pfe-card> |
82 | | - <pfe-card color="complement"> |
83 | | - <h2 slot="header">Complement Card</h2> |
| 105 | + |
| 106 | + <pfe-card pfe-color="complement"> |
| 107 | + <h2 slot="pfe-card--header">Complement Card</h2> |
84 | 108 | <p>This is the complement pfe-card and <a href="#">a link</a>.</p> |
85 | | - <div slot="footer"><pfe-cta priority="secondary" on="dark"><a href="#">Learn more</a></pfe-cta></div> |
| 109 | + <pfe-cta slot="pfe-card--footer"> |
| 110 | + <a href="#">Learn more</a> |
| 111 | + </pfe-cta> |
86 | 112 | </pfe-card> |
87 | | - <pfe-card color="accent"> |
88 | | - <h2 slot="header">Accent Card</h2> |
| 113 | + |
| 114 | + <pfe-card pfe-color="accent"> |
| 115 | + <h2 slot="pfe-card--header">Accent Card</h2> |
89 | 116 | <p>This is the accent pfe-card and <a href="#">a link</a>. Leverage agile frameworks to provide a robust synopsis for high level overviews.</p> |
90 | 117 | </pfe-card> |
91 | 118 | </div> |
| 119 | + |
| 120 | + <div class="demo-cards"> |
| 121 | + <pfe-card pfe-color="lighter"> |
| 122 | + <img src="http://placekitten.com/200/150"/> |
| 123 | + <h2>Imaged card with no overflow</h2> |
| 124 | + <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit.</p> |
| 125 | + <pfe-cta slot="pfe-card--footer"> |
| 126 | + <a href="#">Learn more</a> |
| 127 | + </pfe-cta> |
| 128 | + </pfe-card> |
| 129 | + |
| 130 | + <pfe-card pfe-color="lighter"> |
| 131 | + <img pfe-overflow="top right left" src="http://placekitten.com/600/300"/> |
| 132 | + <h2>Imaged card with top & side overflow</h2> |
| 133 | + <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quaerat porro similique saepe tempora vel! Facilis, porro?</p> |
| 134 | + <pfe-cta slot="pfe-card--footer"> |
| 135 | + <a href="#">Learn more</a> |
| 136 | + </pfe-cta> |
| 137 | + </pfe-card> |
| 138 | + |
| 139 | + <pfe-card pfe-color="lighter" class="custom-header-background"> |
| 140 | + <h2 slot="pfe-card--header">Imaged card with side overflow + header</h2> |
| 141 | + <img pfe-overflow="top right left" src="http://placekitten.com/500/250"/> |
| 142 | + <p style="margin-top: 10px;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Quaerat porro similique saepe tempora vel! Facilis, porro?</p> |
| 143 | + <pfe-cta slot="pfe-card--footer"> |
| 144 | + <a href="#">Learn more</a> |
| 145 | + </pfe-cta> |
| 146 | + </pfe-card> |
| 147 | + |
| 148 | + <pfe-card pfe-color="lighter"> |
| 149 | + <h2>Imaged card with side overflow</h2> |
| 150 | + <img pfe-overflow="right left" src="http://placekitten.com/450/250"/> |
| 151 | + <pfe-cta slot="pfe-card--footer"> |
| 152 | + <a href="#">Learn more</a> |
| 153 | + </pfe-cta> |
| 154 | + </pfe-card> |
| 155 | + |
| 156 | + <pfe-card pfe-color="lighter"> |
| 157 | + <h2>Imaged card with side & bottom overflow</h2> |
| 158 | + <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta rerum tempore natus alias! Cumque illum provident corrupti voluptates.</p> |
| 159 | + <img pfe-overflow="right left bottom" src="http://placekitten.com/400/250" slot="pfe-card--footer"/> |
| 160 | + </pfe-card> |
| 161 | + </div> |
92 | 162 | </body> |
93 | 163 | </html> |
0 commit comments