1
0
Fork 0
mirror of https://code.naskya.net/repos/ndqEd synced 2025-01-12 06:55:08 +09:00
vervis/src/Vervis/Widget/Sharer.hs

43 lines
1 KiB
Haskell
Raw Normal View History

{- This file is part of Vervis.
-
- Written in 2016 by fr33domlover <fr33domlover@riseup.net>.
-
- Copying is an act of love. Please copy, reuse and share.
-
- The author(s) have dedicated all copyright and related and neighboring
- rights to this software to the public domain worldwide. This software is
- distributed without any warranty.
-
- You should have received a copy of the CC0 Public Domain Dedication along
- with this software. If not, see
- <http://creativecommons.org/publicdomain/zero/1.0/>.
-}
2016-05-25 06:48:21 +09:00
module Vervis.Widget.Sharer
( sharerLinkW
2016-05-25 06:48:21 +09:00
, personLinkW
, groupLinkW
)
where
import Prelude
2016-05-25 06:48:21 +09:00
import Yesod.Core (Route)
import Vervis.Foundation
import Vervis.Model
2016-05-25 06:48:21 +09:00
import Vervis.Model.Ident (ShrIdent, shr2text)
import Vervis.Settings (widgetFile)
2016-05-25 06:48:21 +09:00
link :: (ShrIdent -> Route App) -> Sharer -> Widget
link route sharer = $(widgetFile "sharer-link")
sharerLinkW :: Sharer -> Widget
2016-05-25 06:48:21 +09:00
sharerLinkW = link SharerR
personLinkW :: Sharer -> Widget
personLinkW = link PersonR
2016-05-25 06:48:21 +09:00
groupLinkW :: Sharer -> Widget
groupLinkW = link GroupR