Skip to content

Commit 43582fb

Browse files
committed
feat: CSS enhancements
1 parent 005a4dc commit 43582fb

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

_ext/translation_graph.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def run(self):
7676
ygap=5,
7777
customdata=np.array(hoverdata),
7878
hovertemplate=self.HOVER_TEMPLATE,
79+
name="", # Set the trace name to an empty string to remove "trace 0" from hoverbox
7980
colorbar={
8081
'orientation': 'h',
8182
'y': 0,
@@ -113,7 +114,12 @@ def run(self):
113114
yaxis_title="Locale",
114115
yaxis_autorange="reversed",
115116
)
116-
div = plot(fig, output_type="div", include_plotlyjs=True)
117+
div = plot(
118+
fig,
119+
output_type="div",
120+
include_plotlyjs=True,
121+
config={"displayModeBar": False},
122+
)
117123
return [nodes.raw("", div, format="html")]
118124

119125
def setup(app):

_static/pyos.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,31 @@ th {
419419
padding: 8px; /* Add some padding for better readability */
420420
}
421421

422+
/* -------------- */
423+
/* Plotly Heatmap */
424+
/* -------------- */
425+
426+
.plotly svg {
427+
g:not(.heatmap-label) > text {
428+
fill: var(--pst-color-text-base) !important;
429+
}
430+
431+
@media (max-width: 540px) {
432+
g.heatmap-label > text {
433+
display: none;
434+
}
435+
}
436+
}
437+
422438
/* ----------------- */
423439
/* Language Selector */
424440
/* ----------------- */
441+
442+
/* Hide the left-side column for pages marked as orphan */
443+
.orphan .bd-sidebar {
444+
display: none !important;
445+
}
446+
447+
.orphan .bd-main {
448+
margin-left: 0 !important;
449+
}

0 commit comments

Comments
 (0)