From aefcfea0f9cfc6eb35e3efcbd481a0e9576dbf50 Mon Sep 17 00:00:00 2001 From: Angel Beltran Date: Sat, 14 Feb 2026 01:43:30 -0700 Subject: [PATCH] replaced remaining details elements with accordion component --- .../{platform}/shops/link-section.html.tmpl | 2 +- .../{platform}/shops/list-item.html.tmpl | 70 +++++-------------- 2 files changed, 20 insertions(+), 52 deletions(-) diff --git a/templates/components/accounts/{acctID.int64}/platforms/{platform}/shops/link-section.html.tmpl b/templates/components/accounts/{acctID.int64}/platforms/{platform}/shops/link-section.html.tmpl index 3382052..d7d47d8 100644 --- a/templates/components/accounts/{acctID.int64}/platforms/{platform}/shops/link-section.html.tmpl +++ b/templates/components/accounts/{acctID.int64}/platforms/{platform}/shops/link-section.html.tmpl @@ -10,7 +10,7 @@ {{- $idPrefix := "mock-" }}
{{- $shops := .Accounts.ListMockShopsForPlatform $acctID $parsedPlatform }} {{- if $shops }} diff --git a/templates/components/accounts/{acctID.int64}/platforms/{platform}/shops/list-item.html.tmpl b/templates/components/accounts/{acctID.int64}/platforms/{platform}/shops/list-item.html.tmpl index 2c4a197..bfcb050 100644 --- a/templates/components/accounts/{acctID.int64}/platforms/{platform}/shops/list-item.html.tmpl +++ b/templates/components/accounts/{acctID.int64}/platforms/{platform}/shops/list-item.html.tmpl @@ -51,59 +51,27 @@ end " > -
- - {{/* - group-open:border-b-background - group-open:border-b-[0.25rem] - border-dotted - */}} -

{{$platform.PrettyPrint}}

-
- -
+ {{ define "accordion-header" }} + {{/* .Platform */}} + {{- $platform := .Platform -}} +

{{$platform.PrettyPrint}}

+ {{ end }} + {{ define "accordion-body" }} + {{/* .Platform, .IDPrefix */}} + {{- $acctID := .Identity.Account.AccountID }} + {{- $platform := .Platform -}} + {{- $idPrefix := .IDPrefix }} +
{{- $pathSegment := lowerSnakeCase (printf "%s" $platform) }} {{- component (printf "/accounts/%d/platforms/%s/shops/link-section" $acctID $pathSegment) "Mock" .Mock }}
-
+ {{ end }} + {{ component "accordion" + "Platform" $platform + "IDPrefix" $idPrefix + "ID" (printf "%s%s-details" $idPrefix $platformSegment) + "#accordion-header" "accordion-header" + "#accordion-body" "accordion-body" + }}