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 {ogc:safe-string(@max-height)}; link_mp4 {ogc:safe-string(@link_mp4)}; link_mp4_low_res {ogc:safe-string(@link_mp4_low_res)}; link_webm {ogc:safe-string(@link_webm)}; button_url {ogc:safe-string(@button_url)}; link_webm_low_res {ogc:safe-string(@link_webm_low_res)}; text {ogc:safe-string(@text)}; button_text {ogc:safe-string(@button_text)}; searchbox {ogc:safe-string(@searchbox)}; " /> </xsl:template> """
- class town6.homepage_widgets.IconLinksWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="icon_link"> <div metal:use-macro="layout.macros.icon_link" tal:define=" title {ogc:safe-string(@title)}; invert {ogc:safe-string(@invert)}; icon {ogc:safe-string(@icon)}; text {ogc:safe-string(@text)}; link {ogc:safe-string(@link)}; " /> </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="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 ', ogc:safe-string(@title), '; ', '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 {ogc:safe-string(@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 {ogc:safe-string(@image-src)}; title {ogc:safe-string(@title)}; text_on_image {ogc:safe-string(@text-on-image)}; lead {ogc:safe-string(@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 {ogc:safe-string(@color)}; description_1 {ogc:safe-string(@description_1)}; quote_1 {ogc:safe-string(@quote_1)}; image_1 {ogc:safe-string(@image_1)}; description_2 {ogc:safe-string(@description_2)}; quote_2 {ogc:safe-string(@quote_2)}; image_2 {ogc:safe-string(@image_2)}; description_3 {ogc:safe-string(@description_3)}; quote_3 {ogc:safe-string(@quote_3)}; image_3 {ogc:safe-string(@image_3)}; " /> </xsl:template> """
- class town6.homepage_widgets.JobsWidget[source]
- town6.homepage_widgets.parsed_rss(rss: bytes) RSSChannel[source]