Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Fix formatting (Issue #3).
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Sep 26, 2022
1 parent 172cbcb commit 8a7489d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
8 changes: 4 additions & 4 deletions client/loaders/docsloader.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ let loader (projectRoot: string) (siteContent: SiteContents) =
docs
|> Array.iter sc.Add

let sc =
let scTest =
siteContent.TryGetValues<Nfdi4Plants.Docs> ()
|> Option.defaultValue Seq.empty

printfn "LOADER NEXT DOCS: %i" <| Seq.length sc
printfn "LOADER NEXT DOCS: %i" <| Seq.length scTest

siteContent.Add({disableLiveRefresh = false})
siteContent
sc.Add({disableLiveRefresh = false})
sc
20 changes: 15 additions & 5 deletions src/Nfdi4Plants.Fornax/Components.fs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,23 @@ type Components = class end

// support contact
if docs.add_support then
h3 [] [!! "Dataplant Support"]
div [] [
h3 [] [!! "DataPLANT Support"]
div [ ] [
!! "Besides these technical solutions, DataPLANT supports you with community-engaged data stewardship. For further assistance, feel free to reach out via our "
a [Href "https://support.nfdi4plants.org"] [!! "helpdesk"]
!! " or by contacting us "
a [Href "javascript:location='mailto:\u0069\u006e\u0066\u006f\u0040\u006e\u0066\u0064\u0069\u0034\u0070\u006c\u0061\u006e\u0074\u0073\u002e\u006f\u0072\u0067';void 0"] [!! "directly"]
!! "."
!! " or by contacting us "
// This is an insane hack. Fornax parses all text with huuuuge whitespace AND newline added around, BUT in this element we want all text parts separated by exactly
// 1(!) whitespace, except the last two parts which should fit directly together.
// Normally you handle this with flex-box and white-space: pre/pre-wrap. But because of the added whitespaces by fornax in addition to the
// whitespaces added here, it completely kills formatting. So the solution:
// let everything have its appended white-spaces in inline-block and let inline-flex remove the whitespace between the last two. :(
span [ HtmlProperties.Style [
Display "inline-flex"
FlexWrap "wrap"
]] [
a [Href "javascript:location='mailto:\u0069\u006e\u0066\u006f\u0040\u006e\u0066\u0064\u0069\u0034\u0070\u006c\u0061\u006e\u0074\u0073\u002e\u006f\u0072\u0067';void 0"] [!! "directly"]
!! "."
]
]

// Edit this page link
Expand Down

0 comments on commit 8a7489d

Please sign in to comment.