packages feed

takahashi 0.2.0.0 → 0.2.0.1

raw patch · 4 files changed

+96/−34 lines, 4 files

Files

html/Temp.html view
@@ -1,10 +1,10 @@ <html> <head>-  <title></title>+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">   <script type="text/javascript">     var SlideList = []     var SlideIndex = 0;-    var Title = "Title";+    var Title = "Slide";      function init(){       SlideList = document.getElementsByName("pages");@@ -35,8 +35,9 @@       width: 99%;        overflow:hidden;     }-    h1, h2, h3, ul {+    h1, h2, h3, ul, p {       margin:0px; +      padding:0px;     }     .slide {       font-size:45pt;
src/Control/Monad/Takahashi.hs view
@@ -5,22 +5,37 @@   , takaCont   , parCont   , listCont+  , takaCont2+  , parCont2+  , listCont2   , horizonCont   , verticalCont   , annotationCont   , imgCont   , codeCont   , titleCont+  , twinTopCont+  , twinBottomCont+  , twinLeftCont+  , twinRightCont   ----   , title   , taka   , par   , list+  , taka2+  , par2+  , list2   , horizon   , vertical   , annotation   , img   , code+  , code2+  , twinTop+  , twinBottom+  , twinLeft+  , twinRight   ----   , makePage   ------@@ -29,7 +44,7 @@   , fontColor, bgColor, frameColor, frameStyle   , SlideOption   , slideTitle, slideFontSize, titleOption, codeOption-  , contentsOption, annotationOption, blockFontSize+  , contentsOption, contentsOption2, annotationOption, blockFontSize   , defaultSlideOption   ----   , Taka(..) @@ -47,7 +62,9 @@   , bindPage   ------   -- from Control.Monad.Takahashi.HtmlBuilder+  , Color(..)   , DrawType(..)+  , BorderStyle(..)   ------   -- from Control.Monad.Takahashi.Util   , stateSandbox@@ -63,21 +80,24 @@ ---- -- Contents -emptyCont :: Contents-emptyCont = Contents $ \_ -> return ()- takaCont :: String -> Contents-takaCont s = Contents $ -  \option -> central (makeContentsStyle option) $ writeHeader1 s+takaCont = takaContBase makeContentsStyle  listCont :: [String] -> Contents-listCont xs = Contents $ -  \option -> contents (basicContents option) $ writeList xs+listCont = listContBase basicContents  parCont :: String -> Contents-parCont s = Contents $ -  \option -> contents (basicContents option) $ writeParagraph s+parCont = parContBase basicContents +takaCont2 :: String -> Contents+takaCont2 = takaContBase makeContentsStyle2++listCont2 :: [String] -> Contents+listCont2 = listContBase basicContents2++parCont2 :: String -> Contents+parCont2 = parContBase basicContents2+ imgCont :: DrawType -> String -> Contents imgCont dt fp = Contents $   \option -> central (return ()) $ drawPicture dt fp@@ -131,8 +151,6 @@   \option -> central (makeTitleStyle option) $ do     writeHeader1 t     writeParagraph s-  - ----  subTitlePage :: String -> Contents -> Contents@@ -153,6 +171,18 @@       }     ] +takaContBase :: (SlideOption -> MakeStyle ()) -> String -> Contents+takaContBase m s = Contents $ +  \option -> central (m option) $ writeHeader1 s++listContBase :: (SlideOption -> MakeStyle ()) -> [String] -> Contents+listContBase m xs = Contents $ +  \option -> contents (m option) $ writeList xs++parContBase :: (SlideOption -> MakeStyle ()) -> String -> Contents+parContBase m s = Contents $ +  \option -> contents (m option) $ writeParagraph s+ ---- -- slides @@ -168,6 +198,15 @@ par :: String -> Taka () par s = makePage $ parCont s +taka2 :: String -> Taka ()+taka2 s = makePage $ takaCont2 s++list2 :: [String] -> Taka ()+list2 xs = makePage $ listCont2 xs++par2 :: String -> Taka ()+par2 s = makePage $ parCont2 s+ horizon :: [Contents] -> Taka () horizon ps = makePage $ horizonCont ps @@ -183,6 +222,9 @@ code :: String -> String -> Taka () code s c = twinBottom (parCont s) (codeCont c) +code2 :: String -> String -> Taka ()+code2 s c = twinBottom (parCont2 s) (codeCont c)+ twinTop :: Contents -> Contents -> Taka () twinTop c1 c2 = makePage $ twinTopCont c1 c2 @@ -215,10 +257,15 @@   makeContentsStyle o   setPadding +basicContents2 :: SlideOption -> MakeStyle ()+basicContents2 o = do+  makeContentsStyle2 o+  setPadding+ codeContents :: SlideOption -> MakeStyle () codeContents o = do   makeCodeStyle o-  setPadding+  margin.paddingLeft .= Just (Per 8)  setPadding :: MakeStyle () setPadding = do@@ -228,17 +275,17 @@ makeTwinCont :: ([DivInfo Style] -> HBuilder ())    -> Int -> Int -> Contents -> Contents -> Contents makeTwinCont builder i1 i2 c1 c2 = Contents $ \option -> do-    builder-      [ divInfo-          { divRatio = i1-          , divData = do-              display .= Just Table-              extructHBuilder c1 option-          }-      , divInfo-          { divRatio = i2-          , divData = do-              display .= Just Table-              extructHBuilder c2 option-          }-      ]+  builder+    [ divInfo+        { divRatio = i1+        , divData = do+            display .= Just Table+            extructHBuilder c1 option+        }+    , divInfo+        { divRatio = i2+        , divData = do+            display .= Just Table+            extructHBuilder c2 option+        }+    ]
src/Control/Monad/Takahashi/Slide.hs view
@@ -2,11 +2,11 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GADTs #-} module Control.Monad.Takahashi.Slide -  ( BlockOption+  ( BlockOption(..)   , fontColor, bgColor, frameColor, frameStyle-  , SlideOption+  , SlideOption(..)   , slideTitle, slideFontSize, titleOption, codeOption-  , contentsOption, annotationOption, blockFontSize+  , contentsOption, contentsOption2, annotationOption, blockFontSize   , defaultSlideOption   ----   , Taka(..) @@ -20,6 +20,7 @@   , makeSlide    , makeTitleStyle   , makeContentsStyle+  , makeContentsStyle2   , makeAnnotationStyle   , makeCodeStyle   ----@@ -52,6 +53,7 @@   , _slideFontSize :: Maybe Int   , _titleOption :: BlockOption   , _contentsOption :: BlockOption+  , _contentsOption2 :: BlockOption   , _annotationOption :: BlockOption   , _codeOption :: BlockOption   } deriving (Show, Read, Eq, Ord)@@ -77,6 +79,13 @@     , _frameStyle = Just BorderSolid     , _blockFontSize = Nothing     }+  , _contentsOption2 = BlockOption+    { _fontColor = Just $ Color 80 0 0+    , _bgColor = Just $ Color 255 200 200 +    , _frameColor = Just $ Color 255 255 255+    , _frameStyle = Just BorderSolid+    , _blockFontSize = Nothing+    }   , _annotationOption = BlockOption     { _fontColor = Just $ Color 255 0 0     , _bgColor = Nothing@@ -139,18 +148,23 @@  ------ -- helper + makeTitleStyle :: SlideOption -> MakeStyle () makeTitleStyle = makeBlockStyle titleOption  makeContentsStyle :: SlideOption -> MakeStyle () makeContentsStyle = makeBlockStyle contentsOption +makeContentsStyle2 :: SlideOption -> MakeStyle ()+makeContentsStyle2 = makeBlockStyle contentsOption2+ makeAnnotationStyle :: SlideOption -> MakeStyle () makeAnnotationStyle = makeBlockStyle annotationOption  makeCodeStyle :: SlideOption -> MakeStyle () makeCodeStyle o = do   makeBlockStyle codeOption o+  align.verticalAlign .= Just AlignMiddle   font.fontFamily .= Just [SensSelif, Monospace]   font.whiteSpace .= Just Pre 
takahashi.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                takahashi-version:             0.2.0.0+version:             0.2.0.1 synopsis:            library for takahashi method. description:         create slide as takahashi method. license:             MIT