diff --git a/news/index.html b/news/index.html index 979ce23..be434c7 100644 --- a/news/index.html +++ b/news/index.html @@ -3,7 +3,6 @@ - OpenMCP News Feature @@ -14,4 +13,12 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/news/src/components/Header.vue b/news/src/components/Header.vue index b62e574..e78a78e 100644 --- a/news/src/components/Header.vue +++ b/news/src/components/Header.vue @@ -1,6 +1,4 @@ + @@ -64,43 +80,39 @@ opacity: 0.85; } +.bilibili-player-container img { + max-width: 100%; + box-shadow: 0 4px 12px var(--vscode-widget-shadow); + border-radius: .5em; +} + .bilibili-player-container { - position: relative; - min-width: 377px; - min-height: 225px; - width: 52.36vw; - height: 580px; - border: 2px solid var(--vp-c-brand-3); - border-radius: 8px; - aspect-ratio: 16/9; + position: relative; + width: fit-content; + height: fit-content; margin: 2rem 0; - border-radius: .5em; - overflow: hidden; - transition: box-shadow 0.3s ease, border-color 0.3s ease; - box-shadow: 0 4px 12px var(--vscode-widget-shadow); + border-radius: .5em; + overflow: hidden; + transition: box-shadow 0.3s ease, border-color 0.3s ease; } @media (max-width: 2700px) { - .bilibili-player-container { - width: 88%; - } + .bilibili-player-container { + width: 88%; + } } @media (max-width: 1200px) { - .bilibili-player-container { - width: 95%; - } + .bilibili-player-container { + width: 95%; + } } @media screen and (max-width: 741px) { - .bilibili-player-container iframe { - width: 100%; - } + .bilibili-player-container iframe { + width: 100%; + } } -.bilibili-player-container:hover { - border-color: var(--vp-c-brand-1); - box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); -} \ No newline at end of file diff --git a/news/src/components/OmIcon.vue b/news/src/components/OmIcon.vue index 1516344..94f7d68 100644 --- a/news/src/components/OmIcon.vue +++ b/news/src/components/OmIcon.vue @@ -1,92 +1,98 @@ + + \ No newline at end of file diff --git a/src/webview/webview.service.ts b/src/webview/webview.service.ts index 7d60013..117642e 100644 --- a/src/webview/webview.service.ts +++ b/src/webview/webview.service.ts @@ -153,16 +153,7 @@ export function getNewsWebviewContent(context: vscode.ExtensionContext, panel: v const viewRoot = fspath.join(context.extensionPath, 'resources', 'changelog'); const htmlIndexPath = fspath.join(viewRoot, 'index.html'); - const html = fs.readFileSync(htmlIndexPath, { encoding: 'utf-8' })?.replace(/( { - const importFile = $2 as string; - const rel = importFile.startsWith('/') ? importFile.substring(1) : importFile; - const absLocalPath = fspath.resolve(viewRoot, rel); - - const webviewUri = panel.webview.asWebviewUri(vscode.Uri.file(absLocalPath)); - const replaceHref = $1 + webviewUri?.toString() + '"'; - return replaceHref; - }); - + const html = fs.readFileSync(htmlIndexPath, { encoding: 'utf-8' }); return html; }