Skip to content

Commit

Permalink
Merge branch 'root-v1.21-and-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
richmahn committed Nov 2, 2023
2 parents 3c6d4d3 + e9048d2 commit e6abe77
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 31 deletions.
23 changes: 10 additions & 13 deletions templates/catalog/catalog_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
<div class="item">
<div class="ui header gt-df gt-ac">
<div class="repo-title">
{{$avatar := (repoAvatar .Repo 32 "gt-mr-3")}}
{{if $avatar}}
{{$avatar}}
{{end}}
{{template "repo/icon" .Repo}}
{{if .Release}}
<a class="name" href="{{.Repo.Link}}/releases/tag/{{.Ref | PathEscapeSegments}}">
{{else}}
Expand Down Expand Up @@ -52,18 +49,18 @@
<div class="description">
<table>
<tr>
<td><strong>{{if .Release}}{{$ctx.Locale.Tr "repo.metadata.publisher"}}{{else}}{{$ctx.Locale.Tr "repo.metadata.provider"}}{{end}}:</strong></td>
<td><strong>{{if .Release}}{{$.locale.Tr "repo.metadata.publisher"}}{{else}}{{$.locale.Tr "repo.metadata.provider"}}{{end}}:</strong></td>
<td><a href="?sort={{$.SortType}}&q=owner%3A{{.Repo.OwnerName}}">{{.Repo.OwnerName}}</a></td>
<tr>
<td><strong>{{$ctx.Locale.Tr "repo.metadata.subject"}}:</strong></td>
<td><strong>{{$.locale.Tr "repo.metadata.subject"}}:</strong></td>
<td><a href="?sort={{$.SortType}}&q=subject%3A{{.Subject}}">{{.Subject}}</a></td>
</tr>
<tr>
<td><strong>{{$ctx.Locale.Tr "repo.metadata.resource"}}:</strong></td>
<td><strong>{{$.locale.Tr "repo.metadata.resource"}}:</strong></td>
<td><a href="?sort={{$.SortType}}&q=resource%3A{{.Resource}}">{{.Resource}}</a></td>
</tr>
<tr>
<td><strong>{{$ctx.Locale.Tr "repo.metadata.metadata_type"}}:</strong></td>
<td><strong>{{$.locale.Tr "repo.metadata.metadata_type"}}:</strong></td>
<td>
<img src="{{AssetUrlPrefix}}/img/dcs/{{.GetMetadataTypeIcon}}" style="height:16px;vertical-align:middle" />
<a href="?sort={{$.SortType}}&q=metadata_type%3A{{.MetadataType}}">
Expand All @@ -72,31 +69,31 @@
</td>
</tr>
<tr>
<td><strong>{{$ctx.Locale.Tr "repo.metadata.language"}}:</strong></td>
<td><strong>{{$.locale.Tr "repo.metadata.language"}}:</strong></td>
<td><a href="?sort={{$.SortType}}&q=lang%3A{{.Language}}">{{.LanguageTitle}} ({{.Language}}, {{.LanguageDirection}})</a></td>
</tr>
<tr>
<td><strong>{{ctx.Locale.Tr "repo.metadata.stage"}}:</strong></td>
<td><strong>{{$.locale.Tr "repo.metadata.stage"}}:</strong></td>
<td>{{.StageStr}}</td>
</tr>
<tr>
<td><strong>{{ctx.Locale.Tr "repo.metadata.ingredients"}}:</strong></td>
<td><strong>{{$.locale.Tr "repo.metadata.ingredients"}}:</strong></td>
<td>
{{range .Ingredients}}
<a href="?sort={{$.SortType}}&q=book%3A{{.Identifier}}">{{.Identifier}}</a>
{{end}}
</td>
</tr>
<tr>
<td><strong>{{if .Release}}{{ctx.Locale.Tr "repo.metadata.release_date"}}{{else}}{{ctx.Locale.Tr "repo.metadata.last_updated"}}{{end}}:</strong></td>
<td><strong>{{if .Release}}{{$.locale.Tr "repo.metadata.release_date"}}{{else}}{{$.locale.Tr "repo.metadata.last_updated"}}{{end}}:</strong></td>
<td>{{DateTime "full" .ReleaseDateUnix.AsTime}}</td>
</tr>
</table>
</div>
</div>
{{else}}
<div>
{{ctx.Locale.Tr "explore.repo_no_results"}}
{{$.locale.Tr "explore.repo_no_results"}}
</div>
{{end}}
</div>
29 changes: 11 additions & 18 deletions templates/explore/repo_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,24 @@
<!-- END DCS Customizations -->
</div>
<div class="flex-item-trailing">
{{if .PrimaryLanguage}}
<a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
<span class="flex-text-inline"><i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
<!-- DCS Customizations -->
{{if .RepoDM.Language}}
<a class="muted" href="{{$.Link}}?sort={{$.SortType}}&q=lang%3A{{.RepoDM.Language}}" title="{{.RepoDM.LanguageTitle}}">
<span class="gt-df gt-ac gt-mr-3"><i class="color-icon gt-mr-3" style="background-color: {{GetColorFromString .RepoDM.Language}}"></i>{{.RepoDM.Language}}</span>
</a>
{{end}}
{{if .RepoDM.Subject}}
<a class="muted" href="{{$.Link}}?sort={{$.SortType}}&q=subject%3A{{.RepoDM.Subject}}" title="Resource: {{.RepoDM.Resource}}">
<span class="gt-df gt-ac gt-mr-3"><i class="color-icon gt-mr-3" style="background-color: {{GetColorFromString .RepoDM.Subject}}"></i>{{.RepoDM.Subject}}</span>
</a>
{{end}}
<!-- END DCS Customizations -->
{{if not $.DisableStars}}
<a class="text grey flex-text-inline" href="{{.Link}}/stars">{{svg "octicon-star" 16}}{{.NumStars}}</a>
{{end}}
<a class="text grey flex-text-inline" href="{{.Link}}/forks">{{svg "octicon-git-branch" 16}}{{.NumForks}}</a>
</div>
</div>
<div class="gt-font-13 gt-df gt-ac text grey">
{{if .RepoDM.Language}}
<a class="muted" href="{{$.Link}}?sort={{$.SortType}}&q=lang%3A{{.RepoDM.Language}}" title="{{.RepoDM.LanguageTitle}}">
<span class="gt-df gt-ac gt-mr-3"><i class="color-icon gt-mr-3" style="background-color: {{GetColorFromString .RepoDM.Language}}"></i>{{.RepoDM.Language}}</span>
</a>
{{end}}
{{if .RepoDM.Subject}}
<a class="muted" href="{{$.Link}}?sort={{$.SortType}}&q=subject%3A{{.RepoDM.Subject}}" title="Resource: {{.RepoDM.Resource}}">
<span class="gt-df gt-ac gt-mr-3"><i class="color-icon gt-mr-3" style="background-color: {{GetColorFromString .RepoDM.Subject}}"></i>{{.RepoDM.Subject}}</span>
</a>
{{end}}
</div>
</div>
<div class="description">
{{$description := .DescriptionHTML $.Context}}
{{if $description}}
<div class="flex-item-body">{{$description}}</div>
Expand All @@ -87,4 +80,4 @@
{{ctx.Locale.Tr "explore.repo_no_results"}}
</div>
{{end}}
</div>
</div>

0 comments on commit e6abe77

Please sign in to comment.