Skip to content

Commit 2733205

Browse files
authored
Merge pull request #42 from gdalle/gd/split_twocolumn
Add inter-column spacing in `TwoColumn` and `ThreeColumn`
2 parents 4240645 + 9e9f52c commit 2733205

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PlutoTeachingTools"
22
uuid = "661c6b06-c737-4d37-b85c-46df65de6f69"
33
authors = ["Eric Ford <[email protected]> and contributors"]
4-
version = "0.2.14"
4+
version = "0.2.15"
55

66
[deps]
77
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

src/present.jl

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ struct TwoColumn{L, R}
3030
end
3131

3232
function Base.show(io, mime::MIME"text/html", tc::TwoColumn)
33-
write(io, """<div style="display: flex;"><div style="flex: 50%;">""")
33+
write(io, """<div style="display: flex;"><div style="flex: 49%;">""")
3434
show(io, mime, tc.left)
35-
write(io, """</div><div style="flex: 50%;">""")
35+
write(io, """</div><div style="flex: 2%;">""")
36+
write(io, """</div><div style="flex: 49%;">""")
3637
show(io, mime, tc.right)
3738
write(io, """</div></div>""")
3839
end
@@ -43,9 +44,10 @@ struct TwoColumnWideLeft{L, R}
4344
end
4445

4546
function Base.show(io, mime::MIME"text/html", tc::TwoColumnWideLeft)
46-
write(io, """<div style="display: flex;"><div style="flex: 66%;">""")
47+
write(io, """<div style="display: flex;"><div style="flex: 65%;">""")
4748
show(io, mime, tc.left)
48-
write(io, """</div><div style="flex: 34%;">""")
49+
write(io, """</div><div style="flex: 2%;">""")
50+
write(io, """</div><div style="flex: 33%;">""")
4951
show(io, mime, tc.right)
5052
write(io, """</div></div>""")
5153
end
@@ -56,9 +58,10 @@ struct TwoColumnWideRight{L, R}
5658
end
5759

5860
function Base.show(io, mime::MIME"text/html", tc::TwoColumnWideRight)
59-
write(io, """<div style="display: flex;"><div style="flex: 34%;">""")
61+
write(io, """<div style="display: flex;"><div style="flex: 33%;">""")
6062
show(io, mime, tc.left)
61-
write(io, """</div><div style="flex: 66%;">""")
63+
write(io, """</div><div style="flex: 2%;">""")
64+
write(io, """</div><div style="flex: 65%;">""")
6265
show(io, mime, tc.right)
6366
write(io, """</div></div>""")
6467
end
@@ -70,11 +73,13 @@ struct ThreeColumn{L, C, R}
7073
end
7174

7275
function Base.show(io, mime::MIME"text/html", tc::ThreeColumn)
73-
write(io, """<div style="display: flex;"><div style="flex: 33%;">""")
76+
write(io, """<div style="display: flex;"><div style="flex: 32%;">""")
7477
show(io, mime, tc.left)
75-
write(io, """</div><div style="flex: 34%;">""")
78+
write(io, """</div><div style="flex: 2%;">""")
79+
write(io, """</div><div style="flex: 32%;">""")
7680
show(io, mime, tc.center)
77-
write(io, """</div><div style="flex: 33%;">""")
81+
write(io, """</div><div style="flex: 2%;">""")
82+
write(io, """</div><div style="flex: 32%;">""")
7883
show(io, mime, tc.right)
7984
write(io, """</div></div>""")
8085
end
@@ -131,5 +136,3 @@ function ChooseDisplayMode(;wide::Bool=false, present::Bool = false, lang::Abstr
131136
132137
""")
133138
end
134-
135-

0 commit comments

Comments
 (0)