Skip to content

Commit 7fc8ebf

Browse files
mmckyclaude
andauthored
Refresh Books page: DP volumes, QuantMFR, improved card design (#192)
* Refresh Books page: DP volumes, community books section, top nav - Split Dynamic Programming into Volume I and Volume II entries - Add NEW badge to Volume II (General States) - Add Community Books section with Quant Macro Finance (Hansen, Sargent, Borovička) - Promote Books to top-level navigation between Lectures and Workshops - Add category field (quantecon/community) to book project entries - Add badge-new CSS styling * Remove redundant Books heading, center and space section headers * Fix unclosed div tags in books layout (Copilot review feedback) * Add nav pills to signal QuantEcon and Community book sections * Convert pills to toggle selector, remove section headings * Show all books in one list, add QE watermark, and reorder nav * increase transparancy for qe logo to be more visible * Add QuantMFR cover art, reorder books, and reduce card size - Merge QE and community books into one sorted list (QuantMFR now 2nd) - Download and use real cover art from the QuantMFR project page - Mark QuantMFR as NEW; QE watermark shown only for quantecon-category books - Reduce book card height via smaller image container and tighter spacing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * improve book cards * Separate authors from abstract and fix book thumbnail sizing - Split description into authors + description fields for all books - Render authors as a muted italic byline between title and abstract - Fix book thumbnails: remove object-fit cropping, scale naturally to width - Add align-self: flex-start to prevent flex stretch on image container Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Make book author byline darker and remove italic styling Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Replace card hover underline with light background highlight Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix card hover effect: background highlight, no underline Previous commit put styles in the wrong SCSS block. Now correctly scoped to .projects .project with background on hover and underline suppressed on the wrapping anchor. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 344af67 commit 7fc8ebf

10 files changed

Lines changed: 126 additions & 28 deletions

File tree

_layouts/books.html

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,32 @@
44

55
{{ content }}
66

7-
<ul class="row projects projects-container">
7+
{% assign all_books = site.projects | where: 'type', 'book' | sort: 'order' %}
88

9-
{% assign sorted_projects = site.projects | where: 'type', 'book' %}
9+
<ul class="row projects projects-container books-listing">
1010

11-
{% for project in sorted_projects reversed %}
11+
{% for project in all_books %}
1212
<li class="projects-item">
1313
<a target="_blank" href="{{ project.link }}">
1414
<div class="project d-flex flex-column align-items-start">
15+
{% if project.category == 'quantecon' %}
16+
<div class="book-watermark-wrap">
17+
<img class="book-watermark" src="/assets/img/qe-logo-small.png" alt="QuantEcon logo">
18+
</div>
19+
{% endif %}
1520
<div class="item-info d-flex">
1621
<div class="item-pic-books"><img src="/assets/img/books/{{ project.image }}"></div>
1722
<div class="item-title">
18-
<h3 class="name">{{ project.name }}</h3>
19-
<div class="item-desc">
20-
{{ project.description | markdownify }}
21-
</div>
22-
</div>
23+
<h3 class="name">{{ project.name }}{% if project.new %} <span class="badge-new">NEW</span>{% endif %}</h3>
24+
{% if project.authors %}<p class="book-authors">{{ project.authors }}</p>{% endif %}
25+
<div class="item-desc">
26+
{{ project.description | markdownify }}
27+
</div>
28+
</div>
29+
</div>
2330
</div>
2431
</a>
2532
</li>
2633
{% endfor %}
2734

28-
</ul>
35+
</ul>

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ <h2 class="title">Quant<span>Econ</span></h2>
7676
<li{% if page.layout=='home' %} class="active" {% endif %}><a href="{{ '/' | relative_url }}">Home</a></li>
7777
<li{% if page.layout=='lectures' %} class="active" {% endif %}><a href="/lectures/"><span>Lectures</span></a></li>
7878
<li{% if page.permalink=='/workshops/' %} class="active" {% endif %}><a href="/workshops/"><span>Workshops</span></a></li>
79+
<li{% if page.layout=='books' %} class="active" {% endif %}><a href="/books/"><span>Books</span></a></li>
7980
<li class="dropdown"><a><span>Projects</span><i class="bi bi-chevron-down"></i></a>
8081
<ul>
81-
<li><a href="/books">Books</a></li>
8282
<li><a href="/code">Code</a></li>
8383
<li><a href="/infrastructure">Infrastructure</a></li>
8484
<li><a href="https://cheatsheets.quantecon.org/">Cheatsheets</a></li>

_projects/dp-vol2.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: "Dynamic Programming, Volume II: General States"
3+
authors: "Thomas J. Sargent and John Stachurski"
4+
description: "Volume II extends the finite state framework to general state spaces, covering abstract dynamic programs, stochastic discounting, valuation, recursive decision processes, and continuous time."
5+
link: https://dp.quantecon.org
6+
image: dp-image.png
7+
order: 1
8+
type: book
9+
category: quantecon
10+
new: true
11+
---

_projects/dp.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
2-
name: Dynamic Programming
3-
description: This book is about dynamic programming and its applications in economics, finance, and adjacent fields like operations research. It brings together recent innovations in the theory of dynamic programming.
2+
name: "Dynamic Programming, Volume I: Finite States"
3+
authors: "Thomas J. Sargent and John Stachurski"
4+
description: "Volume I covers dynamic programming theory and applications for finite state spaces, including operators and fixed points, Markov dynamics, optimal stopping, and Markov decision processes."
45
link: https://dp.quantecon.org
56
image: dp-image.png
6-
order: 1
7+
order: 3
78
type: book
9+
category: quantecon
810
---

_projects/networks.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
name: Economic Networks
3-
description: This book is an introduction to economic networks and it emphasizes quantitative modeling, with the main underlying tools being graph theory, linear algebra, fixed point theory and programming.
3+
authors: "John Stachurski"
4+
description: "This book is an introduction to economic networks and it emphasizes quantitative modeling, with the main underlying tools being graph theory, linear algebra, fixed point theory and programming."
45
link: https://networks.quantecon.org
56
image: networks-image.png
6-
order: 2
7+
order: 4
78
type: book
9+
category: quantecon
810
---

_projects/quantmfr.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: "Quant Macro Finance"
3+
authors: "Lars Peter Hansen, Thomas J. Sargent, and Jaroslav Borovička"
4+
description: "An online research resource featuring chapters from *Risk, Uncertainty and Value*, developing concepts and tools for uncertainty characterization in nonlinear stochastic equilibrium models."
5+
link: https://lphansen.github.io/QuantMFR/intro.html
6+
image: quantmfr-cover.png
7+
order: 2
8+
type: book
9+
category: community
10+
new: true
11+
---
8.73 KB
Loading
Lines changed: 19 additions & 0 deletions
Loading

assets/main.scss

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -856,13 +856,6 @@ section {
856856
}
857857
}
858858

859-
&:hover {
860-
h3 {
861-
text-decoration: underline;
862-
}
863-
864-
.desc {}
865-
}
866859
}
867860
}
868861

@@ -891,6 +884,15 @@ section {
891884
@media (min-width: 768px) {
892885
min-height: 100px;
893886
}
887+
.book-watermark-wrap {
888+
position: absolute;
889+
top: 0.6rem;
890+
right: 0.8rem;
891+
}
892+
.book-watermark {
893+
width: 36px;
894+
opacity: 0.45;
895+
}
894896

895897

896898
.item-info {
@@ -907,14 +909,27 @@ section {
907909
}
908910
// Item pic style for book page
909911
.item-pic-books {
910-
overflow: hidden;
911912
flex-shrink: 0;
912-
width: 150px;
913+
align-self: flex-start;
914+
width: 110px;
913915
margin-right: 1rem;
914916
img {
915-
width: 150%;
917+
width: 100%;
918+
display: block;
916919
}
917920
}
921+
// NEW badge for recently added books
922+
.badge-new {
923+
display: inline-block;
924+
background-color: #e94560;
925+
color: #fff;
926+
font-size: 0.65rem;
927+
font-weight: 700;
928+
padding: 0.15em 0.5em;
929+
border-radius: 3px;
930+
vertical-align: middle;
931+
letter-spacing: 0.05em;
932+
}
918933
.item-title {
919934
h3 {
920935
color: $color-link;
@@ -923,6 +938,11 @@ section {
923938
margin:0;
924939
//color: $color-dark;
925940
}
941+
.book-authors {
942+
margin: 0.2rem 0 0.3rem 0;
943+
font-size: 0.85rem;
944+
color: #666;
945+
}
926946
.type {
927947
margin:0;
928948
text-transform: capitalize;
@@ -970,11 +990,39 @@ section {
970990
}
971991
.desc {
972992
color: $color-dark;
973-
993+
974994
p {
975995
margin: 0;
976996
}
977997
}
998+
&:hover {
999+
background: $color-bg;
1000+
}
1001+
}
1002+
a {
1003+
text-decoration: none;
1004+
&:hover {
1005+
text-decoration: none;
1006+
}
1007+
}
1008+
}
1009+
1010+
/*--------------------------------------------------------------
1011+
# Books listing overrides (smaller cards)
1012+
--------------------------------------------------------------*/
1013+
1014+
.books-listing {
1015+
.project {
1016+
padding: 0.75rem;
1017+
@media (min-width: 768px) {
1018+
min-height: unset;
1019+
}
1020+
}
1021+
.item-info {
1022+
margin: 0;
1023+
}
1024+
.item-desc {
1025+
font-size: 0.95rem;
9781026
}
9791027
}
9801028

pages/books.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ permalink: /books/
44
menu_item: false
55
layout: books
66
---
7-
8-
# Books

0 commit comments

Comments
 (0)