aboutsummaryrefslogtreecommitdiff
path: root/templates/gititemblob.qtpl
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-06-07 14:02:25 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-06-07 14:02:25 +0200
commit18aa098f50e2a2c7db01dd4d04dde460fd40f5d5 (patch)
tree5e3b3d3ba3206f2765db1a23a378275852154a51 /templates/gititemblob.qtpl
parentd0e0c1eb99303e1000140d4b98c610077278dc42 (diff)
downloadcerrado-18aa098f50e2a2c7db01dd4d04dde460fd40f5d5.tar.gz
cerrado-18aa098f50e2a2c7db01dd4d04dde460fd40f5d5.tar.bz2
cerrado-18aa098f50e2a2c7db01dd4d04dde460fd40f5d5.zip
feat: Add blob endpoint
Diffstat (limited to 'templates/gititemblob.qtpl')
-rw-r--r--templates/gititemblob.qtpl14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/gititemblob.qtpl b/templates/gititemblob.qtpl
new file mode 100644
index 0000000..89d002d
--- /dev/null
+++ b/templates/gititemblob.qtpl
@@ -0,0 +1,14 @@
+{% code
+type GitItemBlobPage struct {
+ File string
+ Content []byte
+}
+%}
+
+{% func (g *GitItemBlobPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Tree) %}{% endfunc %}
+
+{% func (g *GitItemBlobPage) GitContent() %}
+<div class="code-view">
+{%z= g.Content %}
+</div>
+{% endfunc %}