Skip to content

Commit 082c899

Browse files
authored
Minor fixes (#80)
1 parent f111aee commit 082c899

File tree

8 files changed

+35
-23
lines changed

8 files changed

+35
-23
lines changed

demo/markdown/01-classics/20_transitions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ source: [unsplash](https://unsplash.com/fr/photos/couloir-en-beton-avec-applique
179179

180180
##--##
181181

182-
<!-- .slide: class="whith-code" -->
182+
<!-- .slide: class="with-code" -->
183183

184184
# Code to produce / Markdown
185185

@@ -201,7 +201,7 @@ source: [unsplash](https://unsplash.com/fr/photos/couloir-en-beton-avec-applique
201201

202202
##--##
203203

204-
<!-- .slide: class="whith-code" -->
204+
<!-- .slide: class="with-code" -->
205205

206206
# Code to produce / Markdown
207207

@@ -223,7 +223,7 @@ source: [unsplash](https://unsplash.com/fr/photos/couloir-en-beton-avec-applique
223223

224224
##--##
225225

226-
<!-- .slide: class="whith-code" -->
226+
<!-- .slide: class="with-code" -->
227227

228228
# Code to produce / Markdown
229229

demo/markdown/03-layouts/20_multiple-columns.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,21 @@ Some content with fragment <!-- .element: class="fragment"-->
3232

3333
##++##
3434

35-
##++##
35+
##++## class="with-code"
3636

3737
# Column 3
3838

39-
Some content
39+
Some content with code
40+
41+
```xml
42+
<?xml version="1.0" encoding="utf-8"?>
43+
```
4044

4145
##++##
4246

4347
##==##
4448

45-
<!-- .slide: class="whith-code" -->
49+
<!-- .slide: class="with-code" -->
4650

4751
# Code to produce / Markdown
4852

@@ -96,7 +100,7 @@ Some content
96100

97101
##==##
98102

99-
<!-- .slide: class="whith-code" -->
103+
<!-- .slide: class="with-code" -->
100104

101105
# Code to produce / Markdown
102106

docs/layouts.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Also, only colors and image background are allowed in multiple columns !
1212

1313
A new syntax has to be used
1414

15-
```md
15+
````md
1616
<!-- .slide: class="tc-multiple-columns" -->
1717

1818
##++##
@@ -27,19 +27,23 @@ Some content
2727

2828
# Column 2
2929

30-
Some content
30+
Some content with code
3131

3232
##++##
3333

34-
##++##
34+
##++## class="with-code"
3535

3636
# Column 3
3737

38-
Some content
38+
Some content with code
3939

40-
##++##
40+
```xml
41+
<?xml version="1.0" encoding="utf-8"?>
4142
```
4243

44+
##++##
45+
````
46+
4347
![](./imgs/multiple-cols.png)
4448

4549
### Multiple column layout (with background)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@talk-control/talk-control-revealjs-extensions",
33
"private": false,
4-
"version": "1.0.0-rc-2",
4+
"version": "1.0.0-rc-3",
55
"description": "TalkControl aims to provides an easy to use extensions for anyone wanted to create slides with reveal.js",
66
"type": "module",
77
"repository": {

src/addons/tc-copy-clipboard.spec.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ const HTML = `
1515
<section class="with-code">
1616
<pre><code>const example = "test code";</code></pre>
1717
</section>
18-
<section class="with-code">
19-
<pre>
20-
<code>const example = "test code";</code>
21-
<code>function test() { return true; }</code>
22-
</pre>
18+
<section class="tc-multiple-columns">
19+
<div class="tc-column with-code"">
20+
<pre>
21+
<code>const example = "test code";</code>
22+
<code>function test() { return true; }</code>
23+
</pre>
24+
</div>
25+
<div class="tc-column"></div>
2326
</section>
2427
2528
</div>

src/addons/tc-copy-clipboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function manageCopyClipboard(options: TcCopyClipboardOptions): void {
2424
// First we add to each codeblock the icon
2525
const preBlocks = [
2626
...document.querySelectorAll(
27-
'.reveal .slides section[class*="with-code"] pre:has(code)'
27+
'.reveal .slides *:is(.with-code, .with-code-dark, .with-code-bg-dark) pre:has(code)'
2828
),
2929
];
3030

src/scss/theme/classics/code-slides.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@import '../../../../node_modules/highlight.js/scss/a11y-light.scss';
33
}
44

5-
.reveal .slides section:is(.with-code, .with-code-dark, .with-code-bg-dark) {
5+
.reveal .slides *:is(.with-code, .with-code-dark, .with-code-bg-dark) {
66
pre {
77
display: block;
88
position: relative;
@@ -76,7 +76,7 @@
7676
}
7777
}
7878
// Special case for the dark theme
79-
.reveal .slides section:is(.with-code-dark, .with-code-bg-dark) {
79+
.reveal .slides *:is(.with-code-dark, .with-code-bg-dark) {
8080
pre span.tc-copy-to-clipboard {
8181
--tc-icon-color: white;
8282
}
@@ -101,14 +101,14 @@
101101
background-color: var(--tc-code-dark-background);
102102
}
103103

104-
.reveal .slides section.with-code-dark:not(.stack):not([class*='transition']) {
104+
.reveal .slides .with-code-dark:not(.stack):not([class*='transition']) {
105105
h1,
106106
h2 {
107107
color: white;
108108
}
109109
}
110110

111-
.reveal .slides section.with-code-bg-dark {
111+
.reveal .slides .with-code-bg-dark {
112112
pre {
113113
background-color: var(--tc-code-dark-background);
114114
}

src/scss/theme/specifics/multiple-column.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
display: flex !important;
33
flex-direction: row;
44
height: 100%;
5+
gap: 15px;
56

67
div.tc-column {
78
color: var(--tc-multiple-col-color);

0 commit comments

Comments
 (0)