legit

Fork of https://git.icyphox.sh/legit

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
<!--
Copyright 2026 Shota FUJI <pockawoooh@gmail.com>
SPDX-License-Identifier: MIT
-->
{{ define "site-footer" -}}
<footer class="footer">
	{{- if gt (len .Config.UI.Footer.Links) 0 }}
		<ul class="footer--links">
		{{- range .Config.UI.Footer.Links }}
			<li>
				<a href="{{ .Href }}">{{ .Text }}</a>
			</li>
		{{- end }}
		</ul>
	{{- end }}
	<button id="preferences-dialog-trigger" class="footer--preferences script-only" type="button">Preferences</button>
	<dialog id="preferences-dialog" class="preferences" popover="auto" closedby="any">
		<script type="module" src="/static/preferences.js"></script>
		<div class="preferences--field">
			<label for="global-tab-width">Tab width</label>
			<select id="global-tab-width" aria-describedby="global-tab-width-description">
				<option value="1">1</option>
				<option value="2">2</option>
				<option value="3">3</option>
				<option value="4" selected>4</option>
				<option value="6">6</option>
				<option value="8">8</option>
				<option value="12">12</option>
			</select>
			<p id="global-tab-width-description">
				Changes the size of a tab character in code blocks and code previews.
			</p>
		</div>
		<div class="preferences--field">
			<label for="theme-color">Theme color</label>
			<select id="theme-color" aria-describedby="theme-color-description">
				<option value="">Blue (default)</option>
				<option value="purple">Purple</option>
				<option value="pink">Pink</option>
				<option value="red">Red</option>
				<option value="orange">Orange</option>
				<option value="yellow">Yellow</option>
				<option value="green">Green</option>
				<option value="gray">Gray</option>
			</select>
			<p id="theme-color-description">
				Changes the primary color to use for links, buttons, and icons.
			</p>
		</div>
		<button id="preferences-dialog-closer">Close</button>
	</dialog>
	{{- if .Config.UI.Footer.PoweredBy }}
		<p class="footer--poweredby">Powered by <a href="https://git.pocka.jp/legit.git">legit</a></p>
	{{- end }}
</footer>
{{- end -}}