Jump to content

Template:SoftwareCard: Difference between revisions

From SOJI ELECTRONICS
[checked revision][checked revision]
Update
Update
Tag: Manual revert
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
Renders a single software product card with auto-detected icon.
Software card template. Auto-detects icon by filename convention.


'''Icon convention:''' upload icon as <code>PageName-Icon.png</code> (replace spaces with dashes).
Page name spaces are converted to hyphens when looking up the icon file.
Example: page "LIGO BLE CONFIGURATOR" → File:LIGO-BLE-CONFIGURATOR-Icon.png


Examples:
<code><nowiki>{{SoftwareCard|page=%PAGE%|filename=%TITLE%}}</nowiki></code>
* Page "SOJI Configurator Tool" → upload <code>SOJI-Configurator-Tool-Icon.png</code>
* Page "LIGO BLE Configurator" → upload <code>LIGO-BLE-Configurator-Icon.png</code>
 
Falls back to default <code>Icon-software.svg</code> if specific icon not uploaded.
 
Usage: <code><nowiki>{{SoftwareCard|page=PageName}}</nowiki></code>


[[Category:Templates]]
[[Category:Templates]]
</noinclude><includeonly><div class="software-card"><div class="software-card-image">{{#ifexist:File:{{#replace:{{{page|{{PAGENAME}}}}}| |-}}-Icon.png|[[File:{{#replace:{{{page|{{PAGENAME}}}}}| |-}}-Icon.png|100px|center|link={{{page|{{PAGENAME}}}}}]]|[[File:Icon-software.svg|100px|center|link={{{page|{{PAGENAME}}}}}]]}}</div><div class="software-card-title">[[{{{page|{{PAGENAME}}}}}]]</div><div class="software-card-desc">Click for details</div></div></includeonly>
</noinclude><includeonly><div class="software-card"><div class="software-card-image">[[File:{{{filename|{{{page|{{PAGENAME}}}}}}}}-Icon.png|100px|center|link={{{page|{{PAGENAME}}}}}|alt={{{filename|{{{page|{{PAGENAME}}}}}}}}-Icon.png]]</div><div class="software-card-title">[[{{{page|{{PAGENAME}}}}}]]</div><div class="software-card-desc">Click for details</div></div></includeonly>

Latest revision as of 03:49, 12 June 2026

Software card template. Auto-detects icon by filename convention.

Page name spaces are converted to hyphens when looking up the icon file. Example: page "LIGO BLE CONFIGURATOR" → File:LIGO-BLE-CONFIGURATOR-Icon.png

{{SoftwareCard|page=%PAGE%|filename=%TITLE%}}

SOJI Electronics