Skip to content
This repository was archived by the owner on Feb 5, 2023. It is now read-only.

Commit be10439

Browse files
committed
chore: customize icon and document title
1 parent c6c5d3a commit be10439

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/assets/index.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
77
<title>Web3 Pass</title>
8+
<link rel='icon' type='image/x-icon' id='favicon' href='/favicon.ico' />
89
</head>
910
<body>
1011
<div id="app"></div>

src/views/Home.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,14 @@ export default class Home extends Vue {
315315
this.rss3Profile.bio = profile?.bio || '';
316316
this.rss3Profile.address = this.ethAddress;
317317
318+
if (profile?.avatar?.[0]) {
319+
const favicon = <HTMLLinkElement>document.getElementById('favicon');
320+
favicon.href = profile.avatar[0];
321+
}
322+
if (profile?.name) {
323+
document.title = profile.name;
324+
}
325+
318326
if (data) {
319327
this.accounts.push({
320328
platform: 'Ethereum',

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module.exports = (env, argv) => ({
9191
chunks: ['index'],
9292
filename: 'index.html',
9393
title: 'RSS3 Page',
94-
favicon: 'public/favicon.ico',
94+
// favicon: 'public/favicon.ico',
9595
hash: true,
9696
template: 'src/assets/index.ejs',
9797
}),

0 commit comments

Comments
 (0)