feat: ノート・ユーザTL埋め込み

This commit is contained in:
kakkokari-gtyih
2024-06-02 00:03:46 +09:00
parent f80c5d26b5
commit e1a541d60b
14 changed files with 277 additions and 84 deletions

View File

@@ -764,9 +764,9 @@ export class ClientServerService {
//#endregion
//#region embed pages
fastify.get('/embed/:path(.*)', async (request, reply) => {
fastify.get('/embed/*', async (request, reply) => {
reply.removeHeader('X-Frame-Options');
return await renderBase(reply, { noindex: true });
return await renderBase(reply, { noindex: true, embed: true });
});
fastify.get('/_info_card_', async (request, reply) => {

View File

@@ -9,6 +9,12 @@ html {
color: var(--fg);
}
html.embed {
box-sizing: border-box;
background-color: transparent;
max-width: 500px;
}
#splash {
position: fixed;
z-index: 10000;
@@ -22,6 +28,13 @@ html {
transition: opacity 0.5s ease;
}
html.embed #splash {
box-sizing: border-box;
min-height: 300px;
border-radius: var(--radius, 12px);
border: 1px solid var(--divider);
}
#splashIcon {
position: absolute;
top: 0;

View File

@@ -77,7 +77,7 @@ html
script
include ../boot.js
body
body(class=embed && 'embed')
noscript: p
| JavaScriptを有効にしてください
br