mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-15 09:48:14 +08:00
💄 美化未知类型样式
This commit is contained in:
@@ -123,17 +123,6 @@
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.mys-post-unknown) {
|
|
||||||
width: 800px;
|
|
||||||
padding: 10px;
|
|
||||||
border: 2px solid #485466;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin: 10px auto;
|
|
||||||
background: #5b738f;
|
|
||||||
color: #faf7e8;
|
|
||||||
font-family: Consolas, monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.mys-post-link-card-cover) {
|
:deep(.mys-post-link-card-cover) {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
@@ -188,3 +177,19 @@
|
|||||||
height: 45px;
|
height: 45px;
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 未知类型 */
|
||||||
|
:deep(.mys-post-unknown) {
|
||||||
|
width: 800px;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid var(--common-shadow-2);
|
||||||
|
border-radius: 10px;
|
||||||
|
background: var(--box-bg-1);
|
||||||
|
color: var(--common-text-content);
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.mys-post-unknown-code) {
|
||||||
|
font-family: var(--font-text);
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|||||||
@@ -147,20 +147,17 @@ function transferParser(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 解析未知数据
|
* @description 解析未知数据
|
||||||
* @since Alpha v0.1.1
|
* @since Beta v0.3.3
|
||||||
* @param {TGApp.Plugins.Mys.Post.StructuredContent} data Mys数据
|
* @param {TGApp.Plugins.Mys.Post.StructuredContent} data Mys数据
|
||||||
* @returns {HTMLDivElement} 解析后的未知数据
|
* @returns {HTMLDivElement} 解析后的未知数据
|
||||||
*/
|
*/
|
||||||
function parseUnknown(data: TGApp.Plugins.Mys.Post.StructuredContent): HTMLDivElement {
|
function parseUnknown(data: TGApp.Plugins.Mys.Post.StructuredContent): HTMLDivElement {
|
||||||
// 创建 div
|
|
||||||
const div = document.createElement("div");
|
const div = document.createElement("div");
|
||||||
div.classList.add("mys-post-unknown");
|
div.classList.add("mys-post-unknown");
|
||||||
// 创建 code,将数据放入 code
|
|
||||||
const code = document.createElement("code");
|
const code = document.createElement("code");
|
||||||
code.innerText = JSON.stringify(data);
|
code.innerText = JSON.stringify(data, null, 2);
|
||||||
// 插入 code
|
code.classList.add("mys-post-unknown-code");
|
||||||
div.appendChild(code);
|
div.appendChild(code);
|
||||||
// 返回 div
|
|
||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user