summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--cmd/ponzu/main.go (renamed from cmd/cms/main.go)6
-rw-r--r--cmd/ponzu/options.go (renamed from cmd/cms/options.go)2
-rw-r--r--content/post.go10
-rw-r--r--management/manager/manager.go2
-rw-r--r--management/manager/process.go2
-rw-r--r--system/admin/admin.go4
-rw-r--r--system/admin/cache.go2
-rw-r--r--system/admin/config/config.go4
-rw-r--r--system/admin/handlers.go12
-rw-r--r--system/admin/server.go2
-rw-r--r--system/api/handlers.go4
-rw-r--r--system/db/config.go2
-rw-r--r--system/db/content.go6
-rw-r--r--system/db/init.go4
-rw-r--r--system/db/user.go2
16 files changed, 37 insertions, 29 deletions
diff --git a/README.md b/README.md
index 80f1444..2ee6e2d 100644
--- a/README.md
+++ b/README.md
@@ -5,5 +5,5 @@ Creating a CMS thing for Go developers. Not ready for use, but would be happy
to get thoughts/feedback!
```
-$ go get github.com/nilslice/cms/...
+$ go get github.com/bosssauce/ponzu/...
``` \ No newline at end of file
diff --git a/cmd/cms/main.go b/cmd/ponzu/main.go
index c2f1bf1..5043753 100644
--- a/cmd/cms/main.go
+++ b/cmd/ponzu/main.go
@@ -7,9 +7,9 @@ import (
"net/http"
"os"
- "github.com/nilslice/cms/system/admin"
- "github.com/nilslice/cms/system/api"
- "github.com/nilslice/cms/system/db"
+ "github.com/bosssauce/ponzu/system/admin"
+ "github.com/bosssauce/ponzu/system/api"
+ "github.com/bosssauce/ponzu/system/db"
)
var usage = `
diff --git a/cmd/cms/options.go b/cmd/ponzu/options.go
index 94c809f..e893753 100644
--- a/cmd/cms/options.go
+++ b/cmd/ponzu/options.go
@@ -57,7 +57,7 @@ package content
import (
"fmt"
- "github.com/nilslice/cms/management/editor"
+ "github.com/bosssauce/ponzu/management/editor"
)
// {{ .name }} is the generic content struct
diff --git a/content/post.go b/content/post.go
index efa83e8..e08106c 100644
--- a/content/post.go
+++ b/content/post.go
@@ -3,7 +3,7 @@ package content
import (
"fmt"
- "github.com/nilslice/cms/management/editor"
+ "github.com/bosssauce/ponzu/management/editor"
)
// Post is the generic content struct
@@ -13,6 +13,7 @@ type Post struct {
Title string `json:"title"`
Content string `json:"content"`
+ Photo string `json:"photo"`
Author string `json:"author"`
Category []string `json:"category"`
ThemeStyle string `json:"theme"`
@@ -54,6 +55,13 @@ func (p *Post) MarshalEditor() ([]byte, error) {
}),
},
editor.Field{
+ View: editor.File("Photo", p, map[string]string{
+ "label": "Author Photo",
+ "type": "file",
+ "placeholder": "Select a file to upload.",
+ }),
+ },
+ editor.Field{
View: editor.Input("Author", p, map[string]string{
"label": "Author",
"type": "text",
diff --git a/management/manager/manager.go b/management/manager/manager.go
index d69b810..c0056ac 100644
--- a/management/manager/manager.go
+++ b/management/manager/manager.go
@@ -5,7 +5,7 @@ import (
"fmt"
"html/template"
- "github.com/nilslice/cms/management/editor"
+ "github.com/bosssauce/ponzu/management/editor"
)
const managerHTML = `
diff --git a/management/manager/process.go b/management/manager/process.go
index d2d3d96..f34bebd 100644
--- a/management/manager/process.go
+++ b/management/manager/process.go
@@ -5,7 +5,7 @@ import (
"strings"
"unicode"
- "github.com/nilslice/cms/management/editor"
+ "github.com/bosssauce/ponzu/management/editor"
"golang.org/x/text/transform"
"golang.org/x/text/unicode/norm"
)
diff --git a/system/admin/admin.go b/system/admin/admin.go
index e8c4287..b375eb6 100644
--- a/system/admin/admin.go
+++ b/system/admin/admin.go
@@ -6,8 +6,8 @@ import (
"bytes"
"html/template"
- "github.com/nilslice/cms/content"
- "github.com/nilslice/cms/system/db"
+ "github.com/bosssauce/ponzu/content"
+ "github.com/bosssauce/ponzu/system/db"
)
var startAdminHTML = `<!doctype html>
diff --git a/system/admin/cache.go b/system/admin/cache.go
index 9962249..0de45af 100644
--- a/system/admin/cache.go
+++ b/system/admin/cache.go
@@ -5,7 +5,7 @@ import (
"net/http"
"strings"
- "github.com/nilslice/cms/system/db"
+ "github.com/bosssauce/ponzu/system/db"
)
// CacheControl sets the default cache policy on static asset responses
diff --git a/system/admin/config/config.go b/system/admin/config/config.go
index cd27054..c5ef1cd 100644
--- a/system/admin/config/config.go
+++ b/system/admin/config/config.go
@@ -1,8 +1,8 @@
package config
import (
- "github.com/nilslice/cms/content"
- "github.com/nilslice/cms/management/editor"
+ "github.com/bosssauce/ponzu/content"
+ "github.com/bosssauce/ponzu/management/editor"
)
//Config represents the confirgurable options of the system
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 1e8ba4f..623bcea 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -12,12 +12,12 @@ import (
"strings"
"time"
- "github.com/nilslice/cms/content"
- "github.com/nilslice/cms/management/editor"
- "github.com/nilslice/cms/management/manager"
- "github.com/nilslice/cms/system/admin/config"
- "github.com/nilslice/cms/system/admin/user"
- "github.com/nilslice/cms/system/db"
+ "github.com/bosssauce/ponzu/content"
+ "github.com/bosssauce/ponzu/management/editor"
+ "github.com/bosssauce/ponzu/management/manager"
+ "github.com/bosssauce/ponzu/system/admin/config"
+ "github.com/bosssauce/ponzu/system/admin/user"
+ "github.com/bosssauce/ponzu/system/db"
"github.com/nilslice/jwt"
)
diff --git a/system/admin/server.go b/system/admin/server.go
index 2c84479..312a3de 100644
--- a/system/admin/server.go
+++ b/system/admin/server.go
@@ -3,7 +3,7 @@ package admin
import (
"net/http"
- "github.com/nilslice/cms/system/admin/user"
+ "github.com/bosssauce/ponzu/system/admin/user"
)
// Run adds Handlers to default http listener for Admin
diff --git a/system/api/handlers.go b/system/api/handlers.go
index c1519e5..5fb79bc 100644
--- a/system/api/handlers.go
+++ b/system/api/handlers.go
@@ -6,8 +6,8 @@ import (
"log"
"net/http"
- "github.com/nilslice/cms/content"
- "github.com/nilslice/cms/system/db"
+ "github.com/bosssauce/ponzu/content"
+ "github.com/bosssauce/ponzu/system/db"
)
func typesHandler(res http.ResponseWriter, req *http.Request) {
diff --git a/system/db/config.go b/system/db/config.go
index 5bee0b3..bf531f7 100644
--- a/system/db/config.go
+++ b/system/db/config.go
@@ -9,8 +9,8 @@ import (
"time"
"github.com/boltdb/bolt"
+ "github.com/bosssauce/ponzu/system/admin/config"
"github.com/gorilla/schema"
- "github.com/nilslice/cms/system/admin/config"
)
var configCache url.Values
diff --git a/system/db/content.go b/system/db/content.go
index cbe4f14..eaf43e8 100644
--- a/system/db/content.go
+++ b/system/db/content.go
@@ -9,10 +9,10 @@ import (
"strings"
"github.com/boltdb/bolt"
+ "github.com/bosssauce/ponzu/content"
+ "github.com/bosssauce/ponzu/management/editor"
+ "github.com/bosssauce/ponzu/management/manager"
"github.com/gorilla/schema"
- "github.com/nilslice/cms/content"
- "github.com/nilslice/cms/management/editor"
- "github.com/nilslice/cms/management/manager"
)
// SetContent inserts or updates values in the database.
diff --git a/system/db/init.go b/system/db/init.go
index 008449f..1d94385 100644
--- a/system/db/init.go
+++ b/system/db/init.go
@@ -5,8 +5,8 @@ import (
"log"
"github.com/boltdb/bolt"
- "github.com/nilslice/cms/content"
- "github.com/nilslice/cms/system/admin/config"
+ "github.com/bosssauce/ponzu/content"
+ "github.com/bosssauce/ponzu/system/admin/config"
"github.com/nilslice/jwt"
)
diff --git a/system/db/user.go b/system/db/user.go
index e205a47..f6bc4db 100644
--- a/system/db/user.go
+++ b/system/db/user.go
@@ -6,7 +6,7 @@ import (
"errors"
"github.com/boltdb/bolt"
- "github.com/nilslice/cms/system/admin/user"
+ "github.com/bosssauce/ponzu/system/admin/user"
)
// ErrUserExists is used for the db to report to admin user of existing user