diff --git a/docs/autocolor_demo.mdx b/docs/autocolor_demo.mdx index 398f14bb..17e78f0f 100644 --- a/docs/autocolor_demo.mdx +++ b/docs/autocolor_demo.mdx @@ -5,7 +5,12 @@ unlisted: true ### simple -(( scripts.trust )) +(( user.script ))\ +(( scripts.trust ))\ +(( trust.me ))\ +(( risk.it ))\ +(( marks.init ))\ +(( marks.protocol )) ### color diff --git a/docs/guides/new_players/priv_store.mdx b/docs/guides/new_players/priv_store.mdx index e4457b52..af370ef9 100644 --- a/docs/guides/new_players/priv_store.mdx +++ b/docs/guides/new_players/priv_store.mdx @@ -4,7 +4,7 @@ title: priv_store > Think of it as a secure account that scripts can't touch. -_- Unknown, ((%Fmarks%.%Qlost_and_found%))_ +_- Unknown, ((marks.lost_and_found))_ ((%Cpriv_store%)) is a special user that does not take a user slot, cannot be retired, and cannot run any scripts other than ((accts.balance)) or ((accts.xfer_gc_to)). diff --git a/src/css/custom.css b/src/css/custom.css index 742fc0fe..e9fdcd42 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -115,108 +115,141 @@ a.wikilink-new { background-size: 100% 4px; } -.color-tag[data-tag="a"] { +.color-tag[data-tag="a"], +.color-risk { color: #000000; } + .color-tag[data-tag="b"] { color: #3f3f3f; } + .color-tag[data-tag="c"] { color: #676767; } + .color-tag[data-tag="d"] { color: #7d0000; } + .color-tag[data-tag="e"] { color: #8e3434; } + .color-tag[data-tag="f"] { color: #a34f00; } + .color-tag[data-tag="g"] { color: #725437; } + .color-tag[data-tag="h"] { color: #a88600; } + .color-tag[data-tag="i"] { color: #b2934a; } + .color-tag[data-tag="j"] { color: #939500; } + .color-tag[data-tag="k"] { color: #495225; } + .color-tag[data-tag="l"] { color: #299400; } + .color-tag[data-tag="m"] { color: #23381b; } + .color-tag[data-tag="n"] { color: #00535b; } + .color-tag[data-tag="o"] { color: #324a4c; } + .color-tag[data-tag="p"] { color: #0073a6; } + .color-tag[data-tag="q"] { color: #385a6c; } + .color-tag[data-tag="r"] { color: #010067; } + .color-tag[data-tag="s"] { color: #507aa1; } + .color-tag[data-tag="t"] { color: #601c81; } + .color-tag[data-tag="u"] { color: #43314c; } + .color-tag[data-tag="v"] { color: #8c0069; } + .color-tag[data-tag="w"] { color: #973984; } + .color-tag[data-tag="x"] { color: #880024; } + .color-tag[data-tag="y"] { color: #762e4a; } + .color-tag[data-tag="z"] { color: #101215; } + .color-tag[data-tag="A"], .color-tag[data-tag="1"], -.color-cli { +.color-cli, +.color-trust { color: #ffffff; } + .color-tag[data-tag="B"], .color-gc-text { color: #cacaca; } + .color-tag[data-tag="C"], .color-tag[data-tag="0"], .color-user, .color-gc-end { color: #9b9b9b; } + .color-tag[data-tag="D"], .color-gc-q { color: #ff0000; } + .color-tag[data-tag="E"] { color: #ff8383; } + .color-tag[data-tag="F"], -.color-trust, +.color-trust-user, .color-tag[data-tag="5"], .color-tag[data-tag="6"], .color-tag[data-tag="7"], @@ -224,73 +257,95 @@ a.wikilink-new { .color-tag[data-tag="9"] { color: #ff8000; } + .color-tag[data-tag="G"] { color: #f3aa6f; } + .color-tag[data-tag="H"] { color: #fbc803; } + .color-tag[data-tag="I"] { color: #ffd863; } + .color-tag[data-tag="J"], .color-gc-b { color: #fff404; } + .color-tag[data-tag="K"] { color: #f3f998; } + .color-tag[data-tag="L"], .color-tag[data-tag="2"], .color-script, .color-gc-m { color: #1eff00; } + .color-tag[data-tag="M"] { color: #b3ff9b; } + .color-tag[data-tag="N"], .color-gc-k, .color-key { color: #00ffff; } + .color-tag[data-tag="O"] { color: #8fe6ff; } + .color-tag[data-tag="P"], .color-tag[data-tag="3"] { color: #0070dd; } -.color-tag[data-tag="Q"] { + +.color-tag[data-tag="Q"], +.color-script-marks { color: #a4e3ff; } + .color-tag[data-tag="R"] { color: #0000ff; } + .color-tag[data-tag="S"] { color: #7ab2f4; } + .color-tag[data-tag="T"], -.color-tag[data-tag="4"] { +.color-tag[data-tag="4"], +.color-script-risk { color: #b035ee; } + .color-tag[data-tag="U"] { color: #e6c4ff; } + .color-tag[data-tag="V"], .color-gc-t, .color-value { color: #ff00ec; } + .color-tag[data-tag="W"] { color: #ff96e0; } + .color-tag[data-tag="X"] { color: #ff0070; } + .color-tag[data-tag="Y"] { color: #ff6a98; } + .color-tag[data-tag="Z"] { color: #0c112b; } diff --git a/src/plugins/rehype/autocolor.js b/src/plugins/rehype/autocolor.js index 90fab92b..dc174bb5 100644 --- a/src/plugins/rehype/autocolor.js +++ b/src/plugins/rehype/autocolor.js @@ -15,11 +15,13 @@ const trustUsers = [ "market", "scripts", "sys", - "trust", + // "trust", "users", "marks", ]; +const marksTrustScripts = ["protocol", "available", "sync", "clone"]; + // Matches (( )) const regexAutocolorBlock = /\(\((.*?)\)\)/g; @@ -47,11 +49,28 @@ const regexGC = /(?=\d)(?:(\d+)Q)?(?:(\d{1,3})T)?(?:(\d{1,3})B)?(?:(\d{1,3})M)?(?:(\d{1,3})K)?(\d{1,3})?GC/g; function colorScript(_fullMatch, user, script) { - const isTrust = trustUsers.includes(user); + const isTrustUser = trustUsers.includes(user); + const isTrust = user == "trust"; + const isRisk = user == "risk"; + const isMarksScript = user == "marks" && !marksTrustScripts.includes(script); + + const userColor = isTrustUser + ? "trust-user" + : isTrust + ? "trust" + : isRisk + ? "risk" + : "user"; + const scriptColor = isRisk + ? "script-risk" + : isMarksScript + ? "script-marks" + : "script"; + return [ - h("span", { class: `color-${isTrust ? "trust" : "user"}` }, user), + h("span", { class: `color-${userColor}` }, user), u("text", "."), - h("span", { class: "color-script" }, script), + h("span", { class: `color-${scriptColor}` }, script), ]; }