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:
parent
2fdf1d19b8
commit
1926fa304b
@ -34,6 +34,16 @@
|
|||||||
|
|
||||||
const isEmbedPage = document.documentElement.classList.contains('embed');
|
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
|
//#region Detect language & fetch translations
|
||||||
if (!localStorage.hasOwnProperty('locale')) {
|
if (!localStorage.hasOwnProperty('locale')) {
|
||||||
const supportedLangs = LANGS;
|
const supportedLangs = LANGS;
|
||||||
|
@ -12,6 +12,7 @@ html {
|
|||||||
html.embed {
|
html.embed {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
color-scheme: light dark;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +33,15 @@ html.embed #splash {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-height: 300px;
|
min-height: 300px;
|
||||||
border-radius: var(--radius, 12px);
|
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 {
|
#splashIcon {
|
||||||
|
Loading…
Reference in New Issue
Block a user