Commit 6de542d9 authored by Daniel Brötzmann's avatar Daniel Brötzmann

Start page: Automatically detect OS for Download button

parent d6b09358
Pipeline #6768 passed with stage
in 32 seconds
...@@ -4,7 +4,7 @@ subtitle: Gajim, a fully-featured XMPP chat client ...@@ -4,7 +4,7 @@ subtitle: Gajim, a fully-featured XMPP chat client
comments: false comments: false
--- ---
{{< start_block label="Download" >}} {{< start_block label_win="Download for Windows" label_mac="Install on MacOS" label_linux="Install on Linux" label_other="Other platforms" >}}
{{< row >}} {{< row >}}
{{< feature_item icon="fa-project-diagram" header="Decentralized Messaging" text="Connect to your contacts using a server of your choice. Gajim works well with other [chat clients](https://xmpp.org/software/clients.html) and supports multiple accounts.">}} {{< feature_item icon="fa-project-diagram" header="Decentralized Messaging" text="Connect to your contacts using a server of your choice. Gajim works well with other [chat clients](https://xmpp.org/software/clients.html) and supports multiple accounts.">}}
......
...@@ -4,14 +4,24 @@ ...@@ -4,14 +4,24 @@
<img src="/img/gajim-logo.png"/> <img src="/img/gajim-logo.png"/>
</td> </td>
<td> <td>
<div class="dropdown show"> <div>
<a class="btn btn-success dropdown-toggle" href="#" role="button" id="downloadDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ .Get "label" }}</a> <a id="download_btn" href="{{ .Site.Data.Gajim.WinSetup64 }}" class="btn btn-success" role="button"><i class="fas fa-download"></i>&nbsp;&nbsp;&nbsp;{{ .Get "label_win" }}</a>
<div class="dropdown-menu" aria-labelledby="downloadDropdown">
<a class="dropdown-item" href="{{ .Site.LanguagePrefix }}/download#windows">Windows</a>
<a class="dropdown-item" href="{{ .Site.LanguagePrefix }}/download#macos">MacOS</a>
<a class="dropdown-item" href="{{ .Site.LanguagePrefix }}/download#linux">Linux</a>
</div>
</div> </div>
<p class="download-other">
<span>Gajim {{ .Site.Data.Gajim.StableVersion }} · </span>
<a href="{{ .Site.LanguagePrefix }}/download">{{ .Get "label_other" }}</a>
</p>
</td> </td>
</tr> </tr>
</table> </table>
<script>
var btn = document.getElementById("download_btn")
if (navigator.appVersion.indexOf("Mac") != -1) {
btn.href = "{{ .Site.LanguagePrefix }}/download#macos"
btn.innerHTML = '{{ .Get "label_mac" }}'
}
if (navigator.appVersion.indexOf("Linux") != -1) {
btn.href = "{{ .Site.LanguagePrefix }}/download#linux"
btn.innerHTML = '{{ .Get "label_linux" }}'
}
</script>
...@@ -884,6 +884,10 @@ input.gsc-input, .gsc-input-box, .gsc-input-box-hover, .gsc-input-box-focus, .gs ...@@ -884,6 +884,10 @@ input.gsc-input, .gsc-input-box, .gsc-input-box-hover, .gsc-input-box-focus, .gs
.startpage-download tr td img { .startpage-download tr td img {
float: right; float: right;
} }
.download-other {
margin-top: 0.4rem;
font-size: 14px !important;
}
.d-flex { .d-flex {
display: -webkit-box!important; display: -webkit-box!important;
display: flex!important; display: flex!important;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment