Difference between revisions of "Template:InfoBox Crime"

From Detective Conan Wiki
(Undo revision 382737 by LegoFan506 (talk) overflow: auto; does not change anyhting there)
(Tag: Undo)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div style="background: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 5px; max-width: 550px;">
+
{{clearleft}}
  <div style="background: #DF5829; color: white; text-align: center; font-weight: bold; padding: 5px;">{{#if:{{{crime|}}}|{{{crime}}}|Murder}}
+
<div class="infobox-crime">
</div>
+
  <div class="crime-type">{{#if:{{{crime|}}}|{{{crime}}}|Murder}} </div>
  <div style="overflow: auto; font-size: 90%;">
+
  <div class="crime-container">
  <div style="width: 550px; display: flex;">
 
 
   {{#if: {{{image|}}} |
 
   {{#if: {{{image|}}} |
     <div> [[Image:{{{image}}}|290px]]}}
+
     <div class="crime-img-container"> [[Image:{{{image}}}|290px]] </div>}}
    </div>
+
  <div class="crime-details-container">{{#if:
 
+
    {{{date|}}}|  
  <div style="padding-left: 5px; width: 100%;">{{#if:
+
      <div class="crime-detail"> <span><strong>Date:</strong></span> <span>{{{date}}}</span> </div> }}{{#if:
    {{{date|}}}|  
+
    {{{location|}}}|
        <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:
+
      <div class="crime-detail"> <span><strong>Location:</strong></span> <span>{{{location}}}</span> </div> }}{{#if:
    {{{location|}}}|
+
    {{{people|}}}|
        <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:
+
      <div class="crime-detail"> <span><strong>People:</strong></span> <span>{{{people}}}</span> </div> }}{{#if:
    {{{people|}}}|
+
    {{{victim|}}}|
        <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:
+
      <div class="crime-detail"> <span><strong>{{{victim-label|Victim}}}:</strong></span> <span>{{{victim}}}</span> </div> }}{{#if:
    {{{victim|}}}|
+
    {{{age|}}}|
        <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:
+
      <div class="crime-detail"> <span><strong>Age:</strong></span> <span>{{{age}}}</span> </div> }}{{#if:
    {{{age|}}}|
 
        <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:
 
 
     {{{time|}}}|
 
     {{{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:
+
      <div class="crime-detail"> <span><strong>Time:</strong></span> <span>{{{time}}}</span> </div> }}{{#if:
 
     {{{cause-death|}}}|
 
     {{{cause-death|}}}|
        <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:
+
      <div class="crime-detail"> <span><strong>{{{cause-death-label|Cause of death}}}:</strong></span> <span>{{{cause-death}}}</span> </div> }}{{#if:
 
     {{{suspects|}}}|
 
     {{{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:
+
      <div class="crime-detail"> <span><strong>{{{suspects-label|Suspects}}}:</strong></span> <span>{{{suspects}}}</span> </div> }}{{#if:
 
     {{{description|}}}|
 
     {{{description|}}}|
        <div style= "padding: 3px 0; border-top: 1px dotted;">{{{description}}}</div> }}{{#if:
+
      <div class="crime-description">{{{description}}}</div> }}{{#if:
 
     {{{footnotes|}}}|
 
     {{{footnotes|}}}|
        <div style="font-size: 90%; border-top: 1px dotted;">{{{footnotes}}}</div> }}
+
      <div class="crime-footnotes">{{{footnotes}}}</div> }}
  </div>
 
 
   </div>
 
   </div>
 
  </div>
 
  </div>
</div><noinclude>
+
</div>
 +
{{code
 +
|css=
 +
.infobox-crime {
 +
  background: #f8f9fa;
 +
  border: 1px solid #aaa;
 +
  max-width: 650px;
 +
  padding: 0.3em;
 +
  margin: 0.5em 0;
 +
  line-height: 1.3em;
 +
}
 +
 
 +
.crime-type {
 +
  background: #DF5829;
 +
  color: white;
 +
  text-align: center;
 +
  font-weight: bold;
 +
  padding: 2px;
 +
}
 +
 
 +
.crime-container {
 +
  overflow: auto;
 +
  padding-top: 4px;
 +
  font-size: 90%;
 +
  display: flex;
 +
  justify-content: space-between;
 +
}
 +
 
 +
.crime-img-container {
 +
  min-width: 290px;
 +
}
 +
 
 +
.crime-details-container {
 +
  min-width: 355px;
 +
  padding-left: 5px;
 +
}
 +
 
 +
.crime-detail {
 +
  padding: 3px 0;
 +
  border-bottom: 1px dotted #ccc;
 +
  display: grid;
 +
  grid-template-columns: 102px auto;
 +
}
 +
 
 +
.crime-description {
 +
  padding: 3px 0;
 +
}
 +
 
 +
.crime-footnotes {
 +
  padding: 3px 0;
 +
  font-size: 90%;
 +
  border-top: 1px dotted #ccc;
 +
}
 +
}}<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>

Latest revision as of 10:42, 7 June 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)
}}