neo4j-4
Josha von Gizycki 5 years ago
parent 5d7f62d142
commit 4590a345b1

@ -1,24 +0,0 @@
{
"type": "application",
"source-directories": [
"src/frontend"
],
"elm-version": "0.19.0",
"dependencies": {
"direct": {
"elm/browser": "1.0.1",
"elm/core": "1.0.2",
"elm/html": "1.0.0"
},
"indirect": {
"elm/json": "1.1.3",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2"
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}

File diff suppressed because it is too large Load Diff

@ -1,42 +0,0 @@
module Explore exposing (Msg(..), main, update, view)
import Browser
import Html exposing (Html, button, div, node, text)
import Html.Attributes exposing (type_)
import Html.Events exposing (onClick)
main =
Browser.sandbox { init = 0, update = update, view = view }
type Msg
= Increment
| Decrement
update msg model =
case msg of
Increment ->
model + 1
Decrement ->
model - 1
withStyle html =
div []
[ node "style"
[ type_ "text/css" ]
[ text "@import url(/resources/public/css/app.css)" ]
, html
]
view model =
div []
[ button [ onClick Decrement ] [ text "-" ]
, div [] [ text (String.fromInt model) ]
, button [ onClick Increment ] [ text "+" ]
]
|> withStyle

@ -14,8 +14,9 @@
caption]])) caption]]))
(defn delete-btn [] (defn delete-btn []
(hform/submit-button {:class "delete-btn"} [:input {:type "submit"
"☒ Delete!")) :class "delete-btn"
:value "☒ Delete!"}])
(defn flash-error [content] (defn flash-error [content]
[:section.flash--error [:section.flash--error
@ -27,13 +28,11 @@
title title
session session
request request
head head]
bottom]
:or {content [] :or {content []
title nil title nil
request {} request {}
session nil session nil
bottom nil
head nil}}] head nil}}]
(let [session (or session (:session request)) (let [session (or session (:session request))
ident (:ident session) ident (:ident session)
@ -91,5 +90,4 @@
(flash-error msg))] (flash-error msg))]
content) content)
[:footer [:footer
[:small "Ilo pali e ijo"]]] [:small "Ilo pali e ijo"]]]])))
bottom])))

@ -4,11 +4,7 @@
(defn index [req] (defn index [req]
(view/layout! (view/layout!
:request req :request req
:head (include-js "/js/frontend.js") :content
:bottom [:script [[:h1 "Visualisation"]
"Elm.Main.init({node: document.getElementById('visualisation')})"] [:div#visualisation]]))
:content
[[:h1 "Visualisation"]
[:div#visualisation]
]))

Loading…
Cancel
Save