{{ define "title" }}{{ .Path }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} {{ template "repo/fragments/meta" . }} {{ $title := printf "%s at %s · %s" .Path .Ref .RepoInfo.FullName }} {{ $url := printf "https://tangled.org/%s/blob/%s/%s" .RepoInfo.FullName .Ref .Path }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }} {{ $linkstyle := "no-underline hover:underline" }}
at {{ .Ref }} {{ if .BlobView.ShowingText }} {{ .Lines }} lines {{ end }} {{ if .BlobView.SizeHint }} {{ byteFmt .BlobView.SizeHint }} {{ end }} {{ if .BlobView.HasRawView }} view raw {{ end }} {{ if .BlobView.ShowToggle }} view {{ if .BlobView.ShowingRendered }}code{{ else }}rendered{{ end }} {{ end }}
{{ if .BlobView.IsUnsupported }}

Previews are not supported for this file type.

{{ else if .BlobView.ContentType.IsSubmodule }}

This directory is a git submodule of {{ .BlobView.ContentSrc }}.

{{ else if .BlobView.ContentType.IsImage }}
{{ .Path }}
{{ else if .BlobView.ContentType.IsVideo }}
{{ else if .BlobView.ContentType.IsSvg }}
{{ if .BlobView.ShowingRendered }}
{{ .Path }}
{{ else }}
{{ code .BlobView.Contents .Path | escapeHtml }}
{{ end }}
{{ else if .BlobView.ContentType.IsMarkup }}
{{ if .BlobView.ShowingRendered }}
{{ .BlobView.Contents | readme }}
{{ else }}
{{ code .BlobView.Contents .Path | escapeHtml }}
{{ end }}
{{ else if .BlobView.ContentType.IsCode }}
{{ code .BlobView.Contents .Path | escapeHtml }}
{{ end }} {{ template "fragments/multiline-select" }} {{ end }}