packages feed

digestive-bootstrap 0.1.0.0 → 0.1.0.1

raw patch · 4 files changed

+82/−11 lines, 4 filesdep ~basedep ~blaze-bootstrapdep ~blaze-htmlPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, blaze-bootstrap, blaze-html, digestive-functors, digestive-functors-blaze, http-types, text

API changes (from Hackage documentation)

Files

+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2014 - 2015 Alexander Thiemann <mail@athiemann.net>++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ README.md view
@@ -0,0 +1,34 @@+digestive-bootstrap+=====++[![Build Status](https://travis-ci.org/agrafix/digestive-bootstrap.svg)](https://travis-ci.org/agrafix/digestive-bootstrap)+[![Hackage](https://img.shields.io/hackage/v/digestive-bootstrap.svg)](http://hackage.haskell.org/package/digestive-bootstrap)++## Intro++Hackage: [digestive-bootstrap](http://hackage.haskell.org/package/digestive-bootstrap)+Stackage: [digestive-bootstrap](https://www.stackage.org/package/digestive-bootstrap)++Speed up form designing using digestive functors and bootstrap+++## Install++* Using cabal: `cabal install digestive-bootstrap`+* Using Stack: `stack install digestive-bootstrap`+* From Source (cabal): `git clone https://github.com/agrafix/digestive-bootstrap.git && cd digestive-bootstrap && cabal install`+* From Source (stack): `git clone https://github.com/agrafix/digestive-bootstrap.git && cd digestive-bootstrap && stack build`+++## Misc++### Supported GHC Versions++* 7.6.3+* 7.8.4+* 7.10.2++### License++Released under the MIT license.+(c) 2014 - 2015 Alexander Thiemann
digestive-bootstrap.cabal view
@@ -1,24 +1,32 @@ name:                digestive-bootstrap-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Speed up form designing using digestive functors and bootstrap description:         Generate bootstrap forms out of digestive views license:             MIT-author:              Alexander Thiemann <mail@agrafix.net>-maintainer:          mail@agrafix.net-copyright:           (c) 2014 Alexander Thiemann+license-file:        LICENSE+author:              Alexander Thiemann <mail@athiemann.net>+maintainer:          Alexander Thiemann <mail@athiemann.net>+copyright:           (c) 2014 - 2015 Alexander Thiemann category:            Web build-type:          Simple cabal-version:       >=1.10+tested-with:         GHC==7.6.3, GHC==7.8.4, GHC==7.10.2+extra-source-files:+    README.md  library   exposed-modules:     Text.Digestive.Bootstrap-  build-depends:       base ==4.*,-                       digestive-functors >=0.7 && <0.8,-                       digestive-functors-blaze >=0.6 && <0.7,-                       blaze-html >=0.7 && <0.8,-                       blaze-bootstrap >=0.1 && <0.2,-                       http-types  >=0.8 && <0.9,-                       text+  build-depends:       base >=4.6 && <5,+                       digestive-functors >=0.7,+                       digestive-functors-blaze >=0.6,+                       blaze-html >=0.7,+                       blaze-bootstrap >=0.1,+                       http-types >=0.8,+                       text >=1.2   hs-source-dirs:      src   default-language:    Haskell2010   ghc-options: -Wall++source-repository head+  type: git+  location: https://github.com/agrafix/digestive-bootstrap
src/Text/Digestive/Bootstrap.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Text.Digestive.Bootstrap     ( FormMeta (..), FormElement (..), FormElementCfg (..)@@ -7,7 +8,10 @@ where  import Data.Maybe+#if MIN_VERSION_base(4,8,0)+#else import Data.Monoid+#endif import Network.HTTP.Types.Method import Text.Blaze.Bootstrap import Text.Blaze.Html5@@ -21,6 +25,7 @@  type NumberUnit = T.Text +-- | Form element type data FormElementCfg    = InputText    | InputNumber (Maybe NumberUnit)@@ -33,6 +38,7 @@    | InputFile    | InputDate +-- | Configuration for a form element data FormElement    = FormElement    { fe_name :: T.Text@@ -40,6 +46,7 @@    , fe_cfg :: FormElementCfg    } +-- | Meta information for a HTML form data FormMeta    = FormMeta    { fm_method :: StdMethod@@ -48,6 +55,8 @@    , fm_submitText :: T.Text    } +-- | Render a form defined by 'FormMeta' information and+-- the digestive functor 'View'. renderForm :: FormMeta -> View Html -> Html renderForm formMeta formView =     H.form ! role "form" ! method formMethod ! action formAction $