Difference between revisions of "Template:InfoBox Crime"

From Detective Conan Wiki
(achieves similar results with less complicated structure, 30% shorter html, better css)
Line 1: Line 1:
<div style="overflow:auto">
+
<div style="background: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 5px; max-width: 550px;">
{| class="infobox" style="width: 650px; text-align: left; font-size: 90%; float: none; clear: left; margin-left: 0; margin-right: 1em;" cellpadding="2"
+
<div style="background: #DF5829; color: white; text-align: center; font-weight: bold; padding: 5px;">{{#if:{{{crime|}}}|{{{crime}}}|Murder}}
|-
+
</div>
| colspan="2" style="color: #ffffff; text-align:center; vertical-align:middle; /*height:28px;*/ font-size: small; background-color: #DF5829; /*78b3f0;*/ /*5bbd53;*/" |  '''{{#if:{{{crime|}}}|{{{crime}}}|Murder}}'''
+
<div style="overflow: auto; font-size: 90%;">
|-
+
  <div style="width: 550px; display: flex;">
| width="290" class="nospacing" style="text-align:center; vertical-align:top; padding: 2px 0px 0px 0px;" |
+
  {{#if: {{{image|}}} |
{{#if: {{{image|}}} | [[Image:{{{image}}}|290px]]}}
+
    <div> [[Image:{{{image}}}|290px]]}}
| style="padding: 0px;" |
+
    </div>
{| class="infobox crime" width="100%" style="border: 0px; margin: 0px; padding: 0px 0px 0px 2px; font-size: 100%; border-collapse: separate; border-spacing: 1px" cellpadding="0" cellspacing="0"
+
 
|-
+
  <div style="padding-left: 5px; width: 100%;">{{#if:
{{#if: {{{date|}}} |
+
    {{{date|}}}|  
! style="border-bottom: 1px dotted #cccccc;" {{!}} Date:
+
        <div style= "padding: 3px 0; border-top: 1px dotted;"><span style="width: 90px; display: inline-block;"><strong>Date:</strong></span> <span>{{{date}}}</span></div> }}{{#if:
{{!}} style="border-bottom: 1px dotted #cccccc;" {{!}} {{{date}}}
+
    {{{location|}}}|
{{!}}- }}
+
        <div style= "padding: 3px 0; border-top: 1px dotted;"><span style="width: 90px; display: inline-block;"><strong>Location:</strong></span> <span>{{{location}}}</span></div> }}{{#if:
{{#if: {{{location|}}} |
+
    {{{people|}}}|
! width="102" style="border-bottom: 1px dotted #cccccc;" {{!}} Location:
+
        <div style= "padding: 3px 0; border-top: 1px dotted;"><span style="width: 90px; display: inline-block;"><strong>People Involved:</strong></span> <span>{{{people}}}</span></div> }}{{#if:
{{!}} style="border-bottom: 1px dotted #cccccc;" {{!}} {{{location}}}
+
    {{{victim|}}}|
{{!}}- }}
+
        <div style= "padding: 3px 0; border-top: 1px dotted;"><span style="width: 90px; display: inline-block;"><strong>{{{victim-label|Victim}}}:</strong></span> <span>{{{victim}}}</span></div> }}{{#if:
{{#if: {{{people|}}} |
+
    {{{age|}}}|
! style="border-bottom: 1px dotted #cccccc;" {{!}} People:
+
        <div style= "padding: 3px 0; border-top: 1px dotted;"><span style="width: 90px; display: inline-block;"><strong>Age:</strong></span> <span>{{{age}}}</span></div> }}{{#if:
{{!}} style="border-bottom: 1px dotted #cccccc;" {{!}} {{{people}}}
+
    {{{time|}}}|
{{!}}- }}
+
        <div style= "padding: 3px 0; border-top: 1px dotted;"><span style="width: 90px; display: inline-block;"><strong>Time:</strong></span> <span>{{{time}}}</span></div> }}{{#if:
{{#if: {{{victim|}}} |
+
    {{{cause-death|}}}|
! style="border-bottom: 1px dotted #cccccc;" {{!}} {{{victim-label|Victim}}}:
+
        <div style= "padding: 3px 0; border-top: 1px dotted;"><span style="width: 90px; display: inline-block;"><strong>{{{cause-death-label|Cause of death}}}:</strong></span> <span>{{{cause-death}}}</span></div> }}{{#if:
{{!}} style="border-bottom: 1px dotted #cccccc;" {{!}} {{{victim}}}
+
    {{{suspects|}}}|
{{!}}- }}
+
        <div style= "padding: 3px 0; border-top: 1px dotted;"><span style="width: 90px; display: inline-block;"><strong>{{{suspects-label|Suspects}}}:</strong></span> <span>{{{suspects}}}</span></div> }}{{#if:
{{#if: {{{age|}}} |
+
    {{{description|}}}|
! style="border-bottom: 1px dotted #cccccc;" {{!}} Age:
+
        <div style= "padding: 3px 0; border-top: 1px dotted;">{{{description}}}</div> }}{{#if:
{{!}} style="border-bottom: 1px dotted #cccccc;" {{!}} {{{age}}}
+
    {{{footnotes|}}}|
{{!}}- }}
+
        <div style="font-size: 90%; border-top: 1px dotted;">{{{footnotes}}}</div> }}
{{#if: {{{time|}}} |
+
  </div>
! style="border-bottom: 1px dotted #cccccc;" {{!}} Time:
+
  </div>
{{!}} style="border-bottom: 1px dotted #cccccc;" {{!}} {{{time}}}
+
</div>
{{!}}- }}
+
</div><noinclude>
{{#if: {{{cause-death|}}} |
 
! style="border-bottom: 1px dotted #cccccc;" {{!}}  {{{cause-death-label|Cause of death}}}:
 
{{!}} style="border-bottom: 1px dotted #cccccc;" {{!}} {{{cause-death}}}
 
{{!}}- }}
 
{{#if: {{{suspects|}}} |
 
! style="border-bottom: 1px dotted #cccccc;" {{!}}  {{{suspects-label|Suspects}}}:
 
{{!}} style="border-bottom: 1px dotted #cccccc;" {{!}} {{{suspects}}}
 
{{!}}- }}
 
{{#if: {{{description|}}} |
 
{{!}} colspan="2" style="padding: 3px;" {{!}} {{{description}}}
 
{{!}}- }}
 
{{#if: {{{footnotes|}}} |
 
{{!}} colspan="2" style="font-size: smaller; border-top: 1px dotted #aaaaaa" {{!}} {{{footnotes|}}} }}
 
|}
 
|}</div><noinclude>
 
 
<p style="clear: both">The following is a list of required or optional parameters for a case's crime:</p>
 
<p style="clear: both">The following is a list of required or optional parameters for a case's crime:</p>
 
<pre>
 
<pre>

Revision as of 13:44, 2 April 2025

Murder

The following is a list of required or optional parameters for a case's crime:

{{InfoBox Crime
| crime               =    (Optional: defaults to "Murder" if omitted)
| image               =
| location            =    (Optional) 
| victim              =    (Optional)
| victim-label        =    (Optional)
| age                 =    (Optional)
| time                =    (Optional)
| cause-death         =    (Optional)
| cause-death-label   =    (Optional)
| suspects            =    (Optional)
| suspects-label      =    (Optional)
| description         =    (Optional)
| footnotes           =    (Optional: will not show the row if omitted)
}}