mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt background
This commit is contained in:
parent
e83c6acc82
commit
d1455c36f5
5
frame.js
5
frame.js
@ -613,7 +613,10 @@ Volcanos("onmotion", {help: "动态交互", list: [], _init: function(can) {
|
|||||||
can.page.Modify(can, target, {style: {opacity: 1}})
|
can.page.Modify(can, target, {style: {opacity: 1}})
|
||||||
can.core.Timer(time, function(event, value, index) {
|
can.core.Timer(time, function(event, value, index) {
|
||||||
can.page.Modify(can, target, {style: {opacity: 1-(index+1)/time.length}})
|
can.page.Modify(can, target, {style: {opacity: 1-(index+1)/time.length}})
|
||||||
}, cb)
|
}, function() {
|
||||||
|
can.page.Modify(can, target, {style: {display: "none"}})
|
||||||
|
typeof cb == "function" && cb
|
||||||
|
})
|
||||||
},
|
},
|
||||||
clear: function(can, target) {
|
clear: function(can, target) {
|
||||||
can.page.Modify(can, target||can._output, "")
|
can.page.Modify(can, target||can._output, "")
|
||||||
|
14
index.css
14
index.css
@ -78,7 +78,7 @@ table {
|
|||||||
cursor:pointer; overflow: auto;
|
cursor:pointer; overflow: auto;
|
||||||
}
|
}
|
||||||
table tr {
|
table tr {
|
||||||
background:#04272f;
|
background:#04272f85;
|
||||||
}
|
}
|
||||||
table tr:hover {
|
table tr:hover {
|
||||||
background-color:#0fbd45;
|
background-color:#0fbd45;
|
||||||
@ -105,7 +105,7 @@ h1 {
|
|||||||
margin:0;
|
margin:0;
|
||||||
}
|
}
|
||||||
div.code {
|
div.code {
|
||||||
background-color:#343a34f2; color:white;
|
background-color:#343a34c4; color:white;
|
||||||
font-size:14px; font-family:monospace;
|
font-size:14px; font-family:monospace;
|
||||||
box-shadow: 4px 4px 20px 4px #626bd0;
|
box-shadow: 4px 4px 20px 4px #626bd0;
|
||||||
padding:10px; border:solid 3px green;
|
padding:10px; border:solid 3px green;
|
||||||
@ -280,10 +280,11 @@ body.white select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body.white fieldset.Action {
|
body.white fieldset.Action {
|
||||||
background-color:#0dabda;
|
background-color:#81b3c1c9;
|
||||||
}
|
}
|
||||||
body.white fieldset.Action fieldset.plugin {
|
body.white fieldset.Action fieldset.plugin {
|
||||||
background-color:white; color:black;
|
background-color:#ffffff9c;
|
||||||
|
color:black;
|
||||||
}
|
}
|
||||||
body.white fieldset.Action fieldset.plugin legend {
|
body.white fieldset.Action fieldset.plugin legend {
|
||||||
background-color:#339999; color:white;
|
background-color:#339999; color:white;
|
||||||
@ -294,10 +295,11 @@ body.white fieldset.Action fieldset.plugin legend:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body.white fieldset.plugin table {
|
body.white fieldset.plugin table {
|
||||||
background-color:white; color:black;
|
/* background-color:white; */
|
||||||
|
color:black;
|
||||||
}
|
}
|
||||||
body.white fieldset.plugin table tr {
|
body.white fieldset.plugin table tr {
|
||||||
background-color:#e1f1ff;
|
background-color:#e1f1ff6b;
|
||||||
}
|
}
|
||||||
body.white fieldset.plugin table tr:hover {
|
body.white fieldset.plugin table tr:hover {
|
||||||
background-color:#99CCFF;
|
background-color:#99CCFF;
|
||||||
|
@ -5,7 +5,7 @@ fieldset.Action {
|
|||||||
}
|
}
|
||||||
fieldset.Action fieldset.plugin {
|
fieldset.Action fieldset.plugin {
|
||||||
box-shadow:2px 2px 10px 4px #626bd0;
|
box-shadow:2px 2px 10px 4px #626bd0;
|
||||||
background-color:#113c4a;
|
background-color:#113c4a9e;
|
||||||
margin:10px; padding:10px;
|
margin:10px; padding:10px;
|
||||||
}
|
}
|
||||||
fieldset.Action fieldset.plugin:hover {
|
fieldset.Action fieldset.plugin:hover {
|
||||||
|
@ -101,17 +101,15 @@ Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg,
|
|||||||
|
|
||||||
can.core.List(fields, function(key) {
|
can.core.List(fields, function(key) {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case "type":
|
case "ctx": msg.Push(key, "web.chat"); break
|
||||||
msg.Push(key, "fieldset")
|
case "cmd": msg.Push(key, "action"); break
|
||||||
break
|
case "type": msg.Push(key, "fieldset"); break
|
||||||
case "name":
|
case "name": msg.Push(key, item.innerHTML); break
|
||||||
msg.Push(key, item.innerHTML)
|
|
||||||
break
|
|
||||||
case "text":
|
case "text":
|
||||||
msg.Push(key, function() {
|
msg.Push(key, shy("跳转", function() {
|
||||||
var input = can.page.Select(can, item.parentNode, "input.args")[0]
|
var input = can.page.Select(can, item.parentNode, "input.args")[0]
|
||||||
input && input.focus()
|
input && input.focus()
|
||||||
})
|
}))
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
msg.Push(key, "")
|
msg.Push(key, "")
|
||||||
|
@ -8,6 +8,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
|||||||
"white": "白色主题",
|
"white": "白色主题",
|
||||||
"black": "黑色主题",
|
"black": "黑色主题",
|
||||||
"print": "打印主题",
|
"print": "打印主题",
|
||||||
|
"background": "背景图片",
|
||||||
"logout": "退出",
|
"logout": "退出",
|
||||||
}
|
}
|
||||||
can.onmotion.clear(can)
|
can.onmotion.clear(can)
|
||||||
@ -16,8 +17,15 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
|||||||
can.onimport._search(can, msg, target)
|
can.onimport._search(can, msg, target)
|
||||||
can.onimport._agent(can, msg, target)
|
can.onimport._agent(can, msg, target)
|
||||||
can.onimport._menu(can, msg, target)
|
can.onimport._menu(can, msg, target)
|
||||||
|
can.onimport._background(can, msg, target)
|
||||||
typeof cb == "function" && cb(msg)
|
typeof cb == "function" && cb(msg)
|
||||||
},
|
},
|
||||||
|
_background: function(can, msg, target) { if (!msg.Option("background")) { return }
|
||||||
|
can.page.Modify(can, document.body, {style: {background: 'url("'+msg.Option("background")+'")'}})
|
||||||
|
can.page.Select(can, document.body, "fieldset.pane.Action", function(item) {
|
||||||
|
can.page.Modify(can, item, {style: {background: 'url("'+msg.Option("background")+'")'}})
|
||||||
|
})
|
||||||
|
},
|
||||||
_title: function(can, msg, target) {
|
_title: function(can, msg, target) {
|
||||||
can.user.title(can.user.Search(can, TITLE) || can.user.Search(can, POD))
|
can.user.title(can.user.Search(can, TITLE) || can.user.Search(can, POD))
|
||||||
can.user.isMobile || can.core.List(msg.result||["github.com/shylinux/contexts"], function(item) {
|
can.user.isMobile || can.core.List(msg.result||["github.com/shylinux/contexts"], function(item) {
|
||||||
@ -165,12 +173,17 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, msg,
|
|||||||
|
|
||||||
river: function(event, can) { can.run(event, ["search", "River.onmotion.toggle"]) },
|
river: function(event, can) { can.run(event, ["search", "River.onmotion.toggle"]) },
|
||||||
setting: function(event, can) {
|
setting: function(event, can) {
|
||||||
var ui = can.user.carte(event, can, can.onaction, ["pack", "white", "black", "print"])
|
var ui = can.user.carte(event, can, can.onaction, ["pack", "white", "black", "print", "background"])
|
||||||
can.page.Modify(can, ui.first, {style: {top: can._target.offsetHeight}})
|
can.page.Modify(can, ui.first, {style: {top: can._target.offsetHeight}})
|
||||||
},
|
},
|
||||||
black: function(event, can, button) { can.onlayout.topic(can, button) },
|
black: function(event, can, button) { can.onlayout.topic(can, button) },
|
||||||
white: function(event, can, button) { can.onlayout.topic(can, button) },
|
white: function(event, can, button) { can.onlayout.topic(can, button) },
|
||||||
print: function(event, can, button) { can.onlayout.topic(can, "white print") },
|
print: function(event, can, button) { can.onlayout.topic(can, "white print") },
|
||||||
|
background: function(event, can, button) { can.user.input(event, can, ["url"], function(ev, button, data, list) {
|
||||||
|
can.run(event, ["action", "background", list[0]], function(msg) {
|
||||||
|
can.onimport._background(can, msg)
|
||||||
|
})
|
||||||
|
}) },
|
||||||
|
|
||||||
River: function(can) { can.run({}, ["search", "River.onmotion.toggle"]) },
|
River: function(can) { can.run({}, ["search", "River.onmotion.toggle"]) },
|
||||||
Footer: function(can) { can.run({}, ["search", "River.onmotion.autosize"]) },
|
Footer: function(can) { can.run({}, ["search", "River.onmotion.autosize"]) },
|
||||||
|
@ -18,7 +18,7 @@ fieldset.River>div.output div.list {
|
|||||||
}
|
}
|
||||||
fieldset.River>div.output div.list div.item {
|
fieldset.River>div.output div.list div.item {
|
||||||
border-left:solid 3px #ccdc4c;
|
border-left:solid 3px #ccdc4c;
|
||||||
background-color:#073540;
|
background-color:#073540b5;
|
||||||
}
|
}
|
||||||
fieldset.River>div.output div.list div.item:hover {
|
fieldset.River>div.output div.list div.item:hover {
|
||||||
background-color:#2e515f;
|
background-color:#2e515f;
|
||||||
|
@ -5,8 +5,11 @@ fieldset.Search {
|
|||||||
background:black;
|
background:black;
|
||||||
z-index:10;
|
z-index:10;
|
||||||
}
|
}
|
||||||
|
fieldset.Search input.word{
|
||||||
|
width:320px;
|
||||||
|
}
|
||||||
fieldset.Search div.output div.content {
|
fieldset.Search div.output div.content {
|
||||||
max-height:200px;
|
max-height:400px;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
}
|
}
|
||||||
fieldset.Search div.output div.display {
|
fieldset.Search div.output div.display {
|
||||||
|
@ -5,7 +5,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
|||||||
can.onappend.table(can, msg, can.ui.content, "table", function(value, key, index, line) {
|
can.onappend.table(can, msg, can.ui.content, "table", function(value, key, index, line) {
|
||||||
can.Status("count", index+1)
|
can.Status("count", index+1)
|
||||||
|
|
||||||
return {text: [value, "td"], onclick: function(event) {
|
return {text: [key == "text" && typeof line.text == "function" && line.text.help || value, "td"], onclick: function(event) {
|
||||||
if (typeof line.text == "function") {
|
if (typeof line.text == "function") {
|
||||||
can.onmotion.hide(can)
|
can.onmotion.hide(can)
|
||||||
line.text()
|
line.text()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user