web: migrate templates back to django

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-06-05 19:38:24 +02:00
parent 0b90cfcec4
commit e43e42139a
3 changed files with 0 additions and 19 deletions

View File

@ -30,17 +30,6 @@ func (ws *WebServer) configureStatic() {
rw.WriteHeader(200)
rw.Write(staticWeb.SecurityTxt)
})
// Interfaces
ws.lh.Path("/if/admin/").HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
rw.Header()["Content-Type"] = []string{"text/html"}
rw.WriteHeader(200)
rw.Write(staticWeb.InterfaceAdmin)
})
ws.lh.Path("/if/flow/{slug}/").HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
rw.Header()["Content-Type"] = []string{"text/html"}
rw.WriteHeader(200)
rw.Write(staticWeb.InterfaceFlow)
})
// Media files, always local
ws.lh.PathPrefix("/media").Handler(http.StripPrefix("/media", http.FileServer(http.Dir(config.G.Paths.Media))))
}

View File

@ -23,8 +23,6 @@ const resources = [
{ src: "src/authentik.css", dest: "dist/" },
{ src: "node_modules/@patternfly/patternfly/assets/*", dest: "dist/assets/" },
{ src: "src/interfaces/admin/index.html", dest: "dist/if/admin/" },
{ src: "src/interfaces/flow/index.html", dest: "dist/if/flow/" },
{ src: "src/assets/*", dest: "dist/assets" },
{ src: "./icons/*", dest: "dist/assets/icons" },
];

View File

@ -8,12 +8,6 @@ var StaticDist embed.FS
//go:embed authentik
var StaticAuthentik embed.FS
//go:embed dist/if/flow/index.html
var InterfaceFlow []byte
//go:embed dist/if/admin/index.html
var InterfaceAdmin []byte
//go:embed robots.txt
var RobotsTxt []byte