commit 2ebd0bee3a0b74c15e9a8401ae472c29963d03b1 Author: Nils Pukropp Date: Tue Jul 16 15:07:01 2024 +0200 init diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl new file mode 100644 index 0000000..9c9305d --- /dev/null +++ b/templates/base/footer_content.tmpl @@ -0,0 +1,25 @@ + diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl new file mode 100644 index 0000000..e634555 --- /dev/null +++ b/templates/base/head_navbar.tmpl @@ -0,0 +1,75 @@ + + diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl new file mode 100644 index 0000000..2b12180 --- /dev/null +++ b/templates/explore/repo_list.tmpl @@ -0,0 +1,58 @@ +
+ {{range .Repos}} +
+
+
+ {{$avatar := (ctx.AvatarUtils .Repo 32 "mr-3")}} + {{if $avatar}} + {{$avatar}} + {{end}} + + {{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} + +
+ {{if .IsArchived}} + {{$.i18n.Tr "repo.desc.archived"}} + {{end}} + {{if .IsTemplate}} + {{if .IsPrivate}} + {{$.i18n.Tr "repo.desc.private_template"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal_template"}} + {{end}} + {{end}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal"}} + {{end}} + + {{end}} + {{if .IsFork}} + {{svg "octicon-repo-forked"}} + {{else if .IsMirror}} + {{svg "octicon-mirror"}} + {{end}} +
+
+
+
+ {{if .DescriptionHTML}}

{{.DescriptionHTML}}

{{end}} + {{if .Topics }} +
+ {{range .Topics}} + {{if ne . "" }} +
{{.}}
+
{{end}} + {{end}} +
+ {{end}} +

{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}

+
+
+ {{else}} +
+ {{$.i18n.Tr "explore.repo_no_results"}} +
+ {{end}} +
diff --git a/templates/home.tmpl b/templates/home.tmpl new file mode 100644 index 0000000..a284f8c --- /dev/null +++ b/templates/home.tmpl @@ -0,0 +1,17 @@ +{{template "base/head" .}} +
+
+
+
+ +
+
+

+ Progλang Git +

+

Student Code Submission

+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl new file mode 100644 index 0000000..8484857 --- /dev/null +++ b/templates/org/home.tmpl @@ -0,0 +1,95 @@ +{{template "base/head" .}} +
+
+ {{ctx.AvatarUtils .Org 140 "org-avatar"}} +
+
+ {{.Org.DisplayName}} + + {{if .Org.Visibility.IsLimited}} +
{{.i18n.Tr "org.settings.visibility.limited_shortname"}}
{{end}} + {{if .Org.Visibility.IsPrivate}} +
{{.i18n.Tr "org.settings.visibility.private_shortname"}}
{{end}} +
+ {{if .IsOrganizationOwner}}{{svg "octicon-gear" 16 "mb-3"}}{{end}} +
+ {{if $.RenderedDescription}}

{{$.RenderedDescription|Str2html}}

{{end}} +
+ {{if .Org.Location}} +
{{svg "octicon-location"}} {{.Org.Location}}
{{end}} + {{if .Org.Website}} +
{{svg "octicon-link"}} {{.Org.Website}}
{{end}} +
+
+
+ +
+ +
+
+
+ {{template "explore/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} +
+ {{ if .IsAdmin }} +
+

+ {{.i18n.Tr "org.people"}} + {{if .IsOrganizationMember}} + + {{end}} +

+
+ {{$isMember := .IsOrganizationMember}} + {{range .Members}} + {{if or $isMember (.IsPublicMember $.Org.ID)}} + + {{ctx.AvatarUtils .}} + + {{end}} + {{end}} +
+ + {{if .IsOrganizationMember}} +
+ {{.i18n.Tr "org.teams"}} + +
+ + {{if .IsOrganizationOwner}} + + {{end}} + {{end}} +
+ {{ end }} +
+
+
+{{template "base/footer" .}} diff --git a/templates/repo/clone_buttons.tmpl b/templates/repo/clone_buttons.tmpl new file mode 100644 index 0000000..8e29d03 --- /dev/null +++ b/templates/repo/clone_buttons.tmpl @@ -0,0 +1,27 @@ + + + + + + +{{if not (and $.DisableHTTP $.DisableSSH)}} + +{{end}} diff --git a/templates/repo/course_view_list.tmpl b/templates/repo/course_view_list.tmpl new file mode 100644 index 0000000..9e87dee --- /dev/null +++ b/templates/repo/course_view_list.tmpl @@ -0,0 +1,151 @@ + + + + + + + + + + + {{if .HasParentPath}} + + + + {{end}} + {{range $item := .Files}} + {{$entry := $item.Entry}} + {{$commit := $item.Commit}} + {{$subModuleFile := $item.SubModuleFile}} + + + + + + + {{end}} + +
+ {{if .LatestCommitUser}} + {{ctx.AvatarUtils .LatestCommitUser 24}} + {{if .LatestCommitUser.FullName}} + {{.LatestCommitUser.FullName}} + {{else}} + {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} + {{end}} + {{else}} + {{if .LatestCommit.Author}} + {{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24}} + {{.LatestCommit.Author.Name}} + {{end}} + {{end}} + + {{ $commitLink:= printf "%s/commit/%s" .RepoLink .LatestCommit.ID }} + {{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses "root" $}} + {{RenderCommitMessageLinkSubject .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}} + {{if IsMultilineCommitMessage .LatestCommit.Message}} + + + {{end}} + + {{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}
{{svg "octicon-reply"}}..
+ + {{if $entry.IsSubModule}} + {{svg "octicon-file-submodule"}} + {{$refURL := $subModuleFile.RefURL AppUrl $.Repository.FullName $.SSHDomain}} + {{if $refURL}} + {{$entry.Name}}@{{ShortSha $subModuleFile.RefID}} + {{else}} + {{$entry.Name}}@{{ShortSha $subModuleFile.RefID}} + {{end}} + {{else}} + {{if $entry.IsDir}} + {{$subJumpablePathName := $entry.GetSubJumpablePathName}} + {{svg "octicon-file-directory-fill"}} + + {{$subJumpablePathFields := StringUtils.Split $subJumpablePathName "/"}} + {{$subJumpablePathFieldLast := (Eval (len $subJumpablePathFields) "-" 1)}} + {{if eq $subJumpablePathFieldLast 0}} + {{$subJumpablePathName}} + {{else}} + {{$subJumpablePathPrefixes := slice $subJumpablePathFields 0 $subJumpablePathFieldLast}} + {{StringUtils.Join $subJumpablePathPrefixes "/"}}/{{index $subJumpablePathFields $subJumpablePathFieldLast}} + {{end}} + + {{else}} + {{svg (printf "octicon-%s" (EntryIcon $entry))}} + {{$entry.Name}} + {{end}} + {{end}} + + + + {{$commit.Summary | RenderEmoji}} + + + + {{TimeSince $commit.Committer.When $.Lang}}
+{{if .ReadmeExist}} + {{template "repo/view_file" .}} +{{end}} + diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl new file mode 100644 index 0000000..6154683 --- /dev/null +++ b/templates/repo/header.tmpl @@ -0,0 +1,69 @@ +
+ {{with .Repository}} + +
+
+ +{{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl new file mode 100644 index 0000000..32ee0e6 --- /dev/null +++ b/templates/repo/home.tmpl @@ -0,0 +1,124 @@ +{{template "base/head" .}} +{{ $n := len .TreeNames}} +{{$l := Eval $n "-" 1}} +
+ {{template "repo/header" .}} +
+ {{template "base/alert" .}} + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} + + {{end}} + {{if .Repository.IsArchived}} +
+ {{.i18n.Tr "repo.archive.title"}} +
+ {{end}} + + {{if .IsViewFile}} + {{template "repo/view_file" .}} + {{else if .IsBlame}} + {{template "repo/blame" .}} + {{else}} + {{if eq $n 0}} + {{template "repo/course_view_list" .}} + {{else}} + {{template "repo/view_list" .}} + {{end}} + {{end}} +
+
+{{template "base/footer" .}} + diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl new file mode 100644 index 0000000..34790ae --- /dev/null +++ b/templates/repo/sub_menu.tmpl @@ -0,0 +1,38 @@ +
+ + {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats }} + + + {{range .LanguageStats}} +
 
+ {{end}} +
+ {{end}} +
diff --git a/templates/user/dashboard/courses.tmpl b/templates/user/dashboard/courses.tmpl new file mode 100644 index 0000000..15a2137 --- /dev/null +++ b/templates/user/dashboard/courses.tmpl @@ -0,0 +1,183 @@ +
+ + + +
+ diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl new file mode 100644 index 0000000..ac763fe --- /dev/null +++ b/templates/user/dashboard/dashboard.tmpl @@ -0,0 +1,15 @@ +{{template "base/head" .}} +
+
+ {{template "base/alert" .}} +
+
+
+ {{template "user/dashboard/courses" .}} +
+ {{template "user/dashboard/named_feeds" .}} +
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/dashboard/named_feeds.tmpl b/templates/user/dashboard/named_feeds.tmpl new file mode 100644 index 0000000..6509350 --- /dev/null +++ b/templates/user/dashboard/named_feeds.tmpl @@ -0,0 +1,11 @@ +
+

+ Feed +

+
+ {{template "user/dashboard/feeds" .}} + {{ $length := len .Feeds }} {{ if eq $length 0 }} + Nothing to see here, at least yet. + {{ end }} +
+
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl new file mode 100644 index 0000000..1bc4bb8 --- /dev/null +++ b/templates/user/profile.tmpl @@ -0,0 +1,78 @@ +{{template "base/head" .}} +
+
+
+
+
+ {{if eq .SignedUserName .Owner.Name}} + + {{ctx.AvatarUtils.Owner 290}} + + {{else}} + + {{ctx.AvatarUtils.Owner 290}} + + {{end}} +
+ {{if .Owner.FullName}}{{.Owner.FullName}}{{end}} + {{.Owner.Name}} +
+
+
    + {{if .Owner.Location}} +
  • {{svg "octicon-location"}} {{.Owner.Location}}
  • + {{end}} + {{if .ShowUserEmail }} +
  • + {{svg "octicon-mail"}} + {{.Owner.Email}} +
  • + {{end}} + {{if .Owner.Website}} +
  • + {{svg "octicon-link"}} + {{.Owner.Website}} +
  • + {{end}} + {{if $.RenderedDescription}} +
  • +
    {{$.RenderedDescription|Str2html}}
    +
  • + {{end}} + {{range .OpenIDs}} + {{if .Show}} +
  • + {{svg "fontawesome-openid"}} + {{.URI}} +
  • + {{end}} + {{end}} +
  • {{svg "octicon-clock"}} {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}}
  • + {{if .Orgs}} +
  • + +
  • + {{end}} +
+
+
+
+
+
+ +
+{{template "base/footer" .}} diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl new file mode 100644 index 0000000..c71ca97 --- /dev/null +++ b/templates/user/settings/account.tmpl @@ -0,0 +1,124 @@ +{{template "base/head" .}} +
+ {{template "user/settings/navbar" .}} +
+ {{template "base/alert" .}} +

+ {{.i18n.Tr "settings.manage_emails"}} +

+
+ +
+
+
+ {{.CsrfTokenHtml}} +
+ + +
+ +
+
+

+ {{.i18n.Tr "settings.manage_themes"}} +

+
+ +
+
+
+ + + + +{{template "base/footer" .}} diff --git a/templates/user/settings/keys.tmpl b/templates/user/settings/keys.tmpl new file mode 100644 index 0000000..ff0242f --- /dev/null +++ b/templates/user/settings/keys.tmpl @@ -0,0 +1,12 @@ +{{template "base/head" .}} +
+ {{template "user/settings/navbar" .}} +
+ {{template "base/alert" .}} + {{template "user/settings/keys_ssh" .}} + {{template "user/settings/keys_principal" .}} + {{template "user/settings/keys_gpg" .}} +
+
+ +{{template "base/footer" .}} diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl new file mode 100644 index 0000000..12b48b5 --- /dev/null +++ b/templates/user/settings/navbar.tmpl @@ -0,0 +1,13 @@ + diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl new file mode 100644 index 0000000..8763e1e --- /dev/null +++ b/templates/user/settings/profile.tmpl @@ -0,0 +1,102 @@ +{{template "base/head" .}} +
+ {{template "user/settings/navbar" .}} +
+ {{template "base/alert" .}} +

+ {{.i18n.Tr "settings.public_profile"}} +

+
+

{{.i18n.Tr "settings.profile_desc"}}

+
+ {{.CsrfTokenHtml}} +
+ + +
+
+ +

{{.SignedUser.Email}}

+
+
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+
+ +

+ {{.i18n.Tr "settings.avatar"}} +

+
+
+ {{.CsrfTokenHtml}} + {{if not .DisableGravatar}} +
+
+ + +
+
+
+ + +
+ {{end}} + +
+
+ + +
+
+ +
+ + +
+ +
+ + {{$.i18n.Tr "settings.delete_current_avatar"}} +
+
+
+
+
+{{template "base/footer" .}}