Initial commit
This commit is contained in:
commit
d2eba2e5a8
32 changed files with 1195 additions and 0 deletions
assets
1
assets/.gitignore
vendored
Normal file
1
assets/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*_vfsdata.go
|
32
assets/dev.go
Normal file
32
assets/dev.go
Normal file
|
@ -0,0 +1,32 @@
|
|||
// +build dev
|
||||
|
||||
package assets
|
||||
|
||||
import (
|
||||
"go/build"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/shurcooL/httpfs/union"
|
||||
)
|
||||
|
||||
// Assets contains files that will be included in the binary
|
||||
// this is a union file system, so to reach the expected file
|
||||
// the root folder defined in the map should be prepended
|
||||
// to the file path
|
||||
var Assets = union.New(map[string]http.FileSystem{
|
||||
"/migrations": http.Dir(importPathToDir("bitmask.me/skeleton/assets/migrations")),
|
||||
"/templates": http.Dir(importPathToDir("bitmask.me/skeleton/assets/templates")),
|
||||
"/static": http.Dir(importPathToDir("bitmask.me/skeleton/assets/static")),
|
||||
})
|
||||
|
||||
// importPathToDir is a helper function that resolves the absolute path of
|
||||
// modules, so they can be used both in dev mode (`-tags="dev"`) or with a
|
||||
// generated static asset file (`go generate`).
|
||||
func importPathToDir(importPath string) string {
|
||||
p, err := build.Import(importPath, "", build.FindOnly)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
return p.Dir
|
||||
}
|
6
assets/doc.go
Normal file
6
assets/doc.go
Normal file
|
@ -0,0 +1,6 @@
|
|||
//go:generate vfsgendev -source="bitmask.me/skeleton/assets".Assets
|
||||
|
||||
// Package assets contains assets for the service, that will be embedded into
|
||||
// the binary.
|
||||
// Generate by running `go generate bitmask.me/skeleton/assets`.
|
||||
package assets
|
1
assets/migrations/0_empty.up.sql
Normal file
1
assets/migrations/0_empty.up.sql
Normal file
|
@ -0,0 +1 @@
|
|||
-- this file is only here so the database can track a completely empty state.
|
0
assets/static/css/index.html
Normal file
0
assets/static/css/index.html
Normal file
0
assets/static/images/index.html
Normal file
0
assets/static/images/index.html
Normal file
0
assets/static/index.html
Normal file
0
assets/static/index.html
Normal file
3
assets/templates/includes/smiley.tmpl
Normal file
3
assets/templates/includes/smiley.tmpl
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ define "smiley" }}
|
||||
:)
|
||||
{{- end }}
|
17
assets/templates/layouts/landing.tmpl
Normal file
17
assets/templates/layouts/landing.tmpl
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Landing Page</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Skeleton Project</h1>
|
||||
|
||||
If you are an admin, you can <a href="/login">Log in</a>.
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue