Skip to content

Commit 557a897

Browse files
committed
Change Favicon
1 parent 364f578 commit 557a897

File tree

14 files changed

+91
-172
lines changed

14 files changed

+91
-172
lines changed

docs/Adding_favicon.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
If you need to update the colors of an existing favicon, edit the SVG file and update the hex codes in the following places:
2020

21-
- `flood-color="#00FFFF"`
22-
- `fill="#40C0E7"`
23-
- `stroke="#00FFFF"`
21+
- `fill="#033CD2"`
22+
- `stroke="#FF7800"`
2423

2524
Ensure that the new colors remain consistent with the current favicon theme.

public/Randomfavicon.js

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
11
(function () {
2-
function setRandomFavicon() {
2+
function setSequentialFavicons() {
33
const favicons = [
44
'favicon1.svg',
55
'favicon2.svg',
66
'favicon3.svg',
77
'favicon4.svg',
88
'favicon5.svg',
99
'favicon6.svg',
10-
'favicon7.svg'
10+
'favicon7.svg',
11+
'favicon8.svg',
12+
'favicon9.svg',
13+
'favicon10.svg',
14+
'favicon11.svg',
15+
'favicon12.svg'
1116
];
12-
const randomIndex = Math.floor(Math.random() * favicons.length);
13-
const randomFavicon = 'favicons/' + favicons[randomIndex];
14-
const faviconLink = document.getElementById('dynamic');
15-
if (faviconLink) {
16-
faviconLink.href = randomFavicon;
17+
let currentIndex = 0;
18+
19+
function updateFavicon() {
20+
const faviconLink = document.getElementById('dynamic');
21+
if (faviconLink) {
22+
faviconLink.href = 'favicons/' + favicons[currentIndex];
23+
currentIndex = (currentIndex + 1) % favicons.length;
24+
}
1725
}
26+
updateFavicon();
27+
setInterval(updateFavicon, 2000);
1828
}
19-
document.addEventListener('DOMContentLoaded', setRandomFavicon);
29+
30+
document.addEventListener('DOMContentLoaded', setSequentialFavicons);
2031
})();

public/favicons/favicon1.svg

Lines changed: 5 additions & 23 deletions
Loading

public/favicons/favicon10.svg

Lines changed: 7 additions & 0 deletions
Loading

public/favicons/favicon11.svg

Lines changed: 7 additions & 0 deletions
Loading

public/favicons/favicon12.svg

Lines changed: 7 additions & 0 deletions
Loading

public/favicons/favicon2.svg

Lines changed: 5 additions & 23 deletions
Loading

public/favicons/favicon3.svg

Lines changed: 5 additions & 23 deletions
Loading

public/favicons/favicon4.svg

Lines changed: 5 additions & 23 deletions
Loading

0 commit comments

Comments
 (0)