added codemirror optional js for syntax highlight of dockerfiles
This commit is contained in:
@@ -108,9 +108,18 @@
|
||||
[:title title]
|
||||
[:link {:href "https://fonts.googleapis.com/css?family=Open+Sans:300,400,700"
|
||||
:rel "stylesheet"}]
|
||||
|
||||
;; non-invasive js for syntax highlight of text-area
|
||||
(page/include-js "/static/js/codemirror.js")
|
||||
(page/include-js "/static/js/codemirror-simple.js")
|
||||
(page/include-js "/static/js/codemirror-dockerfile.js")
|
||||
|
||||
;; cascade style sheets
|
||||
(page/include-css "/static/css/bulma.min.css")
|
||||
(page/include-css "/static/css/json-html.css")
|
||||
(page/include-css "/static/css/codemirror.css")
|
||||
|
||||
|
||||
;; (page/include-css "/static/css/fa-regular.min.css")
|
||||
;; (page/include-css "/static/css/fontawesome.min.css")
|
||||
|
||||
|
||||
@@ -98,11 +98,6 @@
|
||||
(views/dashboard acct)]))
|
||||
(auth-wrap request)))
|
||||
|
||||
;; (GET "/list" request
|
||||
;; (->> (fn [req conf acct]
|
||||
;; (web/render acct (views/list-jobs acct)))
|
||||
;; (auth-wrap request)))
|
||||
|
||||
(POST "/remove" request
|
||||
(->> (fn [req conf acct]
|
||||
(web/render acct [:body
|
||||
|
||||
@@ -152,6 +152,8 @@
|
||||
dockerfile (-> jobfound :dockerfile)]
|
||||
[:div {:class "box"}
|
||||
[:h1 {:class "title"} (str "Viewing job: " jobid)]
|
||||
[:pre dockerfile]]
|
||||
(f/when-failed [e]
|
||||
(web/notify (str "Failure viewing job: " (f/message e)) "is-error"))))
|
||||
[:form [:textarea {:id "code" :name "code" } dockerfile]]
|
||||
[:script "var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"),
|
||||
{ lineNumbers: true, mode: \"dockerfile\" });"]]
|
||||
(f/when-failed [e]
|
||||
(web/notify (str "Failure viewing job: " (f/message e)) "is-error"))))
|
||||
|
||||
Reference in New Issue
Block a user