2019-02-18 01:25:07 +00:00
|
|
|
/// Layout items for PrayerTracker
|
|
|
|
module PrayerTracker.Views.Layout
|
|
|
|
|
2021-09-19 02:42:40 +00:00
|
|
|
open Giraffe.ViewEngine
|
2022-07-31 13:37:06 +00:00
|
|
|
open Giraffe.ViewEngine.Accessibility
|
2019-02-18 01:25:07 +00:00
|
|
|
open PrayerTracker.ViewModels
|
2019-02-27 07:51:24 +00:00
|
|
|
open System.Globalization
|
2022-07-13 02:43:01 +00:00
|
|
|
|
2019-02-27 07:51:24 +00:00
|
|
|
/// Get the two-character language code for the current request
|
2022-07-13 02:43:01 +00:00
|
|
|
let langCode () = if CultureInfo.CurrentCulture.Name.StartsWith "es" then "es" else "en"
|
2019-02-27 07:51:24 +00:00
|
|
|
|
|
|
|
|
2019-02-18 01:25:07 +00:00
|
|
|
/// Navigation items
|
|
|
|
module Navigation =
|
|
|
|
|
2022-07-13 02:43:01 +00:00
|
|
|
/// Top navigation bar
|
|
|
|
let top m =
|
2022-07-31 21:56:32 +00:00
|
|
|
let s = I18N.localizer.Force ()
|
2022-07-13 02:43:01 +00:00
|
|
|
let menuSpacer = rawText " "
|
2022-08-05 00:24:49 +00:00
|
|
|
let _dropdown = _class "dropdown-btn"
|
2022-07-13 02:43:01 +00:00
|
|
|
let leftLinks = [
|
2022-07-13 22:26:19 +00:00
|
|
|
match m.User with
|
2022-07-13 02:43:01 +00:00
|
|
|
| Some u ->
|
|
|
|
li [ _class "dropdown" ] [
|
2022-07-31 21:56:32 +00:00
|
|
|
a [ _dropdown; _ariaLabel s["Requests"].Value; _title s["Requests"].Value; _roleButton ] [
|
2022-07-31 13:37:06 +00:00
|
|
|
icon "question_answer"; space; locStr s["Requests"]; space; icon "keyboard_arrow_down"
|
|
|
|
]
|
|
|
|
div [ _class "dropdown-content"; _roleMenuBar ] [
|
|
|
|
a [ _href "/prayer-requests"; _roleMenuItem ] [
|
|
|
|
icon "compare_arrows"; menuSpacer; locStr s["Maintain"]
|
|
|
|
]
|
|
|
|
a [ _href "/prayer-requests/view"; _roleMenuItem ] [
|
|
|
|
icon "list"; menuSpacer; locStr s["View List"]
|
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
]
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
li [ _class "dropdown" ] [
|
2022-07-31 21:56:32 +00:00
|
|
|
a [ _dropdown; _ariaLabel s["Group"].Value; _title s["Group"].Value; _roleButton ] [
|
2022-07-31 13:37:06 +00:00
|
|
|
icon "group"; space; locStr s["Group"]; space; icon "keyboard_arrow_down"
|
|
|
|
]
|
|
|
|
div [ _class "dropdown-content"; _roleMenuBar ] [
|
|
|
|
a [ _href "/small-group/members"; _roleMenuItem ] [
|
|
|
|
icon "email"; menuSpacer; locStr s["Maintain Group Members"]
|
|
|
|
]
|
|
|
|
a [ _href "/small-group/announcement"; _roleMenuItem ] [
|
|
|
|
icon "send"; menuSpacer; locStr s["Send Announcement"]
|
|
|
|
]
|
|
|
|
a [ _href "/small-group/preferences"; _roleMenuItem ] [
|
|
|
|
icon "build"; menuSpacer; locStr s["Change Preferences"]
|
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
]
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
2022-08-02 01:57:55 +00:00
|
|
|
if u.IsAdmin then
|
2022-07-13 02:43:01 +00:00
|
|
|
li [ _class "dropdown" ] [
|
2022-07-31 21:56:32 +00:00
|
|
|
a [ _dropdown
|
2022-07-31 13:37:06 +00:00
|
|
|
_ariaLabel s["Administration"].Value
|
|
|
|
_title s["Administration"].Value
|
|
|
|
_roleButton ] [
|
|
|
|
icon "settings"; space; locStr s["Administration"]; space; icon "keyboard_arrow_down"
|
|
|
|
]
|
|
|
|
div [ _class "dropdown-content"; _roleMenuBar ] [
|
|
|
|
a [ _href "/churches"; _roleMenuItem ] [ icon "home"; menuSpacer; locStr s["Churches"] ]
|
|
|
|
a [ _href "/small-groups"; _roleMenuItem ] [ icon "send"; menuSpacer; locStr s["Groups"] ]
|
|
|
|
a [ _href "/users"; _roleMenuItem ] [ icon "build"; menuSpacer; locStr s["Users"] ]
|
2022-07-13 02:43:01 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
| None ->
|
2022-07-13 22:26:19 +00:00
|
|
|
match m.Group with
|
2022-07-13 02:43:01 +00:00
|
|
|
| Some _ ->
|
|
|
|
li [] [
|
2022-07-31 13:37:06 +00:00
|
|
|
a [ _href "/prayer-requests/view"
|
|
|
|
_ariaLabel s["View Request List"].Value
|
|
|
|
_title s["View Request List"].Value ] [
|
|
|
|
icon "list"; space; locStr s["View Request List"]
|
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
]
|
|
|
|
| None ->
|
|
|
|
li [ _class "dropdown" ] [
|
2022-07-31 21:56:32 +00:00
|
|
|
a [ _dropdown; _ariaLabel s["Log On"].Value; _title s["Log On"].Value; _roleButton ] [
|
2022-07-31 13:37:06 +00:00
|
|
|
icon "security"; space; locStr s["Log On"]; space; icon "keyboard_arrow_down"
|
|
|
|
]
|
|
|
|
div [ _class "dropdown-content"; _roleMenuBar ] [
|
|
|
|
a [ _href "/user/log-on"; _roleMenuItem ] [ icon "person"; menuSpacer; locStr s["User"] ]
|
|
|
|
a [ _href "/small-group/log-on"; _roleMenuItem ] [
|
|
|
|
icon "group"; menuSpacer; locStr s["Group"]
|
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
li [] [
|
2022-07-31 13:37:06 +00:00
|
|
|
a [ _href "/prayer-requests/lists"
|
|
|
|
_ariaLabel s["View Request List"].Value
|
|
|
|
_title s["View Request List"].Value ] [
|
|
|
|
icon "list"; space; locStr s["View Request List"]
|
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
]
|
|
|
|
li [] [
|
2022-07-31 13:37:06 +00:00
|
|
|
a [ _href $"https://docs.prayer.bitbadger.solutions/{langCode ()}"
|
|
|
|
_ariaLabel s["Help"].Value
|
|
|
|
_title s["View Help"].Value
|
|
|
|
_target "_blank"
|
2022-07-31 21:56:32 +00:00
|
|
|
_relNoOpener ] [
|
2022-07-31 13:37:06 +00:00
|
|
|
icon "help"; space; locStr s["Help"]
|
|
|
|
]
|
2019-02-27 07:51:24 +00:00
|
|
|
]
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
let rightLinks =
|
2022-07-13 22:26:19 +00:00
|
|
|
match m.Group with
|
2022-07-31 13:37:06 +00:00
|
|
|
| Some _ ->
|
|
|
|
[ match m.User with
|
|
|
|
| Some _ ->
|
|
|
|
li [] [
|
|
|
|
a [ _href "/user/password"
|
|
|
|
_ariaLabel s["Change Your Password"].Value
|
|
|
|
_title s["Change Your Password"].Value ] [
|
|
|
|
icon "lock"; space; locStr s["Change Your Password"]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
| None -> ()
|
2022-07-13 02:43:01 +00:00
|
|
|
li [] [
|
2022-07-31 21:56:32 +00:00
|
|
|
a [ _href "/log-off"; _ariaLabel s["Log Off"].Value; _title s["Log Off"].Value; Target.body ] [
|
2022-07-31 13:37:06 +00:00
|
|
|
icon "power_settings_new"; space; locStr s["Log Off"]
|
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
| None -> []
|
2022-07-31 13:37:06 +00:00
|
|
|
header [ _class "pt-title-bar"; Target.content ] [
|
|
|
|
section [ _class "pt-title-bar-left"; _ariaLabel "Left side of top menu" ] [
|
2022-07-13 02:43:01 +00:00
|
|
|
span [ _class "pt-title-bar-home" ] [
|
2022-07-13 23:02:06 +00:00
|
|
|
a [ _href "/"; _title s["Home"].Value ] [ locStr s["PrayerTracker"] ]
|
2022-07-13 02:43:01 +00:00
|
|
|
]
|
|
|
|
ul [] leftLinks
|
|
|
|
]
|
2022-07-31 13:37:06 +00:00
|
|
|
section [ _class "pt-title-bar-center"; _ariaLabel "Empty center space in top menu" ] []
|
|
|
|
section [ _class "pt-title-bar-right"; _roleToolBar; _ariaLabel "Right side of top menu" ] [
|
2022-07-13 02:43:01 +00:00
|
|
|
ul [] rightLinks
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
|
|
|
|
/// Identity bar (below top nav)
|
|
|
|
let identity m =
|
|
|
|
let s = I18N.localizer.Force ()
|
2022-07-31 13:37:06 +00:00
|
|
|
header [ _id "pt-language"; Target.body ] [
|
2022-07-13 02:43:01 +00:00
|
|
|
div [] [
|
2022-08-06 23:36:02 +00:00
|
|
|
span [ _title s["Language"].Value ] [ icon "record_voice_over"; space ]
|
2022-07-13 02:43:01 +00:00
|
|
|
match langCode () with
|
|
|
|
| "es" ->
|
2022-08-06 23:36:02 +00:00
|
|
|
strong [] [ locStr s["Spanish"] ]
|
|
|
|
rawText " "
|
2022-07-13 23:02:06 +00:00
|
|
|
a [ _href "/language/en" ] [ locStr s["Change to English"] ]
|
2022-07-13 02:43:01 +00:00
|
|
|
| _ ->
|
2022-08-06 23:36:02 +00:00
|
|
|
strong [] [ locStr s["English"] ]
|
|
|
|
rawText " "
|
2022-07-13 23:02:06 +00:00
|
|
|
a [ _href "/language/es" ] [ locStr s["Cambie a Español"] ]
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
2022-07-13 22:26:19 +00:00
|
|
|
match m.Group with
|
2022-07-31 13:37:06 +00:00
|
|
|
| Some g ->
|
|
|
|
[ match m.User with
|
|
|
|
| Some u ->
|
|
|
|
span [ _class "u" ] [ locStr s["Currently Logged On"] ]
|
|
|
|
rawText " "
|
|
|
|
icon "person"
|
2022-08-03 18:36:00 +00:00
|
|
|
strong [] [ str u.Name ]
|
2022-07-31 13:37:06 +00:00
|
|
|
rawText " "
|
|
|
|
| None ->
|
|
|
|
locStr s["Logged On as a Member of"]
|
|
|
|
rawText " "
|
|
|
|
icon "group"
|
|
|
|
space
|
|
|
|
match m.User with
|
2022-08-02 01:57:55 +00:00
|
|
|
| Some _ -> a [ _href "/small-group"; Target.content ] [ strong [] [ str g.Name ] ]
|
|
|
|
| None -> strong [] [ str g.Name ]
|
2022-07-31 13:37:06 +00:00
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
| None -> []
|
|
|
|
|> div []
|
|
|
|
]
|
2019-02-18 01:25:07 +00:00
|
|
|
|
2019-02-27 07:51:24 +00:00
|
|
|
|
2019-02-18 01:25:07 +00:00
|
|
|
/// Content layouts
|
|
|
|
module Content =
|
2022-07-13 02:43:01 +00:00
|
|
|
|
|
|
|
/// Content layout that tops at 60rem
|
|
|
|
let standard = div [ _class "pt-content" ]
|
2019-02-18 01:25:07 +00:00
|
|
|
|
2022-07-13 02:43:01 +00:00
|
|
|
/// Content layout that uses the full width of the browser window
|
|
|
|
let wide = div [ _class "pt-content pt-full-width" ]
|
2019-02-18 01:25:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
/// Separator for parts of the title
|
|
|
|
let private titleSep = rawText " « "
|
|
|
|
|
2022-07-13 02:43:01 +00:00
|
|
|
/// Common HTML head tag items
|
2022-07-31 13:37:06 +00:00
|
|
|
let private commonHead = [
|
|
|
|
meta [ _name "viewport"; _content "width=device-width, initial-scale=1" ]
|
|
|
|
meta [ _name "generator"; _content "Giraffe" ]
|
|
|
|
link [ _rel "stylesheet"; _href "https://fonts.googleapis.com/icon?family=Material+Icons" ]
|
|
|
|
link [ _rel "stylesheet"; _href "/css/app.css" ]
|
|
|
|
]
|
2019-02-18 01:25:07 +00:00
|
|
|
|
|
|
|
/// Render the <head> portion of the page
|
2022-08-01 20:22:37 +00:00
|
|
|
let private htmlHead viewInfo pgTitle =
|
2022-07-13 02:43:01 +00:00
|
|
|
let s = I18N.localizer.Force ()
|
|
|
|
head [] [
|
|
|
|
meta [ _charset "UTF-8" ]
|
2022-08-01 20:22:37 +00:00
|
|
|
title [] [ locStr pgTitle; titleSep; locStr s["PrayerTracker"] ]
|
2022-07-13 02:43:01 +00:00
|
|
|
yield! commonHead
|
2022-08-01 20:22:37 +00:00
|
|
|
for cssFile in viewInfo.Style do
|
2022-07-13 02:43:01 +00:00
|
|
|
link [ _rel "stylesheet"; _href $"/css/{cssFile}.css"; _type "text/css" ]
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
2022-07-31 21:56:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
open Giraffe.ViewEngine.Htmx
|
|
|
|
|
2019-02-18 01:25:07 +00:00
|
|
|
/// Render a link to the help page for the current page
|
|
|
|
let private helpLink link =
|
2022-07-13 02:43:01 +00:00
|
|
|
let s = I18N.localizer.Force ()
|
|
|
|
sup [] [
|
2022-07-31 13:37:06 +00:00
|
|
|
a [ _href link
|
|
|
|
_title s["Click for Help on This Page"].Value
|
|
|
|
_onclick $"return PT.showHelp('{link}')"
|
|
|
|
_hxNoBoost ] [
|
|
|
|
icon "help_outline"
|
|
|
|
]
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
/// Render the page title, and optionally a help link
|
2022-08-01 20:22:37 +00:00
|
|
|
let private renderPageTitle viewInfo pgTitle =
|
2022-07-13 02:43:01 +00:00
|
|
|
h2 [ _id "pt-page-title" ] [
|
2022-08-01 20:22:37 +00:00
|
|
|
match viewInfo.HelpLink with
|
|
|
|
| Some link -> PrayerTracker.Utils.Help.fullLink (langCode ()) link |> helpLink
|
|
|
|
| None -> ()
|
|
|
|
locStr pgTitle
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
/// Render the messages that may need to be displayed to the user
|
2022-08-01 20:22:37 +00:00
|
|
|
let private messages viewInfo =
|
2022-07-13 02:43:01 +00:00
|
|
|
let s = I18N.localizer.Force ()
|
2022-08-06 02:36:29 +00:00
|
|
|
if List.isEmpty viewInfo.Messages then []
|
|
|
|
else
|
|
|
|
viewInfo.Messages
|
|
|
|
|> List.map (fun msg ->
|
|
|
|
div [ _class $"pt-msg {MessageLevel.toCssClass msg.Level}" ] [
|
|
|
|
match msg.Level with
|
|
|
|
| Info -> ()
|
|
|
|
| lvl ->
|
|
|
|
strong [] [ locStr s[MessageLevel.toString lvl] ]
|
|
|
|
rawText " » "
|
|
|
|
rawText msg.Text.Value
|
|
|
|
match msg.Description with
|
|
|
|
| Some desc ->
|
|
|
|
br []
|
|
|
|
div [ _class "description" ] [ rawText desc.Value ]
|
|
|
|
| None -> ()
|
|
|
|
])
|
|
|
|
|> div [ _class "pt-messages" ]
|
|
|
|
|> List.singleton
|
2019-02-18 01:25:07 +00:00
|
|
|
|
2022-07-31 21:56:32 +00:00
|
|
|
|
2022-08-08 02:49:32 +00:00
|
|
|
open NodaTime
|
2022-07-31 21:56:32 +00:00
|
|
|
|
2019-02-18 01:25:07 +00:00
|
|
|
/// Render the <footer> at the bottom of the page
|
2022-08-01 20:22:37 +00:00
|
|
|
let private htmlFooter viewInfo =
|
2022-07-31 13:37:06 +00:00
|
|
|
let s = I18N.localizer.Force ()
|
|
|
|
let imgText = $"""%O{s["PrayerTracker"]} %O{s["from Bit Badger Solutions"]}"""
|
2022-08-08 02:49:32 +00:00
|
|
|
let resultTime = (SystemClock.Instance.GetCurrentInstant () - viewInfo.RequestStart).TotalSeconds
|
2022-08-03 18:36:00 +00:00
|
|
|
footer [ _class "pt-footer" ] [
|
2022-07-13 02:43:01 +00:00
|
|
|
div [ _id "pt-legal" ] [
|
2022-07-13 23:02:06 +00:00
|
|
|
a [ _href "/legal/privacy-policy" ] [ locStr s["Privacy Policy"] ]
|
2022-08-03 18:36:00 +00:00
|
|
|
rawText " "
|
2022-07-13 23:02:06 +00:00
|
|
|
a [ _href "/legal/terms-of-service" ] [ locStr s["Terms of Service"] ]
|
2022-08-03 18:36:00 +00:00
|
|
|
rawText " "
|
2022-07-31 13:37:06 +00:00
|
|
|
a [ _href "https://github.com/bit-badger/PrayerTracker"
|
|
|
|
_title s["View source code and get technical support"].Value
|
2022-07-13 02:43:01 +00:00
|
|
|
_target "_blank"
|
2022-07-31 21:56:32 +00:00
|
|
|
_relNoOpener ] [
|
2022-07-31 13:37:06 +00:00
|
|
|
locStr s["Source & Support"]
|
2022-07-13 02:43:01 +00:00
|
|
|
]
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
2022-07-13 02:43:01 +00:00
|
|
|
div [ _id "pt-footer" ] [
|
2022-07-31 13:37:06 +00:00
|
|
|
a [ _href "/"; _style "line-height:28px;" ] [
|
2022-08-03 18:36:00 +00:00
|
|
|
img [ _src $"""/img/%O{s["footer_en"]}.png"""
|
|
|
|
_alt imgText
|
|
|
|
_title imgText
|
|
|
|
_width "331"; _height "28" ]
|
2022-07-31 13:37:06 +00:00
|
|
|
]
|
2022-08-05 00:24:49 +00:00
|
|
|
span [ _id "pt-version" ] [ str viewInfo.Version ]
|
2022-07-13 02:43:01 +00:00
|
|
|
space
|
2022-07-31 13:37:06 +00:00
|
|
|
i [ _title s["This page loaded in {0:N3} seconds", resultTime].Value; _class "material-icons md-18" ] [
|
|
|
|
str "schedule"
|
|
|
|
]
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2022-07-31 21:56:32 +00:00
|
|
|
/// The content portion of the PrayerTracker layout
|
2022-08-01 20:22:37 +00:00
|
|
|
let private contentSection viewInfo pgTitle (content : XmlNode) = [
|
2022-07-31 21:56:32 +00:00
|
|
|
Navigation.identity viewInfo
|
2022-08-01 20:22:37 +00:00
|
|
|
renderPageTitle viewInfo pgTitle
|
2022-07-31 21:56:32 +00:00
|
|
|
yield! messages viewInfo
|
2022-08-01 01:25:44 +00:00
|
|
|
match viewInfo.ScopedStyle with
|
|
|
|
| [] -> ()
|
2022-08-03 18:36:00 +00:00
|
|
|
| styles -> style [] [ rawText (styles |> String.concat " ") ]
|
2022-07-31 21:56:32 +00:00
|
|
|
content
|
|
|
|
htmlFooter viewInfo
|
2022-08-01 01:25:44 +00:00
|
|
|
match viewInfo.OnLoadScript with
|
2022-08-03 18:36:00 +00:00
|
|
|
| Some onLoad ->
|
|
|
|
script [] [
|
|
|
|
rawText $"""
|
|
|
|
window.doOnLoad = () => {{
|
|
|
|
if (window.PT) {{
|
|
|
|
{onLoad}()
|
|
|
|
delete window.doOnLoad
|
|
|
|
}} else {{ setTimeout(window.doOnLoad, 500) }}
|
|
|
|
}}
|
|
|
|
window.doOnLoad()"""
|
|
|
|
]
|
2022-08-01 01:25:44 +00:00
|
|
|
| None -> ()
|
2022-07-31 21:56:32 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
/// The HTML head element for partial responses
|
|
|
|
let private partialHead pgTitle =
|
|
|
|
let s = I18N.localizer.Force ()
|
|
|
|
head [] [
|
|
|
|
meta [ _charset "UTF-8" ]
|
|
|
|
title [] [ locStr pgTitle; titleSep; locStr s["PrayerTracker"] ]
|
|
|
|
]
|
|
|
|
|
|
|
|
open Giraffe.Htmx.Common
|
|
|
|
|
|
|
|
/// The body of the PrayerTracker layout
|
2022-08-01 20:22:37 +00:00
|
|
|
let private pageLayout viewInfo pgTitle content =
|
2022-07-31 21:56:32 +00:00
|
|
|
body [ _hxBoost ] [
|
|
|
|
Navigation.top viewInfo
|
|
|
|
div [ _id "pt-body"; Target.content; _hxSwap $"{HxSwap.InnerHtml} show:window:top" ]
|
2022-08-01 20:22:37 +00:00
|
|
|
(contentSection viewInfo pgTitle content)
|
2022-08-03 18:36:00 +00:00
|
|
|
match viewInfo.Layout with
|
|
|
|
| FullPage ->
|
|
|
|
Script.minified
|
|
|
|
script [ _src "/js/ckeditor/ckeditor.js" ] []
|
|
|
|
script [ _src "/js/app.js" ] []
|
|
|
|
| _ -> ()
|
2022-07-31 21:56:32 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
/// The standard layout(s) for PrayerTracker
|
|
|
|
let standard viewInfo pageTitle content =
|
|
|
|
let s = I18N.localizer.Force ()
|
|
|
|
let pgTitle = s[pageTitle]
|
2022-07-31 13:37:06 +00:00
|
|
|
html [ _lang (langCode ()) ] [
|
2022-07-31 21:56:32 +00:00
|
|
|
match viewInfo.Layout with
|
|
|
|
| FullPage ->
|
|
|
|
htmlHead viewInfo pgTitle
|
|
|
|
pageLayout viewInfo pgTitle content
|
|
|
|
| PartialPage ->
|
|
|
|
partialHead pgTitle
|
|
|
|
pageLayout viewInfo pgTitle content
|
|
|
|
| ContentOnly ->
|
|
|
|
partialHead pgTitle
|
|
|
|
body [] (contentSection viewInfo pgTitle content)
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|
2022-07-31 21:56:32 +00:00
|
|
|
|
2019-02-18 01:25:07 +00:00
|
|
|
/// A layout with nothing but a title and content
|
|
|
|
let bare pageTitle content =
|
2022-07-31 21:56:32 +00:00
|
|
|
let s = I18N.localizer.Force ()
|
2022-07-31 13:37:06 +00:00
|
|
|
html [ _lang (langCode ()) ] [
|
2022-07-31 21:56:32 +00:00
|
|
|
partialHead s[pageTitle]
|
2022-07-13 02:43:01 +00:00
|
|
|
body [] [ content ]
|
2019-02-18 01:25:07 +00:00
|
|
|
]
|