Rework on the home page and the navbar.

This commit is contained in:
Philippe Pittoli 2023-07-15 15:52:56 +02:00
parent eb780fc5ce
commit e4c696b656
2 changed files with 68 additions and 11 deletions

View File

@ -14,13 +14,14 @@ import Halogen as H
import Bulma as Bulma import Bulma as Bulma
data Query a = DoNothing a
type Slot = H.Slot Query Unit
type Input = Unit type Input = Unit
type Output = Unit
type Action = Unit type Action = Unit
type State = 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 :: forall m. MonadAff m => H.Component Query Input Output m
component = component =
H.mkComponent H.mkComponent
@ -38,4 +39,54 @@ initialState :: forall input. input -> State
initialState _ = unit initialState _ = unit
render :: forall m. State -> H.ComponentHTML Action () m 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 <something>.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."
]

View File

@ -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_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_element str = HH.a [HP.classes C.navbar_item] [HH.text str]
--dropdown_separator = HH.hr [HP.classes C.navbar_divider] --dropdown_separator = HH.hr [HP.classes C.navbar_divider]
nav_button_code nav_button_code = btn_link [] "https://git.baguette.netlib.re/Baguette/dnsmanager" "Code"
= HH.a [HP.classes (C.button), HP.href "https://git.baguette.netlib.re/Baguette/dnsmanager"] [HH.text "Code"] nav_button_strong str action = btn C.is_primary action (HH.strong [] [ HH.text str ])
nav_button_strong str action nav_button_light str action = btn C.is_light action (HH.text str)
= 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]
navbar_item = HH.div [HP.classes C.navbar_item] 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 ]