Permalink
Browse files

Merge pull request #1444 from angussidney/1323/refactor/linkbox-on-bo…

…ok-works-pages

Refactor works and books pages to use linkbox component
  • Loading branch information...
mekarpeles committed Nov 4, 2018
2 parents d508b87 + 02f5c47 commit 808de07028e0becef93a76928368290dffbe9994
@@ -235,12 +235,12 @@ <h4 class="publisher">
$if work:
$def render_subjects(label, subjects, prefix=""):
$if subjects:
<div class="section">
<h6 class="collapse black uppercase">$label</h6>
<div class="sansserif">
<div class="section link-box">
<h6>$label</h6>
<div><span>
$for subject in subjects:
<a href="/subjects/$prefix$utf8(subject.lower().replace(' ', '_').replace(',',''))">$subject</a>$cond(not loop.last,",","")
</div>
</span></div>
</div>
$:render_subjects("Subjects", work.get_subjects())
$:render_subjects("People", work.subject_people, prefix="person:")
@@ -163,12 +163,12 @@ <h3>Links <span class="gray small sansserif">($_("leaves Open Library"))</span><
$def render_subjects(label, subjects, prefix=""):
$if subjects:
<div class="section" style="margin-bottom:15px;">
<h6 class="collapse black uppercase">$label</h6>
<div class="sansserif">
<div class="section link-box" style="margin-bottom:15px;">
<h6>$label</h6>
<div><span>
$for subject in subjects:
<a href="/subjects/$prefix$utf8(subject.lower().replace(' ', '_').replace(',',''))">$subject</a>$cond(not loop.last,",","")
</div>
</span></div>
</div>
$:render_subjects("Subjects", page.get_subjects())
@@ -4,26 +4,27 @@
*/
// contentQuarter rule can likely be removed in future when legacy.css has been removed
.contentQuarter,
.link-box {
.contentQuarter {
float: left;
max-width: 215px;
min-height: 100px;
margin-bottom: 20px;
}
.contentQuarter div, .link-box div {
padding-right: 19px;
}
.link-box {
h6 {
color: @black;
margin: 0;
margin: 0 !important;
padding: 0 !important;
text-transform: uppercase !important;
}
> div span {
font-size: .75em;
}
> div {
padding-right: 19px;
}
}
// div.subjects can be removed in future when legacy.css has been removed

0 comments on commit 808de07

Please sign in to comment.