Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.

Commit ed2569a

Browse files
author
Scott Cranfill
authored
Merge pull request #104 from cfpb/move-featured-challenge
Move featured challenge banner into main content column
2 parents 207541a + 3f19686 commit ed2569a

3 files changed

Lines changed: 31 additions & 41 deletions

File tree

idea/static/idea/css/idea.css

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
[class*="span"] {
1717
border: 0px solid rgba(0,0,0,0);
1818
margin-left: 2.85715%;
19-
margin-right: -3px; // Necessary to get rid of inline whitespace
19+
margin-right: -3px; /* Necessary to get rid of inline whitespace */
2020
padding: 0;
2121
display: inline-block;
2222
vertical-align: top;
@@ -91,7 +91,7 @@ textarea.populated {
9191

9292
/* Header */
9393
.project-header .row {
94-
padding: 0 0 1.5em 0;
94+
margin-bottom: 1.5em;
9595
}
9696
.project-header .row p {
9797
margin: 0;
@@ -365,19 +365,17 @@ ul.section-nav li.active a {
365365
}
366366

367367
/* Sidebar */
368-
.sidebar {
369-
//margin-top: 1em;
370-
}
368+
371369
.sidebar ul {
372-
list-style: none;
373-
padding-left: 0;
370+
list-style-type: square;
371+
padding-left: 1.5em;
374372
}
375373
.ic-add-tags,
376374
.sidebar-nav {
377375
margin-bottom: 2.5em;
378376
}
379-
.sidebar .challenge-banner {
380-
margin-bottom: 1.25em;
377+
.challenge-banner {
378+
margin: 1.25em 0;
381379
background-color: #DBEDD4;
382380
padding: 1.25em;
383381
}
@@ -389,7 +387,7 @@ ul.section-nav li.active a {
389387
#date-range {
390388
margin-top: 20px;
391389
}
392-
.sidebar .challenge-banner #challenge-link {
390+
.challenge-banner #challenge-link {
393391
margin-top: 1.5em;
394392
margin-bottom: 0;
395393
}
@@ -437,7 +435,11 @@ ul.section-nav li.active a {
437435
}
438436
.tags .tag {
439437
display: block;
440-
margin: 0 0.5em 0.75em 1em;
438+
margin: 0 0.5em 0.75em -0.5em;
439+
}
440+
.tags .tag:before {
441+
position: relative;
442+
left: -0.75em;
441443
}
442444
.tags .tag a {
443445
font-family: "Avenir Next Demi", Arial, sans-serif;
@@ -612,7 +614,7 @@ input.btn-voted:hover {
612614
background-color: #919395;
613615
color: #fff;
614616
cursor: default;
615-
}
617+
}
616618

617619
input.btn-voted:active, input.btn-voted:focus {
618620
background-color: #75787b;
@@ -799,21 +801,6 @@ input.btn:visited {
799801
visibility: hidden;
800802
}
801803

802-
.challenge-info h3 {
803-
text-transform: uppercase;
804-
font-family: "Avenir Next Demi", Arial, sans-serif;
805-
font-size: 16px;
806-
letter-spacing: 1px;
807-
}
808-
809-
.challenge-info h2 {
810-
font-weight: normal;
811-
}
812-
.challenge-info .challenge-banner {
813-
margin-top: 0.5em;
814-
background-color: #DBEDD4;
815-
padding: 1em;
816-
}
817804
.challenge-info {
818805
border-bottom: 1px solid #000;
819806
padding: 0;
@@ -830,7 +817,7 @@ section.main-content hr {
830817
padding: 0;
831818
}
832819

833-
.idea-votes .btn-vote,
820+
.idea-votes .btn-vote,
834821
.idea-votes .btn-voted,
835822
.idea-votes .btn-voted:hover,
836823
.idea-votes .btn-voted:active,
@@ -880,7 +867,7 @@ section.main-content hr {
880867
display: inline;
881868
}
882869

883-
// Pagination
870+
/* Pagination */
884871

885872
.pagination {
886873
border: solid #75787b;

idea/templates/idea/banner_detail.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ <h2 class="section">
2121
<div class="row challenge-info span9">
2222
<div class="challenge-banner">
2323
{% if is_current_banner %}
24-
<h3>Current Challenge:</h3>
24+
<h5>Current Challenge:</h5>
2525
{% elif banner.is_private == True %}
26-
<h3>Private Room</h3>
26+
<h5>Private Room</h5>
2727
{% else %}
28-
<h3>Expired Challenge:</h3>
28+
<h5>Expired Challenge:</h5>
2929
{% endif %}
3030
<h2>{{banner.title}}</h2>
3131
</div>
@@ -139,7 +139,7 @@ <h3>Browse by Tag:</h3>
139139
<span class="tag_remove">{{tag.count}}</span>
140140
</li>
141141
{% endfor %}
142-
</ul>
142+
</ul>
143143
</aside>
144144
</div><!-- /span_side -->
145145
</div><!-- /row -->

idea/templates/idea/list.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ <h2 class="section">
1414
</div>
1515
<p class="info">{{ about_text|safe }}</p>
1616
</div><!-- /row -->
17+
18+
{% if banner %}
19+
<div class="challenge-banner">
20+
<h5>Current Challenge:</h5>
21+
<h3 class="challenge-description">{{banner.title}}</h3>
22+
<div id="challenge-link">
23+
<a href="{% url 'idea:challenge_detail' banner.id %}" class="chevron-right">View Challenge Ideas</a>
24+
</div>
25+
</div><!-- /challenge-banner -->
26+
{% endif %}
1727
</header><!-- /project-header -->
1828
<div class="visuallyhidden">
1929
<h2>Main Navigation for IdeaBox</h2>
@@ -101,13 +111,6 @@ <h2>Main Navigation for IdeaBox</h2>
101111
<div class="project-add-idea">
102112
<a href="{% url 'idea:add_idea' %}" class="btn-huge">Submit an Idea</a>
103113
</div><!-- /project-add-idea -->
104-
{% if banner %}
105-
<div class="challenge-banner">
106-
<h5>Current Challenge:</h5>
107-
<h3 class="challenge-description">{{banner.title}}</h3>
108-
<div id="challenge-link"><a href="{% url 'idea:challenge_detail' banner.id %}" class="chevron-right">View Challenge Ideas</a></div>
109-
</div><!-- /challenge-banner -->
110-
{% endif %}
111114
<aside class="banners">
112115
<h3>Browse by Challenge:</h3>
113116
<ul>
@@ -130,7 +133,7 @@ <h3>Browse by Tag:</h3>
130133
<span class="tag_remove">{{tag.count}}</span>
131134
</li>
132135
{% endfor %}
133-
</ul>
136+
</ul>
134137
</aside>
135138
</div><!-- /span_side -->
136139
</div><!-- /row -->

0 commit comments

Comments
 (0)