mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
hide odd hours in small screen
This commit is contained in:
parent
818012e015
commit
365e584db8
2 changed files with 12 additions and 1 deletions
|
|
@ -67,6 +67,9 @@ body {
|
|||
@media only screen and (max-width: 600px) {
|
||||
.tick text {
|
||||
font-size: 15px;
|
||||
|
||||
.tick-odd {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,15 @@ export function renderHours(
|
|||
.paddingInner(0.1);
|
||||
svg.select<SVGGElement>(".x-ticks")
|
||||
.transition(trans)
|
||||
.call(axisBottom(x).tickSizeOuter(0));
|
||||
.call(axisBottom(x).tickSizeOuter(0))
|
||||
.selectAll("text")
|
||||
.attr("class", (n: any) => {
|
||||
if (n % 2 != 0) {
|
||||
return "tick-odd";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
});
|
||||
|
||||
const cappedRange = scaleLinear().range([0.1, 0.8]);
|
||||
const colour = scaleSequential((n) => interpolateBlues(cappedRange(n))).domain([
|
||||
|
|
|
|||
Loading…
Reference in a new issue