Skip to content

Commit 41651d1

Browse files
tighten iframes by using scrolling="no"
1 parent 3ca0937 commit 41651d1

File tree

1 file changed

+43
-34
lines changed
  • docs/blog/posts/2024-07-02-beautiful-tables-in-typst

1 file changed

+43
-34
lines changed

docs/blog/posts/2024-07-02-beautiful-tables-in-typst/index.qmd

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,121 +28,130 @@ You can click on the links below the examples to see the full documents, with so
2828

2929
This example uses a dashed border to draw attention to two cells.
3030

31-
::::: {.column-page .room}
32-
:::: {.columns}
31+
:::::: {.column-page .room}
32+
::::: columns
3333
::: {.column width="50%" style="padding-top:1.5em"}
34-
![](images/pandas-confusion-matrix.png){width=700}
35-
[Typst](examples/pandas-confusion-matrix.pdf){target="_blank"}
34+
![](images/pandas-confusion-matrix.png){width="700"} [Typst](examples/pandas-confusion-matrix.pdf){target="_blank"}
3635
:::
36+
3737
::: {.column width="50%"}
3838
```{=html}
39-
<iframe class="html-demo" src="demo/pandas-confusion-matrix.html" width=700 height=400></iframe>
39+
<iframe class="html-demo" src="demo/pandas-confusion-matrix.html" width=700 height=250 scrolling="no"></iframe>
4040
```
41+
4142
[HTML](examples/pandas-confusion-matrix.HTML){target="_blank"}
4243
:::
43-
::::
4444
:::::
45+
::::::
4546

4647
## Cars heatmap (gt / R)
4748

4849
This example uses cell background colors to encode ranges of values.
4950

50-
::::: {.column-page .room}
51-
:::: {.columns}
51+
:::::: {.column-page .room}
52+
::::: columns
5253
::: {.column width="50%" style="padding-top:2.2em"}
53-
![](images/gt-cars.png){width=430}
54+
![](images/gt-cars.png){width="430"}
5455

5556
[Typst](examples/gt-cars.pdf){target="_blank"}
5657
:::
58+
5759
::: {.column width="50%"}
5860
```{=html}
59-
<iframe class="html-demo" src="demo/gt-cars.html" width=430 height=500></iframe>
61+
<iframe class="html-demo" src="demo/gt-cars.html" width=430 height=375 scrolling="no"></iframe>
6062
```
63+
6164
[HTML](examples/gt-cars.HTML){target="_blank"}
6265
:::
63-
::::
6466
:::::
67+
::::::
6568

6669
## Oceania (Great Tables / Python)
6770

6871
Borders can show the structure of grouped rows.
6972

70-
::::: {.column-page .room}
71-
:::: {.columns}
73+
:::::: {.column-page .room}
74+
::::: columns
7275
::: {.column width="50%" style="padding-top:2.1em"}
73-
![](images/great-tables-oceania.png){width=600}
76+
![](images/great-tables-oceania.png){width="600"}
7477

7578
[Typst](examples/great-tables-oceania.pdf){target="_blank"}
7679
:::
80+
7781
::: {.column width="50%"}
7882
```{=html}
79-
<iframe class="html-demo" src="demo/great-tables-oceania.html" width=600 height=1020></iframe>
83+
<iframe class="html-demo" src="demo/great-tables-oceania.html" width=600 height=907 scrolling="no"></iframe>
8084
```
85+
8186
[HTML](examples/great-tables-oceania.HTML){target="_blank"}
8287
:::
83-
::::
8488
:::::
89+
::::::
8590

8691
## Islands (gt / R)
8792

8893
Font sizes and minimal borders make this table stand out.
8994

90-
91-
::::: {.column-page .room}
92-
:::: {.columns}
95+
:::::: {.column-page .room}
96+
::::: columns
9397
::: {.column width="50%" style="padding-top:2.2em"}
94-
![](images/gt-islands.png){width=500}
98+
![](images/gt-islands.png){width="500"}
9599

96100
[Typst](examples/gt-islands.pdf){target="_blank"}
97101
:::
102+
98103
::: {.column width="50%"}
99104
```{=html}
100-
<iframe class="html-demo" src="demo/gt-islands.html" width=400 height=680></iframe>
105+
<iframe class="html-demo" src="demo/gt-islands.html" width=400 height=580 scrolling="no"></iframe>
101106
```
107+
102108
[HTML](examples/gt-islands.HTML){target="_blank"}
103109
:::
104-
::::
105110
:::::
111+
::::::
106112

107113
## Solar Zenith (Great Tables / Python)
108114

109115
Another cool heatmap.
110116

111-
::::: {.column-page .room}
112-
:::: {.columns}
117+
:::::: {.column-page .room}
118+
::::: columns
113119
::: {.column width="50%" style="padding-top:1.7em"}
114-
![](images/great-tables-solar-zenith.png){width=750}
120+
![](images/great-tables-solar-zenith.png){width="750"}
115121

116122
[Typst](examples/great-tables-solar-zenith.pdf){target="_blank"}
117123
:::
124+
118125
::: {.column width="50%"}
119126
```{=html}
120-
<iframe class="html-demo" src="demo/great-tables-solar-zenith.html" width=850 height=680></iframe>
127+
<iframe class="html-demo" src="demo/great-tables-solar-zenith.html" width=850 height=565 scrolling="no"></iframe>
121128
```
129+
122130
[HTML](examples/great-tables-solar-zenith.HTML){target="_blank"}
123131
:::
124-
::::
125132
:::::
126-
133+
::::::
127134

128135
## Acting on Data (Pandas / Python)
129136

130137
Applying colors and transparency based on data.
131138

132-
::::: {.column-page .room}
133-
:::: {.columns}
139+
:::::: {.column-page .room}
140+
::::: columns
134141
::: {.column width="50%" style="padding-top:2.2em"}
135-
![](images/pandas-acting-on-data.png){width=540}
142+
![](images/pandas-acting-on-data.png){width="540"}
136143

137144
[Typst](examples/pandas-acting-on-data.pdf){target="_blank"}
138145
:::
146+
139147
::: {.column width="50%"}
140148
```{=html}
141-
<iframe class="html-demo" src="demo/pandas-acting-on-data.html" width=600 height=580></iframe>
149+
<iframe class="html-demo" src="demo/pandas-acting-on-data.html" width=600 height=505 scrolling="no"></iframe>
142150
```
151+
143152
[HTML](examples/pandas-acting-on-data.HTML){target="_blank"}
144153
:::
145-
::::
146154
:::::
155+
::::::
147156

148-
We can't wait to see what you do with this new feature!
157+
We can't wait to see what you do with this new feature!

0 commit comments

Comments
 (0)