|
1 | 1 | <div class="pac-footer-row"> |
2 | 2 | <div class="pac-footer-left"> |
3 | | - {{ if fileExists "content/ALLVERSIONS" }} |
4 | | - {{ $versions := os.ReadFile "content/ALLVERSIONS" }} |
5 | | - {{ $version := "nightly"}} |
6 | | - {{ if fileExists "content/VERSION" }} |
7 | | - {{ $version = os.ReadFile "content/VERSION" | strings.TrimLeft "\n" | strings.TrimRight "\n" }} |
8 | | - {{ end }} |
9 | | - {{ $splitted := split $versions "," }} |
| 3 | + {{ if fileExists "content/ALLVERSIONS" }} {{ $versions := os.ReadFile |
| 4 | + "content/ALLVERSIONS" }} {{ $version := "nightly"}} {{ if fileExists |
| 5 | + "content/VERSION" }} {{ $version = os.ReadFile "content/VERSION" | |
| 6 | + strings.TrimLeft "\n" | strings.TrimRight "\n" }} {{ end }} {{ $splitted := |
| 7 | + split $versions "," }} |
10 | 8 | <div class="pac-version-picker"> |
11 | | - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/></svg> |
12 | | - <select name="version" id="version" onchange="handleVersion(this)" class="version-select"> |
13 | | - {{ range $splitted }} |
14 | | - {{ $trimmed := strings.TrimLeft " " . | strings.TrimRight " " }} |
15 | | - {{ if ne $trimmed $version }} |
16 | | - <option value="{{ $trimmed }}">{{$trimmed}}</option> |
17 | | - {{ else }} |
18 | | - <option selected value="{{ $trimmed }}">{{$trimmed}}</option> |
19 | | - {{ end }} |
20 | | - {{ end }} |
| 9 | + <svg |
| 10 | + xmlns="http://www.w3.org/2000/svg" |
| 11 | + width="14" |
| 12 | + height="14" |
| 13 | + viewBox="0 0 24 24" |
| 14 | + fill="none" |
| 15 | + stroke="currentColor" |
| 16 | + stroke-width="2" |
| 17 | + stroke-linecap="round" |
| 18 | + stroke-linejoin="round" |
| 19 | + > |
| 20 | + <path |
| 21 | + d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" |
| 22 | + /> |
| 23 | + <line x1="7" y1="7" x2="7.01" y2="7" /> |
| 24 | + </svg> |
| 25 | + <select |
| 26 | + name="version" |
| 27 | + id="version" |
| 28 | + onchange="handleVersion(this)" |
| 29 | + class="version-select" |
| 30 | + > |
| 31 | + {{ range $splitted }} {{ $trimmed := strings.TrimLeft " " . | |
| 32 | + strings.TrimRight " " }} {{ if ne $trimmed $version }} |
| 33 | + <option value="{{ $trimmed }}">{{$trimmed}}</option> |
| 34 | + {{ else }} |
| 35 | + <option selected value="{{ $trimmed }}">{{$trimmed}}</option> |
| 36 | + {{ end }} {{ end }} |
21 | 37 | </select> |
22 | 38 | </div> |
23 | 39 | <script type="text/javascript"> |
24 | 40 | function handleVersion(elm) { |
25 | | - var path = window.location.pathname; |
26 | | - if (elm.value === "nightly") { |
27 | | - window.location = "https://nightly.pipelines-as-code.pages.dev" + path; |
28 | | - } else if (elm.value === "stable") { |
29 | | - window.location = "https://pipelinesascode.com" + path; |
30 | | - } else { |
31 | | - window.location = "https://release-" + elm.value.replace(/\./g, "-") + ".pipelines-as-code.pages.dev" + path; |
32 | | - } |
| 41 | + var path = window.location.pathname; |
| 42 | + if (elm.value === "nightly") { |
| 43 | + window.location = |
| 44 | + "https://nightly.pipelines-as-code.pages.dev" + path; |
| 45 | + } else if (elm.value === "stable") { |
| 46 | + window.location = "https://pipelinesascode.com" + path; |
| 47 | + } else { |
| 48 | + window.location = |
| 49 | + "https://release-" + |
| 50 | + elm.value.replace(/\./g, "-") + |
| 51 | + ".pipelines-as-code.pages.dev" + |
| 52 | + path; |
| 53 | + } |
33 | 54 | } |
34 | 55 | </script> |
35 | | - {{ end }} |
36 | | - |
37 | | - {{ if and .context.GitInfo .context.Site.Params.editURL.enable }} |
| 56 | + {{ end }} {{ if and .context.GitInfo .context.Site.Params.editURL.enable }} |
38 | 57 | <div class="pac-last-modified"> |
39 | 58 | {{- $date := .context.GitInfo.AuthorDate.Local.Format "2006-01-02" -}} |
40 | | - <svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg> |
| 59 | + <svg |
| 60 | + xmlns="http://www.w3.org/2000/svg" |
| 61 | + width="13" |
| 62 | + height="13" |
| 63 | + viewBox="0 0 24 24" |
| 64 | + fill="none" |
| 65 | + stroke="currentColor" |
| 66 | + stroke-width="2" |
| 67 | + stroke-linecap="round" |
| 68 | + stroke-linejoin="round" |
| 69 | + > |
| 70 | + <circle cx="12" cy="12" r="10" /> |
| 71 | + <polyline points="12 6 12 12 16 14" /> |
| 72 | + </svg> |
41 | 73 | <span>Updated {{ $date }} by {{ .context.GitInfo.AuthorName }}</span> |
42 | 74 | </div> |
43 | 75 | {{ end }} |
44 | 76 | </div> |
45 | 77 |
|
46 | 78 | <div class="pac-footer-right"> |
47 | | - {{- if (.context.Site.Params.footer.displayPoweredBy | default true) -}} |
48 | | - <a class="pac-powered-by" target="_blank" rel="noopener noreferrer" href="https://github.com/imfing/hextra">Hextra</a> |
49 | | - {{- end -}} |
50 | | - {{- if .context.Site.Params.footer.displayCopyright -}} |
51 | | - <span class="pac-copyright">{{ .copyright }}</span> |
52 | | - {{- end -}} |
| 79 | + <a |
| 80 | + class="pac-tekton-org" |
| 81 | + target="_blank" |
| 82 | + rel="noopener noreferrer" |
| 83 | + href="https://tekton.dev" |
| 84 | + > |
| 85 | + <img |
| 86 | + src="https://avatars.githubusercontent.com/u/47602533?v=4" |
| 87 | + width="16" |
| 88 | + height="16" |
| 89 | + alt="Tekton Logo" |
| 90 | + /> |
| 91 | + Pipelines as Code is A Tekton Project |
| 92 | + </a> |
53 | 93 | {{- if .switchesVisible }}{{ partial "theme-toggle.html" }}{{ end -}} |
54 | 94 | </div> |
55 | 95 | </div> |
0 commit comments