Template:Download: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Don't use GitHub downloads anymore as that feature is deprecated)
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="
<ul class="downloads"><li><!--
border-radius: 10px;
background-color: #dfd;
padding-right: 8px;
padding-top: 0px;
padding-bottom: 0px;
border: 1px solid #7a7;
display: inline-block;
margin: 5px;
margin-left: 20px;
"><!--


   icon
   icon
--><div style="float:left; margin-top: 4px; margin-left: 3px;">{{Icon|download}}</div><!--
-->{{Icon|{{{icon|download}}}}}<!--


   download link
   download link
--><div style="font-weight: bold; display: inline-block; padding: 0px; margin: 0px;"><!--
--><!--


       custom link
       custom link
   -->{{If|{{{url|}}}|[{{{url}}} {{{name}}}]<!--
   -->{{#if:{{{url|}}}|[{{{url}}} {{{name}}}]<!--


      github link
   -->{{#if:{{{mirror|}}}| [{{{mirror}}} (mirror)]|}}<!--
   -->|{{If|{{{sourceforge|1}}}|{{SourceForgeDownload|file={{{file}}}|dir={{{dir|}}}|name={{{name}}}}}<!--


       ... with sourceforge mirror
       self-hosted link
      --> {{If|{{{selfhosted|1}}}| {{SelfHostedDownload|file={{{file}}}|dir={{{dir|}}}|name=(mirror)}}|}}<!--
  -->|{{#ifeq:{{{selfhosted|1}}}|1|<!--


       sourceforge link
       -->{{SelfHostedDownload|file={{{file}}}|dir={{{dir|}}}|name={{{name}}}}}<!--
  -->|{{SelfHostedDownload|file={{{file}}}|dir={{{dir|}}}|name={{{name}}}<!-- -->}}<!--
 
      ... with sourceforge mirror (TODO: move somewhere else)
      --> {{#ifeq:{{{sourceforge|1}}}|1|<!--
 
        --> {{SourceForgeDownload|file={{{file}}}|dir={{{dir|}}}|name=(mirror)}}<!--
 
      -->|}}<!--
 
      sourceforge mirror (TODO: move somewhere else)
  -->|<!--
 
      -->{{SourceForgeDownload|file={{{file}}}|dir={{{dir|}}}|name={{{name}}}}}<!--


   -->}}<!--
   -->}}<!--
   -->}}<!--
   -->}}<!--
--></div><!--
--><!--
 
-->{{Style|color: #888; font-size: 7pt; display: block; line-height: 7pt; margin-bottom: 2px;<!--


   filename
   filename
-->|{{{file}}}<!--
--><span class="name">{{{file}}}</span><!--


   and filesize
   and filesize
--> {{If|{{{size|}}}|{{Style|display:block;float:right;|{{{size}}}}}|}}<!--
-->{{#if:{{{size|}}}| <span class="size">{{{size}}}</span>}}<!--
 
  newline
-->{{#if:{{{checksum|}}}{{{signature|}}}|<br>}}<!--


-->}}<!--
  and checksum
-->{{#if:{{{checksum|}}}| <span class="checksum">MD5: <code>{{{checksum}}}</code></span>}}<!--
 
  and siganture
-->{{#ifeq:{{{signature|0}}}|1|<span class="signature"><!--
 
      custom link
  -->{{#if:{{{url|}}}|[{{{url}}}.sig signature]<!--
 
      self-hosted link
  -->|{{SelfHostedDownload|file={{{file}}}.sig|dir={{{dir|}}}|name=signature}}<!--
 
      sourceforge link
  -->|{{#ifeq:{{{sourceforge|1}}}|1|{{SourceForgeDownload|file={{{file}}}.sig|dir={{{dir|}}}|name=signature}}<!--
 
  -->}}<!--
  -->}}<!--
  --></span>}}<!--


--></div><noinclude>
--></li></ul><noinclude>


Parameters:
Parameters:
Line 53: Line 71:
* selfhosted - set to 0 to not use a self-hosted download path
* selfhosted - set to 0 to not use a self-hosted download path
* size - textual filesize
* size - textual filesize
* checksum - MD5 checksum
* signature - signature file
</noinclude>
</noinclude>

Latest revision as of 22:13, 9 March 2024

Parameters:

  • name - title of the download [required]
  • file - filename (without path) [required]
  • dir - subdirectory for file for sourceforge/self-hosted [required]
  • url - full download path (should not be used for sourceforge or self-hosted downloads!)
  • sourceforge - set to 0 to not use a sourceforge download path
  • selfhosted - set to 0 to not use a self-hosted download path
  • size - textual filesize
  • checksum - MD5 checksum
  • signature - signature file