From 802fe8805de2c4d1a7562a77ae7c1aa15c2d8609 Mon Sep 17 00:00:00 2001 From: Oskar Marquardt <oskar.marquardt@student.uni-halle.de> Date: Tue, 11 Jun 2024 18:54:52 +0200 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ elm.json | 28 ++++++++++++++++++++++++++++ public/index.html | 39 +++++++++++++++++---------------------- public/style.css | 24 ------------------------ src/Main.elm | 41 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 88 insertions(+), 46 deletions(-) create mode 100644 .gitignore create mode 100644 elm.json delete mode 100644 public/style.css create mode 100644 src/Main.elm diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96ceeae --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +elm-stuff/ +ZZZ_meta/ \ No newline at end of file diff --git a/elm.json b/elm.json new file mode 100644 index 0000000..ac7524b --- /dev/null +++ b/elm.json @@ -0,0 +1,28 @@ +{ + "type": "application", + "source-directories": [ + "src" + ], + "elm-version": "0.19.1", + "dependencies": { + "direct": { + "elm/browser": "1.0.2", + "elm/core": "1.0.5", + "elm/html": "1.0.0", + "elm/http": "2.0.0", + "elm/json": "1.1.3", + "elm/svg": "1.0.1", + "elm/url": "1.0.0" + }, + "indirect": { + "elm/bytes": "1.0.8", + "elm/file": "1.0.5", + "elm/time": "1.0.0", + "elm/virtual-dom": "1.0.3" + } + }, + "test-dependencies": { + "direct": {}, + "indirect": {} + } +} diff --git a/public/index.html b/public/index.html index 6652c7d..2208e41 100644 --- a/public/index.html +++ b/public/index.html @@ -1,23 +1,18 @@ -<!DOCTYPE html> +<!DOCTYPE HTML> <html> - <head> - <meta charset="utf-8"> - <meta name="generator" content="GitLab Pages"> - <title>Plain HTML site using GitLab Pages</title> - <link rel="stylesheet" href="style.css"> - </head> - <body> - <div class="navbar"> - <a href="https://pages.gitlab.io/plain-html/">Plain HTML Example</a> - <a href="https://gitlab.com/pages/plain-html/">Repository</a> - <a href="https://gitlab.com/pages/">Other Examples</a> - </div> - - <h1>Hello World!</h1> - - <p> - This is a simple plain-HTML website on GitLab Pages, without any fancy static site generator. - </p> - </body> -</html> - +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <script src="main.js"></script> + <link + rel="stylesheet" + href="https://cdn.jsdelivr.net/npm/bulma@1.0.0/css/bulma.min.css" + > +</head> +<body> + <div id="myapp"></div> + <script> + var app = Elm.Main.init(); + </script> +</body> +</html> \ No newline at end of file diff --git a/public/style.css b/public/style.css deleted file mode 100644 index 3eae408..0000000 --- a/public/style.css +++ /dev/null @@ -1,24 +0,0 @@ -body { - font-family: sans-serif; - margin: auto; - max-width: 1280px; -} - -.navbar { - background-color: #313236; - border-radius: 2px; - max-width: 800px; -} - -.navbar a { - color: #aaa; - display: inline-block; - font-size: 15px; - padding: 10px; - text-decoration: none; -} - -.navbar a:hover { - color: #ffffff; -} - diff --git a/src/Main.elm b/src/Main.elm new file mode 100644 index 0000000..49edbfa --- /dev/null +++ b/src/Main.elm @@ -0,0 +1,41 @@ +module Main exposing (..) + +import Browser +import Html exposing (..) +import Html.Attributes exposing (..) + +main : Program () Model Msg +main = + Browser.document + { init = init + , view = view + , update = update + , subscriptions = subscriptions + } + +init : () -> ( Model, Cmd Msg ) +init _ = + ( {} + , Cmd.none + ) + +type alias Model = {} + +type Msg + = Nothing + +update : Msg -> Model -> ( Model, Cmd Msg ) +update msg model = + ( model, Cmd.none ) + +view : Model -> Browser.Document Msg +view model = + { title = "TBD" + , body = + [ div [] [] + ] + } + +subscriptions : Model -> Sub Msg +subscriptions _ = + Sub.none \ No newline at end of file -- GitLab