town6.homepage_widgets
Classes
The elements inside <item> |
|
The elements inside <channel> |
Functions
|
Module Contents
- class town6.homepage_widgets.AutoplayVideoWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="autoplay_video"> <div metal:use-macro="layout.macros.autoplay_video" tal:define="max_height '{@max-height}'; link_mp4 '{@link_mp4}'; link_mp4_low_res '{@link_mp4_low_res}'; link_webm '{@link_webm}'; link_webm_low_res '{@link_webm_low_res}'; text '{@text}' " /> </xsl:template> """
- class town6.homepage_widgets.LinksWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="links"> <ul class="panel-links"> <xsl:for-each select="link"> <li> <a> <xsl:attribute name="href"> <xsl:value-of select="@url" /> </xsl:attribute> <xsl:value-of select="node()" /> </a> <xsl:if test="@description"> <small> <xsl:value-of select="@description" /> </small> </xsl:if> </li> </xsl:for-each> </ul> </xsl:template> """
- class town6.homepage_widgets.EventsWidget[source]
- class town6.homepage_widgets.PartnerWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="partners"> <xsl:variable name="apos">'</xsl:variable> <xsl:variable name="show_title"> <xsl:choose> <xsl:when test="@hide-title"> <xsl:value-of select="'False'" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="'True'" /> </xsl:otherwise> </xsl:choose> </xsl:variable> <metal:block use-macro="layout.macros['partner-cards']"> <xsl:attribute name="tal:define"> <xsl:value-of select="concat( 'title ', $apos, @title, $apos, '; ', 'show_title ', $show_title, ';')" /> </xsl:attribute> </metal:block> </xsl:template> """
- class town6.homepage_widgets.ServicesWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="services"> <div class="services-panel"> <ul class="panel-links callout"> <li tal:repeat="link services_panel.links"> <tal:b content="structure link(layout)" /> </li> <xsl:for-each select="link"> <li tal:define="icon '{@icon}'"> <a tal:attributes=" class ('h5 fa fa-' + icon) if icon else 'generic h5' "> <xsl:attribute name="href"> <xsl:value-of select="@url" /> </xsl:attribute> <xsl:value-of select="node()" /> </a> </li> </xsl:for-each> </ul> </div> </xsl:template> """
- class town6.homepage_widgets.ContactsAndAlbumsWidget[source]
- class town6.homepage_widgets.DirectoriesWidget[source]
Bases:
onegov.org.homepage_widgets.DirectoriesWidget
- class town6.homepage_widgets.FocusWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="focus"> <a href="{@focus-url}" class="focus-link"> <div class="focus-widget card" data-aos="fade"> <xsl:if test="@text-on-image = 'True'"> <xsl:attribute name="class">focus-widget card only-title </xsl:attribute> </xsl:if> <xsl:variable name="apos">'</xsl:variable> <xsl:variable name="image_src"> <xsl:choose> <xsl:when test="@image-src"> <xsl:value-of select="concat($apos, @image-src, $apos)" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="'None'" /> </xsl:otherwise> </xsl:choose> </xsl:variable> <metal:block use-macro="layout.macros['focus-panel']" tal:define="image_src '{@image-src}'; title '{@title}'; text_on_image '{@text-on-image}'; lead '{@lead}';" /> <xsl:choose> <xsl:when test="@text-on-image"> <xsl:if test="text"> <div class="card-section"> <xsl:for-each select="text"> <p class="homepage-text"> <xsl:apply-templates select="node()"/> </p> </xsl:for-each> </div> </xsl:if> </xsl:when> <xsl:otherwise> <div class="card-section"> <h5> <xsl:choose> <xsl:when test="@title"> <xsl:value-of select="@title" /> </xsl:when> <xsl:otherwise> <metal:block use-macro="layout.macros['focus-title']" /> </xsl:otherwise> </xsl:choose> </h5> <xsl:choose> <xsl:when test="@lead"> <p><b> <xsl:value-of select="@lead" /> </b></p> </xsl:when> <xsl:otherwise> </xsl:otherwise> </xsl:choose> <xsl:for-each select="text"> <p class="homepage-text"> <xsl:apply-templates select="node()"/> </p> </xsl:for-each> </div> </xsl:otherwise> </xsl:choose> </div> </a> </xsl:template> """
- class town6.homepage_widgets.TestimonialSliderWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="testimonial_slider"> <div metal:use-macro="layout.macros.testimonial_slider" tal:define="color '{@color}'; description_1 '{@description_1}'; quote_1 '{@quote_1}'; image_1 '{@image_1}'; description_2 '{@description_2}'; quote_2 '{@quote_2}'; image_2 '{@image_2}'; description_3 '{@description_3}'; quote_3 '{@quote_3}'; image_3 '{@image_3}'; " /> </xsl:template> """
- class town6.homepage_widgets.JobsWidget[source]
- town6.homepage_widgets.parsed_rss(rss: bytes) RSSChannel [source]