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
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
  83. 83
  84. 84
  85. 85
  86. 86
  87. 87
<!--
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?r={{ .Config.StaticDirRevision }}"></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>
		<div class="preferences--field">
			<label for="tree-layout">File list layout</label>
			<select id="tree-layout" aria-describedby="tree-layout-description">
				<option value="">Default</option>
				<option value="compact">Compact</option>
			</select>
			<p id="tree-layout-description">
				Row layout of a file list in "Files" page.
			</p>
		</div>
		<div class="preferences--field">
			<label for="file-mode-format">File permission format</label>
			<select id="file-mode-format" aria-describedby="file-mode-format-description">
				<option value="">Default (drwx)</option>
				<option value="octal">Octal</option>
				<option value="hidden">Hidden</option>
			</select>
			<p id="file-mode-format-description">
				How to render file permission?
			</p>
		</div>
		<div class="preferences--field">
			<label for="file-size-format">File size format</label>
			<select id="file-size-format" aria-describedby="file-size-format-description">
				<option value="">Default</option>
				<option value="hidden">Hidden</option>
			</select>
			<p id="file-size-format-description">
				Change display of file size in "Files" page.
			</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 -}}