fix: increase chart size
This commit is contained in:
parent
393d243b66
commit
96b836b660
2 changed files with 50 additions and 38 deletions
|
@ -1,7 +1,7 @@
|
|||
.chart-container {
|
||||
position: relative;
|
||||
margin-inline: auto;
|
||||
block-size: 50vh;
|
||||
block-size: 100vh;
|
||||
inline-size: 95vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -12,7 +12,8 @@
|
|||
}
|
||||
|
||||
@include mq("large") {
|
||||
block-size: 50vh;
|
||||
block-size: auto;
|
||||
max-block-size: 80vh;
|
||||
inline-size: 50vw;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,24 +2,35 @@
|
|||
{{- erroridf "a11y-chart-longdesc" "No longdesc found for chart '%q' (%q)" ( .Get "chart-id" ) .Page.File.Path -}}
|
||||
{{- end -}}
|
||||
|
||||
<figure class="article__figure figure figure--chart{{ with .Get "class" }} {{ . }}{{ end }}" role="group">
|
||||
|
||||
<figure
|
||||
class="article__figure figure figure--chart{{ with .Get "class" }}{{ . }}{{ end }}"
|
||||
role="group"
|
||||
>
|
||||
{{- with .Get "chart-id" -}}
|
||||
<div class="chart-container">
|
||||
<canvas class="chart" id="{{ . }}">
|
||||
<canvas
|
||||
width="auto"
|
||||
class="chart"
|
||||
id="{{ . }}"
|
||||
>
|
||||
You must enable Javascript to view this chart.
|
||||
</canvas>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- with .Get "chart-id-2" -}}
|
||||
<div class="chart-container">
|
||||
<canvas class="chart" id="{{ . }}">
|
||||
<canvas
|
||||
class="chart"
|
||||
id="{{ . }}"
|
||||
>
|
||||
You must enable Javascript to view this chart.
|
||||
</canvas>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- if or ( .Get "caption" ) ( .Get "title" ) -}}
|
||||
<figcaption class="figure__caption{{ if not ( or ( .Get "caption" ) ( .Get "title" ) ) }} figure__caption--no-height{{ end }}">
|
||||
<figcaption class="figure__caption{{ if not ( or ( .Get "caption" ) ( .Get "title" ) ) }}figure__caption--no-height{{ end }}">
|
||||
{{- with .Get "title" -}}<h4 class="figcaption__title">{{ . | markdownify | safeHTML }}</h4>{{- end -}}
|
||||
{{- with .Get "caption" -}}<p class="figcaption__caption">{{ . | markdownify | safeHTML }}</p>{{- end -}}
|
||||
</figcaption>
|
||||
|
|
Loading…
Reference in a new issue