Template:Library card: Difference between revisions

Template page
No edit summary
No edit summary
 
(37 intermediate revisions by 2 users not shown)
Line 4: Line 4:
| category =  
| category =  
| name =  
| name =  
| top =
| left =
}}
}}
-->
-->
<div class="library-card">
<div class="library-card">
[[File:{{{image|}}}|class=library-card-image|link=Category:{{{category|}}}]]
<h6 class="library-card-TOC">{{{name|}}}</h6>
<div class="library-card-content">
<div class="library-card-image" style="position:relative; top:{{{top|0}}}px; left:{{{left|0}}}px;>
<h3 class="library-card-title">{{{name|}}}</h3><p class="library-card-work">({{#invoke:Number of works|getWorkCount|category={{{category}}}}} works)</p>
[[File:{{{image|Placeholder-image.png}}}|link=Category:{{{category|}}}|{{{desc|}}}]]
</div>
[[:Category:{{{category|}}}|<div class="library-card-content">
<p class="library-card-title">{{{name|}}}</p><p class="library-card-works"><br>({{#invoke:Number of works|getWorkCount|category={{{category}}}}})</p>]]
</div>
</div>
</div>
</div>
Line 16: Line 20:
     TemplateData
     TemplateData
-->
-->
<templatestyles src="Library_card/style.css" />
<!--
<!--
     @param image    The image filename or URL.
     @param image    The image filename or URL.
     @param category The associated category name.
     @param category The associated category name.
     @param name    The name of the author or topic.
     @param name    The name of the author or topic.
    @param top      The offset for the image from the top (optional).
    @param left    The offset for the image from the left (optional).
    @param desc    The description you want to display when the user hovers over the link long enough.
-->
-->
<noinclude>
<noinclude>
Line 30: Line 35:
             "type": "string",
             "type": "string",
             "required": true,
             "required": true,
             "description": "The image filename or URL."
             "description": "The image filename or URL, with extension (.jpg etc)",
            "default": "Placeholder-image.png"
         },
         },
         "category": {
         "category": {
Line 41: Line 47:
             "required": true,
             "required": true,
             "description": "The name of the author or topic."
             "description": "The name of the author or topic."
        },
                "top": {
            "type": "string",
            "required": false,
            "description": "The offset from the top in pixels for the image. Can be negative."
        },
        "left": {
            "type": "string",
            "required": false,
            "description": "The offset from the left in pixels for the image. Can be negative."
        },
        "desc": {
            "type": "string",
            "required": false,
            "description": "The description you want to display when the user hovers over the link long enough."
         }
         }
     }
     }

Latest revision as of 20:21, 25 February 2024

[[:Category:|


(0 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
toptop

The offset from the top in pixels for the image. Can be negative.

Stringoptional
leftleft

The offset from the left in pixels for the image. Can be negative.

Stringoptional
descdesc

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

Stringoptional