Jump to content

Template:SoftwareCard: Difference between revisions

From SOJI ELECTRONICS
[checked revision][checked revision]
Create template
 
Update
Tag: Manual revert
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
== SoftwareCard Template ==
Software card template. Auto-detects icon by filename convention.


Renders a single software product card. Auto-detects image and description from the product page.
Page name spaces are converted to hyphens when looking up the icon file.
Example: page "LIGO BLE CONFIGURATOR" → File:LIGO-BLE-CONFIGURATOR-Icon.png


'''Usage:''' {{SoftwareCard|page=SOJI Configurator Tool}}
<code><nowiki>{{SoftwareCard|page=%PAGE%|filename=%TITLE%}}</nowiki></code>


[[Category:Templates]]
[[Category:Templates]]
</noinclude><includeonly><div class="software-card" style="display:inline-block; width:280px; margin:10px; padding:16px; border:1px solid #c8ccd1; border-radius:8px; background:#fff; vertical-align:top; text-align:center; box-shadow:0 1px 3px rgba(0,0,0,0.05); transition:box-shadow 0.2s;">
</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>
<div class="software-card-image" style="height:140px; display:flex; align-items:center; justify-content:center; margin-bottom:12px;">
{{#ifexist: File:{{#replace:{{{page|{{PAGENAME}}}}}| |-}}-Software.png
| [[File:{{#replace:{{{page|{{PAGENAME}}}}}| |-}}-Software.png|140px|center|link={{{page|{{PAGENAME}}}}}]]
| [[File:Icon-software.svg|100px|center|link={{{page|{{PAGENAME}}}}}]]
}}
</div>
<div class="software-card-title" style="font-weight:bold; font-size:1.1em; margin-bottom:8px;">
[[{{{page|{{PAGENAME}}}}}|{{{page|{{PAGENAME}}}}}]]
</div>
<div class="software-card-desc" style="font-size:0.9em; color:#54595d; line-height:1.4;">
{{{description|''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