Skip to content

Commit

Permalink
Move results before left anchors in tab focus order
Browse files Browse the repository at this point in the history
  • Loading branch information
louislebrault committed Dec 6, 2021
1 parent f3d8bfe commit 62a2a8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions html/hoogle.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ body {

#body {
flex-grow: 1;
position: relative;
}

a img {
Expand Down Expand Up @@ -127,6 +128,9 @@ form {
padding: 0px;
margin-left: 10px;
overflow: hidden;
position: absolute;
top: 0;
left: 0;
}

#left li {
Expand Down
7 changes: 4 additions & 3 deletions src/Action/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ dedupeTake n key = f [] Map.empty
showResults :: Bool -> Bool -> Maybe FilePath -> [(String, String)] -> [Query] -> [[Target]] -> Markup
showResults local links haddock args query results = do
H.h1 $ renderQuery query
H.ul ! H.id "left" $ do
H.li $ H.b "Packages"
mconcat [H.li $ f cat val | (cat,val) <- itemCategories $ concat results, QueryScope True cat val `notElem` query]
when (null results) $ H.p "No results found"
forM_ results $ \is@(Target{..}:_) -> do
H.div ! H.class_ "result" $ do
Expand All @@ -203,6 +200,10 @@ showResults local links haddock args query results = do
H.div ! H.class_ "links" $ H.a ! H.href (H.stringValue link) $ "Uses"
H.div ! H.class_ "from" $ showFroms local haddock is
H.div ! H.class_ "doc newline shut" $ H.preEscapedString targetDocs
H.ul ! H.id "left" $ do
H.li $ H.b "Packages"
mconcat [H.li $ f cat val | (cat,val) <- itemCategories $ concat results, QueryScope True cat val `notElem` query]

where
useLink :: [Target] -> Maybe String
useLink [t] | isNothing $ targetPackage t =
Expand Down

0 comments on commit 62a2a8a

Please sign in to comment.