From 443926c0b5e3237542f607a7f35bddde13a2b4ba Mon Sep 17 00:00:00 2001 From: Max Wilson Date: Sun, 26 Nov 2023 18:26:30 -0800 Subject: [PATCH] Layout tweaks to make github link not cover up information and hopefully not be bigger than the viewport on mobile --- main.sass | 10 +++++----- src/Main.fs | 7 ------- src/UI/CommonUI.fs | 6 ++++++ src/UI/Components/PriestSpellsView.fs | 3 ++- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/main.sass b/main.sass index 93beb41..31eeea4 100644 --- a/main.sass +++ b/main.sass @@ -117,11 +117,11 @@ ul font-weight: bold @media speech display: none - .srcLink - max-width: 6rem - position: absolute - right: 3px - background-color: white + +.srcLink + max-width: 6rem + float: right + background-color: white .horizontalStack display: flex diff --git a/src/Main.fs b/src/Main.fs index a11369e..b9d2ce0 100644 --- a/src/Main.fs +++ b/src/Main.fs @@ -15,13 +15,6 @@ let Router() = React.router [ router.onUrlChanged updateUrl router.children [ - class' "header" Html.div [ - classP' "srcLink" Html.a [ - prop.href "https://github.com/MaxWilson/ShiningSword/" - prop.children [Html.img [prop.ariaLabel "GitHub"; prop.src "img/GitHub_Logo.png"]] - prop.target "_blank" - ] - ] let lookup = [ "priestSpells", "Priest Spells by Sphere", (fun () -> UI.PriestSpellsView.View()) ] diff --git a/src/UI/CommonUI.fs b/src/UI/CommonUI.fs index 10ade6c..50cdaf2 100644 --- a/src/UI/CommonUI.fs +++ b/src/UI/CommonUI.fs @@ -16,6 +16,12 @@ let divWrap (className: string) element = let normalizeCRLF (str: string) = str.Replace("\r\n", "\n").Replace("\r", "\n") exception UserFacingException of msg:string let informUserOfError msg = UserFacingException msg |> raise +let srcLink = + classP' "srcLink" Html.a [ + prop.href "https://github.com/MaxWilson/ShiningSword/" + prop.children [Html.img [prop.ariaLabel "GitHub"; prop.src "img/GitHub_Logo.png"]] + prop.target "_blank" + ] type React = static member inline useElmishSimple (init: _ -> 'model) (update: 'msg -> 'model -> 'model) = diff --git a/src/UI/Components/PriestSpellsView.fs b/src/UI/Components/PriestSpellsView.fs index 8572062..737ff26 100644 --- a/src/UI/Components/PriestSpellsView.fs +++ b/src/UI/Components/PriestSpellsView.fs @@ -36,7 +36,8 @@ let View() = ] ] ] - Html.div [ + class' "scrollable" Html.div [ + srcLink Html.h2 "Gods" Html.ul [ for deity in filteredDeities filter model do