Template:Image: Difference between revisions

From elijah
Jump to navigation Jump to search
WikiSync push v1.1
WikiSync push v1.2
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- WikiSync | version=1.1 | updated=2026-04-27 -->
<!-- WikiSync | version=1.2 | updated=2026-10-18 -->
<includeonly>
<includeonly>
__NOFACTBOX__
__NOFACTBOX__
Line 19: Line 19:
  |HasImageKind={{{HasImageKind|}}}
  |HasImageKind={{{HasImageKind|}}}
  |HasDate={{{HasDate|}}}
  |HasDate={{{HasDate|}}}
  |HasRegion={{{HasRegion|}}}
  |HasAnnotationFile={{{HasAnnotationFile|}}}
|HasFocusPoint={{{HasFocusPoint|}}}
}}
}}


Line 40: Line 41:
{{#if:{{{HasTimePeriod|}}}|
{{#if:{{{HasTimePeriod|}}}|
   {{#arraymap:{{{HasTimePeriod|}}}|;|@@|{{#set:HasTimePeriod=@@}}|}}
   {{#arraymap:{{{HasTimePeriod|}}}|;|@@|{{#set:HasTimePeriod=@@}}|}}
}}
<!-- List: Region -->
{{#if:{{{HasRegion|}}}|
  {{#arraymap:{{{HasRegion|}}}|;|@@|{{#set:HasRegion=@@}}|}}
}}
}}


Line 57: Line 63:
   box-sizing: border-box;
   box-sizing: border-box;
">
">
  <!-- Card Header -->
  <div style="
    background: linear-gradient(135deg, #2c3e50 0%, #3d5166 100%);
    color: #ffffff;
    padding: 0.75em 1em 0.6em 1em;
  ">
    <div style="font-size:1.25em; font-weight:bold; letter-spacing:0.02em; line-height:1.2;">
      {{{HasImageCaption|{{PAGENAME}}}}}
    </div>
    {{#if:{{{HasImageKind|}}}|
      <div style="font-size:0.82em; opacity:0.80; margin-top:0.2em;">{{{HasImageKind}}}</div>
    }}
  </div>


   <!-- Image Display -->
   <!-- Image Display -->
Line 78: Line 70:
         [[{{{HasFile|}}}|frameless|center|300px]]
         [[{{{HasFile|}}}|frameless|center|300px]]
         {{#if:{{{HasImageCaption|}}}|
         {{#if:{{{HasImageCaption|}}}|
           <div style="font-size:0.85em; color:#555; font-style:italic; text-align:center; padding:0.4em 1em 0.5em; border-top:1px solid #e4e8ec; margin-top:0.4em;">
           <div style="font-size:0.85em; color:#555; text-align:center; padding:0.5em 1em 0.5em;">
             {{{HasImageCaption|}}}
             {{{HasImageCaption|}}}
           </div>
           </div>
Line 116: Line 108:


     <!-- Metadata Table -->
     <!-- Metadata Table -->
     {{#if:{{{HasImageKind|}}}{{{HasDate|}}}{{{HasRegion|}}}{{{HasLicense|}}}{{{HasRights|}}}{{{HasSourceDescription|}}}|
     {{#if:{{{HasImageKind|}}}{{{HasDate|}}}{{{HasRegion|}}}{{{HasLicense|}}}{{{HasRights|}}}{{{HasSourceDescription|}}}{{{HasAnnotationFile|}}}|
       <table style="border-collapse:collapse; font-size:0.88em; margin-bottom:0.65em; width:100%;">
       <table style="border-collapse:collapse; font-size:0.88em; margin-bottom:0.65em; width:100%;">
         {{#if:{{{HasImageKind|}}}|
         {{#if:{{{HasImageKind|}}}|
Line 122: Line 114:
             <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; width:30%;">'''Kind'''</td>
             <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; width:30%;">'''Kind'''</td>
             <td style="color:#222;">{{{HasImageKind}}}</td>
             <td style="color:#222;">{{{HasImageKind}}}</td>
          </tr>
        }}
        {{#if:{{{HasAnnotationFile|}}}|
          <tr>
            <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top;">'''Annotation File'''</td>
            <td style="color:#222;">[[{{{HasAnnotationFile}}}|Annotation data]]</td>
           </tr>
           </tr>
         }}
         }}
Line 133: Line 131:
           <tr>
           <tr>
             <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top;">'''Region'''</td>
             <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top;">'''Region'''</td>
             <td style="color:#222;">{{{HasRegion}}}</td>
             <td style="color:#222;">{{#arraymap:{{{HasRegion|}}}|;|@@|@@|, }}</td>
           </tr>
           </tr>
         }}
         }}
Line 231: Line 229:
  |HasOnlineSource=https://example.org/images/img-001
  |HasOnlineSource=https://example.org/images/img-001
  |HasRights=Public domain
  |HasRights=Public domain
  |HasRegion=Galicia
  |HasRegion=Galicia; Bukovina
  |HasLicense=CC0 1.0
  |HasLicense=CC0 1.0
  |HasNILID=NIL-45821
  |HasNILID=NIL-45821
|HasAnnotationFile=File:IMG-001-annotations.json
|HasFocusPoint=320,180
  |DepictsPerson=Person:Q123456
  |DepictsPerson=Person:Q123456
  |DepictsPlace=Community:Lviv
  |DepictsPlace=Community:Lviv
Line 243: Line 243:
Properties with type notes:
Properties with type notes:
* HasFile — page reference to File: namespace (e.g. File:image.jpg)
* HasFile — page reference to File: namespace (e.g. File:image.jpg)
* HasAnnotationFile — page reference to File: namespace (e.g. File:IMG-001-annotations.json); the JSON must be uploaded to the wiki as a file
* HasDate — SMW Date type (ISO format YYYY-MM-DD or YYYY); requires Property:HasDate declared as type Date in the wiki
* HasDate — SMW Date type (ISO format YYYY-MM-DD or YYYY); requires Property:HasDate declared as type Date in the wiki
* DepictsPerson — list of page references to Person: namespace (semicolon-separated)
* DepictsPerson — list of page references to Person: namespace (semicolon-separated)
Line 248: Line 249:
* BelongsToTopic — list of text values from controlled vocabulary (semicolon-separated)
* BelongsToTopic — list of text values from controlled vocabulary (semicolon-separated)
* HasTimePeriod — list of text values (semicolon-separated)
* HasTimePeriod — list of text values (semicolon-separated)
* HasFocusPoint — optional text, pixel coordinates "X,Y" in the original image, measured from the top-left corner (e.g. 320,180)
* HasOnlineSource — url
* HasOnlineSource — url
* HasRegion — text
* HasRegion — list of text values, controlled vocabulary (semicolon-separated)
* All others — text
* All others — text
</noinclude>
</noinclude>

Latest revision as of 17:56, 18 October 2026



Use this template on Image: pages to store image metadata.

Example:

{{Image
 |HasFile=File:Perl Joseph portrait.jpg
 |ImageID=IMG-001
 |HasImageCaption=Portrait of Joseph Perl
 |HasImageDescription=Black-and-white portrait photograph of Joseph Perl, Galician rabbi and author.
 |HasImageKind=Portrait
 |HasDate=1880-05-12
 |HasSourceDescription=JGaliciaBukovina archive, digitized 2010
 |HasOnlineSource=https://example.org/images/img-001
 |HasRights=Public domain
 |HasRegion=Galicia; Bukovina
 |HasLicense=CC0 1.0
 |HasNILID=NIL-45821
 |HasAnnotationFile=File:IMG-001-annotations.json
 |HasFocusPoint=320,180
 |DepictsPerson=Person:Q123456
 |DepictsPlace=Community:Lviv
 |BelongsToTopic=Religion, Rabbinate, Hasidism
 |HasTimePeriod=19th century; Pre-WWI
}}

Properties with type notes:

  • HasFile — page reference to File: namespace (e.g. File:image.jpg)
  • HasAnnotationFile — page reference to File: namespace (e.g. File:IMG-001-annotations.json); the JSON must be uploaded to the wiki as a file
  • HasDate — SMW Date type (ISO format YYYY-MM-DD or YYYY); requires Property:HasDate declared as type Date in the wiki
  • DepictsPerson — list of page references to Person: namespace (semicolon-separated)
  • DepictsPlace — list of page references to Community: namespace (semicolon-separated)
  • BelongsToTopic — list of text values from controlled vocabulary (semicolon-separated)
  • HasTimePeriod — list of text values (semicolon-separated)
  • HasFocusPoint — optional text, pixel coordinates "X,Y" in the original image, measured from the top-left corner (e.g. 320,180)
  • HasOnlineSource — url
  • HasRegion — list of text values, controlled vocabulary (semicolon-separated)
  • All others — text