feat: update web-editor

This commit is contained in:
Manfred Touron
2020-05-20 13:22:18 +02:00
parent a0668cce22
commit 1c966f6e9f
7 changed files with 168 additions and 17 deletions

View File

@@ -11,6 +11,7 @@ import (
"os/exec"
"path/filepath"
packr "github.com/gobuffalo/packr/v2"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
)
@@ -101,7 +102,9 @@ func returnError(w http.ResponseWriter, err error) {
func main() {
r := mux.NewRouter()
r.Handle("/", http.FileServer(http.Dir("static")))
box := packr.New("static", "./static")
r.Handle("/", http.FileServer(box))
r.HandleFunc("/generate", generate)
addr := fmt.Sprintf(":%s", os.Getenv("PORT"))
if addr == ":" {

View File

@@ -90,7 +90,7 @@
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/github.min.css">
<style>.ace_editor { height: 80%; }</style>
<style>.ace_editor { height: 80%; min-height: 500px; }</style>
</head>
<body ng-app="pggt">
<div class="container-fluid" ng-controller="PggtCtrl">