diff --git a/actions/build_dashboard.py b/actions/build_dashboard.py index 7efb6c8..cdfae0e 100644 --- a/actions/build_dashboard.py +++ b/actions/build_dashboard.py @@ -31,6 +31,9 @@ OUT = langdb.ME / "dashboard" CSS = r""" *{box-sizing:border-box} +a{color:#7cc4ff;text-decoration:none} +a:hover{color:#b7dcff;text-decoration:underline} +a:visited{color:#7cc4ff} /* 避免浏览器默认紫色 */ body{font-family:system-ui,'Segoe UI',Roboto,'PingFang SC','Microsoft YaHei',sans-serif; margin:0;background:#12141a;color:#e8e8ea;font-size:15px;line-height:1.55} .wrap{max-width:1460px;margin:0 auto;padding:20px 20px 8px} @@ -40,8 +43,10 @@ body{font-family:system-ui,'Segoe UI',Roboto,'PingFang SC','Microsoft YaHei',san .brand{font-weight:700;color:#fff} .banner .nav{display:flex;gap:16px;margin-left:auto;flex-wrap:wrap} .banner .nav a{color:#9fb0c7;text-decoration:none;padding-bottom:2px} -.banner .nav a:hover{color:#fff} +.banner .nav a:hover{color:#fff;text-decoration:none} +.banner .nav a:visited{color:#9fb0c7} .banner .nav a.on{color:#fff;font-weight:600;border-bottom:2px solid #4a90d9} +.banner .nav a.on:visited{color:#fff} .footwrap{color:#8a94a6;font-size:12px;line-height:1.9;display:block} h1{margin:.2em 0;font-size:24px} h2{font-size:14px;text-transform:uppercase;letter-spacing:.7px;color:#9aa2b1; @@ -80,7 +85,9 @@ tr:last-child td{border-bottom:none} .md pre{background:#0f1218;border:1px solid #2a2e3a;border-radius:8px;padding:12px;overflow:auto;font-size:12.5px} .md pre code{background:none;padding:0} .md ul{padding-left:22px}.md li{margin:2px 0} -.md a{color:#7cc4ff} +.md a{color:#7cc4ff}.md a:visited{color:#7cc4ff} +.logdate{font-family:ui-monospace,Consolas,monospace;color:#9fd0ff;border-bottom:1px dashed #3f5a7d;padding-bottom:1px} +.logdate:hover{color:#cBE6ff;border-bottom-style:solid;text-decoration:none} .md hr{border:0;border-top:1px solid #232b38;margin:18px 0} .md blockquote{border-left:3px solid #2f5f96;margin:10px 0;padding:2px 14px;color:#b9c3d3} """ @@ -105,7 +112,7 @@ CHART_JS = r""" }; const SK = [ {k:"listening", l:"听", c:"#4da3ff"}, {k:"speaking", l:"说", c:"#f1c40f"}, - {k:"reading", l:"读", c:"#2ecc71"}, {k:"writing", l:"写", c:"#e879f9"}]; + {k:"reading", l:"读", c:"#2ecc71"}, {k:"writing", l:"写", c:"#ff9f43"}]; const el = document.getElementById("chart"); const pts = DATA.log.slice().sort((a, b) => a.date < b.date ? -1 : 1) .map(r => ({date: r.date, v: Object.fromEntries(SK.map(s => [s.k, val(r[s.k])]))})); @@ -278,7 +285,7 @@ document.getElementById("grammar").innerHTML = SCRIPT_LOG = r""" document.getElementById("log").innerHTML = `日期类型材料听说读写备注` + - (DATA.log.map(l => `${esc(l.date)}${esc(l.type)} + (DATA.log.map(l => `${esc(l.date)}${esc(l.type)} ${esc(l.material_level)}${esc(l.listening)}${esc(l.speaking)} ${esc(l.reading)}${esc(l.writing)} ${esc(l.note)}`).join("") || "") + ``;