Skip to content

Commit 57085cb

Browse files
authored
Add GitHub button to Common.hs (#5)
* Add GitHub button to Common.hs Replace ribbon for button * Refactor to use H.iframe_ syntax
1 parent 7b36334 commit 57085cb

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

shared/Common.hs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -304,19 +304,22 @@ home = template $
304304
]
305305
]
306306
-----------------------------------------------------------------------------
307+
githubStar :: View model action
308+
githubStar = H.iframe_
309+
[ P.title_ "GitHub"
310+
, P.height_ "30"
311+
, P.width_ "170"
312+
, P.scrolling_ "0"
313+
, P.frameborder_ "0"
314+
, P.src_ "https://ghbtns.com/github-btn.html?user=haskell-miso&repo=miso-websocket&type=star&count=true&size=large"
315+
]
316+
[]
317+
-----------------------------------------------------------------------------
307318
template :: View Model Action -> Model -> View Model Action
308319
template content m =
309320
H.div_
310321
[]
311-
[ H.a_
312-
[ P.class_ "github-fork-ribbon left-top fixed"
313-
, P.href_ "http://github.com/dmjio/miso"
314-
, P.data_ "ribbon" "Fork me on GitHub"
315-
, P.target_ "blank"
316-
, P.rel_ "noopener"
317-
, P.title_ "Fork me on GitHub"
318-
]
319-
[ "Fork me on GitHub" ]
322+
[ githubStar
320323
, hero content (m ^. uri) (m ^. navMenuOpen)
321324
, middle
322325
, footer

0 commit comments

Comments
 (0)