blaze 0.0.1 → 0.0.2
raw patch · 7 files changed
+5/−233 lines, 7 filesdep −basedep −blaze-htmldep −blaze-markup
Dependencies removed: base, blaze-html, blaze-markup
Files
- LICENSE +0/−30
- blaze.cabal +5/−19
- src/Blaze.hs +0/−19
- src/Blaze/Attributes.hs +0/−7
- src/Blaze/Bootstrap.hs +0/−96
- src/Blaze/Elements.hs +0/−7
- src/Blaze/Html5.hs +0/−55
− LICENSE
@@ -1,30 +0,0 @@-Copyright (c) 2013, Chris Done--All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:-- * Redistributions of source code must retain the above copyright- notice, this list of conditions and the following disclaimer.-- * Redistributions in binary form must reproduce the above- copyright notice, this list of conditions and the following- disclaimer in the documentation and/or other materials provided- with the distribution.-- * Neither the name of Chris Done nor the names of other- contributors may be used to endorse or promote products derived- from this software without specific prior written permission.--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
blaze.cabal view
@@ -1,24 +1,10 @@ name: blaze-version: 0.0.1-synopsis: Blaze-html-based HTML5 library-description: A host of HTML5 functions to make writing HTML5 with blaze-html practical.+version: 0.0.2+synopsis: None+description: None license: BSD3-license-file: LICENSE-author: Chris Done-maintainer: chrisdone@gmail.com-copyright: 2013 Chris Done-category: HTML, Web+author: None build-type: Simple-cabal-version: >=1.8+cabal-version: >=1.2 library- exposed-modules: Blaze,- Blaze.Html5,- Blaze.Elements,- Blaze.Attributes,- Blaze.Bootstrap- hs-source-dirs: src/- build-depends: base > 4 && <5,- blaze-markup,- blaze-html- ghc-options: -Wall
− src/Blaze.hs
@@ -1,19 +0,0 @@--- | A host of HTML5 functions to make writing HTML5 with blaze-html--- practical.------ Common imports to make:------ > import Blaze--- > import Blaze.Elements as E--- > import Blaze.Attributes as A--- > import Blaze.Bootstrap--module Blaze- (-- * Main library- module Blaze.Html5- -- * Rendering- ,renderHtml)- where--import Blaze.Html5-import Text.Blaze.Html.Renderer.Text (renderHtml)
− src/Blaze/Attributes.hs
@@ -1,7 +0,0 @@--- | Re-export of all HTML5 attributes.--module Blaze.Attributes- (module Text.Blaze.Html5.Attributes)- where--import Text.Blaze.Html5.Attributes
− src/Blaze/Bootstrap.hs
@@ -1,96 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}---- | Bootstrap layout elements. See--- <http://getbootstrap.com/2.3.2/scaffolding.html> for more--- information.--module Blaze.Bootstrap- (- -- * Containers- container- ,containerFluid- -- * Rows- ,row- ,rowFluid- -- * Spans- ,span1- ,span2- ,span3- ,span4- ,span5- ,span6- ,span7- ,span8- ,span9- ,span10- ,span11- ,span12- )- where--import Prelude hiding (div)-import Blaze.Html5---- | A grid container.-container :: Html -> Html-container x = div !. "container" $ x---- | A fluid grid container.-containerFluid :: Html -> Html-containerFluid x = div !. "container-fluid" $ x---- | A grid row.-row :: Html -> Html-row x = div !. "row" $ x---- | A fluid grid row.-rowFluid :: Html -> Html-rowFluid x = div !. "row-fluid" $ x---- | A span of 1 columns.-span1 :: Html -> Html-span1 x = div !. "span1" $ x---- | A span of 2 columns.-span2 :: Html -> Html-span2 x = div !. "span2" $ x---- | A span of 3 columns.-span3 :: Html -> Html-span3 x = div !. "span3" $ x---- | A span of 4 columns.-span4 :: Html -> Html-span4 x = div !. "span4" $ x---- | A span of 5 columns.-span5 :: Html -> Html-span5 x = div !. "span5" $ x---- | A span of 6 columns.-span6 :: Html -> Html-span6 x = div !. "span6" $ x---- | A span of 7 columns.-span7 :: Html -> Html-span7 x = div !. "span7" $ x---- | A span of 8 columns.-span8 :: Html -> Html-span8 x = div !. "span8" $ x---- | A span of 9 columns.-span9 :: Html -> Html-span9 x = div !. "span9" $ x---- | A span of 10 columns.-span10 :: Html -> Html-span10 x = div !. "span10" $ x---- | A span of 11 columns.-span11 :: Html -> Html-span11 x = div !. "span11" $ x---- | A span of 12 columns.-span12 :: Html -> Html-span12 x = div !. "span12" $ x
− src/Blaze/Elements.hs
@@ -1,7 +0,0 @@--- | Re-export of all HTML5 attributes.--module Blaze.Elements- (module Text.Blaze.Html5)- where--import Text.Blaze.Html5
− src/Blaze/Html5.hs
@@ -1,55 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# OPTIONS -fno-warn-unused-do-bind #-}--module Blaze.Html5- (- -- * Re-exports- module Text.Blaze- ,module Text.Blaze.Html5- ,module Text.Blaze.Html5.Attributes- -- * Attribute combinators- ,Attributable- ,(!.)- ,(!#)- -- * Common operations- ,linesToHtml- ,htmlIntercalate- ,htmlCommasAnd- ,htmlCommas)- where--import Data.Monoid-import Text.Blaze-import Text.Blaze.Html5 hiding (map,style,title)-import qualified Text.Blaze.Html5.Attributes as A-import Text.Blaze.Html5.Attributes hiding (span,label,cite,form,summary,min)-import Text.Blaze.Internal (Attributable)---- | Class attribute.-(!.) :: (Attributable h) => h -> AttributeValue -> h-e !. className = e ! A.class_ className---- | Id attribute.-(!#) :: (Attributable h) => h -> AttributeValue -> h-e !# idName = e ! A.id idName---- | Render the lines as HTML lines.-linesToHtml :: [Html] -> Html-linesToHtml = htmlIntercalate br---- | Intercalate the given things.-htmlIntercalate :: Html -> [Html] -> Html-htmlIntercalate _ [x] = x-htmlIntercalate sep (x:xs) = do x; sep; htmlIntercalate sep xs-htmlIntercalate _ [] = mempty---- | Show some HTML comma-separated with “and” inbetween to be grammatical.-htmlCommasAnd :: [Html] -> Html-htmlCommasAnd [x] = x-htmlCommasAnd [x,y] = do x; " and "; y-htmlCommasAnd (x:xs) = do x; ", "; htmlCommasAnd xs-htmlCommasAnd [] = mempty---- | Comma-separate some HTML.-htmlCommas :: [Html] -> Html-htmlCommas = htmlIntercalate ", "