Skip to content

Commit

Permalink
feat: dynamically calculate favicon paths
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Cameron <[email protected]>
  • Loading branch information
JasonLovesDoggo committed Sep 23, 2024
1 parent 3be1063 commit 8e82860
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions dmoj/urls.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os
from os.path import join
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
Expand Down Expand Up @@ -368,15 +370,7 @@ def paged_list_view(view, name):
])),
]

favicon_paths = ['apple-touch-icon-180x180.png', 'apple-touch-icon-114x114.png', 'android-chrome-72x72.png',
'apple-touch-icon-57x57.png', 'apple-touch-icon-72x72.png', 'apple-touch-icon.png', 'mstile-70x70.png',
'android-chrome-36x36.png', 'apple-touch-icon-precomposed.png', 'apple-touch-icon-76x76.png',
'apple-touch-icon-60x60.png', 'android-chrome-96x96.png', 'mstile-144x144.png', 'mstile-150x150.png',
'safari-pinned-tab.svg', 'android-chrome-144x144.png', 'apple-touch-icon-152x152.png',
'favicon-96x96.png',
'favicon-32x32.png', 'favicon-16x16.png', 'android-chrome-192x192.png', 'android-chrome-48x48.png',
'mstile-310x150.png', 'apple-touch-icon-144x144.png', 'browserconfig.xml', 'manifest.json',
'apple-touch-icon-120x120.png', 'mstile-310x310.png']
favicon_paths = os.listdir(join(settings.STATIC_ROOT, "icons"))

static_lazy = lazy(static, str)
for favicon in favicon_paths:
Expand Down

0 comments on commit 8e82860

Please sign in to comment.