diff --git a/assets/scss/_registry.scss b/assets/scss/_registry.scss index 06ed0693de9f..52f440a6c3f4 100644 --- a/assets/scss/_registry.scss +++ b/assets/scss/_registry.scss @@ -38,4 +38,24 @@ .registry-entry { @extend .shadow; + max-width: 340px; + min-width: 200px; +} + +.registry-entry:hover { + transform: scale(1.05); + transition: all 0.3s ease; +} + +.narrative { + font-size: 0.9rem; +} + +.quick-setup { + margin-left: 1%; +} + +.item-specs { + padding-left: 0px; + padding-right: 0px; } diff --git a/layouts/partials/ecosystem/registry/entry.html b/layouts/partials/ecosystem/registry/entry.html index 9a282c4db0b9..e869b683a676 100644 --- a/layouts/partials/ecosystem/registry/entry.html +++ b/layouts/partials/ecosystem/registry/entry.html @@ -1,222 +1,298 @@ {{ $languageNames := .languageNames -}} {{ with .value -}} - {{ - $remoteRegistries := dict - "npm" (dict - "urlPattern" "https://npmjs.com/package/%s" - "installTemplate" "ecosystem/registry/quickinstall/default.md" - "installLine" "npm install %s" - "icon" "fab fa-npm") - "packagist" (dict - "urlPattern" "https://packagist.org/packages/%s" - "installLine" "composer require %s" - "installTemplate" "ecosystem/registry/quickinstall/default.md" - "icon" "fa-solid fa-box-open") - "gems" (dict - "urlPattern" "https://rubygems.org/gems/%s" - "installLine" "gem install %s" - "installTemplate" "ecosystem/registry/quickinstall/default.md" - "icon" "fa-solid fa-gem") - "go" (dict - "urlPattern" "https://pkg.go.dev/%s" - "installLine" "go get %s" - "installTemplate" "ecosystem/registry/quickinstall/default.md" - "icon" "fa-brands fa-golang") - "go-collector" (dict - "urlPattern" "https://pkg.go.dev/%s" - "installTemplate" "ecosystem/registry/quickinstall/collector.md" - "icon" "fa-solid fa-box-open") - "nuget" (dict - "urlPattern" "https://www.nuget.org/packages/%s" - "installLine" "dotnet add package %s" - "installTemplate" "ecosystem/registry/quickinstall/default.md" - "icon" "fa-solid fa-box-open") - "pip" (dict - "urlPattern" "https://pypi.org/project/%s" - "installLine" "pip install %s" - "installTemplate" "ecosystem/registry/quickinstall/default.md" - "icon" "fa-brands fa-python") - "hex" (dict - "urlPattern" "https://hex.pm/packages/%s" - "installTemplate" "ecosystem/registry/quickinstall/hex.md" - "icon" "fa-brands fa-erlang") - "crates" (dict - "urlPattern" "https://crates.io/crates/%s" - "installLine" "cargo add %s" - "installTemplate" "ecosystem/registry/quickinstall/default.md" - "icon" "fab fa-rust") - -}} +{{ +$remoteRegistries := dict +"npm" (dict +"urlPattern" "https://npmjs.com/package/%s" +"installTemplate" "ecosystem/registry/quickinstall/default.md" +"installLine" "npm install %s" +"icon" "fab fa-npm") +"packagist" (dict +"urlPattern" "https://packagist.org/packages/%s" +"installLine" "composer require %s" +"installTemplate" "ecosystem/registry/quickinstall/default.md" +"icon" "fa-solid fa-box-open") +"gems" (dict +"urlPattern" "https://rubygems.org/gems/%s" +"installLine" "gem install %s" +"installTemplate" "ecosystem/registry/quickinstall/default.md" +"icon" "fa-solid fa-gem") +"go" (dict +"urlPattern" "https://pkg.go.dev/%s" +"installLine" "go get %s" +"installTemplate" "ecosystem/registry/quickinstall/default.md" +"icon" "fa-brands fa-golang") +"go-collector" (dict +"urlPattern" "https://pkg.go.dev/%s" +"installTemplate" "ecosystem/registry/quickinstall/collector.md" +"icon" "fa-solid fa-box-open") +"nuget" (dict +"urlPattern" "https://www.nuget.org/packages/%s" +"installLine" "dotnet add package %s" +"installTemplate" "ecosystem/registry/quickinstall/default.md" +"icon" "fa-solid fa-box-open") +"pip" (dict +"urlPattern" "https://pypi.org/project/%s" +"installLine" "pip install %s" +"installTemplate" "ecosystem/registry/quickinstall/default.md" +"icon" "fa-brands fa-python") +"hex" (dict +"urlPattern" "https://hex.pm/packages/%s" +"installTemplate" "ecosystem/registry/quickinstall/hex.md" +"icon" "fa-brands fa-erlang") +"crates" (dict +"urlPattern" "https://crates.io/crates/%s" +"installLine" "cargo add %s" +"installTemplate" "ecosystem/registry/quickinstall/default.md" +"icon" "fab fa-rust") +-}} - {{ $isNative := and (or (eq .registryType "instrumentation") (eq .registryType "application integration")) (.isNative) }} - {{ $isFirstParty := and (or (eq .registryType "instrumentation") (eq .registryType "application integration")) (.isFirstParty) }} - {{ $currentTime := (time now) -}} - {{ $delta := $currentTime.Sub (time.AsTime .createdAt) -}} - {{ $isNew := lt $delta.Hours 730 -}} - {{ $usedInDemo := and (isset . "urls") (isset .urls "demo") }} - {{ $deprecated := and (isset . "deprecated") (isset .deprecated "reason") }} - {{ $package := "" -}} - {{ if and (.package) (isset $remoteRegistries .package.registry) -}} - {{ $package = merge .package (index $remoteRegistries .package.registry) -}} - {{ $package = merge $package (dict "type" .registryType) -}} - {{ end -}} - {{ $highlightStyle := "" -}} - {{ if $isNew -}} - {{ $highlightStyle = "border-info" -}} - {{ end -}} - {{ if $isNative -}} - {{ $highlightStyle = "border-success" -}} - {{ end -}} - {{ if $isFirstParty -}} - {{ $highlightStyle = "border-success" -}} - {{ end -}} - {{ if $usedInDemo -}} - {{ $highlightStyle = "border-secondary" -}} - {{ end -}} - {{ if $deprecated -}} - {{ $highlightStyle = "border-danger" -}} - {{ end -}} - {{ $primaryUrl := "" -}} - {{ if .urls.repo -}} - {{ $primaryUrl = .urls.repo -}} - {{ else if .urls.website -}} - {{ $primaryUrl = .urls.website -}} - {{ else if .urls.docs -}} - {{ errorf "The %q registry entry requires a repo or website URL." .title }} - {{ end -}} - {{ $primaryHref := printf "href=%q" $primaryUrl | safeHTMLAttr -}} -
- - by - {{ range $index, $author := .authors -}} - {{ if $index }}, {{ end }} - {{ if eq $author.name "OpenTelemetry Authors" -}} - 🔠{{ $author.name }} 🔠- {{ else if isset $author "url" }} +
+ + by + {{ range $index, $author := .authors -}} + {{ if $index }}, {{ end }} + {{ if eq $author.name "OpenTelemetry Authors" -}} + 🔠{{ $author.name }} + 🔠+ {{ else if isset $author "url" }} {{ $href := printf "href=%q" $author.url | safeHTMLAttr -}} - {{ $author.name }} - {{ else -}} + {{ $author.name }} + {{ else -}} {{ $author.name -}} - {{ end -}} - {{ end -}} - -
-{{ (partial .installTemplate .) | markdownify -}} -
{{ end -}} - {{- end -}} -+ {{- .description | markdownify -}} +
+{{ (partial .installTemplate .) | markdownify -}}
+ {{ end -}} + {{- end -}} +