Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Library card: Difference between revisions

Template page
CriticalResist (talk | contribs)
No edit summary
CriticalResist (talk | contribs)
removed top and left offsets as the images are now automatically centered and fit the container
 
(79 intermediate revisions by 3 users not shown)
Line 4: Line 4:
| category =  
| category =  
| name =  
| name =  
| top =
| left =
}}
}}
-->
-->
 
<div class="library-card">
<div class="card">
<h6 class="library-card-TOC">{{{name|}}}</h6>
    [[File:{{{image|}}}|200px|link={{category|}}]]
<div class="library-card-image">
    <div class="card-content">
[[File:{{{image|Placeholder-image.png}}}|link=Category:{{{category|}}}|{{{desc|}}}]]
        <h2><span class="card-title">{{{name|}}}</span></h2>
        <p>({{#invoke:'Number of works'|getWorkCount}} works)</p>
    </div>
</div>
</div>
[[:Category:{{{category|}}}|
<div class="library-card-content">
<p class="library-card-title">{{{name|}}}</p><p class="library-card-works"><br>({{#dpl:category={{{category|}}}|resultsheader=%PAGES%|mode=userformat}} works)</p>
]]
</div>
</div>
<!--
    TemplateData
-->
<!--
    @param image    The image filename or URL.
    @param category The associated category name.
    @param name    The name of the author or topic.
    @param desc    The description you want to display when the user hovers over the link long enough.
-->
<noinclude>
<noinclude>
<templatedata>
<templatedata>
{
{
"params": {
    "params": {
"image": {},
        "image": {
"name": {}
            "type": "string",
}
            "required": true,
            "description": "The image filename or URL, with extension (.jpg etc)",
            "default": "Placeholder-image.png"
        },
        "category": {
            "type": "string",
            "required": true,
            "description": "The associated category name."
        },
        "name": {
            "type": "string",
            "required": true,
            "description": "The name of the author or topic."
        },
        "desc": {
            "type": "string",
            "required": false,
            "description": "The description you want to display when the user hovers over the link long enough."
        }
    }
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 15:31, 23 September 2025

[[:Category:|


(

Extension:DynamicPageList4 (DPL4), version 4.0.0: Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants

works)

]]

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
imageimage

The image filename or URL, with extension (.jpg etc)

Default
Placeholder-image.png
Stringrequired
categorycategory

The associated category name.

Stringrequired
namename

The name of the author or topic.

Stringrequired
descdesc

The description you want to display when the user hovers over the link long enough.

Stringoptional
Contents