<s> from random import choice <EOL> from xierpa3 . components . column import Column <EOL> from xierpa3 . components . container import Container <EOL> from xierpa3 . descriptors . media import Media <EOL> from xierpa3 . attributes import Em , Margin , Perc , Color , Padding <EOL> from xierpa3 . descriptors . blueprint import BluePrint <EOL> LEVELSIZE = Em ( <NUM_LIT> ) <EOL> AUTHORSIZE = Em ( <NUM_LIT> ) <EOL> CATEGORYSIZE = Em ( <NUM_LIT> ) <EOL> AUTHORCOLOR = Color ( '<STR_LIT>' ) <EOL> CATEGORYCOLOR = AUTHORCOLOR <EOL> LABELCOLOR = AUTHORCOLOR <EOL> NAMECOLOR = Color ( '<STR_LIT>' ) <EOL> SUMMARYCOLOR = Color ( '<STR_LIT>' ) <EOL> class Featured ( Container ) : <EOL> pass <EOL> class FeaturedBase ( Column ) : <EOL> u"""<STR_LIT>""" <EOL> C = Column . C <EOL> CLASS_FEATURED_ITEM = '<STR_LIT>' <EOL> CLASS_FEATURED_ITEM_IMG = '<STR_LIT>' <EOL> def buildColumn ( self , b ) : <EOL> u"""<STR_LIT>""" <EOL> s = self . style <EOL> articles = self . adapter . getArticles ( start = s . start , count = s . count , <EOL> omit = b . getCurrentArticleId ( ) ) <EOL> self . buildFeatured ( b , articles ) <EOL> class FeaturedByImage ( FeaturedBase ) : <EOL> u"""<STR_LIT>""" <EOL> C = FeaturedBase . C <EOL> BLUEPRINT = BluePrint ( FeaturedBase . BLUEPRINT , <EOL> start = <NUM_LIT:0> , doc_start = u'<STR_LIT>' , <EOL> count = <NUM_LIT:3> , doc_count = u'<STR_LIT>' , <EOL> width = Perc ( <NUM_LIT:30> ) , doc_width = u'<STR_LIT>' , <EOL> widthMobile = Perc ( <NUM_LIT:100> ) , doc_widthMobile = u'<STR_LIT>' , <EOL> backgroundColor = None , doc_backgroundColor = u'<STR_LIT>' , <EOL> display = C . BLOCK , doc_display = u'<STR_LIT>' , <EOL> displayMobile = C . BLOCK , doc_displayMobile = u'<STR_LIT>' , <EOL> float = C . LEFT , doc_float = u'<STR_LIT>' , <EOL> floatMobile = C . LEFT , doc_floatMobile = u'<STR_LIT>' , <EOL> padding = <NUM_LIT:0> , doc_padding = u'<STR_LIT>' , <EOL> itemDisplay = C . BLOCK , doc_itemDisplay = u'<STR_LIT>' , <EOL> itemBackgroundColor = Color ( '<STR_LIT>' ) , doc_itemBackgroundColor = u'<STR_LIT>' , <EOL> itemClear = C . NONE , doc_itemClear = u'<STR_LIT>' , <EOL> itemMarginBottom = Em ( <NUM_LIT:0.5> ) , doc_itemMarginBottom = u'<STR_LIT>' , <EOL> itemWidth = Perc ( <NUM_LIT:100> ) , doc_itemWidth = u'<STR_LIT>' , <EOL> itemPadding = Padding ( Em ( <NUM_LIT> ) ) , doc_itemPadding = u'<STR_LIT>' , <EOL> showLevel = False , doc_showLevel = u'<STR_LIT>' , <EOL> levelFormat = '<STR_LIT>' , doc_levelFormat = u'<STR_LIT>' , <EOL> genericLevel = None , doc_genericLevel = u'<STR_LIT>' , <EOL> levelColor = Color ( '<STR_LIT>' ) , doc_levelColor = u'<STR_LIT>' , <EOL> levelSize = Em ( <NUM_LIT> ) , doc_levelSize = u'<STR_LIT>' , <EOL> levelWeight = C . BOLD , doc_levelWeight = u'<STR_LIT>' , <EOL> levelMarginTop = Em ( <NUM_LIT> ) , doc_levelMarginTop = u'<STR_LIT>' , <EOL> levelMarginBottom = Em ( <NUM_LIT> ) , doc_levelMarginBottom = u'<STR_LIT>' , <EOL> showTitle = True , doc_showTitle = u'<STR_LIT>' , <EOL> titleColor = ( '<STR_LIT>' ) , doc_titleColor = u'<STR_LIT>' , <EOL> titleSize = Em ( <NUM_LIT> ) , doc_titleSize = u'<STR_LIT>' , <EOL> titleWeight = C . NORMAL , doc_titleWeight = u'<STR_LIT>' , <EOL> titleLineHeight = Em ( <NUM_LIT> ) , doc_titleLineHeight = u'<STR_LIT>' , <EOL> showTopic = True , doc_showTopic = u'<STR_LIT>' , <EOL> topicColor = Color ( '<STR_LIT>' ) , doc_topicColor = u'<STR_LIT>' , <EOL> topicSize = Em ( <NUM_LIT> ) , doc_topicSize = u'<STR_LIT>' , <EOL> topicWeight = C . NORMAL , doc_topicWeight = u'<STR_LIT>' , <EOL> topicLineHeight = Em ( <NUM_LIT> ) , doc_topicLineHeight = u'<STR_LIT>' , <EOL> ) <EOL> '''<STR_LIT>''' <EOL> def buildFeatured ( self , b , articles ) : <EOL> s = self . style <EOL> b . div ( class_ = self . getClassName ( ) , width = s . width , backgroundcolor = s . backgroundColor , <EOL> display = s . display , float = s . float , padding = s . padding , <EOL> media = Media ( max = self . C . M_MOBILE_MAX , width = s . widthMobile , <EOL> display = s . displayMobile , float = s . floatMobile ) , <EOL> ) <EOL> for article in articles . items : <EOL> if article . poster : <EOL> self . buildFeaturedImage ( b , article ) <EOL> b . _div ( ) <EOL> def buildFeaturedImage ( self , b , article ) : <EOL> s = self . style <EOL> b . div ( class_ = self . C . CLASS_FEATUREDITEM , display = s . itemDisplay , <EOL> backgroundcolor = s . itemBackgroundColor , padding = s . itemPadding , <EOL> clear = s . itemClear , marginbottom = s . itemMarginBottom , margintop = s . itemMarginTop , <EOL> width = s . itemWidth , <EOL> ) <EOL> b . a ( href = '<STR_LIT>' % ( self . C . PARAM_ARTICLE , article . id ) ) <EOL> b . img ( class_ = ( self . C . CLASS_AUTOWIDTH , '<STR_LIT>' ) , src = article . poster ) <EOL> if s . showLevel or s . genericLevel : <EOL> b . h5 ( class_ = self . C . CLASS_LEVEL , color = s . levelColor , fontsize = s . levelSize , <EOL> fontweight = s . levelWeight , <EOL> margintop = s . levelMarginTop , marginbottom = s . levelMarginBottom ) <EOL> b . text ( s . levelFormat % ( article . level or s . genericLevel ) ) <EOL> b . _h5 ( ) <EOL> if s . showTitle : <EOL> b . h4 ( class_ = self . C . CLASS_TITLE , color = s . titleColor , fontsize = s . titleSize , <EOL> fontweight = s . titleWeight , lineheight = s . titleLineHeight ) <EOL> b . text ( article . title ) <EOL> b . _h4 ( ) <EOL> if s . showTopic and article . topic is not None : <EOL> b . h5 ( class_ = self . C . CLASS_TOPIC , color = s . topicColor , fontsize = s . topicSize , <EOL> fontweight = s . topicWeight , lineheight = s . topicLineHeight ) <EOL> if isinstance ( article . topic , basestring ) : <EOL> b . text ( article . topic ) <EOL> else : <EOL> self . buildElement ( b , article . topic ) <EOL> b . _h5 ( ) <EOL> b . _a ( ) <EOL> b . _div ( comment = self . C . CLASS_FEATUREDITEM ) <EOL> class FeaturedByImageList ( FeaturedBase ) : <EOL> u"""<STR_LIT>""" <EOL> C = FeaturedBase . C <EOL> BLUEPRINT = BluePrint ( FeaturedBase . BLUEPRINT , <EOL> start = <NUM_LIT:0> , doc_start = u'<STR_LIT>' , <EOL> count = <NUM_LIT:3> , doc_count = u'<STR_LIT>' , <EOL> colDisplay = C . BLOCK , doc_colDisplay = u'<STR_LIT>' , <EOL> colClear = C . BOTH , doc_colClear = '<STR_LIT>' , <EOL> colMarginBottom = Em ( <NUM_LIT:0.5> ) , doc_colMarginBottom = '<STR_LIT>' , <EOL> colColor = None , doc_colColor = u'<STR_LIT>' , <EOL> colMarginRight = Perc ( <NUM_LIT> ) , <EOL> colMarginLeft = <NUM_LIT:0> , <EOL> colFloat = C . LEFT , <EOL> colMinHeight = <NUM_LIT:1> , <EOL> colWidth = <NUM_LIT:4> , doc_colWidth = u'<STR_LIT>' , <EOL> itemClear = C . NONE , itemDisplay = C . LEFT , itemWidth = Perc ( <NUM_LIT> ) , <EOL> thumbDisplay = C . BLOCK , <EOL> showLevel = False , <EOL> genericLevel = '<STR_LIT>' , doc_genericLevel = u'<STR_LIT>' , <EOL> levelColor = Color ( '<STR_LIT>' ) , doc_levelColor = u'<STR_LIT>' , <EOL> levelSize = LEVELSIZE , doc_levelSize = u'<STR_LIT>' , <EOL> levelWeight = C . BOLD , doc_levelWeight = u'<STR_LIT>' , <EOL> levelMarginTop = Em ( <NUM_LIT:0.5> ) , doc_levelMarginTop = u'<STR_LIT>' , <EOL> showName = False , <EOL> nameColor = Color ( '<STR_LIT>' ) , <EOL> nameSize = Em ( <NUM_LIT> ) , <EOL> nameLineHeight = Em ( <NUM_LIT> ) , <EOL> nameWeight = C . BOLD , <EOL> showTopic = False , <EOL> mobileDisplay = C . NONE , <EOL> mobilePaddingTop = Em ( <NUM_LIT:2> ) , mobilePaddingBottom = Em ( <NUM_LIT:0.5> ) , mobilePaddingLeft = Em ( <NUM_LIT:0.5> ) , mobilePaddingRight = Em ( <NUM_LIT:0.5> ) , <EOL> mobileMarginTop = Em ( <NUM_LIT:2> ) , mobileMarginBottom = Em ( <NUM_LIT:0.5> ) , mobileMarginLeft = Em ( <NUM_LIT:0.5> ) , mobileMarginRight = Em ( <NUM_LIT:0.5> ) , <EOL> mobileFloat = C . NONE , mobileWidth = C . AUTO , <EOL> ) <EOL> def buildFeatured ( self , b , data ) : <EOL> s = self . style <EOL> for item in data . items : <EOL> b . div ( class_ = self . CLASS_FEATURED_ITEM , display = s . itemDisplay , <EOL> clear = s . itemClear , marginbottom = s . itemMarginBottom , width = s . itemWidth , <EOL> ) <EOL> b . a ( href = '<STR_LIT>' % ( self . C . PARAM_ARTICLE , item . id ) ) <EOL> if s . showLevel : <EOL> b . h5 ( color = s . levelColor , fontsize = s . levelSize , fontweight = s . levelWeight , <EOL> margintop = s . levelMarginTop ) <EOL> b . text ( item . level or s . genericLevel ) <EOL> b . text ( '<STR_LIT>' ) <EOL> b . _h5 ( ) <EOL> b . img ( class_ = self . C . CLASS_AUTOWIDTH , src = item . poster ) <EOL> if s . showName : <EOL> b . h4 ( color = s . nameColor , fontsize = s . nameSize , fontweight = s . nameWeight , <EOL> lineheight = s . nameLineHeight ) <EOL> b . text ( item . name ) <EOL> b . _h4 ( ) <EOL> if s . showTopic and item . topic is not None : <EOL> self . buildElement ( b , item . topic ) <EOL> b . _a ( ) <EOL> b . _div ( comment = self . CLASS_FEATURED_ITEM ) <EOL> class FeaturedByText ( FeaturedBase ) : <EOL> u"""<STR_LIT>""" <EOL> C = FeaturedBase . C <EOL> BLUEPRINT = BluePrint ( FeaturedBase . BLUEPRINT , <EOL> start = <NUM_LIT:0> , count = <NUM_LIT:1> , itemRandom = True , <EOL> label = None , labelSize = Em ( <NUM_LIT:2> ) , labelColor = '<STR_LIT>' , labelMarginBottom = Em ( <NUM_LIT:0.5> ) , <EOL> labelMarginTop = Em ( <NUM_LIT> ) , labelLineHeight = Em ( <NUM_LIT> ) , <EOL> showPoster = True , posterWidth = '<STR_LIT>' , <EOL> colWidth = <NUM_LIT:8> , <EOL> showLevel = True , genericLevel = '<STR_LIT>' , <EOL> levelColor = '<STR_LIT>' , levelSize = LEVELSIZE , levelLineHeight = Em ( <NUM_LIT> ) , <EOL> levelWeight = C . BOLD , levelMarginTop = Em ( <NUM_LIT:0.5> ) , <EOL> showCategory = False , categoryColor = CATEGORYCOLOR , categorySize = CATEGORYSIZE , <EOL> categoryLineHeight = Em ( <NUM_LIT> ) , categoryWeight = C . BOLD , <EOL> nameSize = Em ( <NUM_LIT> ) , nameLineHeight = Em ( <NUM_LIT:1> ) , nameWeight = None , <EOL> nameColor = NAMECOLOR , nameMarginBottom = Em ( <NUM_LIT> ) , nameMarginTop = <NUM_LIT:0> , <EOL> nameDisplay = C . BLOCK , <EOL> authorSize = AUTHORSIZE , <EOL> authorWeight = C . NORMAL , <EOL> authorColor = AUTHORCOLOR , doc_authorColor = u'<STR_LIT>' , <EOL> authorDisplay = C . BLOCK , authorLineHeight = Em ( <NUM_LIT> ) , <EOL> summaryColor = SUMMARYCOLOR , summarySize = Em ( <NUM_LIT> ) , summaryLineHeight = Em ( <NUM_LIT> ) , <EOL> summaryMarginTop = Em ( <NUM_LIT> ) , summaryMarginBottom = Em ( <NUM_LIT:0.5> ) , <EOL> mobileDisplay = C . NONE , <EOL> mobilePaddingTop = Em ( <NUM_LIT:2> ) , mobilePaddingBottom = Em ( <NUM_LIT:0.5> ) , mobilePaddingLeft = Em ( <NUM_LIT:0.5> ) , mobilePaddingRight = Em ( <NUM_LIT:0.5> ) , <EOL> mobileMarginTop = Em ( <NUM_LIT:2> ) , mobileMarginBottom = Em ( <NUM_LIT:0.5> ) , mobileMarginLeft = Em ( <NUM_LIT:0.5> ) , mobileMarginRight = Em ( <NUM_LIT:0.5> ) , <EOL> mobileFloat = C . NONE , mobileWidth = C . AUTO , <EOL> ) <EOL> def buildFeatured ( self , b , articles ) : <EOL> s = self . style <EOL> b . div ( class_ = self . getClassName ( ) , width = s . width , backgroundcolor = s . backgroundColor , <EOL> display = s . display , float = s . float , padding = s . padding , <EOL> media = Media ( max = self . C . M_MOBILE_MAX , width = s . widthMobile , <EOL> display = s . displayMobile , float = s . floatMobile ) , <EOL> ) <EOL> for article in articles . items : <EOL> self . _buildFeaturedText ( b , article ) <EOL> b . _div ( ) <EOL> def _buildFeaturedText ( self , b , data ) : <EOL> u"""<STR_LIT>""" <EOL> return <EOL> if not data . items : <EOL> return <EOL> s = self . style <EOL> if s . itemRandom : <EOL> item = choice ( data . items ) <EOL> else : <EOL> item = data . items [ <NUM_LIT:0> ] <EOL> if s . label : <EOL> b . h2 ( fontsize = s . labelSize , color = s . labelColor , margintop = s . labelMarginTop , <EOL> marginbottom = s . labelMarginBottom , lineheight = s . labelLineHeight , <EOL> media = ( <EOL> Media ( min = self . C . M_TABLET_MIN , max = self . C . M_TABLET_MAX , fontsize = s . tabletLabelSize , color = '<STR_LIT>' ) , <EOL> Media ( max = self . C . M_MOBILE_MAX , color = '<STR_LIT>' ) <EOL> ) ) <EOL> b . text ( s . label ) <EOL> b . _h2 ( ) <EOL> b . a ( href = '<STR_LIT>' % ( self . C . PARAM_ARTICLE , item . id ) , class_ = self . C . CLASS_NAME ) <EOL> b . h2 ( fontsize = s . nameSize , fontweight = s . nameWeight , lineheight = s . nameLineHeight , <EOL> color = s . nameColor , marginbottom = s . nameMarginBottom , display = s . nameDisplay , <EOL> margintop = s . nameMarginTop ) <EOL> b . text ( item . name ) <EOL> b . _h2 ( ) <EOL> b . _a ( ) <EOL> if s . showPoster : <EOL> b . a ( href = '<STR_LIT>' % ( self . C . PARAM_ARTICLE , item . id ) , class_ = self . C . CLASS_NAME ) <EOL> b . img ( width = s . posterWidth , src = item . poster , float = self . C . LEFT , padding = <NUM_LIT:0> , <EOL> margin = Margin ( Em ( <NUM_LIT:0.5> ) , Em ( <NUM_LIT:0.5> ) , <NUM_LIT:0> , <NUM_LIT:0> ) , <EOL> media = Media ( max = self . C . M_MOBILE_MAX , display = self . C . NONE ) <EOL> ) <EOL> b . _a ( ) <EOL> if s . showLevel : <EOL> b . h5 ( class_ = self . C . CLASS_LEVEL , color = s . levelColor , fontsize = s . levelSize , fontweight = s . levelWeight , <EOL> margintop = s . levelMarginTop , lineheight = s . levelLineHeight ) <EOL> b . text ( item . level or s . genericLevel ) <EOL> b . text ( '<STR_LIT>' ) <EOL> b . _h5 ( ) <EOL> if item . author : <EOL> b . a ( href = '<STR_LIT>' % ( self . C . PARAM_AUTHOR , item . author ) , class_ = self . C . CLASS_AUTHOR ) <EOL> b . h5 ( fontsize = s . authorSize , fontweight = s . authorWeight , color = s . authorColor , <EOL> lineheight = s . authorLineHeight , display = s . authorDisplay ) <EOL> b . text ( '<STR_LIT>' % item . author ) <EOL> b . _h5 ( ) <EOL> b . _a ( ) <EOL> if s . showCategory and item . category : <EOL> b . a ( href = '<STR_LIT>' % ( self . C . PARAM_CATEGORY , item . category ) , class_ = self . C . CLASS_CATEGORY ) <EOL> b . h5 ( fontsize = s . categorySize , fontweight = s . categoryWeight , lineheight = s . categoryLineHeight , <EOL> color = s . categoryColor , margintop = Em ( <NUM_LIT:1> ) , display = self . C . BLOCK ) <EOL> b . text ( item . category ) <EOL> b . _h5 ( ) <EOL> b . _a ( ) <EOL> if item . summary is not None : <EOL> b . div ( class_ = '<STR_LIT>' , clear = self . C . BOTH , float = self . C . LEFT , width = Perc ( <NUM_LIT:100> ) , <EOL> color = s . summaryColor , fontsize = s . summarySize , lineheight = s . summaryLineHeight , <EOL> margintop = s . summaryMarginTop , marginbottom = s . summaryMarginBottom ) <EOL> if isinstance ( item . summary , basestring ) : <EOL> b . text ( item . summary ) <EOL> else : <EOL> self . buildElement ( b , item . summary ) <EOL> b . _div ( ) <EOL> class FeaturedByDiapText ( FeaturedByText ) : <EOL> u"""<STR_LIT>""" <EOL> C = FeaturedByText . C <EOL> BLUEPRINT = BluePrint ( FeaturedBase . BLUEPRINT , <EOL> start = <NUM_LIT:0> , <EOL> count = <NUM_LIT:10> , <EOL> itemRandom = True , doc_itemRandom = u'<STR_LIT>' , <EOL> label = None , doc_label = u'<STR_LIT>' , <EOL> labelSize = Em ( <NUM_LIT> ) , doc_labelSize = u'<STR_LIT>' , <EOL> labelColor = Color ( '<STR_LIT>' ) , doc_labelColor = u'<STR_LIT>' , <EOL> labelMarginBottom = Em ( <NUM_LIT:0.5> ) , <EOL> labelMarginTop = Em ( <NUM_LIT> ) , <EOL> showPoster = True , posterWidth = '<STR_LIT>' , <EOL> colWidth = <NUM_LIT:8> , <EOL> showLevel = True , genericLevel = '<STR_LIT>' , <EOL> levelColor = Color ( '<STR_LIT>' ) , <EOL> levelSize = LEVELSIZE , <EOL> levelWeight = C . BOLD , <EOL> levelMarginTop = Em ( <NUM_LIT:0.5> ) , <EOL> showCategory = False , <EOL> categoryColor = CATEGORYCOLOR , <EOL> categorySize = Em ( <NUM_LIT> ) , <EOL> categoryLineHeight = Em ( <NUM_LIT> ) , <EOL> categoryWeight = C . BOLD , <EOL> nameSize = Em ( <NUM_LIT> ) , <EOL> nameLineHeight = Em ( <NUM_LIT> ) , <EOL> nameWeight = None , <EOL> nameColor = Color ( '<STR_LIT>' ) , <EOL> nameMarginBottom = Em ( <NUM_LIT> ) , <EOL> nameMarginTop = <NUM_LIT:0> , <EOL> nameDisplay = C . BLOCK , <EOL> authorSize = AUTHORSIZE , <EOL> authorWeight = C . NORMAL , <EOL> authorColor = Color ( '<STR_LIT>' ) , <EOL> authorDisplay = C . BLOCK , <EOL> authorLineHeight = Em ( <NUM_LIT> ) , <EOL> summaryColor = C . WHITE , <EOL> summaryMarginTop = Em ( <NUM_LIT> ) , <EOL> summaryMarginBottom = Em ( <NUM_LIT:0.5> ) , <EOL> tabletLabelSize = Em ( <NUM_LIT> ) , <EOL> mobileDisplay = C . NONE , <EOL> mobilePaddingTop = Em ( <NUM_LIT:2> ) , <EOL> mobilePaddingBottom = Em ( <NUM_LIT:0.5> ) , <EOL> mobilePaddingLeft = Em ( <NUM_LIT:0.5> ) , mobilePaddingRight = Em ( <NUM_LIT:0.5> ) , <EOL> mobileMarginTop = Em ( <NUM_LIT:2> ) , <EOL> mobileMarginBottom = Em ( <NUM_LIT:0.5> ) , <EOL> mobileMarginLeft = Em ( <NUM_LIT:0.5> ) , mobileMarginRight = Em ( <NUM_LIT:0.5> ) , <EOL> mobileFloat = C . NONE , <EOL> ) <EOL> class FeaturedByTextList ( FeaturedBase ) : <EOL> C = FeaturedBase . C <EOL> BLUEPRINT = BluePrint ( <EOL> start = <NUM_LIT:0> , <EOL> count = <NUM_LIT:6> , <EOL> colWidth = <NUM_LIT:4> , <EOL> categoryColor = Color ( '<STR_LIT>' ) , categorySize = Em ( <NUM_LIT> ) , categoryLineHeight = Em ( <NUM_LIT> ) , <EOL> categoryWeight = C . NORMAL , categoryMarginTop = Em ( <NUM_LIT:1> ) , categoryDisplay = C . BLOCK , <EOL> nameColor = Color ( '<STR_LIT>' ) , nameSize = Em ( <NUM_LIT> ) , nameWeight = C . NORMAL , nameDisplay = C . BLOCK , <EOL> nameMarginBottom = Em ( <NUM_LIT> ) , nameMarginTop = Em ( <NUM_LIT> ) , nameLineHeight = Em ( <NUM_LIT> ) , <EOL> topicColor = Color ( '<STR_LIT>' ) , <EOL> mobileDisplay = C . NONE , <EOL> mobilePaddingTop = Em ( <NUM_LIT:2> ) , mobilePaddingBottom = Em ( <NUM_LIT:0.5> ) , mobilePaddingLeft = Em ( <NUM_LIT:0.5> ) , mobilePaddingRight = Em ( <NUM_LIT:0.5> ) , <EOL> mobileMarginTop = Em ( <NUM_LIT:2> ) , mobileMarginBottom = Em ( <NUM_LIT:0.5> ) , mobileMarginLeft = Em ( <NUM_LIT:0.5> ) , mobileMarginRight = Em ( <NUM_LIT:0.5> ) , <EOL> mobileFloat = C . NONE , <EOL> ) <EOL> def buildFeatured ( self , b , data ) : <EOL> s = self . style <EOL> for item in data . items : <EOL> if item . category : <EOL> b . a ( href = '<STR_LIT>' % ( self . C . PARAM_CATEGORY , item . category ) , class_ = self . C . CLASS_CATEGORYTHUMB ) <EOL> b . h5 ( fontsize = s . categorySize , fontweight = s . categoryWeight , lineheight = s . categoryLineHeight , <EOL> color = s . categoryColor , margintop = s . categoryMarginTop , display = s . categoryDisplay ) <EOL> b . text ( item . category ) <EOL> b . _h5 ( ) <EOL> b . _a ( ) <EOL> b . a ( href = '<STR_LIT>' % ( self . C . PARAM_ARTICLE , item . id ) , class_ = self . C . CLASS_NAME ) <EOL> b . h2 ( fontsize = s . nameSize , fontweight = s . nameWeight , lineheight = s . nameLineHeight , <EOL> color = s . nameColor , marginbottom = s . nameMarginBottom , display = s . nameDisplay , <EOL> margintop = s . nameMarginTop ) <EOL> b . text ( item . name ) <EOL> b . _h2 ( ) <EOL> b . _a ( ) <EOL> if isinstance ( item . topic , basestring ) : <EOL> b . text ( item . topic ) <EOL> elif item . topic is not None : <EOL> self . buildElement ( b , item . topic ) <EOL> class FeaturedTitled ( FeaturedBase ) : <EOL> pass </s>
