From 29e18042620fcddccf3e68fa2f772697773fd87d Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Thu, 23 Jan 2020 02:12:05 -0500 Subject: templates: Add repo header and home --- templates/repo/header.tmpl | 112 +++++++++++++++++++++++++++++++++ templates/repo/home.tmpl | 153 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 265 insertions(+) create mode 100644 templates/repo/header.tmpl create mode 100644 templates/repo/home.tmpl (limited to 'templates') diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl new file mode 100644 index 0000000..b1b3118 --- /dev/null +++ b/templates/repo/header.tmpl @@ -0,0 +1,112 @@ +
+{{with .Repository}} +
+
+ + {{if not .IsBeingCreated}} + + {{end}} +
+
+{{end}} +
+ {{if not .Repository.IsBeingCreated}} + + {{end}} +
+
+
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl new file mode 100644 index 0000000..19989bb --- /dev/null +++ b/templates/repo/home.tmpl @@ -0,0 +1,153 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} +
+ {{template "base/alert" .}} +
+
+ {{if .Repository.DescriptionHTML}}{{.Repository.DescriptionHTML}}{{else if .IsRepositoryAdmin}}{{.i18n.Tr "repo.no_desc"}}{{end}} + {{.Repository.Website}} +
+ {{if .RepoSearchEnabled}} + + {{end}} +
+
+ {{range .Topics}}{{.Name}}{{end}} + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}{{.i18n.Tr "repo.topic.manage_topics"}}{{end}} +
+ {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} + + {{end}} +
+ {{.i18n.Tr "repo.topic.count_prompt"}} + {{.i18n.Tr "repo.topic.format_prompt"}} +
+ {{if .Repository.IsArchived}} +
+ {{.i18n.Tr "repo.archive.title"}} +
+ {{end}} + {{template "repo/sub_menu" .}} + + {{if .IsViewFile}} + {{template "repo/view_file" .}} + {{else if .IsBlame}} + {{template "repo/blame" .}} + {{else}} + {{template "repo/view_list" .}} + {{end}} +
+
+{{template "base/footer" .}} -- cgit v1.2.3