Support unload / reload

This commit is contained in:
the1812 2021-12-22 23:13:27 +08:00
parent e7a1a435ac
commit 7a903c2041
3 changed files with 7 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -37,6 +37,9 @@ body {
--home-color: #eee;
--home-card-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.2);
}
body.home-redesign-off & {
display: none;
}
}
html {
scroll-behavior: smooth;

View File

@ -36,6 +36,8 @@ export const component: ComponentMetadata = {
defaultValue: false,
},
},
unload: () => document.body.classList.add('home-redesign-off'),
reload: () => document.body.classList.remove('home-redesign-off'),
instantStyles: [
{
name: 'fresh-home-hide-original',