Skip to content

Commit 306f108

Browse files
committed
fix image size in title content image slide
1 parent 72d5434 commit 306f108

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,19 @@ Following the front matter, create slides as described in [Creating Presentation
8484

8585
Besides default metadata, you can also provide inline metadata for each slide. This will be useful when you want to
8686
override the default metadata for a specific slide and this will be applied to that slide only. The inline metadata can
87-
be defined by adding metadata directly after the slide title as below:
87+
be defined by adding metadata directly on the slide title as below:
8888

8989
```markdown
9090
# Title of the slide ::metadata_key_1:metadata_value_1 ::metadata_key_2:metadata_value_2
9191
```
9292

93+
Example:
94+
```markdown
95+
# Title of slide ::slide:title-content-image ::logo:logo.png
96+
```
97+
98+
For this slide, the `slide` template will be set to `title-content-image`, and the `logo` will be set to `logo.png`.
99+
93100
### Slide Templates
94101

95102
The slide template should be provided in the default metadata. Provide slide template that will be mostly used in the

src/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ function addCustomSlideNumber() {
246246
}
247247
}
248248
function updateImageStructure() {
249-
const pTags = document.querySelectorAll('p > img')
249+
const slideContainer = document.getElementById('slideContainer')
250+
if (!slideContainer) return
251+
const pTags = slideContainer.querySelectorAll('section p > img')
250252
pTags.forEach((img) => {
251253
const pTag = img.parentNode
252254
const divContainer = document.createElement('div')

src/css/templates.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ footer {
145145
width: 100%;
146146
}
147147

148+
149+
148150
.title-content-image .content-container .content-wrapper .content > ul,
149151
.title-content-image .content-container .content-wrapper .content > ol,
150152
.title-content-image .content-container .content-wrapper .content > p,
@@ -161,6 +163,13 @@ footer {
161163
right: 0;
162164
}
163165

166+
.title-content-image .content-container .content-wrapper .content .image-container img {
167+
max-width: 100%;
168+
height: auto;
169+
width: auto;
170+
max-height: 80vh;
171+
}
172+
164173
.about-us-text {
165174
background-color: rgba(32, 67, 79, 0.8);
166175
width: 100%;

0 commit comments

Comments
 (0)