Add missing $ in templates (#122)

This commit is contained in:
Thomas Miceli 2023-09-29 06:32:09 +02:00 committed by GitHub
parent 4eedfdcf6f
commit d137820037
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -34,12 +34,12 @@
</div> </div>
{{ if $file.Truncated }} {{ if $file.Truncated }}
<div class="text-sm px-4 py-1.5 border-t-1 border-gray-200 dark:border-gray-700"> <div class="text-sm px-4 py-1.5 border-t-1 border-gray-200 dark:border-gray-700">
{{ .locale.Tr "gist.file-truncated" }} <a href="{{ $.c.ExternalUrl }}/{{ $.gist.User.Username }}/{{ $.gist.Uuid }}/raw/{{ $.commit }}/{{$file.Filename}}">{{ .locale.Tr "gist.watch-full-file" }}.</a> {{ $.locale.Tr "gist.file-truncated" }} <a href="{{ $.c.ExternalUrl }}/{{ $.gist.User.Username }}/{{ $.gist.Uuid }}/raw/{{ $.commit }}/{{$file.Filename}}">{{ $.locale.Tr "gist.watch-full-file" }}.</a>
</div> </div>
{{ end }} {{ end }}
{{ if and (not $csv) (isCsv $file.Filename) }} {{ if and (not $csv) (isCsv $file.Filename) }}
<div class="text-sm px-4 py-1.5 border-t-1 border-gray-200 dark:border-gray-700"> <div class="text-sm px-4 py-1.5 border-t-1 border-gray-200 dark:border-gray-700">
{{ .locale.Tr "gist.file-not-valid" }} {{ $.locale.Tr "gist.file-not-valid" }}
</div> </div>
{{ end }} {{ end }}
</div> </div>

View file

@ -44,11 +44,11 @@
</div> </div>
<div class="overflow-auto"> <div class="overflow-auto">
{{ if $file.Truncated }} {{ if $file.Truncated }}
<p class="m-2 ml-4 text-sm">{{ .locale.Tr "gist.revision.diff-truncated" }}</p> <p class="m-2 ml-4 text-sm">{{ $.locale.Tr "gist.revision.diff-truncated" }}</p>
{{ else if and (eq $file.Content "") (ne $file.OldFilename "") }} {{ else if and (eq $file.Content "") (ne $file.OldFilename "") }}
<p class="m-2 ml-4 text-sm">{{ .locale.Tr "gist.revision.file-renamed-no-changes" }}</p> <p class="m-2 ml-4 text-sm">{{ $.locale.Tr "gist.revision.file-renamed-no-changes" }}</p>
{{ else if eq $file.Content "" }} {{ else if eq $file.Content "" }}
<p class="m-2 ml-4 text-sm">{{ .locale.Tr "gist.revision.empty-file" }}</p> <p class="m-2 ml-4 text-sm">{{ $.locale.Tr "gist.revision.empty-file" }}</p>
{{ else }} {{ else }}
<table class="code table-code w-full whitespace-pre" data-filename="{{ $file.Filename }}" style="font-size: 0.8em; border-spacing: 0"> <table class="code table-code w-full whitespace-pre" data-filename="{{ $file.Filename }}" style="font-size: 0.8em; border-spacing: 0">
<tbody> <tbody>
@ -91,7 +91,7 @@
</div> </div>
{{end}} {{end}}
{{else}} {{else}}
<p class="text-left text-sm text-slate-700 dark:text-slate-300 italic">{{ .locale.Tr "gist.revision.no-changes" }}</p> <p class="text-left text-sm text-slate-700 dark:text-slate-300 italic">{{ $.locale.Tr "gist.revision.no-changes" }}</p>
{{end}} {{end}}
</div> </div>
</div> </div>