@@ -76,23 +76,36 @@ function getPlatformType(assetName: string): PlatformType {
76
76
{ latestRelease .assets && latestRelease .assets .length > 0 && (
77
77
<div class = " assets-container" >
78
78
<ul class = " assets-list" >
79
- { latestRelease .assets .map ((asset : any ) => (
80
- <li class = " asset-item" >
81
- <a
82
- href = { asset .browser_download_url }
83
- target = " _blank"
84
- rel = " noopener noreferrer"
85
- class = " download-button-wrapper"
86
- title = { ` Size: ${(asset .size / 1024 / 1024 ).toFixed (2 )} MB ` }
87
- >
88
- <div class = " download-text-wrapper" >
89
- <span class = " download-filename" >Download now</span >
90
- { getAssetDescription (asset .name ) && <p >{ getAssetDescription (asset .name )} </p >}
91
- </div >
92
- <DownloadIcon />
93
- </a >
94
- </li >
95
- ))}
79
+ { (() => {
80
+ const assets = latestRelease .assets ;
81
+ const tarGzIndex = assets .findIndex ((a : any ) => a .name .includes (' .tar.gz' ));
82
+ return assets .map ((asset : any , idx : number ) => [
83
+ (idx === tarGzIndex && tarGzIndex !== 0 ) ? (
84
+ <li class = " asset-separator" >
85
+ <div class = " download-separator" >
86
+ <hr />
87
+ <p >compressed archives</p >
88
+ <hr />
89
+ </div >
90
+ </li >
91
+ ) : null ,
92
+ <li class = " asset-item" >
93
+ <a
94
+ href = { asset .browser_download_url }
95
+ target = " _blank"
96
+ rel = " noopener noreferrer"
97
+ class = " download-button-wrapper"
98
+ title = { ` Size: ${(asset .size / 1024 / 1024 ).toFixed (2 )} MB ` }
99
+ >
100
+ <div class = " download-text-wrapper" >
101
+ <span class = " download-filename" >Download now</span >
102
+ { getAssetDescription (asset .name ) && <p >{ getAssetDescription (asset .name )} </p >}
103
+ </div >
104
+ <DownloadIcon />
105
+ </a >
106
+ </li >
107
+ ]).flat ();
108
+ })()}
96
109
</ul >
97
110
</div >
98
111
)}
@@ -114,9 +127,6 @@ function getPlatformType(assetName: string): PlatformType {
114
127
text-align: center;
115
128
}
116
129
117
- .release-container {
118
- padding-top: 1rem;
119
- }
120
130
121
131
.release-header {
122
132
margin-bottom: 0.5rem;
@@ -224,10 +234,36 @@ function getPlatformType(assetName: string): PlatformType {
224
234
}
225
235
}
226
236
237
+ .download-separator {
238
+ display: flex;
239
+ align-items: center;
240
+ gap: 40px;
241
+ align-self: stretch;
242
+ text-align: center;
243
+ @include typography(footer);
244
+ padding-top: 1.5rem;
245
+ padding-bottom: 1.5rem;
246
+
247
+ hr {
248
+ flex: 1;
249
+ height: 1px;
250
+ background-color: var(--border-separator);
251
+ border: none;
252
+ margin: 0;
253
+ }
254
+
255
+ p {
256
+ width: 30%;
257
+ }
258
+ }
259
+
227
260
@include break-down(sm) {
228
261
P {
229
262
font-size: 12px;
230
263
font-weight: 300;
231
264
}
265
+ .download-separator p {
266
+ width: 30%;
267
+ }
232
268
}
233
269
</style >
0 commit comments