this repo has no description

:sparkles: updated glance's startpage

+32 -20
+32 -20
glance/glances/startpage.yml
··· 43 43 - symbol: NU 44 44 name: Nubank 45 45 46 - - type: bookmarks 47 - groups: 48 - - title: General 49 - links: 50 - - title: Gmail 51 - url: https://mail.google.com/mail/u/0/ 52 - - title: Proton mail 53 - url: https://mail.proton.me 54 - - title: Github 55 - url: https://github.com/ 56 - - title: Social 57 - links: 58 - - title: Reddit 59 - url: https://www.reddit.com/ 60 - - title: Bluesky 61 - url: https://bsky.app 62 - - title: Instagram 63 - url: https://www.instagram.com/ 64 - - title: Mastodon 65 - url: https://phany.social 46 + - type: custom-api 47 + title: Daily Go Problem 48 + cache: 6h 49 + url: https://www.goproblems.com/api/v2/problems/daily 50 + template: | 51 + {{ $targetCategory := "medium" }} 52 + 53 + {{ range .JSON.Array "entries" }} 54 + {{ if eq (.String "category") $targetCategory }} 55 + {{ $id := .Int "id" }} 56 + {{ $imageUrl := .String "imageUrl" }} 57 + {{ $diffVal := .Int "difficulty.value" }} 58 + {{ $diffUnit := .String "difficulty.unit" }} 59 + {{ $genre := .String "genre" }} 60 + {{ $problemUrl := printf "https://www.goproblems.com/problems/%d" $id }} 61 + {{ $difficulty := printf "%d %s" $diffVal $diffUnit }} 62 + 63 + <div style="text-align: center;"> 64 + <h3 style="font-size: 1.4rem; margin: 0 0 4px 0"> 65 + Medium Problem of the Day 66 + </h3> 67 + <div style="margin-bottom: 6px; font-size: 0.85rem"> 68 + {{ $difficulty }} {{ $genre }} 69 + </div> 70 + <a href="{{ $problemUrl }}" target="_blank"> 71 + <img src="{{ $imageUrl }}" 72 + alt="Go Problem of the Day" 73 + style="max-width:100%; height:auto; border-radius: 3px; display: inline"> 74 + </a> 75 + </div> 76 + {{ end }} 77 + {{ end }}