Skip to content

Commit

Permalink
Merge pull request #640 from cfpb/sub_page_fix
Browse files Browse the repository at this point in the history
Fixes for /sub-pages
  • Loading branch information
sebworks committed Jun 11, 2015
2 parents 7876cf8 + f381342 commit e4eb67d
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions sub-pages/_single.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{% extends "layout-side-nav.html" %}
{% import "_vars-sub-pages.html" as vars with context %}
{% set active_nav_id = sub_page.slug %}
{% set sub_pages = vars.sub_pages %}

{% block title -%}
{{ sub_page.title | safe if sub_page.title }}
{%- endblock %}

{% block content_main_modifiers -%}
{{ super() }} content__flush-bottom
{{ super() }} content__flush-bottom content_main__sub-page
{%- endblock %}

{% block content_main %}
Expand All @@ -20,17 +21,24 @@ <h1>{{ sub_page.title | safe }}</h1>
{% endif %}

{% if sub_page.content %}
<section class="initiative_description block block__flush-top">
<section class="sub-page_content
block
block__flush-top">
{{ sub_page.content | safe }}
</section>
{% endif %}

{% if vars.sub_pages %}
<section class="block block__padded-top block__border-top block__flush-bottom">
{% if sub_pages and sub_pages.total %}
<section class="block
block__padded-top
block__border-top
block__flush-bottom">
<div class="content-l content-l__main">
{% for page in vars.sub_pages %}
{% for page in sub_pages %}
<!-- TODO: link header styles -->
<div class="initiative_topic block__sub block__flush-top
<div class="sub-page_topic
block__sub
block__flush-top
{{ 'office_col' if vars.sub_pages.result_dict|length > 1 else 'content-l_col-1' -}}">

{% if page.title %}
Expand Down Expand Up @@ -63,8 +71,20 @@ <h2 class="h3">
</section>
{% endif %}

{% if sub_page.body_content %}
<section class="block
block__padded-top
block__border-top">
{{ sub_page.body_content }}
</section>
{% endif %}

{% if activities_feed %}
<aside class="block block__flush-sides block__bg u-mb0 u-mt0">
<aside class="block
block__flush-sides
block__bg
u-mb0
u-mt0">
<section class="office_activities">
<h1 class="header-slug">
<span class="header-slug_inner">
Expand Down

0 comments on commit e4eb67d

Please sign in to comment.