Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Add favicon to Django API (#4360)

Princewill Onyenanu79607167121c
diff --git a/api/api/static/favicon.ico b/api/api/static/favicon.ico
new file mode 100644
index 000000000..478d29829
Binary files /dev/null and b/api/api/static/favicon.ico differ
diff --git a/api/api/static/favicon.svg b/api/api/static/favicon.svg
new file mode 100644
index 000000000..21bea6259
--- /dev/null
+++ b/api/api/static/favicon.svg
@@ -0,0 +1,16 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="16" height="16" rx="2" fill="#232323"/>
+<g clip-path="url(#clip0_4508_11559)">
+<path d="M10.5693 7.57713C11.5568 7.57713 12.3574 6.77636 12.3574 5.78857C12.3574 4.80077 11.5568 4 10.5693 4C9.58179 4 8.78125 4.80077 8.78125 5.78857C8.78125 6.77636 9.58179 7.57713 10.5693 7.57713Z" fill="white"/>
+<path d="M3.59998 5.78857C3.59998 6.77278 4.39404 7.57713 5.3767 7.57713V4C4.39404 4 3.59998 4.79936 3.59998 5.78857Z" fill="white"/>
+<path d="M6.19067 5.78857C6.19067 6.77278 6.98474 7.57713 7.9674 7.57713V4C6.98971 4 6.19067 4.79936 6.19067 5.78857Z" fill="white"/>
+<path d="M10.5693 11.9985C11.5568 11.9985 12.3574 11.1977 12.3574 10.2099C12.3574 9.22209 11.5568 8.42133 10.5693 8.42133C9.58179 8.42133 8.78125 9.22209 8.78125 10.2099C8.78125 11.1977 9.58179 11.9985 10.5693 11.9985Z" fill="white"/>
+<path d="M6.19067 10.2069C6.19067 11.1922 6.98474 11.9974 7.9674 11.9974V8.42133C6.9897 8.42133 6.19067 9.22157 6.19067 10.2069Z" fill="white"/>
+<path d="M3.59998 10.2069C3.59998 11.1972 4.39404 11.9974 5.3767 11.9974V8.42133C4.39404 8.42133 3.59998 9.22157 3.59998 10.2069Z" fill="white"/>
+</g>
+<defs>
+<clipPath id="clip0_4508_11559">
+<rect width="8.8" height="8" fill="white" transform="translate(3.59998 4)"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/api/conf/settings/spectacular.py b/api/conf/settings/spectacular.py
index 6f67ee62b..8e5d7608c 100644
--- a/api/conf/settings/spectacular.py
+++ b/api/conf/settings/spectacular.py
@@ -41,7 +41,7 @@ SPECTACULAR_SETTINGS = {
"SORT_OPERATION_PARAMETERS": False,
"EXTENSIONS_INFO": {
"x-logo": {
- "url": "https://raw.githubusercontent.com/WordPress/openverse/HEAD/brand/logo.svg",
+ "url": "https://raw.githubusercontent.com/WordPress/openverse/HEAD/documentation/meta/brand/logo.svg",
"backgroundColor": "#fafafa",
}
},
diff --git a/api/nginx.conf.template b/api/nginx.conf.template
index 5e11959c8..990252456 100644
--- a/api/nginx.conf.template
+++ b/api/nginx.conf.template
@@ -91,4 +91,12 @@ server {
default_type "application/json";
return 200 '{"release": "$DJANGO_NGINX_GIT_REVISION", "environment": "$DJANGO_NGINX_ENVIRONMENT"}';
}
+
+ location /favicon.ico {
+ alias /app/static/favicon.ico;
+ }
+
+ location /favicon.svg {
+ alias /app/static/favicon.svg;
+ }
}