diff --git a/nonebot_plugin_dialectlist/temple/cache/头像.jpg b/nonebot_plugin_dialectlist/temple/cache/头像.jpg new file mode 100644 index 0000000..014c344 Binary files /dev/null and b/nonebot_plugin_dialectlist/temple/cache/头像.jpg differ diff --git a/nonebot_plugin_dialectlist/temple/css/style.css b/nonebot_plugin_dialectlist/temple/css/style.css new file mode 100644 index 0000000..9326d3b --- /dev/null +++ b/nonebot_plugin_dialectlist/temple/css/style.css @@ -0,0 +1,117 @@ +body { + background-image: url('../img/background.jpg'); + background-attachment: scroll; + margin: 0; + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} + +.container { + padding: 20px 40px; + position: relative; + flex-direction: column; + display: flex; +} + +.card { + border: 5px solid rgba(200, 200, 200, 1); + text-align: center; /*设置文本水平居中*/ + align-content: center; + margin: 1% 1% 1% 1%; + border-radius: 2rem; + background: rgba(255, 255, 255, .2); + -webkit-backdrop-filter: blur(3px); + backdrop-filter: blur(3px); +} + +.card2 { + justify-content: center; + flex-wrap: wrap; + align-items: center; + flex-direction: revert; + display: flex; + border: 5px solid rgba(200, 200, 200, 1); + text-align: center; /*设置文本水平居中*/ + align-content: center; + margin: 1% 1% 1% 1%; + border-radius: 2rem; + background: rgba(255, 255, 255, .2); + -webkit-backdrop-filter: blur(3px); + backdrop-filter: blur(3px); +} + +.center_text { + text-align: center; + font-size: 300%; + font-weight: bolder; +} + +.center_text2 { + text-align: center; + font-size: 150%; +} + +.rank_container { + flex-direction: column; + display: flex; + border: 5px solid rgba(200, 200, 200, 1); + border-radius: 2rem; + padding: 10px 20px; + margin: 1% 1% 1% 1%; + display: flex; + justify-content: center; + align-items: center; + background: rgba(243, 243, 240, 0.6); +} + +.rank_card { + display: flex; + width: 90%; + flex-direction: row; + border: 3px solid rgba(255, 255, 255, 0.61); + margin: 20px 10px; + border-radius: 2rem; + /* padding: 20px 40px; */ + align-content: center; + backdrop-filter: blur(30px); + -webkit-backdrop-filter: blur(30px); +} + +.profile{ + width: 20%; + height: 20%; + border: 3px solid rgba(255, 255, 255, 0.61); + border-radius: 2000px; + background-size: cover; + margin-right: 20px; +} + +.profile2{ + width: 4%; + height: 4%; + border: 3px solid rgba(255, 255, 255, 0.61); + border-radius: 2000px; + background-size: cover; + margin-right: 20px; +} + +.rank_card_info { + width: 100%; + display: flex; + flex-direction: column; +} + +.g-container { + width: 90%; + height: 25px; + border-radius: 25px; + background: #ffb2b25d; +} + +.g-progress { + width: 50%; + height: inherit; + border-radius: 25px 20px 20px 25px; + background: linear-gradient(90deg,rgb(57, 230, 230), rgb(21, 161, 248)); +} \ No newline at end of file diff --git a/nonebot_plugin_dialectlist/temple/img/background.jpg b/nonebot_plugin_dialectlist/temple/img/background.jpg new file mode 100644 index 0000000..c6b9ca0 Binary files /dev/null and b/nonebot_plugin_dialectlist/temple/img/background.jpg differ diff --git a/nonebot_plugin_dialectlist/temple/img/头像.jpg b/nonebot_plugin_dialectlist/temple/img/头像.jpg new file mode 100644 index 0000000..014c344 Binary files /dev/null and b/nonebot_plugin_dialectlist/temple/img/头像.jpg differ diff --git a/nonebot_plugin_dialectlist/temple/rank_temple.html b/nonebot_plugin_dialectlist/temple/rank_temple.html new file mode 100644 index 0000000..a121011 --- /dev/null +++ b/nonebot_plugin_dialectlist/temple/rank_temple.html @@ -0,0 +1,104 @@ + + + + + + 在 title 里夹一点私货应该不会被发现吧?——ddl 真是太厉害啦! + + + + +
+
+

话痨排行榜

+
+
+
+ +
+

第一名:ChenXu233

+
+
+
+

ta一共废话了12131231句,占比100%

+
+
+
+ +
+

第一名:ChenXu233

+
+
+
+

ta一共废话了12131231句,占比100%

+
+
+
+ +
+

第一名:ChenXu233

+
+
+
+

ta一共废话了12131231句,占比100%

+
+
+
+ +
+

第一名:ChenXu233

+
+
+
+

ta一共废话了12131231句,占比100%

+
+
+
+ +
+

第一名:ChenXu233

+
+
+
+

ta一共废话了12131231句,占比100%

+
+
+
+ +
+

第一名:ChenXu233

+
+
+
+

ta一共废话了12131231句,占比100%

+
+
+
+ +
+

第一名:ChenXu233

+
+
+
+

ta一共废话了12131231句,占比100%

+
+
+
+ +
+

第一名:ChenXu233

+
+
+
+

ta一共废话了12131231句,占比100%

+
+
+ +
+
+ +

Designed By ChenXu233

+
+
+ + \ No newline at end of file diff --git a/tests/screenshot-chromium.png b/tests/screenshot-chromium.png new file mode 100644 index 0000000..2af59ab Binary files /dev/null and b/tests/screenshot-chromium.png differ diff --git a/tests/screenshot-firefox.png b/tests/screenshot-firefox.png new file mode 100644 index 0000000..3b94b15 Binary files /dev/null and b/tests/screenshot-firefox.png differ diff --git a/tests/screenshot-webkit.png b/tests/screenshot-webkit.png new file mode 100644 index 0000000..71a03dd Binary files /dev/null and b/tests/screenshot-webkit.png differ diff --git a/tests/temple_render.py b/tests/temple_render.py new file mode 100644 index 0000000..44a8114 --- /dev/null +++ b/tests/temple_render.py @@ -0,0 +1,10 @@ +from playwright.sync_api import sync_playwright + +with sync_playwright() as p: + for browser_type in [p.chromium, p.firefox, p.webkit]: + browser = browser_type.launch(headless=True) + page = browser.new_page() + page.goto('file:///H:/Bot/%E7%8E%B0%E5%BD%B9Bot/mybot/src/nonebot_plugin_dialectlist/nonebot_plugin_dialectlist/temple/rank_temple.html') + page.screenshot(path=f'screenshot-{browser_type.name}.png',full_page=True) + print(page.title()) + browser.close() \ No newline at end of file