Skip to content

Commit 99a74aa

Browse files
committed
chore: enhance two cols layout
1 parent 87cf1ca commit 99a74aa

File tree

2 files changed

+51
-50
lines changed

2 files changed

+51
-50
lines changed

example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ layout: two-cols-header
6161
::right::
6262

6363
```javascript
64-
console.log("With some code");
64+
console.log("With some code"); console.log("With some code"); console.log("With some code");
6565
```
6666

6767
`inline code`

styles/layout.css

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
/* PT Sans */
22

33
@font-face {
4-
font-family: 'PT Sans';
5-
font-display: swap;
6-
font-weight: 400;
7-
src: url('@fontsource/pt-sans/files/pt-sans-latin-ext-400-normal.woff2') format('woff2');
4+
font-family: 'PT Sans';
5+
font-display: swap;
6+
font-weight: 400;
7+
src: url('@fontsource/pt-sans/files/pt-sans-latin-ext-400-normal.woff2') format('woff2');
88
}
99

1010
@font-face {
11-
font-family: 'PT Sans';
12-
font-display: swap;
13-
font-weight: 400;
14-
font-style: italic;
15-
src: url('@fontsource/pt-sans/files/pt-sans-latin-ext-400-italic.woff2') format('woff2');
11+
font-family: 'PT Sans';
12+
font-display: swap;
13+
font-weight: 400;
14+
font-style: italic;
15+
src: url('@fontsource/pt-sans/files/pt-sans-latin-ext-400-italic.woff2') format('woff2');
1616
}
1717

1818
@font-face {
19-
font-family: 'PT Sans';
20-
font-display: swap;
21-
font-weight: 700;
22-
src: url('@fontsource/pt-sans/files/pt-sans-latin-ext-700-normal.woff2') format('woff2');
19+
font-family: 'PT Sans';
20+
font-display: swap;
21+
font-weight: 700;
22+
src: url('@fontsource/pt-sans/files/pt-sans-latin-ext-700-normal.woff2') format('woff2');
2323
}
2424

2525
@font-face {
26-
font-family: 'PT Sans';
27-
font-display: swap;
28-
font-weight: 700;
29-
font-style: italic;
30-
src: url('@fontsource/pt-sans/files/pt-sans-latin-ext-700-italic.woff2') format('woff2');
26+
font-family: 'PT Sans';
27+
font-display: swap;
28+
font-weight: 700;
29+
font-style: italic;
30+
src: url('@fontsource/pt-sans/files/pt-sans-latin-ext-700-italic.woff2') format('woff2');
3131
}
3232

3333
/* 2MASSJ1808 */
3434

3535
@font-face {
36-
font-family: '2MASS J1808';
37-
font-display: swap;
38-
font-weight: normal;
39-
src: url(./fonts/2MASSJ1808-Normal.woff2) format('woff2');
36+
font-family: '2MASS J1808';
37+
font-display: swap;
38+
font-weight: normal;
39+
src: url(./fonts/2MASSJ1808-Normal.woff2) format('woff2');
4040
}
4141

4242
@font-face {
43-
font-family: '2MASS J1808';
44-
font-display: swap;
45-
font-weight: 900;
46-
src: url(./fonts/2MASSJ1808-Heavy.woff2) format('woff2');
43+
font-family: '2MASS J1808';
44+
font-display: swap;
45+
font-weight: 900;
46+
src: url(./fonts/2MASSJ1808-Heavy.woff2) format('woff2');
4747
}
4848

4949
/* Fira Code */
5050

5151
@font-face {
52-
font-family: 'Fira Code';
53-
font-display: swap;
54-
font-weight: 400;
55-
src: url('@fontsource/fira-code/files/fira-code-latin-400-normal.woff2') format('woff2');
52+
font-family: 'Fira Code';
53+
font-display: swap;
54+
font-weight: 400;
55+
src: url('@fontsource/fira-code/files/fira-code-latin-400-normal.woff2') format('woff2');
5656
}
5757

5858

@@ -67,8 +67,8 @@ html {
6767
}
6868

6969
::marker {
70-
font-family: monospace;
71-
font-weight: bold;
70+
font-family: monospace;
71+
font-weight: bold;
7272
}
7373

7474
h1,
@@ -79,16 +79,16 @@ h5,
7979
h6 {
8080
color: var(--slidev-theme-primary);
8181
font-family: "2MASS J1808";
82-
margin-bottom: 0 !important;
82+
margin-bottom: 0 !important;
8383
}
8484

8585
.slidev-layout p, .slidev-layout li {
86-
line-height: 1.8;
86+
line-height: 1.8;
8787
}
8888

8989
.slidev-layout h1 {
9090
font-size: 1.4rem;
91-
font-weight: bold;
91+
font-weight: bold;
9292
}
9393

9494
.slidev-layout h2 {
@@ -112,54 +112,55 @@ h6 {
112112
}
113113

114114
.slidev-layout h1 + h2 {
115-
color: var(--slidev-theme-primary-alternative);
116-
font-size: 1rem;
115+
color: var(--slidev-theme-primary-alternative);
116+
font-size: 1rem;
117117
}
118118

119119
.slidev-layout h1 + * {
120-
margin-top: 0.5rem !important;
120+
margin-top: 0.5rem !important;
121121
}
122122

123123
.slidev-layout ul li::marker {
124-
content: '> ';
124+
content: '> ';
125125
}
126126

127127
.slidev-layout ul li li::marker {
128-
content: '- ';
128+
content: '- ';
129129
}
130130

131131
.slidev-layout ul, .slidev-layout ol, .slidev-layout dl {
132-
margin-top: 1rem;
133-
margin-bottom: 0.5rem;
132+
margin-top: 1rem;
133+
margin-bottom: 0.5rem;
134134
}
135135

136136
.slidev-layout li ul, .slidev-layout li ol, .slidev-layout li dl {
137-
margin-top: 0;
137+
margin-top: 0;
138138
}
139139

140140
.slidev-layout li {
141-
margin-left: 2rem;
141+
margin-left: 2rem;
142142
}
143143

144144
.slidev-layout {
145145
padding: 1.9rem 3rem 3rem 3rem;
146-
z-index: 1 !important;
146+
z-index: 1 !important;
147147
}
148148

149149
.slidev-layout.two-cols, .slidev-layout.two-cols-header {
150-
gap: 0.25rem 1rem;
150+
gap: 0.25rem 1rem;
151+
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
151152
}
152153

153154
.slidev-layout.two-cols-header {
154-
grid-template-rows: repeat(2, min-content) !important;
155+
grid-template-rows: repeat(2, min-content) !important;
155156
}
156157

157158
.slidev-layout.two-cols-header > div {
158-
margin: 0;
159+
margin: 0;
159160
}
160161

161162
.slidev-layout.cover {
162-
background-repeat: no-repeat;
163+
background-repeat: no-repeat;
163164
}
164165

165166
.col-right pre:first-of-type, .col-left pre:first-of-type {

0 commit comments

Comments
 (0)