diff --git a/appview/pages/templates/goodfirstissues/index.html b/appview/pages/templates/goodfirstissues/index.html new file mode 100644 index 00000000..dd11521a --- /dev/null +++ b/appview/pages/templates/goodfirstissues/index.html @@ -0,0 +1,180 @@ +{{ define "title" }}good first issues{{ end }} + +{{ define "extrameta" }} + + + + +{{ end }} + +{{ define "content" }} +
+
+

Good First Issues

+

+ Find beginner-friendly issues across all repositories to get started with open source contributions. +

+
+ +
+ {{ if eq (len .RepoGroups) 0 }} +
+
+
+ {{ i "circle-dot" "w-16 h-16 mx-auto" }} +
+

No good first issues available

+

+ There are currently no open issues labeled as "good-first-issue" across all repositories. +

+

+ Repository maintainers can add the "good-first-issue" label to beginner-friendly issues to help newcomers get started. +

+
+
+ {{ else }} + {{ range .RepoGroups }} +
+
+
+
+ {{ if .Repo.Source }} + {{ i "git-fork" "w-4 h-4 mr-1.5 shrink-0" }} + {{ else }} + {{ i "book-marked" "w-4 h-4 mr-1.5 shrink-0" }} + {{ end }} + {{ $repoOwner := resolve .Repo.Did }} + {{ $repoOwner }}/{{ .Repo.Name }} +
+
+ + + {{ if .Repo.RepoStats }} +
+ {{ with .Repo.RepoStats.Language }} +
+ {{ template "repo/fragments/colorBall" (dict "color" (langColor .)) }} + {{ . }} +
+ {{ end }} + {{ with .Repo.RepoStats.StarCount }} +
+ {{ i "star" "w-3 h-3 fill-current" }} + {{ . }} +
+ {{ end }} + {{ with .Repo.RepoStats.IssueCount.Open }} +
+ {{ i "circle-dot" "w-3 h-3" }} + {{ . }} +
+ {{ end }} + {{ with .Repo.RepoStats.PullCount.Open }} +
+ {{ i "git-pull-request" "w-3 h-3" }} + {{ . }} +
+ {{ end }} +
+ {{ end }} +
+ + {{ with .Repo.Description }} +
+ {{ . | description }} +
+ {{ end }} + + {{ if gt (len .Issues) 0 }} +
+ + {{ $s := "s" }} + {{ if eq (len .Issues) 1 }} + {{ $s = "" }} + {{ end }} +
+ {{ i "chevrons-up-down" "w-4 h-4" }} expand {{ len .Issues }} issue{{$s}} in this repo +
+ +
+ +
+ {{ end }} +
+ {{ end }} + + {{ if or (gt .Page.Offset 0) (eq (len .RepoGroups) .Page.Limit) }} +
+
+ {{ if gt .Page.Offset 0 }} + {{ $prev := .Page.Previous }} + + {{ i "chevron-left" "w-4 h-4" }} + previous + + {{ else }} +
+ {{ end }} + + {{ if eq (len .RepoGroups) .Page.Limit }} + {{ $next := .Page.Next }} + + next + {{ i "chevron-right" "w-4 h-4" }} + + {{ end }} +
+
+ {{ end }} + {{ end }} +
+
+{{ end }} diff --git a/appview/pages/templates/repo/issues/fragments/globalIssueListing.html b/appview/pages/templates/repo/issues/fragments/globalIssueListing.html new file mode 100644 index 00000000..7ecd808a --- /dev/null +++ b/appview/pages/templates/repo/issues/fragments/globalIssueListing.html @@ -0,0 +1,63 @@ +{{ define "repo/issues/fragments/globalIssueListing" }} +
+ {{ range .Issues }} +
+ +
+ {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} + {{ $icon := "ban" }} + {{ $state := "closed" }} + {{ if .Open }} + {{ $bgColor = "bg-green-600 dark:bg-green-700" }} + {{ $icon = "circle-dot" }} + {{ $state = "open" }} + {{ end }} + + + {{ i $icon "w-3 h-3 mr-1.5 text-white dark:text-white" }} + {{ $state }} + + + + {{ template "user/fragments/picHandleLink" .Did }} + + + + {{ template "repo/fragments/time" .Created }} + + + + {{ $s := "s" }} + {{ if eq (len .Comments) 1 }} + {{ $s = "" }} + {{ end }} + {{ len .Comments }} comment{{$s}} + + + {{ $state := .Labels }} + {{ range $k, $d := $.LabelDefs }} + {{ range $v, $s := $state.GetValSet $d.AtUri.String }} + {{ template "labels/fragments/label" (dict "def" $d "val" $v "withPrefix" true) }} + {{ end }} + {{ end }} +
+
+ {{ end }} +
+{{ end }} diff --git a/appview/pages/templates/repo/issues/fragments/issueListing.html b/appview/pages/templates/repo/issues/fragments/issueListing.html new file mode 100644 index 00000000..8f858bbd --- /dev/null +++ b/appview/pages/templates/repo/issues/fragments/issueListing.html @@ -0,0 +1,55 @@ +{{ define "repo/issues/fragments/issueListing" }} +
+ {{ range .Issues }} +
+ +
+ {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} + {{ $icon := "ban" }} + {{ $state := "closed" }} + {{ if .Open }} + {{ $bgColor = "bg-green-600 dark:bg-green-700" }} + {{ $icon = "circle-dot" }} + {{ $state = "open" }} + {{ end }} + + + {{ i $icon "w-3 h-3 mr-1.5 text-white dark:text-white" }} + {{ $state }} + + + + {{ template "user/fragments/picHandleLink" .Did }} + + + + {{ template "repo/fragments/time" .Created }} + + + + {{ $s := "s" }} + {{ if eq (len .Comments) 1 }} + {{ $s = "" }} + {{ end }} + {{ len .Comments }} comment{{$s}} + + + {{ $state := .Labels }} + {{ range $k, $d := $.LabelDefs }} + {{ range $v, $s := $state.GetValSet $d.AtUri.String }} + {{ template "labels/fragments/label" (dict "def" $d "val" $v "withPrefix" true) }} + {{ end }} + {{ end }} +
+
+ {{ end }} +
+{{ end }} diff --git a/appview/pages/templates/repo/issues/issues.html b/appview/pages/templates/repo/issues/issues.html index 688ba364..5d073f0e 100644 --- a/appview/pages/templates/repo/issues/issues.html +++ b/appview/pages/templates/repo/issues/issues.html @@ -37,58 +37,8 @@ {{ end }} {{ define "repoAfter" }} -
- {{ range .Issues }} -
- -
- {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} - {{ $icon := "ban" }} - {{ $state := "closed" }} - {{ if .Open }} - {{ $bgColor = "bg-green-600 dark:bg-green-700" }} - {{ $icon = "circle-dot" }} - {{ $state = "open" }} - {{ end }} - - - {{ i $icon "w-3 h-3 mr-1.5 text-white dark:text-white" }} - {{ $state }} - - - - {{ template "user/fragments/picHandleLink" .Did }} - - - - {{ template "repo/fragments/time" .Created }} - - - - {{ $s := "s" }} - {{ if eq (len .Comments) 1 }} - {{ $s = "" }} - {{ end }} - {{ len .Comments }} comment{{$s}} - - - {{ $state := .Labels }} - {{ range $k, $d := $.LabelDefs }} - {{ range $v, $s := $state.GetValSet $d.AtUri.String }} - {{ template "labels/fragments/label" (dict "def" $d "val" $v "withPrefix" true) }} - {{ end }} - {{ end }} -
-
- {{ end }} +
+ {{ template "repo/issues/fragments/issueListing" (dict "Issues" .Issues "RepoPrefix" .RepoInfo.FullName "LabelDefs" .LabelDefs) }}
{{ block "pagination" . }} {{ end }} {{ end }} diff --git a/go.mod b/go.mod index a9500fb1..f122a84c 100644 --- a/go.mod +++ b/go.mod @@ -43,6 +43,7 @@ require ( github.com/yuin/goldmark v1.7.12 github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc golang.org/x/crypto v0.40.0 + golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b golang.org/x/net v0.42.0 golang.org/x/sync v0.16.0 golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da @@ -168,7 +169,6 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect golang.org/x/sys v0.34.0 // indirect golang.org/x/text v0.27.0 // indirect golang.org/x/time v0.12.0 // indirect