Skip to content

Commit

Permalink
移除css时钟
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyiwy committed Dec 13, 2019
1 parent 81a1cd6 commit 133bad6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 120 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.12

require (
github.com/gin-gonic/gin v1.4.0
github.com/jinzhu/gorm v1.9.10
github.com/lib/pq v1.1.1
github.com/pkg/sftp v1.10.1 // indirect
github.com/tdewolff/minify v2.3.6+incompatible
github.com/tdewolff/minify/v2 v2.5.0
Expand Down
16 changes: 8 additions & 8 deletions script/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ import (
"strings"
)

const buildDir = "build"
const buildDir = "./build"
const tempDir = buildDir + "/oktools"

const srcTplDir = "tpl"
const srcTplDir = "./tpl"
const dstTplDir = tempDir + "/tpl/"

const srcCSSDir = "static/css"
const srcCSSDir = "./static/css"
const dstCSSDir = tempDir + "/static/css/"

const srcJSDir = "static/js"
const srcJSDir = "./static/js"
const dstJSDir = tempDir + "/static/js/"

func main() {
Expand All @@ -49,7 +49,7 @@ func buildGo() {
err = os.Setenv("GOARCH", "amd64")
checkError(err)

cmd := exec.Command("go", "build", "-o", tempDir+"/oktools", "-i", "src")
cmd := exec.Command("go", "build", "-o", tempDir+"/oktools", "-i", "./src")
cmd.Stderr = os.Stderr
out, err := cmd.Output()
checkError(err)
Expand All @@ -68,9 +68,9 @@ func minifyStatic() {
}

func copyFiles() {
copyDir("sql", tempDir+"/sql")
copyFile("static/favicon.ico", tempDir+"/static/favicon.ico")
copyFile("conf.yaml", tempDir+"/conf.yaml")
copyDir("./sql", tempDir+"/sql")
copyFile("./static/favicon.ico", tempDir+"/static/favicon.ico")
copyFile("./conf.yaml", tempDir+"/conf.yaml")
}

func minifyFiles(m *minify.M, mimeType, src, dst string) {
Expand Down
1 change: 0 additions & 1 deletion src/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func initRouter() *gin.Engine {
r.GET("/json2xml", contoller.JSON2XML, middleware.UsageCount)
r.GET("/json2yaml", contoller.JSON2YAML, middleware.UsageCount)
r.GET("/pdf2img", contoller.PDF2IMG, middleware.UsageCount)
r.GET("/clocks", contoller.Clocks, middleware.UsageCount)

r.GET("/websocket", func(c *gin.Context) {
c.Redirect(http.StatusMovedPermanently, "http://oktools.net/websocket")
Expand Down
1 change: 0 additions & 1 deletion tpl/aside.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ <h1 class="logo"><a href="/">OKTools</a></h1>
<li><a href="http://oktools.net/websocket">WebSocket测试</a></li>
<li><a href="/regex">正则表达式测试</a></li>
<li><a href="/placeholder">SVG占位图</a></li>
<li><a href="/clocks">CSS时钟</a></li>
</ul>
</nav>
</aside>
Expand Down
109 changes: 0 additions & 109 deletions tpl/clocks.html

This file was deleted.

0 comments on commit 133bad6

Please sign in to comment.