fix: make logo optional#130
Conversation
f670227 to
6506f63
Compare
6506f63 to
696b47e
Compare
individual-it
left a comment
There was a problem hiding this comment.
Let's also add some tests
696b47e to
4ba6be7
Compare
There was a problem hiding this comment.
Pull request overview
This PR aims to make the presentation logo optional so that slides don’t display the “Logo” alt text when no logo is provided in front matter metadata.
Changes:
- Added a
setLogohook intended to hide the logo image when no logo is defined. - Updated template-application flow to invoke logo handling when templates are enabled.
- Updated
.gitignoreto ignore the generatedpackage.json.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/App.vue |
Adds logo-hiding logic when templates are applied. |
.gitignore |
Ignores generated package.json. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1907fbf to
f865e66
Compare
| el.style.color = color | ||
| }) | ||
| } | ||
| function setLogo(frontMatter) { |
There was a problem hiding this comment.
hmm, the reason for showing the logo alt text is how we have the template.
IMO, we should fix the default template instead of removing logo container from html here.
Let the template files handle the rendering.
logo container should be enclosed by {{#metadata.lgo}}...{{/metadata.logo}}
Similiar to about-us
web-app-presentation-viewer/public/templates/about-us-template.html
Lines 23 to 29 in 19d9596
There was a problem hiding this comment.
If that's the case then i have removed the function and updated the templates 💯
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
f865e66 to
f9ab1d9
Compare
f9ab1d9 to
de28076
Compare
8903210 to
a2d05be
Compare
| <div class="logo"> | ||
| <img src="" alt="Logo"> | ||
| </div> |
There was a problem hiding this comment.
Need to wrap the logo div in {{#metadata.logo}}...{{/metadata.logo}} in the templateHtmlMap in the test code. Then this should also be removed from the snapshot.
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
a2d05be to
72497df
Compare
Description
This PR makes the logo to be optional.
And also added an unit test to
render the template without the logo.Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: