From 723f628c3163e7de0659dab92eb8cb09e7848190 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sat, 16 Nov 2019 08:49:07 -0500 Subject: [PATCH] frontend theming; md content-types --- entry/entry.go | 6 + frontend/package.json | 3 + frontend/public/index.html | 2 +- frontend/src/App.vue | 27 +- frontend/src/components/Editor.vue | 12 +- frontend/src/components/MainView.vue | 27 +- frontend/src/components/Search.vue | 15 +- frontend/src/main.js | 6 +- frontend/src/views/Console.vue | 25 +- frontend/yarn.lock | 477 +++++++++++++++++++++++++-- web/entry.go | 26 ++ web/routes.go | 15 + 12 files changed, 569 insertions(+), 72 deletions(-) diff --git a/entry/entry.go b/entry/entry.go index 18a46d1..41a06f1 100644 --- a/entry/entry.go +++ b/entry/entry.go @@ -52,6 +52,12 @@ func PrepareTable(tx *sqlx.Tx) error { return nil } +func NewFromMd(db *db.Database, body string) *Entry { + e := New(db) + e.Content = body + return e +} + func New(db *db.Database) *Entry { e := Entry{ db: db, diff --git a/frontend/package.json b/frontend/package.json index c1386ee..9c2958b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,6 +12,7 @@ "axios": "^0.19.0", "bootstrap": "^4.3.1", "bootstrap-vue": "^2.0.4", + "bootswatch": "^4.3.1", "brace": "latest", "core-js": "^3.3.2", "lodash": "^4.17.15", @@ -29,6 +30,8 @@ "babel-eslint": "^10.0.3", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.0.0", + "sass": "^4.13.0", + "sass-loader": "^8.0.0", "vue-template-compiler": "^2.6.10" } } diff --git a/frontend/public/index.html b/frontend/public/index.html index 1fe8d73..e747196 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -5,7 +5,7 @@ - frontend + Cabinet