From a258be41cf4e48002a3d8c5983d6971bccec354c Mon Sep 17 00:00:00 2001 From: shylinux Date: Mon, 10 Jul 2023 12:48:25 +0800 Subject: [PATCH] opt some --- frame.js | 2 +- index.css | 175 ++++++++++++++++++------------------ lib/page.js | 3 +- panel/footer.css | 1 - panel/header.css | 2 +- panel/header.js | 2 +- panel/search.css | 6 +- plugin/local/code/inner.css | 2 +- plugin/local/code/inner.js | 2 +- plugin/local/code/vimer.js | 5 +- plugin/local/team/plan.css | 9 +- plugin/local/wiki/data.css | 8 +- proto.js | 6 +- publish/chrome/contexts.css | 58 ------------ 14 files changed, 109 insertions(+), 172 deletions(-) diff --git a/frame.js b/frame.js index e30bb006..52d7b31b 100644 --- a/frame.js +++ b/frame.js @@ -221,7 +221,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { }), item), "", action) }), meta }, - _output0: function(can, meta, event, cmds, cb, silent) { var msg = can.request(event) + _output0: function(can, meta, event, cmds, cb, silent) { var msg = can.request(event); meta.feature = meta.feature||{} if (msg.Option(ice.MSG_HANDLE) != ice.TRUE && cmds && cmds[0] == ctx.ACTION) { var sub = can.core.Value(can, chat._OUTPUTS_CURRENT); if (msg.RunAction(event, sub, cmds)) { return } } if (msg.RunAction(event, can, cmds)) { return } if (msg.Option(ice.MSG_HANDLE) != ice.TRUE && cmds && cmds[0] == ctx.ACTION && meta.feature[cmds[1]]) { var msg = can.request(event, {action: cmds[1]}) diff --git a/index.css b/index.css index 767d57b8..be0c567a 100644 --- a/index.css +++ b/index.css @@ -1,6 +1,21 @@ +body { + --body-bg-color:black; --body-fg-color:silver; + --danger-bg-color:red; --danger-fg-color:white; + --create-bg-color:blue; --create-fg-color:white; + --notice-fg-color:blue; --progress-bg-color:red; + --disable-fg-color:gray; + + --code-bg-color:black; --code-fg-color:silver; --code-border-color:blue; + --code-comment:darkgray; --code-keyword:darkblue; --code-package:blue; + --code-datatype:cornflowerblue; --code-function:darkcyan; + --code-constant:gray; --code-string:brown; --code-object:purple; + + --svg-stroke-width:2; +} +/* element */ * { tab-size:4; box-sizing:border-box; padding:0; border:0; margin:0; } -body { font-size:16px; } legend { padding:0 20px; } +select { padding:0 10px; } input:not([type=file]) { padding:0 10px; } input:not([type=button]) { width:120px; } input[name=path] { width:160px; } @@ -9,54 +24,63 @@ input[name=limit] { width:60px; } input[name=offend] { width:80px; } input[name=id] { width:60px; } input[name=url] { width:320px; } -input[name=cmd] { background-color:black; color:white; width:100%; } +input[name=cmd] { background-color:var(--code-bg-color); color:var(--code-fg-color); width:100%; } table.content.full { width:100%; } table.content thead { position:sticky; top:2px; } table.content th { padding:2px 5px; } table.content td { padding:2px 5px; } table.content.action th:last-child { position:sticky; right:2px; } table.content.action td:last-child { position:sticky; right:2px; } -h1 { text-align:center; margin:20px 0; } h2 { margin:20px 0; } h3 { margin:20px 0; } ul { padding-left:40px; margin:20px 0; } +h1 { text-align:center; margin:20px 0; } h2 { margin:20px 0; } h3 { margin:20px 0; } hr, td.hr { border-bottom:var(--plugin-border-color) dashed 1px; margin:5px; } +ul { padding-left:40px; margin:20px 0; } +kbd { padding:0 10px; } img { margin-bottom:-8px; } /* fieldset */ fieldset>legend { margin-right:10px; } -fieldset>form.option>div.item { margin-right:10px; } +fieldset>form.option>div.cmd { width:100%; } +fieldset>form.option>div.textarea { width:100%; } +fieldset>form.option>div.item:not(.icon) { margin-right:10px; } fieldset>form.option>div.item.select>input { min-width:80px; } -fieldset>div.action>div.item { margin-right:10px; height:32px; } +fieldset>form.option>div.item.select { border-radius:5px; } +fieldset>div.action>div.item.select { border-radius:5px; } +fieldset>div.action>div.item { margin-right:10px; } +fieldset>div.output { width:100%; } +fieldset>div.status { width:100%; } fieldset.input>legend { display:none; } fieldset.input.key div.action { display:none; } -fieldset.input.key div.status { display:block; position:sticky; bottom:0; } fieldset.input.key div.output table.content { width:100%; } +fieldset.input.key div.status { display:block; position:sticky; bottom:0; } fieldset.input.key.simple th { display:none; } fieldset.input.key.simple td { min-width:40px; } -fieldset.input.date { display:block; } -fieldset.input.date table.content { text-align:center; width:350px; } -fieldset.input.date div.output td { padding:2px 10px; } -fieldset.input.date div.output td.prev { color:gray; } -fieldset.input.date div.output td.next { color:gray; } -fieldset.input.date div.output td.select { background-color:#5066b945; } -fieldset.input.date div.output td span.lunar { font-size:8px; display:block; clear:both; } -fieldset.input.date div.output td span.lunar.term { color:green; } -fieldset.input.date div.output td span.lunar.fest { color:red; } -fieldset.input.date div.status { text-align:center; } fieldset.input.date>div.action>div.item.next { margin-right:0; } fieldset.input.date>div.action>div.item.today { margin-right:0; } +fieldset.input.date>div.output table.content { text-align:center; width:100%; min-width:350px; } +fieldset.input.date>div.output td { padding:2px 10px; } +fieldset.input.date>div.output td.prev { color:var(--disable-fg-color); } +fieldset.input.date>div.output td.next { color:var(--disable-fg-color); } +fieldset.input.date>div.output td.select { background-color:var(--hover-bg-color); } +fieldset.input.date>div.output td:hover { background-color:var(--hover-bg-color); } +fieldset.input.date>div.output td span.lunar { font-size:8px; display:block; clear:both; } +fieldset.input.date>div.output td span.lunar.term { color:green; } +fieldset.input.date>div.output td span.lunar.fest { color:red; } +fieldset.input.date>div.status { text-align:center; } /* float */ body div.float { padding:5px; } -body>div.toast div.title { color:blue; float:left; } +body>div.toast div.title { color:var(--notice-fg-color); float:left; } body>div.toast div.duration { color:gray; float:right; } -body>div.toast div.content { color:blue; text-align:center; } -body>div.toast div.progress { border:blue solid 1px; margin-left:0px; height:20px; clear:both; } -body>div.toast div.progress div.current { background-color:red; height:18px; } +body>div.toast div.content { color:var(--notice-fg-color); text-align:center; } +body>div.toast div.progress { border:var(--notice-fg-color) solid 1px; margin-left:0px; height:20px; clear:both; } +body>div.toast div.progress div.current { background-color:var(--progress-bg-color); height:18px; } body>div.toast div.action { width:100%; display:block; } body>div.toast div.action>div.item { float:right; } body>div.carte { padding:0; } body>div.carte input[name=filter] { margin:5px; width:calc(100% - 10px); position:sticky; top:5px; } body>div.carte div.item { white-space:pre; padding:5px 10px; } -body>div.carte div.item span.icon.next { float:right; } +body>div.carte div.item span.icon.next { float:right; line-height:22px; height:22px; } +body>div.carte.select.float>div.item { text-align:center; } body>div.input td { padding:10px; } -body>div.input td span.icon { margin-left:-20px; visibility:hidden; } +body>div.input td span.icon { margin-left:-25px; visibility:hidden; } body>div.input td:hover span.icon { visibility:visible; } body>div.input select { width:230px; } body>div.input input { width:240px; } @@ -65,57 +89,53 @@ body>div.input div.action { width:100%; } body>div.input div.action>div.item { margin:5px; float:right; } body>div.input div.action>div.item>input[type=button] { width:110px; } body>div.upload div.action input[type=file] { width:320px; } -body>div.upload div.output { border:red solid 1px; } -body>div.upload div.output div.progress { background-color:red; height:10px; width:0; } +body>div.upload div.output { border:var(--notice-fg-color) solid 1px; } +body>div.upload div.output div.progress { background-color:var(--progress-bg-color); height:10px; width:0; } body>div.upload div.status div.cost { float:left; } body>div.upload div.status div.show { float:right; } body>div.upload div.status div.size { text-align:center; } /* font */ +body { font-size:16px; } legend { font-size:1.2rem; line-height:32px; height:32px; } -select, input { font-size:1rem; height:32px; } textarea::placeholder, input::placeholder { font-style:italic; } +select, input { font-size:1rem; height:32px; } input::placeholder, textarea::placeholder { font-style:italic; } textarea { font-size:1rem; tab-size:2; padding:5px; height:96px; width:100%; resize:vertical; } -table.content, div.item, div.code, div.story[data-type=spark] { white-space:pre; text-align:left; } -div.story[data-type=spark] { padding:5px 10px; border-left:var(--code-border-color) solid 5px; } -table.content div.story[data-type=spark] { margin:0; } +table.content, div.code, div.story[data-type=spark] { white-space:pre; margin:0; } +div.story[data-type=spark] { padding:5px 10px; border-left:var(--notice-fg-color) solid 5px; } +fieldset>div.action>div.tabs { font-style:italic; padding:0 10px;} fieldset>div.output>div.code { font-size:14px; } -fieldset>div.action>div.tabs { font-style:italic; line-height:22px; padding:5px; height:32px; } fieldset>div.status>div.item { padding:5px; height:31px; } fieldset>div.status>div.item>label { font-size:0.6rem; } -body.light span.keyword { color:darkblue; } -body.light span.function { color:darkcyan; } -body.dark span.function { color:lightgreen; } -body.dark span.keyword { color:royalblue; } body.en fieldset.input.date>div.action>div.item.select select { width:55px; } body.en fieldset.input.date>div.action>div.item.select.year select { width:100px; } body.en fieldset.input.date>div.action>div.item.select.month select { width:100px; } body.zh fieldset.input.date>div.action>div.item.select select { width:58px; } body.zh fieldset.input.date>div.action>div.item.select.year select { width:81px; } body.zh fieldset.input.date>div.action>div.item.select.month select { width:81px; } +body.zh input[type=button]:not(.select) { letter-spacing:5px; } /* icon */ -fieldset>form.option>div.icon { font-size:26px; line-height:28px; padding:0 5px; height:32px; margin:0; } -fieldset>form.option>div.item.icons>span.icon { font-size:26px; line-height:28px; padding:0 5px; height:32px; } -fieldset>div.action>div.item.icons>span.icon { font-size:26px; line-height:28px; padding:0 5px; height:32px; } -fieldset>form.option>div.item.icons>span.icon.create { line-height:30px; } -fieldset>div.action>div.item.icons>span.icon.create { line-height:30px; } -form.option>div.icon:first-child { margin-left:-5px; } -form.option>div.icon.refresh { line-height:26px; } -form.option>div.icon.goback { line-height:26px; } -form.option>div.icon.next { font-size:18px; } -form.option>div.icon.prev { font-size:18px; } -div.item.text>span.icon { margin-left:-15px; margin-right:3px; } -div.item.select>span.icon { margin-left:-15px; margin-right:3px; visibility:hidden; } +legend>i:first-child { margin-right:10px; } div.item>i:first-child { margin-right:10px; } +form.option div.icon, form.option span.icon { font-size:20px; line-height:32px; padding:0 5px; margin:0; height:32px; } +div.action div.icon, div.action span.icon { font-size:20px; line-height:32px; padding:0 5px; margin:0; height:32px; } +form.option div.icon:first-child { margin-left:-5px; } +form.option div.icon.refresh { font-size:26px; line-height:28px; } +form.option div.icon.goback { font-size:26px; line-height:28px; } +form.option div.icon.next { font-size:18px; } +form.option div.icon.prev { font-size:18px; } +div.item.select>span.icon { margin-left:-25px; margin-right:3px; visibility:hidden; } div.item.select:hover>span.icon { visibility:visible; } +div.item.text>span.icon { margin-left:-25px; margin-right:3px; } div.item.text>span.icon.delete { font-size:20px; visibility:hidden; } div.item.text:hover>span.icon.delete { visibility:visible; } +div.item.button>span.icon.create { font-size:26px; line-height:28px; } div.tabs span.icon { margin-left:5px; visibility:hidden; } -div.tabs>div:hover span.icon { visibility:visible; } div.tabs>div.select span.icon { visibility:visible; } -div.action>div.tabs:hover span.icon { visibility:visible; } +div.tabs>div:hover span.icon { visibility:visible; } +div.tabs:hover span.icon { visibility:visible; } fieldset.plug>form.option>div.icon { margin-left:5px; } -fieldset.plugin:not(.float):not(.full):not(.cmd)>form.option>div.icon { display:none; } -fieldset.plugin:not(.float):not(.full):not(.cmd)>form.option>div.button>span.icon { display:none; } -fieldset.plugin:not(.float):not(.full):not(.cmd)>div.action>div.button>span.icon { display:none; } fieldset.panel>div.action>div.button>span.icon { display:none; } +fieldset.plugin:not(.story):not(.float):not(.full):not(.cmd)>form.option>div.icon { display:none; } +fieldset.plugin:not(.story):not(.float):not(.full):not(.cmd)>form.option>div.button>span.icon { display:none; } +fieldset.plugin:not(.story):not(.float):not(.full):not(.cmd)>div.action>div.button>span.icon { display:none; } fieldset.story>form.option>div.button.icons>input { display:none; } fieldset.float>form.option>div.button.icons>input { display:none; } fieldset.full>form.option>div.button.icons>input { display:none; } @@ -124,24 +144,18 @@ fieldset.story>div.action>div.button.icons>input { display:none; } fieldset.float>div.action>div.button.icons>input { display:none; } fieldset.full>div.action>div.button.icons>input { display:none; } fieldset.cmd>div.action>div.button.icons>input { display:none; } -body.windows form.option>div.icon { font-size:21px; } -legend>i:first-child { margin-right:10px; } div.item>i:first-child { margin-right:10px; } -fieldset.float div.text:hover>span.icon.delete { visibility:hidden; } +fieldset:not(.float)>form.option>div.text>span.value { display:none; } fieldset.float>form.option>div.text>input { display:none; } fieldset.float>form.option>div.text>span { display:none; } fieldset.float>form.option>div.text>span.value { padding:7px; height:32px; max-width:200px; display:block; overflow:auto; } -fieldset:not(.float)>form.option>div.text>span.value { display:none; } +fieldset.float div.text:hover>span.icon.delete { visibility:hidden; } body.mobile:not(.landscape) fieldset.float>form.option>div.text>span.value { display:none; } +body.windows form.option>div.icon { font-size:21px; } /* svg */ -body { --svg-stroke-width:2; } -svg text { font-size:24px; font-family:monospace; } -svg rect { stroke-width:var(--svg-stroke-width); } -svg line { stroke-width:var(--svg-stroke-width); } -svg path { stroke-width:var(--svg-stroke-width); } -svg text { stroke:var(--body-fg-color); fill:var(--body-fg-color); } -svg rect { stroke:var(--body-fg-color); fill:var(--output-bg-color); } -svg line { stroke:var(--body-fg-color); } -svg path { stroke:var(--body-fg-color);; } +svg text { font-size:24px; font-family:monospace; stroke:var(--body-fg-color); fill:var(--body-fg-color); } +svg rect { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); fill:var(--output-bg-color); } +svg line { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); } +svg path { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); } svg g[stroke] text { stroke:unset; } svg g[stroke] rect { stroke:unset; } svg g[stroke] line { stroke:unset; } @@ -151,6 +165,7 @@ svg g[fill] rect { fill:unset; } /* output */ div.project div.list { margin-left:10px; clear:both; } div.project div.item { padding:2px 10px; } +div.project div.item.filter { padding:0; } div.project div.item>div.name { padding-left:15px; } div.project div.expand { float:left; transition:all .3s; } div.project div.expand.open { rotate:90deg; translate:1px 2px; transition:all .3s; } @@ -158,8 +173,7 @@ div.project div.zone>div.item { text-align:center; padding:3px; } div.project div.zone>div.item>div.icon { margin-left:3px; float:right; } div.project div.zone>div.list>div.zone>div.item { text-align:left; padding-left:20px; } div.project div.zone>div.list>div.zone>div.item:hover { margin-left:10px; transition:all 0.3s; } -fieldset>div.output>div.project>div.item.filter { padding:0; } -fieldset>div.output>div.project { border-right:var(--plugin-border-color) solid 1px; min-width:120px; max-width:230px; } +fieldset>div.output div.project { border-right:var(--plugin-border-color) solid 1px; min-width:120px; max-width:230px; } fieldset>div.output div.profile { border-left:var(--plugin-border-color) solid 1px; max-width:320px; } fieldset>div.output div.display { border-top:var(--plugin-border-color) solid 1px; } /* table card */ @@ -178,7 +192,6 @@ fieldset.output>form.option { display:none; } fieldset.output>div.action { display:none; } fieldset.output>div.status { display:none; } fieldset.output>div.item { display:none; } -fieldset>form.option>div.item.select, fieldset>div.action>div.item.select { border-radius:5px; } fieldset>form.option, fieldset>div.action { display:contents; } form.option.hide, div.action.hide, .hidden, .hide { display:none; } div.action, div.output, div.status, div.project, div.content, div.profile, div.display, table.content, table.content td, div.list, div.code, div.story, div.float, fieldset.float { overflow:auto; } legend, form.option, form.option>div.item, div.action, div.action>div.item, div.action>div.tabs, fieldset>div.status>div.item { float:left; } @@ -189,14 +202,10 @@ fieldset.cmd fieldset.plug { position:fixed; bottom:32px; right:0; } fieldset.plug { position:absolute; bottom:0; right:0; } fieldset.full { position:fixed; left:0; top:0; } fieldset>div.output>div.code { position:sticky; left:0; } -fieldset>div.status>legend { margin-left:2px; margin-right:0; height:31px; float:right; clear:none; } -fieldset>div.status>legend:not(:hover):not(.select) { background-color:unset; } -div.carte.select.float>div.item { text-align:center; } legend, select, input[type=button], th, table.content td, h1, h2, h3, div.item, div.tabs { cursor:pointer; } div.story[data-type=spark] { cursor:copy; } -fieldset>div.output { width:100%; } fieldset>div.status { width:100%; } -form.option>div.cmd, form.option>div.textarea { width:100%; } -fieldset.plug div.output table.content { width:100%; } +fieldset>div.status>legend { margin-left:2px; margin-right:0; height:31px; float:right; clear:none; } +fieldset>div.status>legend:not(:hover):not(.select) { background-color:unset; } /* hover */ input:hover[type=button][name=create] { background-color:var(--create-bg-color); color:var(--create-fg-color); } input:hover[type=button][name=insert] { background-color:var(--create-bg-color); color:var(--create-fg-color); } @@ -209,20 +218,8 @@ input:hover[type=button][name=trash] { background-color:var(--danger-bg-color); input:hover[type=button][name=delete] { background-color:var(--danger-bg-color); color:var(--danger-fg-color); } input:hover[type=button][name=remove] { background-color:var(--danger-bg-color); color:var(--danger-fg-color); } /* theme */ -body { - --body-bg-color:black; --body-fg-color:silver; - --danger-bg-color:red; --danger-fg-color:white; - --create-bg-color:blue; --create-fg-color:white; - --disable-fg-color:gray; - - --code-bg-color:black; --code-fg-color:silver; --code-border-color:blue; - --code-comment:darkgray; --code-keyword:darkblue; --code-package:blue; - --code-datatype:cornflowerblue; --code-function:darkcyan; - --code-constant:gray; --code-string:brown; --code-object:purple; -} body { background-color:var(--body-bg-color); color:var(--body-fg-color); } legend { background-color:var(--legend-bg-color); border-radius:var(--input-radius); } -legend:hover { color:var(--hover-fg-color) } select { border-radius:var(--input-radius); } input { background-color:var(--input-bg-color); color:var(--input-fg-color); border-radius:var(--input-radius); } input:hover { color:var(--hover-fg-color) } @@ -238,16 +235,16 @@ table.content.action td:last-child { background-color:var(--th-bg-color); } h1:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } h2:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } h3:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } +kbd:hover { background-color:white; color:black; } +samp:hover { background-color:white; color:black; } div.item:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } div.item.select { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } -kbd:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } -samp:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } span.item:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } span.item.select { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } span.icon:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } div.action div.tabs:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } div.action div.tabs.select { background-color:var(--hover-bg-color); color:var(--hover-fg-color); } -div.output { background-color:var(--output-bg-color); } +fieldset>div.output { background-color:var(--output-bg-color); } fieldset>div.status { border-top:var(--status-border); } fieldset:not(.panel) { background-color:var(--plugin-bg-color); color:var(--plugin-fg-color); border-radius:var(--plugin-radius); } fieldset.panel:not(.main) { background-color:var(--panel-bg-color); color:var(--panel-fg-color); } @@ -266,7 +263,6 @@ div.tabs div.select { background-color:var(--hover-bg-color); color:var(--hover- div.plug legend { background-color:var(--output-bg-color); } div.plug legend.select { background-color:var(--plugin-bg-color); } div.complete>table { background-color:var(--plugin-bg-color); } - body.light fieldset.panel:not(.main)>div.output div.state:hover { background-color:var(--panel-hover-bg-color); color:var(--panel-hover-fg-color); } body.light fieldset.panel:not(.main)>div.output div.title:hover { background-color:var(--panel-hover-bg-color); color:var(--panel-hover-fg-color); } body.light fieldset.panel:not(.main)>div.output div.menu:hover { background-color:var(--panel-hover-bg-color); color:var(--panel-hover-fg-color); } @@ -275,6 +271,8 @@ body.light fieldset.panel:not(.main):not(.auto) div.item.select { background-col body.light fieldset.panel:not(.main):not(.auto) input { background-color:var(--panel-input-bg-color); color:var(--panel-input-fg-color); border-radius:var(--input-radius); } body.light fieldset.panel:not(.main)>div.output>div.item>input::placeholder { background-color:var(--panel-input-bg-color); color:var(--panel-fg-color); } body.light fieldset.panel:not(.main) label { color:var(--panel-fg-color); } +body.light span.keyword { color:darkblue; } body.light span.function { color:darkcyan; } +body.dark span.keyword { color:royalblue; } body.dark span.function { color:lightgreen; } /* print */ body.print { -webkit-filter: grayscale(100%); } body.print { background-color:white; color:black; } @@ -305,6 +303,7 @@ fieldset.cmd>div.item.time { line-height:22px; padding:5px 10px; float:right; } fieldset.cmd>div.item.avatar { padding:0; height:32px; float:right; } fieldset.cmd>div.item.avatar>img { height:32px; } fieldset.cmd>div.item.usernick { line-height:22px; padding:5px 10px; float:right; } +fieldset.plug>div.output table.content { width:100%; } fieldset.location>div.action input[type=text] { width:40px; } fieldset.config form.option input[name=key] { width:240px; } fieldset.inner.float>div.status { display:none; } diff --git a/lib/page.js b/lib/page.js index 73ccc9b7..86b91288 100644 --- a/lib/page.js +++ b/lib/page.js @@ -30,7 +30,8 @@ Volcanos("page", { can.base.isString(value)? (target.innerHTML = value): can.core.Item(value, function(key, val) { key == "className" && can.base.isArray(val) && (val = val.join(lex.SP)), !can.base.isObject(val)? (target[key] = val): can.core.Item(val, function(k, v) { if (can.base.isIn(k, "height", "width", "min-height", "max-height", "min-width", "max-width") && parseInt(v) < 0) { return target[key] && (target[key][k] = "") } - if (can.base.isIn(k, "height", "width", "min-height", "max-height", "min-width", "max-width", "left", "top", "right", "bottom", "margin-left", "margin-top", "margin", "padding", "font-size") && v && (can.base.isNumber(v) || !can.base.endWith(v, "px"))) { v += "px" } + if (can.base.isIn(k, "height", "width", "min-height", "max-height", "min-width", "max-width", + "left", "top", "right", "bottom", "margin-left", "margin-top", "margin", "padding", "font-size") && v && (can.base.isNumber(v) || !can.base.endWith(v, "px"))) { v += "px" } target[key] && (target[key][k] = v) }) }); return target diff --git a/panel/footer.css b/panel/footer.css index 73b44528..b9172f03 100644 --- a/panel/footer.css +++ b/panel/footer.css @@ -8,7 +8,6 @@ fieldset.Footer>div.output div.cmd { padding:0; margin-left:10px; position:relat fieldset.Footer>div.output div.cmd>i { position:absolute; left:10px; top:8px; } fieldset.Footer>div.output div.cmd>input[name=cmd] { padding-left:30px; margin-right:0; width:120px; transition:all 1s; } fieldset.Footer>div.output div.cmd>input[name=cmd]:focus { width:320px; transition:all 0.5s; } -fieldset.Footer>div.output div.cmd>span.delete { margin-left:-20px; margin-right:5px; } .picker { box-shadow:4px 4px 20px 4px #626bd0; } div.view span.keyword { color:#5cadd4; } diff --git a/panel/header.css b/panel/header.css index 308d0986..0eb028a4 100644 --- a/panel/header.css +++ b/panel/header.css @@ -8,4 +8,4 @@ fieldset.Header>div.output div.search.title { padding:8px 5px; margin-left:5px; fieldset.Header>div.output div.search>i { position:absolute; left:10px; top:15px; } fieldset.Header>div.output div.search>input { padding-left:30px; margin-right:0; transition:all 1s; } fieldset.Header>div.output div.search>input:focus { width:320px; transition:all 0.5s; } -fieldset.Header>div.output div.search>span.delete { position:absolute; top:14px; right:5px; } +fieldset.Header>div.output div.search>span.delete { margin-left:-20px; } diff --git a/panel/header.js b/panel/header.js index 8f933174..a8995d3e 100644 --- a/panel/header.js +++ b/panel/header.js @@ -1,7 +1,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onimport._title(can, msg, target), can.onimport._state(can, msg, target), can.onimport._avatar(can, msg, target), can.onimport._background(can, msg, target), can.onimport._search(can, msg, target) }, - _title: function(can, msg, target) { can.user.isMobile || can.core.List(can.base.getValid(can.Conf(chat.TITLE)||(can.user.isExtension? "chrome": location.host)||msg.result, [location.host]), function(item) { + _title: function(can, msg, target) { can.user.isMobile || can.core.List(can.base.getValid(can.Conf(chat.TITLE)||(can.user.isExtension? "contexts": location.host)||msg.result, [location.host]), function(item) { can.page.Append(can, target, [{view: [[html.ITEM, chat.TITLE], "", item], title: "返回主页", onclick: function(event) { can.onaction.title(event, can) }}]) }) }, _state: function(can, msg, target) { can.core.List(can.base.Obj(can.Conf(chat.STATE)||msg.Option(chat.STATE), [aaa.USERNICK, aaa.AVATAR, mdb.TIME]).reverse(), function(item) { diff --git a/panel/search.css b/panel/search.css index 873b7e74..71a06984 100644 --- a/panel/search.css +++ b/panel/search.css @@ -1,5 +1,3 @@ -fieldset.Search { background-color:#061c3ceb; padding:10px; position:fixed; left:230px; top:48px; } -fieldset.Search>div.action>div.item.filter>input { background-color:#6b7488; color:white; } -fieldset.Search>div.output table.content { width:100%; } +fieldset.Search { padding:10px; position:fixed; left:230px; top:48px; } fieldset.Search>div.output>div.profile { max-width:unset; } -body.dark fieldset.Search>div.action>div.item.filter>input { background-color:#212121; } \ No newline at end of file +fieldset.Search>div.output table.content { width:100%; } diff --git a/plugin/local/code/inner.css b/plugin/local/code/inner.css index 997daad6..75223f99 100644 --- a/plugin/local/code/inner.css +++ b/plugin/local/code/inner.css @@ -34,7 +34,7 @@ fieldset.inner>div.output>div.project>div.zone>div.item>span.icon { font-style:n fieldset.inner.cmd>div.output>div.layout>div.tabs { height:38px; display:block; overflow:hidden; } fieldset.inner.cmd>div.output>div.layout>div.tabs.hide { display:none; } fieldset.inner.cmd>div.output>div.layout>div.tabs>div { padding:10px; height:38px; float:left; } -fieldset.inner.cmd>div.output>div.layout>div.tabs>div.icon { font-size:18px; line-height:32px; padding:2px 5px; position:sticky; top:0; } +fieldset.inner.cmd>div.output>div.layout>div.tabs>div.icon { font-size:26px; line-height:32px; padding:2px 5px; position:sticky; top:0; } fieldset.inner.cmd>div.output>div.layout>div.tabs>div.tabs>span { font-style:italic; } fieldset.inner.cmd>div.output>div.layout>div.tabs>div.tabs>span.icon { padding:0 5px; } fieldset.inner.cmd>div.output>div.layout>div.tabs>div.usernick { float:right; position:sticky; top:0; } diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index a275086c..b65bd6ee 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -35,7 +35,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp _tabs: function(can) { if (!can.isCmdMode()) { return can.ui.tabs = can._action } can.page.Append(can, can.ui.tabs, can.core.List([ {name: can.page.unicode.menu, onclick: function() { can.user.carte(event, can, can.onaction, can.onaction.list) }}, - {name: can.page.unicode.refresh, style: {"font-size": "24px", "padding-top": 0}, onclick: function() { location.reload() }}, + {name: can.page.unicode.refresh, style: {"font-size": 26, "padding-top": 2}, onclick: function() { location.reload() }}, ], function(item) { return can.base.Copy(item, {view: [[html.ITEM, html.ICON], "", item.name]}) })), can.page.Append(can, can.ui.tabs, can.user.header(can)) }, __tabPath: function(can, cache) { var target = can.ui.path diff --git a/plugin/local/code/vimer.js b/plugin/local/code/vimer.js index f6bddd11..498d6a38 100644 --- a/plugin/local/code/vimer.js +++ b/plugin/local/code/vimer.js @@ -71,7 +71,7 @@ Volcanos(chat.ONFIGURE, { } } }) }, }) -Volcanos(chat.ONACTION, {list: ["编译", "源码", "终端", "文档", "计划", "桌面", "首页"], +Volcanos(chat.ONACTION, {list: ["编译", "源码", "终端", "文档", "计划", "桌面", "后台", "官网"], _run: function(event, can, button, args, cb) { can.runAction(event, button, args, cb||function(msg) { can.onimport.tabview(can, msg.Option(nfs.PATH), msg.Option(nfs.FILE)), can.user.toastSuccess(can, button) can.ui.zone.source.refresh() @@ -115,7 +115,8 @@ Volcanos(chat.ONACTION, {list: ["编译", "源码", "终端", "文档", "计划" "文档": function(event, can) { can.onimport.tabview(can, "", web.WIKI_WORD, ctx.INDEX) }, "计划": function(event, can) { can.onimport.tabview(can, "", web.TEAM_PLAN, ctx.INDEX) }, "桌面": function(event, can) { can.onimport.tabview(can, "", "web.chat.macos.desktop", ctx.INDEX) }, - "首页": function(event, can) { can.onimport.tabview(can, "", location.origin+nfs.PS+(can.misc.Search(can, log.DEBUG) == ice.TRUE? "?debug=true": ""), web.SPACE) }, + "后台": function(event, can) { can.onimport.tabview(can, "", location.origin+"/chat/portal/"+(can.misc.Search(can, log.DEBUG) == ice.TRUE? "?debug=true": ""), web.SPACE) }, + "官网": function(event, can) { can.onimport.tabview(can, "", location.origin+"/wiki/portal/"+(can.misc.Search(can, log.DEBUG) == ice.TRUE? "?debug=true": ""), web.SPACE) }, insertLine: function(can, value, before) { var line = can.onaction.appendLine(can, value); before && can.ui.content.insertBefore(line, can.onaction._getLine(can, before)); return can.onaction.rerankLine(can), can.onexport.line(can, line) }, deleteLine: function(can, line) { line = can.onaction._getLine(can, line); var next = line.nextSibling||line.previousSibling; return can.page.Remove(can, line), can.onaction.rerankLine(can), next }, _selectLine: function(can) { can.current && can.page.Select(can, can.current.line, "td.text", function(td) { var target = can.ui.current; target.value = td.innerText diff --git a/plugin/local/team/plan.css b/plugin/local/team/plan.css index 56fc4d07..8c47dcd7 100644 --- a/plugin/local/team/plan.css +++ b/plugin/local/team/plan.css @@ -2,11 +2,10 @@ fieldset.plan>div.output td.content { position:relative; } fieldset.plan>div.output table.content.plan th { text-align:center; } fieldset.plan>div.output table.content.plan td { vertical-align:top; } fieldset.plan>div.output table.content.plan td.over { border:red solid 1px; } -fieldset.plan>div.output table.content.plan td.select { background-color:#5066b945; } -fieldset.plan>div.output table.content.plan td:hover { background-color:#5066b945; } -fieldset.plan>div.output table.content.plan td.over { background-color:#5066b945; } +fieldset.plan>div.output table.content.plan td.select { background-color:var(--hover-bg-color); } +fieldset.plan>div.output table.content.plan td:hover { background-color:var(--hover-bg-color); } +fieldset.plan>div.output table.content.plan td.over { background-color:var(--hover-bg-color); } fieldset.plan>div.output table.content.plan td div { color:white; } -// fieldset.plan>div.output table.content.plan td div:not(.date) { height:100%; text-align:center; } fieldset.plan>div.output table.content.plan td div.date { color:gray; } fieldset.plan>div.output table.content.plan td div.date span.lunar { font-size:12px; } fieldset.plan>div.output table.content.plan td div.date span.lunar.fest { color:red; } @@ -16,4 +15,4 @@ fieldset.plan>div.output table.content.plan td div.process { background-color:#0 fieldset.plan>div.output table.content.plan td div.cancel { background-color:#ff000070; } fieldset.plan>div.output table.content.plan td div.finish { background-color:gray; } fieldset.plan>div.output table.content.plan tr:first-child { height:30px; position:sticky; top:2px; } -fieldset.plan>div.output table.content.plan th:first-child { width:40px; position:sticky; left:2px; } \ No newline at end of file +fieldset.plan>div.output table.content.plan th:first-child { width:40px; position:sticky; left:2px; } diff --git a/plugin/local/wiki/data.css b/plugin/local/wiki/data.css index b49b0503..de58e26b 100644 --- a/plugin/local/wiki/data.css +++ b/plugin/local/wiki/data.css @@ -1,6 +1,2 @@ -fieldset.data div.output table.content tr.select { - background-color:gray; -} -fieldset.data div.output table.content tr.over { - background-color:gray; -} +fieldset.data div.output table.content tr.select { background-color:gray; } +fieldset.data div.output table.content tr.over { background-color:gray; } diff --git a/proto.js b/proto.js index 0b39e5ec..1871e14a 100644 --- a/proto.js +++ b/proto.js @@ -393,8 +393,10 @@ var Volcanos = shy({iceberg: "/chat/", volcano: "/frame.js", cache: {}, pack: {} }) try { if (typeof(window) == lang.OBJECT) { var meta = Volcanos.meta meta.target = document.body, meta._height = window.innerHeight, meta._width = window.innerWidth - if (window._version && (window.parent.outerWidth-window.parent.innerWidth < 100)) { meta.version = window._version } - meta._load = function(url, cb) { var v = meta.version? meta.version+"&_tt="+(new Date()).getTime(): "" + meta.version = window._version + var debug = location.search.indexOf("debug=true") > 0 && (window.parent.outerWidth-window.parent.innerWidth < 100) + if (window.parent.outerWidth - window.parent.innerWidth > 100) { meta.version = "", debug = false } + meta._load = function(url, cb) { var v = (meta.version||"")+(debug? "&_tt="+(new Date()).getTime(): "") switch (url.split(ice.QS)[0].split(nfs.PT).pop().toLowerCase()) { case nfs.CSS: var item = document.createElement(mdb.LINK); item.href = url+v, item.rel = "stylesheet", item.onload = cb, document.head.appendChild(item); break default: var item = document.createElement(nfs.SCRIPT); item.src = url+v, item.onerror = cb, item.onload = cb, document.body.appendChild(item) diff --git a/publish/chrome/contexts.css b/publish/chrome/contexts.css index d154eff8..98e0988f 100644 --- a/publish/chrome/contexts.css +++ b/publish/chrome/contexts.css @@ -108,61 +108,3 @@ fieldset.contexts div.item.text:hover>span.icon.delete { visibility:visible; } fieldset.contexts form.option>div.button.icons { display:none; } fieldset.contexts div.action>div.button.icons { display:none; } -/* https://redis.io/ */ -html, body.antialiased, main { background-color:var(--body-bg-color); color:var(--body-fg-color); } -main>div>nav>div.absolute { background:var(--body-bg-color); color:var(--body-fg-color); } -section.prose *:not(a):not(pre):not(code) { color:var(--body-fg-color); border-left-color:gray; } -main>div>nav span { background:var(--body-bg-color); color:var(--body-fg-color); } -main>section>div.w-52.z-40.hidden.overflow-auto.fixed { background-color:var(--body-bg-color); color:var(--body-fg-color); } -main>section>div.w-52.z-40.hidden.overflow-auto.fixed nav { background-color:var(--body-bg-color); color:var(--body-fg-color); } -@media (prefers-color-scheme: dark) { section.prose code { color:var(--body-fg-color); font-style:italic; } } - -/* https://blog.csdn.net/ */ -body { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div .toolbar-container { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div.main_father { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div aside.blog_container_aside * { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div aside div.aside-box h3.aside-title { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div aside div.aside-box { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div aside div.aside-box div.aside-content { background-color:var(--body-bg-color); color:var(--body-fg-color); } -.nodata .recommend-right_aside .kind_person .aside-content ul { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body main div.blog-content-box .article-header-box { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body .groupfile .pos-box .scroll-box .toc-box >ol li.active { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div main * { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div main div.blog-content-box { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div .programmer1Box { display:none; } - -/* https://zhuanlan.zhihu.com/ */ -body div .Post-content { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div .ColumnPageHeader { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div .ContentItem-actions { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body #blogColumnPayAdvert .column-group-item, body #blogHuaweiyunAdvert .column-group-item { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div .markdown_views blockquote { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body main div.blog-content-box .article-header-box .article-header div.article-title-box .title-article { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body main div .markdown_views * { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body .more-toolbox-new .left-toolbox { display:none; } -body .csdn-side-toolbar { display:none; } -body #footerRightAds { display:none; } -body div.box-shadow.mb8 { display:none; } - -/* https://cn.bing.com/ */ -body header#b_header { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div #b_results .b_algo.b_rc_gb_template.b_algoBorder { background:var(--body-bg-color); color:var(--body-fg-color); } -body div .b_rc_gb_text_cell_wrapper>div:last-child { background:var(--body-bg-color); color:var(--body-fg-color); } -body div #b_results>.b_algo { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div #b_results .b_ans.b_nwsAns { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div #b_results .b_algoBigWiki .b_widgetContainer, body div #b_results .b_rc_gb_template .b_widgetContainer { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div .b_rc_gb_w_content { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body .b_searchboxForm { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body #b_header .b_searchbox { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body #sw_as .sa_drw .sa_sg { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body #b_results .b_rc_gb_sub .b_paractl { background-color:var(--body-bg-color); color:var(--body-fg-color); } - -/* https://juejin.cn/ */ -body div#juejin div.view-container { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div#juejin div.main-header-box header { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div#juejin article { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div#juejin .article-suspended-panel { display:none; } -body div#juejin .markdown-body blockquote { background-color:var(--body-bg-color); color:var(--body-fg-color); } -body div#juejin .sidebar .sidebar-block { background-color:var(--body-bg-color); color:var(--body-fg-color); } -