1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
shaoying 2022-12-17 09:11:41 +08:00
parent 16618a388f
commit 48eab473bd
2 changed files with 23 additions and 4 deletions

View File

@ -179,9 +179,9 @@ var _main_template = `<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=0.8,maximum-scale=0.8,user-scalable=no">
<meta charset="utf-8"><title>volcanos</title>
<link rel="shortcut icon" type="image/ico" href="/favicon.ico">
<link rel="stylesheet" href="/page/cache.css">
<link rel="stylesheet" href="/page/index.css">
<link href="/favicon.ico" rel="shortcut icon" type="image/ico">
<link href="/page/cache.css" rel="stylesheet">
<link href="/page/index.css" rel="stylesheet">
</head>
<body>
<script src="/proto.js"></script>
@ -194,7 +194,7 @@ var _cmd_template = `<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=0.8,maximum-scale=0.8,user-scalable=no">
<meta charset="utf-8"><title>volcanos</title>
<link rel="stylesheet" href="/page/can.css">
<link href="/page/can.css" rel="stylesheet">
</head>
<body>
<script src="/page/can.js"></script><script>Volcanos(%s)</script>

19
core/code/html.go Normal file
View File

@ -0,0 +1,19 @@
package code
import (
"path"
ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/mdb"
kit "shylinux.com/x/toolkits"
)
func init() {
Index.MergeCommands(ice.Commands{
HTML: {Name: "html path auto", Help: "网页", Actions: ice.MergeActions(ice.Actions{
mdb.RENDER: {Hand: func(m *ice.Message, arg ...string) {
m.Echo(`<iframe src="%s"></iframe>`, kit.MergeURL(path.Join("/require/", arg[2], arg[1]), "_", kit.Hashs("uniq")))
}},
}, PlugAction())},
})
}