Skip to content

Commit 1f4798f

Browse files
Zach LasiukZach Lasiuk
authored andcommitted
test update to list
1 parent 8d04588 commit 1f4798f

1 file changed

Lines changed: 136 additions & 1 deletion

File tree

  • themes/arm-design-system-hugo-theme/layouts/test
Lines changed: 136 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,140 @@
1+
{{/*
2+
Basic list, expandable info.
3+
Search = name. Sorting = bonus
4+
Info: up-front loading for all SW. Two options:
5+
- one_file JSON, or
6+
- multi_files JSONs
7+
*/}}
8+
9+
10+
111
{{define "main"}}
212

3-
Test
13+
14+
{{/*******************************************************
15+
HUGO VARIABLE INITALIZATION
16+
*******************************************************/}}
17+
<!-- Get all SWs -->
18+
{{ $packages_opensource := .Site.GetPage "/opensource_packages" }}
19+
{{ $packages_commercial := .Site.GetPage "/commercial_packages" }}
20+
21+
{{ $packages_opensource := where (where (.Site.GetPage "/opensource_packages").Pages "Type" "opensource_packages") "Params.works_on_arm" true }}
22+
{{ $packages_commercial := where (where (.Site.GetPage "/commercial_packages").Pages "Type" "commercial_packages") "Params.works_on_arm" true }}
23+
24+
{{ $packages_all := $packages_opensource | union $packages_commercial }}
25+
{{ $packages_alphabetical_order := sort $packages_all ".Params.name" }}
26+
27+
<!-- Get initial most recent 5 packages from data file -->
28+
{{ $recent_packages := $.Site.Data.recently_added_packages }}
29+
30+
<!-- Get all Filter categories from data file -->
31+
{{ $filter_category_dict := .Site.Data.categories }}
32+
33+
<!-- Define opensource vs commercial filter -->
34+
{{ $filter_licenses := slice "All" "Open source" "Commercial" }}
35+
{{ $filter_categories := (slice "All") | append .Site.Data.category_data.groups}}
36+
{{/*******************************************************
37+
*******************************************************/}}
38+
39+
40+
<!-- space for top header to stay clear of other stuff -->
41+
<div style="height: 50px;"></div>
42+
43+
44+
{{ partial "eco-dashboard/title-top.html" .}}
45+
46+
<div id="all-content-div" class="c-container is-responsive-width" style="min-height: 250px; background-color: var(--arm-color-footing);">
47+
{{ partial "eco-dashboard/info-top.html" .}}
48+
49+
<!-- Page wrapping row -->
50+
<div class="c-row md:is-collapsed u-gap-1-1/2 u-flex-nowrap u-padding-top-2 u-padding-bottom-2-1/2">
51+
<!-- Filter bar on left -->
52+
<div class="c-col u-hide lg:u-display-block u-flex-shrink-0 filter-column-div">
53+
<h4 class="u-margin-left-1 u-margin-top-0">Filter by:</h4>
54+
<div id="desktop-filters">
55+
<div id="filters-movable">
56+
{{ partial "eco-dashboard/filter-box.html" (dict "context" . "title" "License" "items" $filter_licenses)}}
57+
{{ partial "eco-dashboard/filter-box.html" (dict "context" . "title" "Category" "items" $filter_categories "items_descs" .Site.Data.category_data.groups_and_descriptions )}}
58+
Testing
59+
</div>
60+
</div>
61+
{{/*
62+
<div id="sticky-wrapper">
63+
Return to top
64+
</div>
65+
*/}}
66+
</div>
67+
68+
<!-- Search & Results on Right -->
69+
<div class="c-col">
70+
71+
<!-- Search, and mobile filtering support -->
72+
{{ partial "eco-dashboard/mobile-search-and-filter.html" (dict "context" . "categories" $filter_category_dict "licenses" $filter_licenses)}}
73+
74+
<!-- Bars: Active Filters, # content displayed, sort by. -->
75+
{{ partial "eco-dashboard/active-filter-and-sort-bar.html" (dict "all_packages" $packages_alphabetical_order "initial_display_packages" $recent_packages)}}
76+
77+
78+
{{/*
79+
Removing initial recently added packages, until large package growth requires reimplementation
80+
<div id="initial-dashboard-display">
81+
<div class="c-row">
82+
<div class="c-col">
83+
<h2 id="recently-added-note" class="minhang-mist-text">Most recently added packages</h2>
84+
</div>
85+
</div>
86+
87+
88+
<!-- Recent packages table -->
89+
{{ partial "package-display/table.html" (dict "packages" $recent_packages "search_enable" false) }}
90+
91+
<div class="c-row">
92+
<div class="c-col">
93+
<p style="text-align:center; padding-top: 32px; font-size: 1.25rem!important;">
94+
{{sub (len $packages_alphabetical_order) (len $recent_packages) }}
95+
more packages. Explore by:
96+
<p>
97+
<div class="u-display-grid u-gap-1 sm:u-grid-columns-1 md:u-grid-columns-3 u-margin-top-1">
98+
<ads-button id="filter-cta" level="primary">Filter by Category</ads-button>
99+
<ads-button id="search-cta" level="primary">Search by Name</ads-button>
100+
<ads-button id="browse-cta" level="primary">Browse all Packages</ads-button>
101+
</div>
102+
</div>
103+
</div>
104+
</div>
105+
*/}}
106+
107+
<!-- All packages table -->
108+
<div id="all-packages-div">
109+
{{ partial "package-display/table.html" (dict "packages" $packages_alphabetical_order "search_enable" true) }}
110+
</div>
111+
112+
<!-- Contribute CTA of no packages -->
113+
<div id="if-none-contribute-div">
114+
<p>Is a software package missing? Add it through a GitHub pull request in five minutes.</a></p>
115+
{{$cta_link := printf "%s/%s" site.Params.github_repo "#readme"}}
116+
<ads-cta-button size="medium" class="hydrated" id="contribute-btn" name="contribute-cta" onclick="window.location.href='{{$cta_link}}'" level="primary" type="button">
117+
Contribute a package
118+
</ads-cta-button>
119+
</div>
120+
121+
122+
</div> <!-- end of row -->
123+
</div> <!-- end of filter/search div -->
124+
</div> <!-- end of end-to-end all content div -->
125+
126+
<div style="margin-bottom: 150px;"></div>
127+
128+
129+
</div>
130+
131+
{{/* Not needed for now. May re-implement with recently added table.
132+
{{ partial "eco-dashboard/scripts-for-three-ctas.html"}}
133+
*/}}
134+
135+
136+
137+
138+
4139

5140
{{end}}

0 commit comments

Comments
 (0)