{{define "content"}} {{$repo := .Data.Repo}}

{{$repo.Name}}{{if $repo.IsArchived}}已归档{{end}}{{if not $repo.AIEnabled}}AI 功能已关闭{{end}}

{{if $repo.Description}}

{{$repo.Description}}

{{else}}

暂无项目描述{{if .Data.CanManage}} · 去添加{{end}}

{{end}}
clone
{{if not .Data.IsEmpty}} Download ZIP {{end}}
{{template "repotabs" (dict "Repo" $repo "Ref" .Data.Ref "Tab" "code" "CanManage" .Data.CanManage "CommitCount" .Data.CommitCount "BranchCount" .Data.BranchCount "ReleaseCount" .Data.ReleaseCount "IssueCount" .Data.IssueCount)}}
{{if .Data.IsEmpty}}

仓库还是空的

在本地执行下面的命令,把第一个版本推上来。

git init -b main
git add .
git commit -m "first commit"
git remote add origin {{.Data.CloneURL}}
git push -u origin main
{{if not .User}}

推送时需要登录:账号由管理员创建,点此登录。

{{end}}
{{else}} {{with .Data.Path}}
{{range $.Data.Breadcrumbs}}{{.Name}}/{{end}}
{{end}}
{{if .Data.LastCommit}} {{template "avin" (dict "N" .Data.LastCommit.Author "S" 26)}} {{.Data.LastCommit.Author}} {{.Data.LastCommit.Subject}} {{timeago .Data.LastCommit.When}} {{else}}目录内容{{end}}
{{range .Data.Entries}} {{end}}
{{if .IsDir}} ▸{{.Name}} {{else}} •{{.Name}} {{end}} {{if .HasCommit}}{{.LastCommit.Subject}}{{end}} {{if .HasCommit}}{{timeago .LastCommit.When}}{{end}} {{if not .IsDir}}{{humanSize .Size}}{{end}}
{{if .Data.ReadmeName}}
•{{.Data.ReadmeName}}
{{if .Data.ReadmeIsMarkdown}}{{.Data.ReadmeHTML}}{{else}}
{{.Data.ReadmeText}}
{{end}}
{{end}} {{end}}
{{end}}