{{ define "title" }}{{ .Path }} at {{ .Ref }} · {{ .RepoInfo.FullName }} · Tangled{{ 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 (and .BlobView.ContentType.HasTextView (not .ShowRendered)) }} {{ .BlobView.Lines }} lines {{ end }} {{ if .BlobView.SizeHint }} {{ byteFmt .BlobView.SizeHint }} {{ end }} {{ if .BlobView.ContentType.HasRawView }} View raw {{ end }} {{ if (and .BlobView.ContentType.HasTextView .BlobView.ContentType.HasRenderedView) }} View {{ if .ShowRendered }}code{{ else }}rendered{{ end }} {{ end }} {{ if (and .BlobView.ContentType.HasTextView (not .ShowRendered)) }}
{{ end }}
{{ if .LastCommitInfo }} {{ template "repo/fragments/lastCommitPanel" $ }} {{ end }} {{ $wrapContentClasses := "peer-has-[:checked]:*:whitespace-pre-wrap peer-has-[:checked]:*:[overflow-wrap:anywhere]" }} {{ 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 .ShowRendered }}
{{ .Path }}
{{ else }}
{{ code .BlobView.Contents .Path | escapeHtml }}
{{ end }}
{{ else if .BlobView.FileTooLarge }}

This file is too large to render. View raw..

{{ else if .BlobView.ContentType.IsMarkup }}
{{ if .ShowRendered }}
{{ .BlobView.Contents | readme }}
{{ else }}
{{ code .BlobView.Contents .Path | escapeHtml }}
{{ end }}
{{ else if .BlobView.ContentType.IsCode }}
{{ code .BlobView.Contents .Path | escapeHtml }}
{{ else }}

Previews are not supported for this file type.

{{ end }} {{ template "fragments/multiline-select" }} {{ if .LastCommitInfo }} {{ template "repo/fragments/permalinkShortcutScript" (printf "/%s/tree/%s/%s" .RepoInfo.RepoIdentifier .LastCommitInfo.Hash .Path) }} {{ end }} {{ end }}