single.html 5.98 KB
Newer Older
1 2
{{ define "title" }}
<div class="container">
Philip Müller's avatar
Philip Müller committed
3
  <div class="content-center title-container">
4 5 6 7 8 9 10
    <h1 class="title">{{ .Title }}</h1>
  </div>
</div>
{{ end }}

{{ define "body" }}
<div class="row">
11
  <div class="col-md-8 ml-auto mr-auto text-center">
12
    <section>
13
      <div class="container">
14 15
        <!-- <h2>Manjaro {{ .Params.name }}</h2>
        <hr class="star-primary" /> -->
16
        <a href="/img/editions/{{ .Params.screenshot }}" target="_blank"><img src="/img/editions/{{ .Params.thumbnail }}" class="img-responsive" alt="Desktop Image" style="width:100%;"></a>
17
        <p>{{ .Content | markdownify }}</p>
Philip Müller's avatar
Philip Müller committed
18 19 20
        {{ if .Params.Youtube }}
          <p>{{partial "youtube" .}}</p>
        {{ end }}
21
        <ul class="flex-grid download-edition-grid">
22 23 24 25 26 27 28 29 30 31 32
            {{ if .Params.download_x64 }}
            <li class="flex-item">
              <div class="content">
                <div class="top">
                  <img src="/img/download/x64.svg" alt="Icon" style="width: 200px; height: 200px;" />
                  <h3>{{ .Site.Params.download_edition.download_x64_title }}</h3>
                  <hr/>
                  <p>{{ .Site.Params.download_edition.download_x64_description }}</p>
                </div>
                <div class="bottom">
                  <div style="margin-top: auto; margin-bottom: 10px;">
33
                    <a href="{{ .Params.download_x64 }}" class="btn btn-success btn-xl" target="_blank" onClick="download_link = '{{ .Params.download_x64 }}'" data-toggle="modal" data-target="#download-how-to-try">
34 35 36 37
                       {{ .Site.Params.download_edition.download_button }}</a>
                    <p></p>
                    <div>
                      <div style="margin-top: auto; margin-bottom: 10px; font-size: 12px;">
38 39 40 41 42
                        {{ if .Params.download_x64_torrent }}
                          {{ with .Params.download_x64_torrent }}<a href="{{ . }}" target="_blank" onClick="download_link = '{{ . }}'" data-toggle="modal" data-target="#download-how-to-try">{{ $.Site.Params.download_edition.download_torrent }}</a>{{end}}<br/>
                        {{ else }}
                          <span>Torrent Not Available.</span><br>
                        {{ end }}
43 44 45 46
                        {{ with .Params.download_x64_sig}}
                        <a href="{{ . }}" target="_blank">{{ $.Site.Params.download_edition.download_gpg }}</a>{{end}}<br/>
                        SHA1: {{.Params.download_x64_checksum}}
                      </div>
47 48 49 50
                    </div>
                  </div>
                </div>
              </div>
51 52 53 54 55 56 57 58 59 60 61
            </li>
            {{ else if .Params.download_x86 }}
            <li class="flex-item">
              <div class="content">
                <div class="top">
                  <img src="/img/download/x86.svg" alt="Icon" style="width: 200px; height: 200px;" />
                  <h3>{{ .Site.Params.download_edition.download_x86_title }}</h3>
                  <hr/>
                  <p>{{ .Site.Params.download_edition.download_x86_description }}</p>
                </div>
                <div class="bottom">
62 63 64 65
                  <div style="margin-top: auto; margin-bottom: 10px;font-size: 12px;">
                    <a href="{{ .Params.download_x86 }}" class="btn btn-success btn-xl" onClick="download_link = '{{ .Params.download_x86 }}'" target="_blank" data-toggle="modal" data-target="#download-how-to-try">
                      {{ .Site.Params.download_edition.download_button }}</a>
                    <p></p>
66
                    {{ if .Params.download_x86_torrent }}
67
                      {{ with .Params.download_x86_torrent }} <a href="{{ . }}" target="_blank">{{ $.Site.Params.download_edition.download_torrent }}</a>{{end}}<br>
68
                    {{ else }}
69
                      <br><span>Torrent Not Available.</span><br>
70
                    {{ end }}
71 72 73 74 75
                    <div>
                      <div style="margin-top: auto; margin-bottom: 10px; font-size: 12px;">
                        {{ with .Params.download_x86_sig }} <a href="{{ . }}" target="_blank">{{ $.Site.Params.download_edition.download_gpg }}</a>{{end}}<br/>
                        SHA1: {{ .Params.download_x86_checksum }}
                      </div>
76 77 78 79
                    </div>
                  </div>
                </div>
              </div>
80 81 82
            </li>
            {{ end }}
          </ul>
83 84 85 86 87 88 89 90 91
          {{ if or (.Params.download_x64_torrent) (.Params.download_x86_torrent) }}
              {{ range (where .Site.Pages ".Type" "download-additional-info-torrent")}}
                <p>{{ .Content | replaceRE ";torrent-x64;" $.Params.download_x64_torrent | replaceRE ";torrent-x86;" $.Params.download_x86_torrent | replaceRE ";baseurl;" .Site.BaseURL | markdownify }}
              {{ end }}
          {{ else }}
              {{ range (where .Site.Pages ".Type" "download-additional-info-post")}}
                <p>{{ .Content | markdownify }}
              {{ end }}
          {{ end }}
92 93 94 95
      </div>
    </section>
  </div>   
</div>
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
<script>var download_link = "";</script>
{{ range (where .Site.Pages ".Type" "download-documentation-modal")}}        
        <div class="modal fade" id="download-how-to-try" tabindex="-1" role="dialog" aria-labelledby="how to try manjaro" aria-hidden="true">
          <div class="modal-dialog" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <h5 class="modal-title">{{ .Params.title }}</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true">&times;</span>
                </button>
              </div>
              <div class="modal-body">
                {{ .Content | markdownify }}
              </div>{{ end }}
              <div class="modal-footer">
111
                <button type="button" class="btn btn-success" data-dismiss="modal" onclick="window.open(download_link, '_blank');">No thanks, take me to Download</button>
112 113 114 115
              </div>
            </div>
          </div>
        </div>
Vitor Lopes's avatar
Vitor Lopes committed
116
{{ end }}