dash-docs/_templates/download.html
David A. Harding cbebe461ff Releases: Variablize Release Notes
Add additional variables to the release note files to allow setting the
version number and date.  The version number is required, and can be
used to automatically set the release notes title.  The date is optional
and can be set hours/days after the release.

Additionally, a Makefile test is added that checks whether the download
files exist on the Bitcoin.org server.  This can help prevent creating a
broken Download page.

* Set variables for all previous releases

* Document variables in README.md

* Update code and templates to use variables

* Add the Download page links to the "dl" CSS class. Also add newlines
  to make the HTML a bit easier to parse using sed

* Add a new Liquid plugin to print warnings. This is used to print a
  non-error warning if any release is created without the optional date
2015-02-27 08:15:50 -05:00

141 lines
6 KiB
HTML
Executable file

---
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: download
win32zip: "win32.zip"
win64zip: "win64.zip"
win32exe: "win32-setup.exe"
win64exe: "win64-setup.exe"
macdmg: "-osx.dmg"
#macdmg: ".dmg"
mactar: "osx64.tar.gz"
lin32: "linux32.tar.gz"
lin64: "linux64.tar.gz"
---
{% capture PATH_PREFIX %}/bin/bitcoin-core-{{ site.DOWNLOAD_VERSION }}{% endcapture %}
{% capture FILE_PREFIX %}bitcoin-{{ site.DOWNLOAD_VERSION }}{% endcapture %}
<link rel="alternate" type="application/rss+xml" href="/en/rss/releases.rss" title="Bitcoin Core releases">
<div class="download">
<h1>{% translate pagetitle %}</h1>
<h2>{% translate latestversion %} {{ site.DOWNLOAD_VERSION }}<a type="application/rss+xml" href="/en/rss/releases.rss"><img src="/img/icons/icon_rss.svg" alt="rss" class="rssicon"></a></h2>
<div class="mainbutton"><a id="downloadbutton" href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.win32exe }}"><img src="/img/os/but_windows.svg" alt="icon">{% translate download %}</a></div>
<div class="downloadbox">
<p>{% translate downloados %}</p>
<div>
<div>
<img src="/img/os/med_win.png" alt="windows">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.win64exe }}" id="downloadwinexe">Windows</a>
<span><a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.win64exe }}" class="dl" id="win64exe">64 bit</a> -
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.win32exe }}" class="dl" id="win32exe">32 bit</a></span>
</span>
</div>
<div>
<img src="/img/os/med_win.png" alt="windows">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.win64zip }}" id="downloadwinzip">Windows (zip)</a>
<span><a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.win64zip }}" class="dl" id="win64zip">64 bit</a> -
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.win32zip }}" class="dl" id="win32zip">32 bit</a></span>
</span>
</div>
<div>
<img src="/img/os/med_osx.png" alt="osx">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}{{ page.macdmg }}">Mac OS X</a>
<span><a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}{{ page.macdmg }}" class="dl" id="macdmg">dmg</a> -
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.mactar }}" class="dl" id="mactar">tar.gz</a></span>
</span>
</div>
</div>
<div>
<div>
<img src="/img/os/med_linux.png" alt="linux">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.lin64 }}" id="downloadlin">Linux (tgz)</a>
<span><a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.lin64 }}" class="dl" id="lin64">64 bit</a> -
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ page.lin32 }}" class="dl" id="lin32">32 bit</a></span>
</span>
</div>
<div>
<img src="/img/os/med_ubuntu.svg" alt="ubuntu">
<span>
<a href="https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin">Ubuntu (PPA)</a>
</span>
</div>
<div>
<img src="/img/os/med_opensource.svg" alt="source code">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}.tar.gz" class="dl">{% translate source %}</a>
<span><a href="https://github.com/bitcoin/bitcoin">GitHub</a></span>
</span>
</div>
</div>
<p>
<a href="{{ PATH_PREFIX }}/SHA256SUMS.asc" class="dl">{% translate downloadsig %}</a><br>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}.torrent" class="dl">{% translate downloadtorrent %}</a>
{% if site.DOWNLOAD_MAGNETLINK %} <a href="{{ site.DOWNLOAD_MAGNETLINK }}" class="magnetlink"></a>{% endif %}<br>
<a href="/en/version-history">{% translate versionhistory %}</a>
</p>
</div>
<h2><img src="/img/icons/note.svg" class="warningicon" alt="note">{% translate patient %}</h2>
<p>{% translate notesync %} {% translate full_node_guide %}</p>
<p>{% translate notelicense %}</p>
</div>
<script type="text/javascript">
var os = 'windows32';
if (navigator.userAgent.indexOf('Mac') != -1) var os = 'mac'
else if (navigator.userAgent.indexOf('Linux') != -1) {
var os='linux32';
if (navigator.userAgent.indexOf('x86_64') != -1) var os = 'linux64';
if (navigator.userAgent.indexOf('Ubuntu') != -1) var os = 'ubuntu';
}
else if (navigator.userAgent.indexOf('WOW64') != -1 || navigator.userAgent.indexOf('Win64') != -1) var os='windows64';
var but = document.getElementById('downloadbutton');
var linkwinexe = document.getElementById('downloadwinexe');
var linkwinzip = document.getElementById('downloadwinzip');
var linklin = document.getElementById('downloadlin');
var hrefwin64exe = document.getElementById('win64exe').href;
var hrefwin32exe = document.getElementById('win32exe').href;
var hrefwin64zip = document.getElementById('win64zip').href;
var hrefwin32zip = document.getElementById('win32zip').href;
var hrefmacdmg = document.getElementById('macdmg').href;
var hrefmactar = document.getElementById('mactar').href;
var hreflin64 = document.getElementById('lin64').href;
var hreflin32 = document.getElementById('lin32').href;
switch (os) {
case 'windows64':
but.getElementsByTagName('IMG')[0].src = '/img/os/but_windows.svg';
but.href = hrefwin64exe;
linkwinexe.href = hrefwin64exe;
linkwinzip.href = hrefwin64zip;
break;
case 'windows32':
but.getElementsByTagName('IMG')[0].src = '/img/os/but_windows.svg';
but.href = hrefwin32exe;
linkwinexe.href = hrefwin32exe;
linkwinzip.href = hrefwin32zip;
break;
case 'linux64':
but.getElementsByTagName('IMG')[0].src = '/img/os/but_linux.png';
but.href = hreflin64;
linklin.href = hreflin64;
break;
case 'linux32':
but.getElementsByTagName('IMG')[0].src = '/img/os/but_linux.png';
but.href = hreflin32;
linklin.href = hreflin32;
break;
case 'ubuntu':
but.getElementsByTagName('IMG')[0].src = '/img/os/but_ubuntu.svg';
but.href = 'https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin';
break;
case 'mac':
but.getElementsByTagName('IMG')[0].src = '/img/os/but_mac.svg';
but.href = hrefmacdmg;
break;
}
</script>