summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/src/ElmModule/View.elm5
-rw-r--r--src/login/src/View/Header.elm.m476
-rw-r--r--src/login/src/View/MainMenu.elm82
-rw-r--r--src/login/www/index.html1
4 files changed, 163 insertions, 1 deletions
diff --git a/src/login/src/ElmModule/View.elm b/src/login/src/ElmModule/View.elm
index 558decd..55e720f 100644
--- a/src/login/src/ElmModule/View.elm
+++ b/src/login/src/ElmModule/View.elm
@@ -9,6 +9,9 @@ import Html.Attributes
import Struct.Event
import Struct.Model
+import View.Header
+import View.MainMenu
+
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
@@ -23,5 +26,7 @@ view model =
(Html.Attributes.class "fullscreen-module")
]
[
+ (View.Header.get_html),
+ (View.MainMenu.get_html)
]
)
diff --git a/src/login/src/View/Header.elm.m4 b/src/login/src/View/Header.elm.m4
new file mode 100644
index 0000000..81ac132
--- /dev/null
+++ b/src/login/src/View/Header.elm.m4
@@ -0,0 +1,76 @@
+module View.Header exposing (get_html)
+
+-- Elm -------------------------------------------------------------------------
+import Html
+import Html.Attributes
+import Html.Events
+
+-- Map -------------------------------------------------------------------
+import Struct.Event
+import Struct.UI
+
+--------------------------------------------------------------------------------
+-- LOCAL -----------------------------------------------------------------------
+--------------------------------------------------------------------------------
+link_html : String -> String -> Bool -> (Html.Html Struct.Event.Type)
+link_html src label is_active =
+ (Html.a
+ [
+ (Html.Attributes.src src)
+ ]
+ [
+ (
+ if (is_active)
+ then (Html.text label)
+ else (Html.s [] [(Html.text label)])
+ )
+ ]
+ )
+
+navigation_html : (Html.Html Struct.Event.Type)
+navigation_html =
+ (Html.nav
+ []
+ [
+ (link_html "/login/" "Play" False),
+ (link_html "/news/" "News" False),
+ (link_html "/community/" "Community" False),
+ (link_html "/about/" "About" False),
+ (link_html "/battle/?id=0" "[D] Battle" True),
+ (link_html "/map-editor/?id=0" "[D] Map Editor" True)
+ ]
+ )
+
+--------------------------------------------------------------------------------
+-- EXPORTED --------------------------------------------------------------------
+--------------------------------------------------------------------------------
+get_html : (Html.Html Struct.Event.Type)
+get_html =
+ (Html.header
+ []
+ [
+ (Html.div
+ [
+ (Html.Attributes.class "main-server-logo")
+ ]
+ [
+ (Html.img
+ [
+ (Html.Attributes.src "__CONF_SERVER_LOGO")
+ ]
+ [
+ ]
+ )
+ ]
+ ),
+ (Html.div
+ [
+ (Html.Attributes.class "main-server-version")
+ ]
+ [
+ (Html.text "__CONF_VERSION")
+ ]
+ ),
+ (navigation_html)
+ ]
+ )
diff --git a/src/login/src/View/MainMenu.elm b/src/login/src/View/MainMenu.elm
new file mode 100644
index 0000000..018b9ba
--- /dev/null
+++ b/src/login/src/View/MainMenu.elm
@@ -0,0 +1,82 @@
+module View.MainMenu exposing (get_html)
+
+-- Elm -------------------------------------------------------------------------
+import Html
+import Html.Attributes
+import Html.Events
+
+-- Map -------------------------------------------------------------------
+import Struct.Event
+import Struct.UI
+
+--------------------------------------------------------------------------------
+-- LOCAL -----------------------------------------------------------------------
+--------------------------------------------------------------------------------
+link_html : String -> Bool -> (Html.Html Struct.Event.Type)
+link_html label is_active =
+ (Html.a
+ [
+ (Html.Attributes.class
+ (
+ if (is_active)
+ then "active"
+ else "inactive"
+ )
+ )
+ ]
+ [
+ (Html.text label)
+ ]
+ )
+
+--------------------------------------------------------------------------------
+-- EXPORTED --------------------------------------------------------------------
+--------------------------------------------------------------------------------
+get_html : (Html.Html Struct.Event.Type)
+get_html =
+ (Html.main_
+ [
+ ]
+ [
+ (Html.nav
+ []
+ [
+ (link_html "Login" True),
+ (link_html "Create Account" False),
+ (link_html "Recover Account" False)
+ ]
+ ),
+ (Html.article
+ []
+ [
+ (Html.div
+ [
+ (Html.Attributes.class "user-input")
+ ]
+ [
+ (Html.h1 [] [(Html.text "Username")]),
+ (Html.input [] [])
+ ]
+ ),
+ (Html.div
+ [
+ (Html.Attributes.class "user-input")
+ ]
+ [
+ (Html.h1 [] [(Html.text "Password")]),
+ (Html.input
+ [
+ (Html.Attributes.type_ "password")
+ ]
+ []
+ )
+ ]
+ ),
+ (Html.button
+ []
+ [ (Html.text "Send") ]
+ )
+ ]
+ )
+ ]
+ )
diff --git a/src/login/www/index.html b/src/login/www/index.html
index d2e13fd..459c550 100644
--- a/src/login/www/index.html
+++ b/src/login/www/index.html
@@ -2,7 +2,6 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css/global.css">
- <link rel="stylesheet" type="text/css" href="/css/verbose.css">
<link rel="stylesheet" type="text/css" href="/css/login.css">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
</head>