Skip to content

Commit

Permalink
Fixing blog featurettes, making text go full width if in a sidebar or…
Browse files Browse the repository at this point in the history
… featurettes panel, Closes #117.
  • Loading branch information
adamglenn committed Jun 3, 2019
1 parent b69f9dc commit b20b92d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
16 changes: 7 additions & 9 deletions views/components/_wvu-featurettes.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<r:comment><!-- Add an openin markup tag. This is used by the demo site to auto-generate code that the user can copy into their own theme. --></r:comment>
<r:comment><!-- This component’s outer container also contains utilities for evaluating whether the component should get a section or a main tag, what classes to apply to the outer container, and a background styler, defined by uploading an image and labeling it with the page slug and component name. --></r:comment>
<!-- Markup --><<r:partial name="utilities/wvu-is-main-checker" theme="University Relations: WVU Design System" /> <r:if v1="{$componentIsMain}" v2="1" op="=">id="wvu-main-content"</r:if> class="<r:if v1="{$componentIsEditModeOnly}" v2="1" op="=">d-none </r:if><r:partial name="utilities/wvu-component-classes-checker" theme="University Relations: WVU Design System" />" <r:partial name="utilities/wvu-bg-styler" theme="University Relations: WVU Design System" />>
<!-- Markup --><<r:partial name="utilities/wvu-is-main-checker" theme="University Relations: WVU Design System" /> <r:if v1="{$componentDisplayContext}" v2="as_full_width_block" op="="><r:if v1="{$componentIsMain}" v2="1" op="=">id="wvu-main-content"</r:if></r:if> class="<r:if v1="{$componentIsEditModeOnly}" v2="1" op="=">d-none </r:if><r:partial name="utilities/wvu-component-classes-checker" theme="University Relations: WVU Design System" />" <r:partial name="utilities/wvu-bg-styler" theme="University Relations: WVU Design System" />>
<div class="<r:if expr="{{ contains(componentDisplayContext, 'as_full_width_block') or contains(componentDisplayContext, 'wvu-backpage') }}">container </r:if>wvu-z-index-content">

<r:page:if_has_content_for region="{$componentHeader}" always_show_in_edit_mode="true">
Expand All @@ -50,14 +50,12 @@ <h2 id="featurettes-*-label" class="display-3 wvu-shout">Featurettes Headline</h
<r:partial name="{$featurettePartialName}" theme="University Relations: WVU Design System" />

<r:page:if_has_content_for region="{$componentPostscript}" always_show_in_edit_mode="true">
<div class="mt-4 wvu-z-index-content">
<div class="wvu-z-index-content mb-2">
<r:comment><!-- This is just a label for the editable region that follows in order to make it clear to content editors what the region is for (in case they delete content and forget). --></r:comment>
<r:edit_mode_only><span class="d-inline-block badge badge-primary mb-1">Postscript</span></r:edit_mode_only>
<r:editable_region name="{$componentPostscript}" scope="{$componentScope}">
<p class="mb-0">Put additional info or <a href="#">links</a> here.</p>
</r:editable_region>
</div>
<div class="mt-4 wvu-z-index-content mb-2">
<r:comment><!-- This is just a label for the editable region that follows in order to make it clear to content editors what the region is for (in case they delete content and forget). --></r:comment>
<r:edit_mode_only><span class="d-inline-block badge badge-primary mb-1">Postscript</span></r:edit_mode_only>
<r:editable_region name="{$componentPostscript}" scope="{$componentScope}">
<p class="mb-0">Put additional info or <a href="#">links</a> here.</p>
</r:editable_region>
</div>
</r:page:if_has_content_for>

Expand Down
6 changes: 3 additions & 3 deletions views/includes/_wvu-featurettes__blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,20 @@
<r:var name="bgPrefix" />-panel-<r:index />-background
</r:set_var>
<div class="<r:if expr="{{ contains(componentDisplayContext, 'as_full_width_block') or contains(componentDisplayContext, 'wvu-backpage') }}"><r:var name="columnClasses" /> </r:if><r:var name="itemClassesChecker" />" <r:partial name="utilities/wvu-bg-styler" />>
<div class="mt-3<r:if expr="{{ contains(componentDisplayContext, 'featurettes') or contains(componentDisplayContext, 'sidebar') }}"> row</r:if>">
<div class="mt-3<r:if expr="{{ NOT(BLANK(thumbnail_url)) }}"><r:if expr="{{ contains(componentDisplayContext, 'featurettes') or contains(componentDisplayContext, 'sidebar') }}"> row</r:if></r:if>">
<r:if expr="{{ NOT(BLANK(thumbnail_url)) }}">
<div class="mb-1<r:if expr="{{ contains(componentDisplayContext, 'featurettes') or contains(componentDisplayContext, 'sidebar') }}"> col-md-4</r:if>">
<a title="<r:var name="itemReadMoreButtonTextChecker" />: <r:page:name />" href="<r:if expr="{{ NOT(BLANK(alternate_url)) }}"><r:page:data name="alternate_url" /></r:if><r:if expr="{{ BLANK(alternate_url) }}"><r:page:url /></r:if>"><img class="shadow" src="<r:page:data name="thumbnail_url" />/381x255.jpg" srcset="<r:page:data name="thumbnail_url" />/960x640.jpg, <r:page:data name="thumbnail_url" />/586x286.jpg, <r:page:data name="thumbnail_url" />/381x255.jpg, <r:page:data name="thumbnail_url" />/286x191.jpg, <r:page:data name="thumbnail_url" />/279x186.jpg, <r:page:data name="thumbnail_url" />/217x145.jpg" sizes="960px, (min-width: 768px) 586px" alt="<r:page:data name="thumbnail_alt" />"></a>
</div>
</r:if>
<r:if expr="{{ contains(componentDisplayContext, 'featurettes') or contains(componentDisplayContext, 'sidebar') }}"><div class="col-md-8"></r:if>
<r:if expr="{{ contains(componentDisplayContext, 'featurettes') or contains(componentDisplayContext, 'sidebar') }}"><r:if expr="{{ NOT(BLANK(thumbnail_url)) }}"><div class="col-md-8"></r:if></r:if>
<<r:page:if_has_content_for region="{$componentHeader}">h3</r:page:if_has_content_for><r:page:unless_has_content_for region="{$componentHeader}">h2</r:page:unless_has_content_for> class="<r:var name="itemHeaderClassesChecker" />" id="<r:page:slug />-<r:var name="componentName" />-<r:page:id />"><a href="<r:if expr="{{ NOT(BLANK(alternate_url)) }}"><r:page:data name="alternate_url" /></r:if><r:if expr="{{ BLANK(alternate_url) }}"><r:article:path /></r:if>"><r:article:name /></a></<r:page:if_has_content_for region="{$componentHeader}">h3</r:page:if_has_content_for><r:page:unless_has_content_for region="{$componentHeader}">h2</r:page:unless_has_content_for>>
<p class="<r:var name="itemBodyClassesChecker" />">
<r:if expr="{{ NOT(BLANK(description)) }}"><r:page:data name="description" /></r:if>
<r:if expr="{{ BLANK(description) }}">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</r:if>
</p>
<a class="btn <r:var name="itemButtonClassesChecker" />" aria-labelledby="<r:page:slug />-<r:var name="componentName" />-<r:page:id />" href="<r:if expr="{{ NOT(BLANK(alternate_url)) }}"><r:page:data name="alternate_url" /></r:if><r:if expr="{{ BLANK(alternate_url) }}"><r:article:path /></r:if>"><r:if expr="{{ NOT(BLANK(link_text)) }}"><r:page:data name="link_text" /></r:if><r:if expr="{{ BLANK(link_text) }}"><r:var name="itemReadMoreButtonTextChecker" /><span class="sr-only">: <r:article:name /></span></r:if></a>
<r:if expr="{{ contains(componentDisplayContext, 'featurettes') or contains(componentDisplayContext, 'sidebar') }}"></div></r:if>
<r:if expr="{{ contains(componentDisplayContext, 'featurettes') or contains(componentDisplayContext, 'sidebar') }}"><r:if expr="{{ NOT(BLANK(thumbnail_url)) }}"></div></r:if></r:if>
</div>
</div>
</r:each>
Expand Down

0 comments on commit b20b92d

Please sign in to comment.