Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Defines html image handling functions.
Synopsis
- data HTMLSrcset = HTMLSrcset {}
- data HTMLSrcsetCandidate = HTMLSrcsetCandidate {}
- data HTMLSrcsetDescriptor
- htmlSrcsetParse :: Text -> HTMLSrcset
- htmlSrcsetParseCandidate :: Text -> Maybe HTMLSrcsetCandidate
- htmlSrcsetParseDescriptor :: Text -> HTMLSrcsetDescriptor
- htmlSrcsetRender :: HTMLSrcset -> Text
- htmlSrcsetRenderCandidate :: HTMLSrcsetCandidate -> Text
- htmlSrcsetRenderDescriptor :: HTMLSrcsetDescriptor -> Text
- htmlSrcsetListURL :: HTMLSrcset -> [Text]
- htmlSrcsetMapURL :: (Text -> Text) -> HTMLSrcset -> HTMLSrcset
- htmlSrcsetImageMin :: HTMLSrcset -> Text
- htmlSrcsetImageMax :: HTMLSrcset -> Text
- htmlSrcsetDescriptorSize :: HTMLSrcsetDescriptor -> Int
- htmlSrcsetCandidatePair :: HTMLSrcsetCandidate -> (Int, Text)
- htmlSrcsetFilter :: (HTMLSrcsetCandidate -> Bool) -> HTMLSrcset -> HTMLSrcset
Documentation
data HTMLSrcset Source #
Defines a srcset attribute value.
Instances
Eq HTMLSrcset Source # | |
Defined in Zenacy.HTML.Internal.Image (==) :: HTMLSrcset -> HTMLSrcset -> Bool # (/=) :: HTMLSrcset -> HTMLSrcset -> Bool # | |
Ord HTMLSrcset Source # | |
Defined in Zenacy.HTML.Internal.Image compare :: HTMLSrcset -> HTMLSrcset -> Ordering # (<) :: HTMLSrcset -> HTMLSrcset -> Bool # (<=) :: HTMLSrcset -> HTMLSrcset -> Bool # (>) :: HTMLSrcset -> HTMLSrcset -> Bool # (>=) :: HTMLSrcset -> HTMLSrcset -> Bool # max :: HTMLSrcset -> HTMLSrcset -> HTMLSrcset # min :: HTMLSrcset -> HTMLSrcset -> HTMLSrcset # | |
Show HTMLSrcset Source # | |
Defined in Zenacy.HTML.Internal.Image showsPrec :: Int -> HTMLSrcset -> ShowS # show :: HTMLSrcset -> String # showList :: [HTMLSrcset] -> ShowS # |
data HTMLSrcsetCandidate Source #
Defines the image candidates.
Instances
Eq HTMLSrcsetCandidate Source # | |
Defined in Zenacy.HTML.Internal.Image (==) :: HTMLSrcsetCandidate -> HTMLSrcsetCandidate -> Bool # (/=) :: HTMLSrcsetCandidate -> HTMLSrcsetCandidate -> Bool # | |
Ord HTMLSrcsetCandidate Source # | |
Defined in Zenacy.HTML.Internal.Image compare :: HTMLSrcsetCandidate -> HTMLSrcsetCandidate -> Ordering # (<) :: HTMLSrcsetCandidate -> HTMLSrcsetCandidate -> Bool # (<=) :: HTMLSrcsetCandidate -> HTMLSrcsetCandidate -> Bool # (>) :: HTMLSrcsetCandidate -> HTMLSrcsetCandidate -> Bool # (>=) :: HTMLSrcsetCandidate -> HTMLSrcsetCandidate -> Bool # max :: HTMLSrcsetCandidate -> HTMLSrcsetCandidate -> HTMLSrcsetCandidate # min :: HTMLSrcsetCandidate -> HTMLSrcsetCandidate -> HTMLSrcsetCandidate # | |
Show HTMLSrcsetCandidate Source # | |
Defined in Zenacy.HTML.Internal.Image showsPrec :: Int -> HTMLSrcsetCandidate -> ShowS # show :: HTMLSrcsetCandidate -> String # showList :: [HTMLSrcsetCandidate] -> ShowS # |
data HTMLSrcsetDescriptor Source #
Defines the srcset descriptor.
Instances
Eq HTMLSrcsetDescriptor Source # | |
Defined in Zenacy.HTML.Internal.Image (==) :: HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor -> Bool # (/=) :: HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor -> Bool # | |
Ord HTMLSrcsetDescriptor Source # | |
Defined in Zenacy.HTML.Internal.Image compare :: HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor -> Ordering # (<) :: HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor -> Bool # (<=) :: HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor -> Bool # (>) :: HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor -> Bool # (>=) :: HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor -> Bool # max :: HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor # min :: HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor -> HTMLSrcsetDescriptor # | |
Show HTMLSrcsetDescriptor Source # | |
Defined in Zenacy.HTML.Internal.Image showsPrec :: Int -> HTMLSrcsetDescriptor -> ShowS # show :: HTMLSrcsetDescriptor -> String # showList :: [HTMLSrcsetDescriptor] -> ShowS # |
htmlSrcsetParse :: Text -> HTMLSrcset Source #
Parses a srcset attribute value.
htmlSrcsetParseCandidate :: Text -> Maybe HTMLSrcsetCandidate Source #
Parses a srcset candidate value.
htmlSrcsetParseDescriptor :: Text -> HTMLSrcsetDescriptor Source #
Parses a srcset descriptor value.
htmlSrcsetRender :: HTMLSrcset -> Text Source #
Renders a srcset.
htmlSrcsetRenderCandidate :: HTMLSrcsetCandidate -> Text Source #
Renders a srcset candidate.
htmlSrcsetRenderDescriptor :: HTMLSrcsetDescriptor -> Text Source #
Renders a srcset descriptor.
htmlSrcsetListURL :: HTMLSrcset -> [Text] Source #
Returns the URLs for a srcset.
htmlSrcsetMapURL :: (Text -> Text) -> HTMLSrcset -> HTMLSrcset Source #
Maps a function over the srcset URLs.
htmlSrcsetImageMin :: HTMLSrcset -> Text Source #
Returns the smallest image in the srcset.
htmlSrcsetImageMax :: HTMLSrcset -> Text Source #
Returns the largest image in the srcset.
htmlSrcsetDescriptorSize :: HTMLSrcsetDescriptor -> Int Source #
Gets the size of the descriptor.
htmlSrcsetCandidatePair :: HTMLSrcsetCandidate -> (Int, Text) Source #
Converts a candidate to a pair.
htmlSrcsetFilter :: (HTMLSrcsetCandidate -> Bool) -> HTMLSrcset -> HTMLSrcset Source #
Filter candidates from a srcset.