User:Eviand/TemplateTesting: Difference between revisions
From SpiritVale Wiki
More actions
No edit summary |
|||
Line 443: | Line 443: | ||
|} | |} | ||
|} | |} | ||
==Template Box== | |||
Had this super fun template idea, but I couldn't get it to work on mobile. Going to shelve it for now as it might be useful for later. | |||
<noinclude>[[Category:Templates]]</noinclude> | |||
<!-- Compact Infobox Template with Shrinking Rows, Equal Height Columns, Word Wrapping, and Mobile-Safe Display --> | |||
<div style="display:inline-block; width:100%; max-width:260px; margin:0 0 1em 1em; float:{{{float|right}}}; border:2px solid #5a4e7c; background:#f0f2f8; border-radius:12px; box-shadow:0 2px 4px rgba(0,0,0,0.2); font-size:95%; overflow:hidden; box-sizing:border-box;"> | |||
<!-- Header Section --> | |||
<div style="background:linear-gradient(180deg,#7a6fb0,#5a4e7c); color:white; text-align:center; padding:4px 6px; font-size:110%; border-top-left-radius:10px; border-top-right-radius:10px;"> | |||
'''{{{BoxName}}}''' | |||
</div> | |||
<!-- Content Section --> | |||
<div style="padding:0; display:flex; flex-direction:column;"> | |||
<!-- Row 1 --> | |||
{{#if: {{{A1|}}} | | |||
<div style="display:flex; align-items:center; flex-wrap:nowrap;"> | |||
<div style="flex:0 0 {{{Col1Width|35%}}}; display:flex; align-items:center; background:#e6e3f0; font-weight:bold; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #f7f7f7;">{{{A1}}}</div> | |||
<div style="flex:1; max-width:48ch; display:flex; align-items:center; background:#ffffff; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #ccc;">{{{B1}}}</div> | |||
</div> | |||
}} | |||
<!-- Row 2 --> | |||
{{#if: {{{A2|}}} | | |||
<div style="display:flex; align-items:center; flex-wrap:nowrap;"> | |||
<div style="flex:0 0 {{{Col1Width|35%}}}; display:flex; align-items:center; background:#e6e3f0; font-weight:bold; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #f7f7f7;">{{{A2}}}</div> | |||
<div style="flex:1; max-width:48ch; display:flex; align-items:center; background:#ffffff; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #ccc;">{{{B2}}}</div> | |||
</div> | |||
}} | |||
<!-- Row 3 --> | |||
{{#if: {{{A3|}}} | | |||
<div style="display:flex; align-items:center; flex-wrap:nowrap;"> | |||
<div style="flex:0 0 {{{Col1Width|35%}}}; display:flex; align-items:center; background:#e6e3f0; font-weight:bold; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #f7f7f7;">{{{A3}}}</div> | |||
<div style="flex:1; max-width:48ch; display:flex; align-items:center; background:#ffffff; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #ccc;">{{{B3}}}</div> | |||
</div> | |||
}} | |||
<!-- Row 4 --> | |||
{{#if: {{{A4|}}} | | |||
<div style="display:flex; align-items:center; flex-wrap:nowrap;"> | |||
<div style="flex:0 0 {{{Col1Width|35%}}}; display:flex; align-items:center; background:#e6e3f0; font-weight:bold; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #f7f7f7;">{{{A4}}}</div> | |||
<div style="flex:1; max-width:48ch; display:flex; align-items:center; background:#ffffff; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #ccc;">{{{B4}}}</div> | |||
</div> | |||
}} | |||
<!-- Row 5 --> | |||
{{#if: {{{A5|}}} | | |||
<div style="display:flex; align-items:center; flex-wrap:nowrap;"> | |||
<div style="flex:0 0 {{{Col1Width|35%}}}; display:flex; align-items:center; background:#e6e3f0; font-weight:bold; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #f7f7f7;">{{{A5}}}</div> | |||
<div style="flex:1; max-width:48ch; display:flex; align-items:center; background:#ffffff; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #ccc;">{{{B5}}}</div> | |||
</div> | |||
}} | |||
<!-- Row 6 --> | |||
{{#if: {{{A6|}}} | | |||
<div style="display:flex; align-items:center; flex-wrap:nowrap;"> | |||
<div style="flex:0 0 {{{Col1Width|35%}}}; display:flex; align-items:center; background:#e6e3f0; font-weight:bold; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #f7f7f7;">{{{A6}}}</div> | |||
<div style="flex:1; max-width:48ch; display:flex; align-items:center; background:#ffffff; padding:4px; word-break:break-word; white-space:normal; border-bottom:1px solid #ccc;">{{{B6}}}</div> | |||
</div> | |||
}} | |||
<!-- Row 7 --> | |||
{{#if: {{{A7|}}} | | |||
<div style="display:flex; align-items:center; flex-wrap:nowrap;"> | |||
<div style="flex:0 0 {{{Col1Width|35%}}}; display:flex; align-items:center; background:#e6e3f0; font-weight:bold; padding:4px; word-break:break-word; white-space:normal;">{{{A7}}}</div> | |||
<div style="flex:1; max-width:48ch; display:flex; align-items:center; background:#ffffff; padding:4px; word-break:break-word; white-space:normal;">{{{B7}}}</div> | |||
</div> | |||
}} | |||
</div> | |||
</div> |