1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-12 21:59:02 +09:00

fix embed splash

This commit is contained in:
kakkokari-gtyih 2024-06-29 17:18:06 +09:00
parent 2fdf1d19b8
commit 1926fa304b
2 changed files with 20 additions and 1 deletions

View File

@ -34,6 +34,16 @@
const isEmbedPage = document.documentElement.classList.contains('embed');
if (isEmbedPage) {
const params = new URLSearchParams(location.search);
if (params.has('rounded') && params.get('rounded') === 'false') {
document.documentElement.classList.add('norounded');
}
if (params.has('border') && params.get('border') === 'false') {
document.documentElement.classList.add('noborder');
}
}
//#region Detect language & fetch translations
if (!localStorage.hasOwnProperty('locale')) {
const supportedLangs = LANGS;

View File

@ -12,6 +12,7 @@ html {
html.embed {
box-sizing: border-box;
background-color: transparent;
color-scheme: light dark;
max-width: 500px;
}
@ -32,7 +33,15 @@ html.embed #splash {
box-sizing: border-box;
min-height: 300px;
border-radius: var(--radius, 12px);
border: 1px solid var(--divider);
border: 1px solid var(--divider, #e8e8e8);
}
html.embed.norounded #splash {
border-radius: 0;
}
html.embed.noborder #splash {
border: none;
}
#splashIcon {