From 6690f6a70eb319c1156f8a1bb7465e048567580a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Tue, 21 Nov 2017 19:37:47 -0800 Subject: [PATCH] Add bookmarklet --- README.md | 2 +- config/config.go | 4 ++ locale/translations.go | 11 ++-- locale/translations/fr_FR.json | 7 ++- server/core/handler.go | 8 ++- server/core/html_response.go | 2 +- server/core/response.go | 4 +- server/routes.go | 8 ++- server/server.go | 10 ++-- server/static/bin.go | 2 +- server/static/css.go | 6 +-- server/static/css/common.css | 15 ++++++ server/static/js.go | 2 +- server/template/common.go | 2 +- server/template/html/about.html | 3 ++ server/template/html/create_user.html | 3 ++ server/template/html/edit_user.html | 3 ++ server/template/html/integrations.html | 35 +++++++++++++ server/template/html/sessions.html | 3 ++ server/template/html/settings.html | 3 ++ server/template/html/users.html | 3 ++ server/template/template.go | 44 +++++++++------- server/template/views.go | 69 +++++++++++++++++++++++--- server/ui/controller/integrations.go | 20 ++++++++ server/ui/controller/subscription.go | 21 +++++++- sql/sql.go | 2 +- 26 files changed, 244 insertions(+), 48 deletions(-) create mode 100644 server/template/html/integrations.html create mode 100644 server/ui/controller/integrations.go diff --git a/README.md b/README.md index 564fdb72..90d349af 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ TODO - [ ] Custom entries sorting - [ ] Webpage scraper (Readability) -- [ ] Bookmarklet +- [X] Bookmarklet - [ ] External integrations (Pinboard, Wallabag...) - [ ] Gzip compression - [ ] Integration tests diff --git a/config/config.go b/config/config.go index 42fb2090..fb462f8f 100644 --- a/config/config.go +++ b/config/config.go @@ -9,6 +9,10 @@ import ( "strconv" ) +const ( + DefaultBaseURL = "http://localhost" +) + type Config struct { } diff --git a/locale/translations.go b/locale/translations.go index f4532a23..ed17220d 100644 --- a/locale/translations.go +++ b/locale/translations.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-21 15:41:59.495654213 -0800 PST m=+0.041889871 +// 2017-11-21 19:31:59.645632989 -0800 PST m=+0.024631837 package locale @@ -139,12 +139,17 @@ var Translations = map[string]string{ "Work in progress...": "Travail en cours...", "This user already exists.": "Cet utilisateur existe déjà.", "This category already exists.": "Cette catégorie existe déjà.", - "Unable to update this category.": "Impossible de mettre à jour cette catégorie." + "Unable to update this category.": "Impossible de mettre à jour cette catégorie.", + "Integrations": "Intégrations", + "Bookmarklet": "Bookmarklet", + "Drag and drop this link to your bookmarks.": "Glisser-déposer ce lien dans vos favoris.", + "This special link allows you to subscribe to a website directly by using a bookmark in your web browser.": "Ce lien spécial vous permet de vous abonner à un site web directement en utilisant un marque page dans votre navigateur web.", + "Add to Miniflux": "Ajouter à Miniflux" } `, } var TranslationsChecksums = map[string]string{ "en_US": "6fe95384260941e8a5a3c695a655a932e0a8a6a572c1e45cb2b1ae8baa01b897", - "fr_FR": "5c8c2c5e35a17a7dd3c30596b73342f70950a3bbce00786d43ccba01b96ea672", + "fr_FR": "f1ddbcfb8ffd837a2df69e8506d023e4254ead2f0b94e518ab595df97d32c87a", } diff --git a/locale/translations/fr_FR.json b/locale/translations/fr_FR.json index 9cbe2200..a0206bad 100644 --- a/locale/translations/fr_FR.json +++ b/locale/translations/fr_FR.json @@ -123,5 +123,10 @@ "Work in progress...": "Travail en cours...", "This user already exists.": "Cet utilisateur existe déjà.", "This category already exists.": "Cette catégorie existe déjà.", - "Unable to update this category.": "Impossible de mettre à jour cette catégorie." + "Unable to update this category.": "Impossible de mettre à jour cette catégorie.", + "Integrations": "Intégrations", + "Bookmarklet": "Bookmarklet", + "Drag and drop this link to your bookmarks.": "Glisser-déposer ce lien dans vos favoris.", + "This special link allows you to subscribe to a website directly by using a bookmark in your web browser.": "Ce lien spécial vous permet de vous abonner à un site web directement en utilisant un marque page dans votre navigateur web.", + "Add to Miniflux": "Ajouter à Miniflux" } diff --git a/server/core/handler.go b/server/core/handler.go index 85413016..df7e0be7 100644 --- a/server/core/handler.go +++ b/server/core/handler.go @@ -18,16 +18,19 @@ import ( "github.com/gorilla/mux" ) +// HandlerFunc is an application HTTP handler. type HandlerFunc func(ctx *Context, request *Request, response *Response) +// Handler manages HTTP handlers and middlewares. type Handler struct { store *storage.Storage translator *locale.Translator - template *template.TemplateEngine + template *template.Engine router *mux.Router middleware *middleware.MiddlewareChain } +// Use is a wrapper around an HTTP handler. func (h *Handler) Use(f HandlerFunc) http.Handler { return h.middleware.WrapFunc(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { defer helper.ExecutionTime(time.Now(), r.URL.Path) @@ -47,7 +50,8 @@ func (h *Handler) Use(f HandlerFunc) http.Handler { })) } -func NewHandler(store *storage.Storage, router *mux.Router, template *template.TemplateEngine, translator *locale.Translator, middleware *middleware.MiddlewareChain) *Handler { +// NewHandler returns a new Handler. +func NewHandler(store *storage.Storage, router *mux.Router, template *template.Engine, translator *locale.Translator, middleware *middleware.MiddlewareChain) *Handler { return &Handler{ store: store, translator: translator, diff --git a/server/core/html_response.go b/server/core/html_response.go index f10fe72f..52b51454 100644 --- a/server/core/html_response.go +++ b/server/core/html_response.go @@ -15,7 +15,7 @@ import ( type HTMLResponse struct { writer http.ResponseWriter request *http.Request - template *template.TemplateEngine + template *template.Engine } // Render execute a template and send to the client the generated HTML. diff --git a/server/core/response.go b/server/core/response.go index 48403dd2..3acc453c 100644 --- a/server/core/response.go +++ b/server/core/response.go @@ -15,7 +15,7 @@ import ( type Response struct { writer http.ResponseWriter request *http.Request - template *template.TemplateEngine + template *template.Engine } // SetCookie send a cookie to the client. @@ -67,6 +67,6 @@ func (r *Response) commonHeaders() { } // NewResponse returns a new Response. -func NewResponse(w http.ResponseWriter, r *http.Request, template *template.TemplateEngine) *Response { +func NewResponse(w http.ResponseWriter, r *http.Request, template *template.Engine) *Response { return &Response{writer: w, request: r, template: template} } diff --git a/server/routes.go b/server/routes.go index 36471b09..97a8b2f9 100644 --- a/server/routes.go +++ b/server/routes.go @@ -7,6 +7,7 @@ package server import ( "net/http" + "github.com/miniflux/miniflux2/config" "github.com/miniflux/miniflux2/locale" "github.com/miniflux/miniflux2/reader/feed" "github.com/miniflux/miniflux2/reader/opml" @@ -20,10 +21,10 @@ import ( "github.com/gorilla/mux" ) -func getRoutes(store *storage.Storage, feedHandler *feed.Handler) *mux.Router { +func getRoutes(cfg *config.Config, store *storage.Storage, feedHandler *feed.Handler) *mux.Router { router := mux.NewRouter() translator := locale.Load() - templateEngine := template.NewTemplateEngine(router, translator) + templateEngine := template.NewEngine(cfg, router, translator) apiController := api_controller.NewController(store, feedHandler) uiController := ui_controller.NewController(store, feedHandler, opml.NewHandler(store)) @@ -110,6 +111,9 @@ func getRoutes(store *storage.Storage, feedHandler *feed.Handler) *mux.Router { router.Handle("/settings", uiHandler.Use(uiController.ShowSettings)).Name("settings").Methods("GET") router.Handle("/settings", uiHandler.Use(uiController.UpdateSettings)).Name("updateSettings").Methods("POST") + router.Handle("/bookmarklet", uiHandler.Use(uiController.Bookmarklet)).Name("bookmarklet").Methods("GET") + router.Handle("/integrations", uiHandler.Use(uiController.ShowIntegrations)).Name("integrations").Methods("GET") + router.Handle("/sessions", uiHandler.Use(uiController.ShowSessions)).Name("sessions").Methods("GET") router.Handle("/sessions/{sessionID}/remove", uiHandler.Use(uiController.RemoveSession)).Name("removeSession").Methods("POST") diff --git a/server/server.go b/server/server.go index ec32329f..9ab0ab86 100644 --- a/server/server.go +++ b/server/server.go @@ -5,21 +5,23 @@ package server import ( - "github.com/miniflux/miniflux2/config" - "github.com/miniflux/miniflux2/reader/feed" - "github.com/miniflux/miniflux2/storage" "log" "net/http" "time" + + "github.com/miniflux/miniflux2/config" + "github.com/miniflux/miniflux2/reader/feed" + "github.com/miniflux/miniflux2/storage" ) +// NewServer returns a new HTTP server. func NewServer(cfg *config.Config, store *storage.Storage, feedHandler *feed.Handler) *http.Server { server := &http.Server{ ReadTimeout: 5 * time.Second, WriteTimeout: 10 * time.Second, IdleTimeout: 60 * time.Second, Addr: cfg.Get("LISTEN_ADDR", "127.0.0.1:8080"), - Handler: getRoutes(store, feedHandler), + Handler: getRoutes(cfg, store, feedHandler), } go func() { diff --git a/server/static/bin.go b/server/static/bin.go index ea9db5a4..ae5a4b27 100644 --- a/server/static/bin.go +++ b/server/static/bin.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-21 15:41:59.461181295 -0800 PST m=+0.007416953 +// 2017-11-21 19:31:59.626742594 -0800 PST m=+0.005741442 package static diff --git a/server/static/css.go b/server/static/css.go index 5243f897..11e827ef 100644 --- a/server/static/css.go +++ b/server/static/css.go @@ -1,14 +1,14 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-21 15:41:59.464123652 -0800 PST m=+0.010359310 +// 2017-11-21 19:31:59.629675274 -0800 PST m=+0.008674122 package static var Stylesheets = map[string]string{ "black": `body{background:#222;color:#efefef}h1,h2,h3{color:#aaa}a{color:#aaa}a:focus,a:hover{color:#ddd}.header li{border-color:#333}.header a{color:#ddd;font-weight:400}.header .active a{font-weight:400;color:#9b9494}.header a:focus,.header a:hover{color:rgba(82,168,236,.85)}.page-header h1{border-color:#333}.logo a:hover span{color:#555}table,th,td{border:1px solid #555}th{background:#333;color:#aaa;font-weight:400}tr:hover{background-color:#333;color:#aaa}input[type=url],input[type=password],input[type=text]{border:1px solid #555;background:#333;color:#ccc}input[type=url]:focus,input[type=password]:focus,input[type=text]:focus{color:#efefef;border-color:rgba(82,168,236,.8);box-shadow:0 0 8px rgba(82,168,236,.6)}.button-primary{border-color:#444;background:#333;color:#efefef}.button-primary:hover,.button-primary:focus{border-color:#888;background:#555}.alert,.alert-success,.alert-error,.alert-info,.alert-normal{color:#efefef;background-color:#333;border-color:#444}.panel{background:#333;border-color:#555}.unread-counter{color:#bbb}.category{color:#efefef;background-color:#333;border-color:#444}.category a{color:#999}.category a:hover,.category a:focus{color:#aaa}.pagination a{color:#aaa}.pagination-bottom{border-color:#333}.item{border-color:#666;padding:4px}.item.current-item{border-width:2px;border-color:rgba(82,168,236,.8);box-shadow:0 0 8px rgba(82,168,236,.6)}.item-title a{font-weight:400}.item-status-read .item-title a{color:#666}.item-status-read .item-title a:focus,.item-status-read .item-title a:hover{color:rgba(82,168,236,.6)}.item-meta a:hover,.item-meta a:focus{color:#aaa}.item-meta li:after{color:#ddd}.entry header{border-color:#333}.entry header h1 a{color:#bbb}.entry-content,.entry-content p,ul{color:#999}.entry-content pre,.entry-content code{color:#fff;background:#555;border-color:#888}.entry-enclosure{border-color:#333}`, - "common": `*{margin:0;padding:0;box-sizing:border-box}body{font-family:helvetica neue,Helvetica,Arial,sans-serif;text-rendering:optimizeLegibility}.main{padding-left:3px;padding-right:3px}a{color:#36c}a:focus{outline:0;color:red;text-decoration:none;border:1px dotted #aaa}a:hover{color:#333;text-decoration:none}.header{margin-top:10px;margin-bottom:20px}.header nav ul{display:none}.header li{cursor:pointer;padding-left:10px;line-height:2.1em;font-size:1.2em;border-bottom:1px dotted #ddd}.header li:hover a{color:#888}.header a{font-size:.9em;color:#444;text-decoration:none;border:0}.header .active a{font-weight:600}.header a:hover,.header a:focus{color:#888}.page-header{margin-bottom:25px}.page-header h1{font-weight:500;border-bottom:1px dotted #ddd}.page-header ul{margin-left:25px;font-size:.9em}.page-header li{list-style-type:circle;line-height:1.4em}.logo{cursor:pointer;text-align:center}.logo a{color:#000;letter-spacing:1px}.logo a:hover{color:#396}.logo a span{color:#396}.logo a:hover span{color:#000}@media(min-width:600px){body{margin:auto;max-width:750px}.logo{text-align:left;float:left;margin-right:15px}.header nav ul{display:block}.header li{display:inline;padding:0;padding-right:15px;line-height:normal;font-size:1em;border:0}.page-header ul{margin-left:0}.page-header li{display:inline;padding-right:15px}}table{width:100%;border-collapse:collapse}table,th,td{border:1px solid #ddd}th,td{padding:5px;text-align:left}td{vertical-align:top}th{background:#fcfcfc}tr:hover{background-color:#f9f9f9}.column-40{width:40%}.column-25{width:25%}.column-20{width:20%}label{cursor:pointer;display:block}.radio-group{line-height:1.9em}div.radio-group label{display:inline-block}select{margin-bottom:15px}input[type=url],input[type=password],input[type=text]{border:1px solid #ccc;padding:3px;line-height:20px;width:250px;font-size:99%;margin-bottom:10px;margin-top:5px;-webkit-appearance:none}input[type=url]:focus,input[type=password]:focus,input[type=text]:focus{color:#000;border-color:rgba(82,168,236,.8);outline:0;box-shadow:0 0 8px rgba(82,168,236,.6)}::-moz-placeholder,::-ms-input-placeholder,::-webkit-input-placeholder{color:#ddd;padding-top:2px}.form-help{font-size:.9em;color:brown;margin-bottom:15px}a.button{text-decoration:none}.button{display:inline-block;-webkit-appearance:none;-moz-appearance:none;font-size:1.1em;cursor:pointer;padding:3px 10px;border:1px solid;border-radius:unset}.button-primary{border-color:#3079ed;background:#4d90fe;color:#fff}.button-primary:hover,.button-primary:focus{border-color:#2f5bb7;background:#357ae8}.button-danger{border-color:#b0281a;background:#d14836;color:#fff}.button-danger:hover,.button-danger:focus{color:#fff;background:#c53727}.button:disabled{color:#ccc;background:#f7f7f7;border-color:#ccc}.buttons{margin-top:10px;margin-bottom:20px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px;overflow:auto}.alert h3{margin-top:0;margin-bottom:15px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-error a{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.panel{color:#333;background-color:#f0f0f0;border:1px solid #ddd;border-radius:5px;padding:10px;margin-bottom:15px}.panel h3{font-weight:500;margin-top:0;margin-bottom:20px}.panel ul{margin-left:30px}.login-form{margin:auto;margin-top:50px;width:350px}.unread-counter{font-size:.8em;font-weight:300;color:#666}.category{font-size:.75em;background-color:#fffcd7;border:1px solid #d5d458;border-radius:5px;margin-left:.25em;padding:1px .4em;white-space:nowrap}.category a{color:#555;text-decoration:none}.category a:hover,.category a:focus{color:#000}.pagination{font-size:1.1em;display:flex;align-items:center;padding-top:8px}.pagination-bottom{border-top:1px dotted #ddd;margin-bottom:15px;margin-top:50px}.pagination>div{flex:1}.pagination-next{text-align:right}.pagination-prev:before{content:"« "}.pagination-next:after{content:" »"}.pagination a{color:#333}.pagination a:hover,.pagination a:focus{text-decoration:none}.item{border:1px dotted #ddd;margin-bottom:20px;padding:5px;overflow:hidden}.item.current-item{border:3px solid #bce;padding:3px}.item-title a{text-decoration:none;font-weight:600}.item-status-read .item-title a{color:#777}.item-meta{color:#777;font-size:.8em}.item-meta a{color:#777;text-decoration:none}.item-meta a:hover,.item-meta a:focus{color:#333}.item-meta ul{margin-top:5px}.item-meta li{display:inline}.item-meta li:after{content:"|";color:#aaa}.item-meta li:last-child:after{content:""}.hide-read-items .item-status-read{display:none}.entry header{padding-bottom:5px;border-bottom:1px dotted #ddd}.entry header h1{font-size:2em;line-height:1.25em;margin:30px 0}.entry header h1 a{text-decoration:none;color:#333}.entry header h1 a:hover,.entry header h1 a:focus{color:#666}.entry-meta{font-size:.95em;margin:0 0 20px;color:#666}.entry-website img{vertical-align:top}.entry-website a{color:#666;vertical-align:top;text-decoration:none}.entry-website a:hover,.entry-website a:focus{text-decoration:underline}.entry-date{font-size:.65em;font-style:italic;color:#555}.entry-content{padding-top:15px;font-size:1.1em;font-weight:300;color:#444}.entry-content h1,h2,h3,h4,h5,h6{margin-top:15px}.entry-content iframe,.entry-content video,.entry-content img{max-width:100%}.entry-content figure img{border:1px solid #000}.entry-content figcaption{font-size:.75em;text-transform:uppercase;color:#777}.entry-content p{margin-top:15px;margin-bottom:15px;text-align:justify}.entry-content a:visited{color:purple}.entry-content dt{font-weight:500;margin-top:15px;color:#555}.entry-content dd{margin-left:15px;margin-top:5px;padding-left:20px;border-left:3px solid #ddd;color:#777;font-weight:300;line-height:1.4em}.entry-content blockquote{border-left:4px solid #ddd;padding-left:25px;margin-left:20px;margin-top:20px;margin-bottom:20px;color:#888;line-height:1.4em;font-family:Georgia,serif}.entry-content blockquote+p{color:#555;font-style:italic;font-weight:200}.entry-content q{color:purple;font-family:Georgia,serif;font-style:italic}.entry-content q:before{content:"“"}.entry-content q:after{content:"”"}.entry-content pre{padding:5px;background:#f0f0f0;border:1px solid #ddd;overflow:scroll}.entry-content ul,.entry-content ol{margin-left:30px}.entry-content ul{list-style-type:square}.entry-enclosures h3{font-weight:500}.entry-enclosure{border:1px dotted #ddd;padding:5px;margin-top:10px;max-width:100%}.entry-enclosure-download{font-size:.85em}.enclosure-video video,.enclosure-image img{max-width:100%}.confirm{font-weight:500;color:#ed2d04}.confirm a{color:#ed2d04}.loading{font-style:italic}`, + "common": `*{margin:0;padding:0;box-sizing:border-box}body{font-family:helvetica neue,Helvetica,Arial,sans-serif;text-rendering:optimizeLegibility}.main{padding-left:3px;padding-right:3px}a{color:#36c}a:focus{outline:0;color:red;text-decoration:none;border:1px dotted #aaa}a:hover{color:#333;text-decoration:none}.header{margin-top:10px;margin-bottom:20px}.header nav ul{display:none}.header li{cursor:pointer;padding-left:10px;line-height:2.1em;font-size:1.2em;border-bottom:1px dotted #ddd}.header li:hover a{color:#888}.header a{font-size:.9em;color:#444;text-decoration:none;border:0}.header .active a{font-weight:600}.header a:hover,.header a:focus{color:#888}.page-header{margin-bottom:25px}.page-header h1{font-weight:500;border-bottom:1px dotted #ddd}.page-header ul{margin-left:25px;font-size:.9em}.page-header li{list-style-type:circle;line-height:1.4em}.logo{cursor:pointer;text-align:center}.logo a{color:#000;letter-spacing:1px}.logo a:hover{color:#396}.logo a span{color:#396}.logo a:hover span{color:#000}@media(min-width:600px){body{margin:auto;max-width:750px}.logo{text-align:left;float:left;margin-right:15px}.header nav ul{display:block}.header li{display:inline;padding:0;padding-right:15px;line-height:normal;font-size:1em;border:0}.page-header ul{margin-left:0}.page-header li{display:inline;padding-right:15px}}table{width:100%;border-collapse:collapse}table,th,td{border:1px solid #ddd}th,td{padding:5px;text-align:left}td{vertical-align:top}th{background:#fcfcfc}tr:hover{background-color:#f9f9f9}.column-40{width:40%}.column-25{width:25%}.column-20{width:20%}label{cursor:pointer;display:block}.radio-group{line-height:1.9em}div.radio-group label{display:inline-block}select{margin-bottom:15px}input[type=url],input[type=password],input[type=text]{border:1px solid #ccc;padding:3px;line-height:20px;width:250px;font-size:99%;margin-bottom:10px;margin-top:5px;-webkit-appearance:none}input[type=url]:focus,input[type=password]:focus,input[type=text]:focus{color:#000;border-color:rgba(82,168,236,.8);outline:0;box-shadow:0 0 8px rgba(82,168,236,.6)}::-moz-placeholder,::-ms-input-placeholder,::-webkit-input-placeholder{color:#ddd;padding-top:2px}.form-help{font-size:.9em;color:brown;margin-bottom:15px}a.button{text-decoration:none}.button{display:inline-block;-webkit-appearance:none;-moz-appearance:none;font-size:1.1em;cursor:pointer;padding:3px 10px;border:1px solid;border-radius:unset}.button-primary{border-color:#3079ed;background:#4d90fe;color:#fff}.button-primary:hover,.button-primary:focus{border-color:#2f5bb7;background:#357ae8}.button-danger{border-color:#b0281a;background:#d14836;color:#fff}.button-danger:hover,.button-danger:focus{color:#fff;background:#c53727}.button:disabled{color:#ccc;background:#f7f7f7;border-color:#ccc}.buttons{margin-top:10px;margin-bottom:20px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px;overflow:auto}.alert h3{margin-top:0;margin-bottom:15px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-error a{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.panel{color:#333;background-color:#f0f0f0;border:1px solid #ddd;border-radius:5px;padding:10px;margin-bottom:15px}.panel h3{font-weight:500;margin-top:0;margin-bottom:20px}.panel ul{margin-left:30px}.login-form{margin:auto;margin-top:50px;width:350px}.unread-counter{font-size:.8em;font-weight:300;color:#666}.category{font-size:.75em;background-color:#fffcd7;border:1px solid #d5d458;border-radius:5px;margin-left:.25em;padding:1px .4em;white-space:nowrap}.category a{color:#555;text-decoration:none}.category a:hover,.category a:focus{color:#000}.pagination{font-size:1.1em;display:flex;align-items:center;padding-top:8px}.pagination-bottom{border-top:1px dotted #ddd;margin-bottom:15px;margin-top:50px}.pagination>div{flex:1}.pagination-next{text-align:right}.pagination-prev:before{content:"« "}.pagination-next:after{content:" »"}.pagination a{color:#333}.pagination a:hover,.pagination a:focus{text-decoration:none}.item{border:1px dotted #ddd;margin-bottom:20px;padding:5px;overflow:hidden}.item.current-item{border:3px solid #bce;padding:3px}.item-title a{text-decoration:none;font-weight:600}.item-status-read .item-title a{color:#777}.item-meta{color:#777;font-size:.8em}.item-meta a{color:#777;text-decoration:none}.item-meta a:hover,.item-meta a:focus{color:#333}.item-meta ul{margin-top:5px}.item-meta li{display:inline}.item-meta li:after{content:"|";color:#aaa}.item-meta li:last-child:after{content:""}.hide-read-items .item-status-read{display:none}.entry header{padding-bottom:5px;border-bottom:1px dotted #ddd}.entry header h1{font-size:2em;line-height:1.25em;margin:30px 0}.entry header h1 a{text-decoration:none;color:#333}.entry header h1 a:hover,.entry header h1 a:focus{color:#666}.entry-meta{font-size:.95em;margin:0 0 20px;color:#666}.entry-website img{vertical-align:top}.entry-website a{color:#666;vertical-align:top;text-decoration:none}.entry-website a:hover,.entry-website a:focus{text-decoration:underline}.entry-date{font-size:.65em;font-style:italic;color:#555}.entry-content{padding-top:15px;font-size:1.1em;font-weight:300;color:#444}.entry-content h1,h2,h3,h4,h5,h6{margin-top:15px}.entry-content iframe,.entry-content video,.entry-content img{max-width:100%}.entry-content figure img{border:1px solid #000}.entry-content figcaption{font-size:.75em;text-transform:uppercase;color:#777}.entry-content p{margin-top:15px;margin-bottom:15px;text-align:justify}.entry-content a:visited{color:purple}.entry-content dt{font-weight:500;margin-top:15px;color:#555}.entry-content dd{margin-left:15px;margin-top:5px;padding-left:20px;border-left:3px solid #ddd;color:#777;font-weight:300;line-height:1.4em}.entry-content blockquote{border-left:4px solid #ddd;padding-left:25px;margin-left:20px;margin-top:20px;margin-bottom:20px;color:#888;line-height:1.4em;font-family:Georgia,serif}.entry-content blockquote+p{color:#555;font-style:italic;font-weight:200}.entry-content q{color:purple;font-family:Georgia,serif;font-style:italic}.entry-content q:before{content:"“"}.entry-content q:after{content:"”"}.entry-content pre{padding:5px;background:#f0f0f0;border:1px solid #ddd;overflow:scroll}.entry-content ul,.entry-content ol{margin-left:30px}.entry-content ul{list-style-type:square}.entry-enclosures h3{font-weight:500}.entry-enclosure{border:1px dotted #ddd;padding:5px;margin-top:10px;max-width:100%}.entry-enclosure-download{font-size:.85em}.enclosure-video video,.enclosure-image img{max-width:100%}.confirm{font-weight:500;color:#ed2d04}.confirm a{color:#ed2d04}.loading{font-style:italic}.bookmarklet{border:1px dashed #ccc;border-radius:5px;padding:15px;margin:15px;text-align:center}.bookmarklet a{font-weight:600;text-decoration:none;font-size:1.2em}`, } var StylesheetsChecksums = map[string]string{ "black": "38e7fee92187a036ce37f3c15fde2deff59a55c5ab693c7b8578af79d6a117d2", - "common": "66deebc05acbfd97a2c0b04ebe0bd0205c1e99c92599df1c311b4085c39171ba", + "common": "fc802b0b281d26df08fe196f6d1d10024eaeccef42710e91e03201d08ae1b19f", } diff --git a/server/static/css/common.css b/server/static/css/common.css index 0c0fe220..3354f55b 100644 --- a/server/static/css/common.css +++ b/server/static/css/common.css @@ -659,3 +659,18 @@ a.button { .loading { font-style: italic; } + +/* Bookmarlet */ +.bookmarklet { + border: 1px dashed #ccc; + border-radius: 5px; + padding: 15px; + margin: 15px; + text-align: center; +} + +.bookmarklet a { + font-weight: 600; + text-decoration: none; + font-size: 1.2em; +} diff --git a/server/static/js.go b/server/static/js.go index 23df072c..07f2de07 100644 --- a/server/static/js.go +++ b/server/static/js.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-21 15:41:59.4687788 -0800 PST m=+0.015014458 +// 2017-11-21 19:31:59.631783539 -0800 PST m=+0.010782387 package static diff --git a/server/template/common.go b/server/template/common.go index b108f0ea..2dc24c60 100644 --- a/server/template/common.go +++ b/server/template/common.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-21 15:41:59.491806442 -0800 PST m=+0.038042100 +// 2017-11-21 19:31:59.643994492 -0800 PST m=+0.022993340 package template diff --git a/server/template/html/about.html b/server/template/html/about.html index 3596327f..24c0f2cc 100644 --- a/server/template/html/about.html +++ b/server/template/html/about.html @@ -7,6 +7,9 @@
  • {{ t "Settings" }}
  • +
  • + {{ t "Integrations" }} +
  • {{ t "Sessions" }}
  • diff --git a/server/template/html/create_user.html b/server/template/html/create_user.html index 36af356f..225dfaa1 100644 --- a/server/template/html/create_user.html +++ b/server/template/html/create_user.html @@ -7,6 +7,9 @@
  • {{ t "Settings" }}
  • +
  • + {{ t "Integrations" }} +
  • {{ t "Sessions" }}
  • diff --git a/server/template/html/edit_user.html b/server/template/html/edit_user.html index 8f63307d..dbbd852e 100644 --- a/server/template/html/edit_user.html +++ b/server/template/html/edit_user.html @@ -7,6 +7,9 @@
  • {{ t "Settings" }}
  • +
  • + {{ t "Integrations" }} +
  • {{ t "Sessions" }}
  • diff --git a/server/template/html/integrations.html b/server/template/html/integrations.html new file mode 100644 index 00000000..75ffbc97 --- /dev/null +++ b/server/template/html/integrations.html @@ -0,0 +1,35 @@ +{{ define "title"}}{{ t "Integrations" }}{{ end }} + +{{ define "content"}} + + +
    +

    {{ t "Bookmarklet" }}

    +

    {{ t "This special link allows you to subscribe to a website directly by using a bookmark in your web browser." }}

    + +
    +