diff --git a/src/App/HomeInterface.purs b/src/App/HomeInterface.purs index 3f81671..95485ad 100644 --- a/src/App/HomeInterface.purs +++ b/src/App/HomeInterface.purs @@ -14,13 +14,14 @@ import Halogen as H import Bulma as Bulma -data Query a = DoNothing a -type Slot = H.Slot Query Unit type Input = Unit -type Output = Unit type Action = Unit type State = Unit +data Query a = DoNothing a +type Output = Unit +type Slot = H.Slot Query Output + component :: forall m. MonadAff m => H.Component Query Input Output m component = H.mkComponent @@ -38,4 +39,54 @@ initialState :: forall input. input -> State initialState _ = unit render :: forall m. State -> H.ComponentHTML Action () m -render _ = Bulma.section_small [ Bulma.p "Hello." ] +render _ = Bulma.section_small [ Bulma.h1 "Welcome on netlib.re" + , Bulma.subtitle "Free domain names" + , Bulma.hr + , render_description + , render_why_and_contact + , Bulma.hr + , render_how_and_code + ] + where + title = Bulma.h3 + p = Bulma.p + b x = Bulma.column_ [ Bulma.box x ] + + render_description = Bulma.columns_ [ render_basics, render_updates ] + render_basics + = b [ title "What is provided?" + , p "Reserve a domain name in .netlib.re for free." + , p "Manage your own DNS zone." + , Bulma.hr + , p "No need to be an expert! This website will help you through your configuration." + , Bulma.hr + , p "We don't provide housing, just a name." + ] + render_updates + = b [ title "Automatic updates" + , p "Update your current address with a simple script." + ] + + render_why_and_contact = Bulma.columns_ [ render_why, render_contact ] + render_why + = b [ title "Why?" + , p "Because everyone should be able to have a place on the Internet." + , p "We provide you a name, build something meaningful with it." + ] + render_contact + = b [ title "Contact" + , p "You have a question, you saw a bug or you just want to chat?" + , p "You can contact us: ..." + ] + + render_how_and_code = Bulma.columns_ [ render_how, render_code ] + render_how + = b [ title "How does this work?" + , p "We pay for the domain names (netlib.re and codelib.re) and let you have a subdomain." + , p "This service helps you manage your domain (a subdomain of netlib.re or codelib.re)." + ] + render_code + = b [ title "I want to see the code!" + , p "The project is fully open-source (ISC licence)." + , p "There are 3 parts: libipc, micro-services (authentication and dnsmanager) and this website." + ] diff --git a/src/App/Nav.purs b/src/App/Nav.purs index e1e5578..41542bc 100644 --- a/src/App/Nav.purs +++ b/src/App/Nav.purs @@ -54,7 +54,7 @@ netlibre_navbar authenticated admin actionHome actionDomainList actionAuthdAdmin nav_menu = HH.div [HP.id "navbarExample", HP.classes C.navbar_menu] navbar_start = HH.div [HP.classes C.navbar_start] navbar_end = HH.div [HP.classes C.navbar_end] - link_home = HH.a [HP.classes C.navbar_item, HE.onClick (\_ -> actionHome)] [HH.text "Home"] + link_home = HH.a [HP.classes C.navbar_item, HE.onClick (\_ -> actionHome)] [HH.text "Home"] link_domains = HH.a [HP.classes C.navbar_item, HE.onClick (\_ -> actionDomainList)] [HH.text "Domain List"] link_authd_admin = HH.a [HP.classes C.navbar_item, HE.onClick (\_ -> actionAuthdAdmin)] [HH.text "Authd Admin"] --dropdown title dropdown_elements @@ -63,10 +63,16 @@ netlibre_navbar authenticated admin actionHome actionDomainList actionAuthdAdmin --dropdown_title str = HH.a [HP.classes C.navbar_link] [HH.text str] --dropdown_element str = HH.a [HP.classes C.navbar_item] [HH.text str] --dropdown_separator = HH.hr [HP.classes C.navbar_divider] - nav_button_code - = HH.a [HP.classes (C.button), HP.href "https://git.baguette.netlib.re/Baguette/dnsmanager"] [HH.text "Code"] - nav_button_strong str action - = HH.a [HP.classes (C.button <> C.is_primary), HE.onClick (\_ -> action)] [HH.strong [] [HH.text str]] - nav_button_light str action - = HH.a [HP.classes (C.button <> C.is_light), HE.onClick (\_ -> action)] [HH.text str] + nav_button_code = btn_link [] "https://git.baguette.netlib.re/Baguette/dnsmanager" "Code" + nav_button_strong str action = btn C.is_primary action (HH.strong [] [ HH.text str ]) + nav_button_light str action = btn C.is_light action (HH.text str) navbar_item = HH.div [HP.classes C.navbar_item] + + btn_link c link str + = HH.a [ HP.classes (C.button <> c) + , HP.href link + ] [ HH.text str ] + btn c action str + = HH.a [ HP.classes (C.button <> c) + , HE.onClick (\_ -> action) + ] [ str ]