From 655f5a312ba7909f6167a1138b3e2c5ae4dd5724 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 May 2025 13:20:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BD=91=E9=A1=B5=E6=88=AA?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constants/rss/rss_template.html | 11 +++++++---- lib/rss/screenshot.js | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/constants/rss/rss_template.html b/constants/rss/rss_template.html index 06bc17a..4891646 100644 --- a/constants/rss/rss_template.html +++ b/constants/rss/rss_template.html @@ -12,13 +12,16 @@ padding: 0; font-family: "Helvetica Neue", sans-serif; overflow-x: hidden; + position: relative; + min-height: 100vh; } .background { - position: fixed; top: 0; left: 0; + min-height: 100vh; height: 100%; + position: absolute; width: 100%; background-image: url('https://www.dmoe.cc/random.php'); background-size: cover; @@ -37,7 +40,7 @@ backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 25px rgba(0,0,0,0.4); - border: 1.5px solid rgba(76, 175, 80, 0.7); + border: 2px solid rgba(76, 175, 80, 0.7); } .container pre code { @@ -47,11 +50,11 @@ padding: 16px; display: block; overflow-x: auto; - background: rgba(0, 0, 0, 0.11); + background: rgba(0, 0, 0, 0.58); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); - color: #f8f8f2; + color: #ffffff; } diff --git a/lib/rss/screenshot.js b/lib/rss/screenshot.js index 256cd5c..7a37f32 100644 --- a/lib/rss/screenshot.js +++ b/lib/rss/screenshot.js @@ -26,7 +26,7 @@ const screenshot = { }); const page = await browser.newPage(); await page.setContent(html, { waitUntil: 'networkidle0' }); - await page.setViewport({ width: 800, height: 600, deviceScaleFactor: 1.5 }); + await page.setViewport({ width: 800, height: 600, deviceScaleFactor: 2 }); await page.screenshot({ path: savePath, fullPage: true }); await browser.close(); return savePath;