added romm and steam widgets

This commit is contained in:
2026-01-13 10:22:18 +01:00
parent 51b976f59a
commit 0ea898778e
+57
View File
@@ -842,6 +842,61 @@ data:
</div>
</div>
- type: custom-api
title: RomM
cache: 1d
url: http://${ROMM_URL}/api/stats
headers:
Accept: application/json
template: |
{{ $bytes := .JSON.Int "TOTAL_FILESIZE_BYTES" | toFloat }}
{{ $tb := div $bytes 1099511627776 }}
{{ $gb := div $bytes 1073741824 | toInt }}
<div class="flex justify-between text-center">
<div>
<div class="color-highlight size-h3">{{ .JSON.Int "PLATFORMS" | formatNumber }}</div>
<div class="size-h6">PLATFORMS</div>
</div>
<div>
<div class="color-highlight size-h3">{{ .JSON.Int "ROMS" | formatNumber }}</div>
<div class="size-h6">ROMS</div>
</div>
<div>
<div class="color-highlight size-h3">
{{ if ge $tb 1.0 }}
{{ printf "%.2f" $tb }}TB
{{ else }}
{{ $gb }}GB
{{ end }}
</div>
<div class="size-h6">FILESIZE</div>
</div>
</div>
- type: custom-api
title: Steam Specials
cache: 12h
url: https://store.steampowered.com/api/featuredcategories?cc=us
template: |
<ul class="list list-gap-10 collapsible-container" data-collapse-after="5">
{{ range .JSON.Array "specials.items" }}
{{ $header := .String "header_image" }}
{{ $urlPrefix := "https://store.steampowered.com/sub/" }}
{{ if findMatch "/steam/apps/" $header }}
{{ $urlPrefix = "https://store.steampowered.com/app/" }}
{{ end }}
<li>
<a class="size-h4 color-highlight block text-truncate" href="{{ $urlPrefix }}{{ .Int "id" }}/">{{ .String "name" }}</a>
<ul class="list-horizontal-text">
<li>{{ .Int "final_price" | toFloat | mul 0.01 | printf "$%.2f" }}</li>
{{ $discount := .Int "discount_percent" }}
<li{{ if ge $discount 40 }} class="color-positive"{{ end }}>{{ $discount }}% off</li>
</ul>
</li>
{{ end }}
</ul>
- size: full
widgets:
# YouTube Videos
@@ -1454,6 +1509,8 @@ spec:
value: "newtoken"
- name: CRAFTY_SERVER_ID
value: "837c7378-7a76-46f7-b8ea-6f35c0a314f4"
- name: ROMM_URL
value: "arcade.dooplex.hu"
ports:
- name: http
containerPort: 8080