Add default avatar and zuul avatar
Change-Id: Ied34bdcb915eb8982fd2855951ad189d3ce2f022
diff --git a/avatar.php b/avatar.php
index aec678e..92f017a 100644
--- a/avatar.php
+++ b/avatar.php
@@ -3,9 +3,7 @@
$username = $_GET['username'] ?? null;
-if (!array_key_exists($username, $USERS)) {
- http_response_code(404);
- exit();
-}
+$avatar_exists = array_key_exists($username, $USERS);
+$avatar = ($avatar_exists ? $USERS[$username] : $DEFAULT_AVATAR);
-header('Location: '.$USERS[$username]);
+header('Location: '.$avatar);
diff --git a/config_avatars.php b/config_avatars.php
index a978b99..ee1e5d4 100644
--- a/config_avatars.php
+++ b/config_avatars.php
@@ -2,6 +2,9 @@
// Avatars definitions
$USERS = [
'avm99963' => 'https://www.avm99963.com/images/avatar.jpg',
- 'ccbot' => 'https://developers.google.com/search/images/google-search-central-logo.png',
- // Add your avatar above!
+ 'ccbot' => 'https://gerrit-avatars.avm99963.com/img/webmasters.png',
+ 'zuul' => 'https://gerrit-avatars.avm99963.com/img/zuul.svg',
+ // Add your avatar above this line!
];
+
+$DEFAULT_AVATAR = 'https://gerrit-avatars.avm99963.com/img/default.png';
diff --git a/img/default.png b/img/default.png
new file mode 100644
index 0000000..0d6c368
--- /dev/null
+++ b/img/default.png
Binary files differ
diff --git a/img/webmaster.png b/img/webmaster.png
new file mode 100644
index 0000000..eb51317
--- /dev/null
+++ b/img/webmaster.png
Binary files differ
diff --git a/img/zuul.svg b/img/zuul.svg
new file mode 100644
index 0000000..60a5a37
--- /dev/null
+++ b/img/zuul.svg
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg enable-background="new 0 0 144 144" version="1.1" viewBox="0 0 144 144" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
+<style type="text/css">
+ .st0{fill:#071D49;}
+</style>
+<g transform="matrix(.90771 0 0 .90771 6.5997 25.435)">
+ <path class="st0" d="m12.8 102.6h118.5l-25.3-43.8v-15l7-9.2h-21l-20-34.6-20 34.7h-20.9l7 9.2v15zm25.2-6h-14.9l14.9-25.8zm10.4 0h-4.4v-35.3h4.3v35.3zm0-41.3h-4.4v-4.3h4.3v4.3zm20.6 41.3h-14.7v-35.3h14.7zm20.7 0h-14.7v-35.3h14.7zm0-41.3h-35.4v-4.3h35.3v4.3zm10.3 41.3h-4.3v-35.3h4.3zm0-41.3h-4.3v-4.3h4.3zm6 15.5 14.9 25.8h-14.9zm-34-58.8 13.1 22.7h-26.2zm28.9 28.7-0.9 1.2v3.1h-56v-3.2l-0.9-1.2h57.8z"/>
+</g>
+</svg>