Skip to content

Commit f5d7624

Browse files
style: Custom sample code width ( Fixes #202 )
Adding landscape/portrait option
1 parent aeeae7a commit f5d7624

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

psturtle.com/_includes/Help.ps1

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ $Command,
1414
[switch]
1515
$InvokeExample,
1616

17-
# The width of the sample code, in characters
17+
# The width of the sample code (in landscape mode), in characters
1818
[int]
19-
$SampleCodeWidth = 80
19+
$SampleCodeWidthLandscape = 80,
20+
21+
# The width of the sample code (in portrait mode), in characters
22+
[int]
23+
$SampleCodeWidthPortrait = 80
2024
)
2125

2226
# Try to get command help
@@ -58,12 +62,16 @@ if ($notes) {
5862
}"
5963
".sampleCode {
6064
text-align: center;
61-
width: 60ch;
65+
width: ${SampleCodeWidthLandscape}ch;
6266
font-size: .9rem;
6367
margin-left: auto;
6468
margin-right: auto;
6569
}"
6670

71+
"@media (orientation: portrait) {
72+
sampleCode { width: ${SampleCodeWidthPortrait}ch }
73+
}"
74+
6775
"code { text-align: left}"
6876

6977
".example-outputs {

0 commit comments

Comments
 (0)