diff --git a/passbook/core/static/package.json b/passbook/core/static/package.json
deleted file mode 100644
index 6d3d88834..000000000
--- a/passbook/core/static/package.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "passbook-static",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "",
- "license": "MIT",
- "dependencies": {
- "@patternfly/patternfly": "2.56.3"
- }
-}
diff --git a/passbook/core/static/yarn.lock b/passbook/core/static/yarn.lock
deleted file mode 100644
index 52440fa7f..000000000
--- a/passbook/core/static/yarn.lock
+++ /dev/null
@@ -1,8 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
-"@patternfly/patternfly@2.56.3":
- version "2.56.3"
- resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-2.56.3.tgz#ca70eec632863f4ab62dada040f0979998a1355b"
- integrity sha512-merUreEz4ul84s+OXwJ27AtMtcBdzExDX+Xn/T84OD6OAgG8iU1x1dnWdFBeEFKOlTpKxwjXxS/Zc8tSxpfRBw==
diff --git a/passbook/core/templates/login/base.html b/passbook/core/templates/login/base.html
index 48ac3b125..d0523d465 100644
--- a/passbook/core/templates/login/base.html
+++ b/passbook/core/templates/login/base.html
@@ -44,13 +44,14 @@
{{ config.login.subtext }}
{% endif %}
- {% for url, icon, name in sources %}
+ {% for source in sources %}
-
-
- {% if icon %}
-
- {% else %}
- {{ name }}
+
+ {% if source.icon_path %}
+
+ {% endif %}
+ {% if source.icon_url %}
+
{% endif %}
diff --git a/passbook/core/views/authentication.py b/passbook/core/views/authentication.py
index 94053af81..2014e199a 100644
--- a/passbook/core/views/authentication.py
+++ b/passbook/core/views/authentication.py
@@ -47,9 +47,9 @@ class LoginView(UserPassesTestMixin, FormView):
kwargs["sources"] = []
sources = Source.objects.filter(enabled=True).select_subclasses()
for source in sources:
+ ui_login_button = source.ui_login_button
if ui_login_button:
kwargs["sources"].append(ui_login_button)
- ui_login_button = source.ui_login_button
# if kwargs["sources"]:
# self.template_name = "login/with_sources.html"
return super().get_context_data(**kwargs)
diff --git a/passbook/root/settings.py b/passbook/root/settings.py
index 34735dcc2..b51758fd4 100644
--- a/passbook/root/settings.py
+++ b/passbook/root/settings.py
@@ -78,6 +78,7 @@ INSTALLED_APPS = [
"guardian",
"django_prometheus",
"passbook.core.apps.PassbookCoreConfig",
+ 'passbook.static.apps.PassbookStaticConfig',
"passbook.admin.apps.PassbookAdminConfig",
"passbook.api.apps.PassbookAPIConfig",
"passbook.lib.apps.PassbookLibConfig",
diff --git a/passbook/sources/oauth/models.py b/passbook/sources/oauth/models.py
index 17d4e8c2f..4885ebb5c 100644
--- a/passbook/sources/oauth/models.py
+++ b/passbook/sources/oauth/models.py
@@ -35,7 +35,7 @@ class OAuthSource(Source):
"passbook_sources_oauth:oauth-client-login",
kwargs={"source_slug": self.slug},
),
- icon_path=f"img/logos/{self.provider_type}.svg",
+ icon_path=f"passbook/sources/{self.provider_type.replace(' ', '-')}.svg",
name=self.name,
)
diff --git a/passbook/static/apps.py b/passbook/static/apps.py
new file mode 100644
index 000000000..e866c5fbc
--- /dev/null
+++ b/passbook/static/apps.py
@@ -0,0 +1,10 @@
+"""passbook static app config"""
+from django.apps import AppConfig
+
+
+class PassbookStaticConfig(AppConfig):
+ """passbook static app config"""
+
+ name = "passbook.static"
+ label = "passbook_static"
+ verbose_name = "passbook Static"
diff --git a/passbook/core/static/robots.txt b/passbook/static/robots.txt
similarity index 100%
rename from passbook/core/static/robots.txt
rename to passbook/static/robots.txt
diff --git a/passbook/core/static/.gitignore b/passbook/static/static/.gitignore
similarity index 100%
rename from passbook/core/static/.gitignore
rename to passbook/static/static/.gitignore
diff --git a/passbook/static/static/package.json b/passbook/static/static/package.json
new file mode 100644
index 000000000..98da61243
--- /dev/null
+++ b/passbook/static/static/package.json
@@ -0,0 +1,6 @@
+{
+ "license": "MIT",
+ "dependencies": {
+ "@patternfly/patternfly": "^2.65.3"
+ }
+}
diff --git a/passbook/core/static/passbook/brand.svg b/passbook/static/static/passbook/brand.svg
similarity index 100%
rename from passbook/core/static/passbook/brand.svg
rename to passbook/static/static/passbook/brand.svg
diff --git a/passbook/core/static/passbook/logo.png b/passbook/static/static/passbook/logo.png
similarity index 100%
rename from passbook/core/static/passbook/logo.png
rename to passbook/static/static/passbook/logo.png
diff --git a/passbook/core/static/passbook/logo.svg b/passbook/static/static/passbook/logo.svg
similarity index 100%
rename from passbook/core/static/passbook/logo.svg
rename to passbook/static/static/passbook/logo.svg
diff --git a/passbook/core/static/sources/azure-ad.svg b/passbook/static/static/passbook/sources/azure-ad.svg
similarity index 100%
rename from passbook/core/static/sources/azure-ad.svg
rename to passbook/static/static/passbook/sources/azure-ad.svg
diff --git a/passbook/core/static/sources/dropbox.svg b/passbook/static/static/passbook/sources/dropbox.svg
similarity index 100%
rename from passbook/core/static/sources/dropbox.svg
rename to passbook/static/static/passbook/sources/dropbox.svg
diff --git a/passbook/core/static/sources/facebook.svg b/passbook/static/static/passbook/sources/facebook.svg
similarity index 100%
rename from passbook/core/static/sources/facebook.svg
rename to passbook/static/static/passbook/sources/facebook.svg
diff --git a/passbook/core/static/sources/github.svg b/passbook/static/static/passbook/sources/github.svg
similarity index 100%
rename from passbook/core/static/sources/github.svg
rename to passbook/static/static/passbook/sources/github.svg
diff --git a/passbook/core/static/sources/gitlab.svg b/passbook/static/static/passbook/sources/gitlab.svg
similarity index 100%
rename from passbook/core/static/sources/gitlab.svg
rename to passbook/static/static/passbook/sources/gitlab.svg
diff --git a/passbook/core/static/sources/google.svg b/passbook/static/static/passbook/sources/google.svg
similarity index 100%
rename from passbook/core/static/sources/google.svg
rename to passbook/static/static/passbook/sources/google.svg
diff --git a/passbook/static/static/yarn.lock b/passbook/static/static/yarn.lock
new file mode 100644
index 000000000..e463e4495
--- /dev/null
+++ b/passbook/static/static/yarn.lock
@@ -0,0 +1,8 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@patternfly/patternfly@^2.65.3":
+ version "2.65.3"
+ resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-2.65.3.tgz#0856d6ca13d971f18b1d7889a60a73eb78cad3c8"
+ integrity sha512-pOmj1r6nOU8WOI0y6s0vfILG8dLxxhDpzBCYUtnx+i8bqq3Ci6F1tekGqs0AfjAR1+OF5lfJEb+dhixs0Z8yrg==