From 7fb8756787ae8aaeba4fa0d1b2eeb703516d8c23 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 2 Nov 2017 11:58:32 +0100 Subject: Add copy&pasteable BibTeX entries to HTML --- src/Render.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/Render.hs b/src/Render.hs index 146b68d..7b8bab2 100644 --- a/src/Render.hs +++ b/src/Render.hs @@ -10,6 +10,7 @@ import Data.Maybe (catMaybes) import qualified Data.Text as T import Data.Text.Encoding (decodeUtf8) import Text.BibTeX.Entry as E +import Text.BibTeX.Format (entry) import qualified Data.Map as M import Text.Parsec.Error import Text.ParserCombinators.Parsec.Prim @@ -114,6 +115,8 @@ bibentry bib = do span_ [class_ "author"] $ htmlLookup "author" ", " span_ [class_ "year"] $ htmlLookup "year" + " " + button_ [type_ "button", class_ "btn btn-light btn-sm", data_ "toggle" "popover", title_ "BibTeX", data_ "content" $ T.pack $ entry bib] "BibTeX" -- | References section references :: [E.T] -> Html () -- cgit v1.2.3