Skip to content

Add templates for presentation viewer#111

Merged
PrajwolAmatya merged 14 commits intomainfrom
templating
Nov 21, 2025
Merged

Add templates for presentation viewer#111
PrajwolAmatya merged 14 commits intomainfrom
templating

Conversation

@PrajwolAmatya
Copy link
Contributor

@PrajwolAmatya PrajwolAmatya commented Oct 15, 2025

Description

This PR adds basic templates for the presentation viewer.

Following templates are added:

  1. Cover Slide Template
image
  1. Title Content Slide Template
image
  1. Title Content Image Slide Template
image
  1. About Us Slide Template
image

Slide content fitting

The font size of the slide will be automatically reduced when the content tends to overflow out of the slide.

image

@PrajwolAmatya PrajwolAmatya self-assigned this Oct 15, 2025
@PrajwolAmatya PrajwolAmatya force-pushed the templating branch 8 times, most recently from 09ccaa1 to 4fc196c Compare October 27, 2025 06:15
@PrajwolAmatya PrajwolAmatya changed the title Add templates Add templates for presentation viewer Oct 27, 2025
@PrajwolAmatya PrajwolAmatya marked this pull request as ready for review October 28, 2025 03:42
Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
@PrajwolAmatya PrajwolAmatya requested a review from saw-jan October 30, 2025 03:34
@individual-it
Copy link
Member

pnpm update and then make command did not help

@PrajwolAmatya
Copy link
Contributor Author

Can you do pnpm update revealjs-awesomd
Also can you check if setBaseUrl function is in node_modules/revealjs-awesomd/plugin/awesoMD/plugin.js just to make sure the plugin is updated.

@individual-it
Copy link
Member

pnpm update revealjs-awesomd helped. do we need to pin the version somewhere?

Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to have a "blank" template that works just as the default reveal-js template

Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after closing the presentation the UI of opencloud is a bit broken
before:
grafik

after opening and closing the presentation it looks like
grafik

footer: <footer-content>
aboutUs:
- title: <about-us-title1>
text: <text-for-title1>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how difficult would it be to allow links here?
Currently

  - title: WWW
     text: [www.jankaritech.com](www.jankaritech.com)

makes the whole presentation to fall apart

Object { name: "YAMLException", reason: "bad indentation of a mapping entry", mark: {…}, message: "bad indentation of a mapping entry at line 7, column 10:\n         text: [www.jankaritech.com](www.jank ... \n             ^", stack: "", … }
​
mark: Object { buffer: "slide: title-content\npresenter:  JankariTech Pvt. Ltd. \nlogo: Logo-colour.png\nfooter: Markdown Presentation Viewer\naboutUs:\n  - title: WWW\n     text: [www.jankaritech.com](www.jankaritech.com)\n  - title: linkedin\n    text: www.linkedin.com/company/jankaritech\n  - title: facebook\n    text: www.facebook.com/jankaritech\n\u0000", position: 148, line: 6, … }
​
message: "bad indentation of a mapping entry at line 7, column 10:\n         text: [www.jankaritech.com](www.jank ... \n             ^"
​
name: "YAMLException"
​
reason: "bad indentation of a mapping entry"

If links are not supported that is fine, but the presentation should not break

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing something invalid here, e.g text:www.jankaritech.com leads now to this error:

YAMLException: can not read an implicit mapping pair; a colon is missed at line 7, column 29: text:www.jankaritech.com ^

it gives some hint, but might still be hard for users to understand. Do we want to accept that kind of error message for now?

@individual-it
Copy link
Member

Let's add tests for the templating to make sure all these corner cases don't break

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
@PrajwolAmatya
Copy link
Contributor Author

I have addressed the issues and fixed them. Most of the fixes needed to done in the plugin (PR: opf/revealjs-awesoMD#24).

Let's add tests for the templating to make sure all these corner cases don't break

Will work on it. 👍

@individual-it

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
@PrajwolAmatya PrajwolAmatya force-pushed the templating branch 5 times, most recently from fa7702c to 7ee9e83 Compare November 19, 2025 04:11
Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anything shown to the user e.g. error messages should be sanitized.

currently I can do:

# This template does not exist and has special char  ::slide:<a href="jankari.tech">jankaritech</a>

and the browser will render <a href="jankari.tech">jankaritech</a> as HTML

Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sometimes the logo works sometimes not

I am using

---
slide: title-content
presenter:  JankariTech Pvt. Ltd. 
logo: images/Logo-colour.png

and the file images/Logo-colour.png does exist.

the URL of the logo in the presentation is sometimes: https://localhost:9200/images/Logo-colour.png but after a reload correctly blob:https://localhost:9200/9db3f52b-2d67-4be4-b116-9a94f6798c7

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
@PrajwolAmatya
Copy link
Contributor Author

PrajwolAmatya commented Nov 20, 2025

anything shown to the user e.g. error messages should be sanitized.

currently I can do:

# This template does not exist and has special char  ::slide:<a href="jankari.tech">jankaritech</a>

and the browser will render <a href="jankari.tech">jankaritech</a> as HTML

Fixed it in PR opf/revealjs-awesoMD#25.
Screenshot from 2025-11-20 10-59-52

The fix for this is in PR opf/revealjs-awesoMD#25.

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
@PrajwolAmatya PrajwolAmatya merged commit 2745519 into main Nov 21, 2025
2 checks passed
@PrajwolAmatya PrajwolAmatya deleted the templating branch November 21, 2025 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants