Skip to content

Commit 33c24e0

Browse files
committed
Restyle the per-card library selector as compact pills
Ten file-folder tabs wrapped to two ragged lines and broke the metaphor. Chips wrap cleanly instead: all libraries fit one line at 1200px and up, and stack tidily below that. Also fixes the hvPlot label casing.
1 parent dc1747c commit 33c24e0

3 files changed

Lines changed: 43 additions & 4 deletions

File tree

render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"plotnine": "plotnine",
2727
"lets-plot": "lets-plot",
2828
"plotly": "plotly",
29-
"hvplot": "hvplot (Bokeh)",
29+
"hvplot": "hvPlot (Bokeh)",
3030
"altair": "Altair",
3131
"ggplot": "ggplot2 (R)",
3232
}

templates/t_index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,10 @@ <h5>{{ name }}</h5>
120120
<div class="card mb-4">
121121
<div class="card-header">
122122
<h3 class="card-title mb-1">{{ name }}<a class="anchor-link" href="#{{ slug }}" title="Link to {{ name }}" aria-label="Link to {{ name }}">#</a></h3>
123-
<ul class="nav nav-tabs card-header-tabs">
123+
<ul class="nav nav-pills card-header-pills library-pills">
124124
{% for plot in items %}
125125
<li class="nav-item">
126-
<a class="nav-link {% if loop.index0 == 0 %} active{% endif %}" data-toggle="tab" href="#{{ slug }}{{ plot['package-slug'] }}" role="tab"> {{ plot['package'] }}
127-
</a>
126+
<a class="nav-link{% if loop.index0 == 0 %} active{% endif %}" data-toggle="tab" href="#{{ slug }}{{ plot['package-slug'] }}" role="tab">{{ plot['package'] }}</a>
128127
</li>
129128
{% endfor %}
130129
</ul>

web/css/custom.css

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,46 @@ table {
4343
text-decoration: none;
4444
}
4545

46+
/* Library selector: compact chips that wrap neatly instead of ragged folder tabs. */
47+
.library-pills {
48+
gap: .25rem;
49+
margin-left: 0;
50+
margin-right: 0;
51+
margin-top: .35rem;
52+
}
53+
54+
.library-pills .nav-item {
55+
margin: 0;
56+
}
57+
58+
.library-pills .nav-link {
59+
background-color: #fff;
60+
border: 1px solid #e0e2e5;
61+
border-radius: 50rem;
62+
color: #495057;
63+
font-size: .85rem;
64+
line-height: 1.3;
65+
padding: .2rem .6rem;
66+
transition: background-color .12s ease, border-color .12s ease, color .12s ease;
67+
white-space: nowrap;
68+
}
69+
70+
.library-pills .nav-link:hover,
71+
.library-pills .nav-link:focus {
72+
background-color: #eceef0;
73+
border-color: #cfd3d7;
74+
color: #212529;
75+
text-decoration: none;
76+
}
77+
78+
.library-pills .nav-link.active,
79+
.library-pills .nav-link.active:hover,
80+
.library-pills .nav-link.active:focus {
81+
background-color: #202020;
82+
border-color: #202020;
83+
color: #fff;
84+
}
85+
4686
/* Copy button sitting in the dark code panel header. */
4787
.copy-btn {
4888
background: transparent;

0 commit comments

Comments
 (0)