Closed HugoGranstrom closed 2 years ago
@pietroppeter any features you are missing in nimiSlides that you would like in your NimConf slides?
Do we have a two columns format?
I'll try and hack together something with CSS Grid tomorrow.
And a way to add something in the corner (selecting which corner)? We could put the we links for the slides there
Oh, had forgotten about #7 :o I'll look into it again.
Quarto has a section on multiple columns, not sure how they do it: https://quarto.org/docs/presentations/revealjs/
Quarto has a section on multiple columns, not sure how they do it:
I had a similar idea in mind, the only difference right now is that you can't decide how wide each column is, they are equally wide:
slide:
columns:
column:
nbText: "This is column left"
column:
nbText: "This is column right"
I would guess equal width columns will likely be the most common use case, we probably we can start supporting just that.
Implementation looks very clean!
I would guess equal width columns will likely be the most common use case, we probably we can start supporting just that.
Yeah, it's easy enough to fix in the future if someone requests it I guess.
Implementation looks very clean!
Yep, the beauty of nimib :sunglasses: It almost feels wasteful though, the way I define column
as simply a div :rofl:
template column(bodyInner: untyped) =
nbRawHtml: "<div>"
bodyInner
nbRawHtml: "</div>"
I have got a footer working now, only problem is that it is shown on top of literally every slide including videos :rofl:
The footer is now implemented, and it automatically hides when the background is set to some full-screen content. Unless you come with any other ideas, I will probably release a new version on Sunday.
nice. I was looking at the footer where the string should be html. why not markdown (which in particular includes html)?
No reason in particular I realize now 😅 the footer can't be implemented as a block so somehow I thought I couldn't use markdown then 🙃 but I could just run the nim-markdown on the text directly. I might add an option so you can pass in raw Html as well, if I recall correctly, the markdown library we use didn't support every html tag in the past
Yes, you can use markdown directly (remember to use the GitHub version to see how we do it in nimib in renders.nim).
As far as I know markdown should support all html tags, I think it is kind of part of the spec.
What it does not support is if you put markdown inside html and expect to have your markdown transformed. There might be some cases where it works, but mostly I would expect it to not work.
https://github.com/pietroppeter/nimib/issues/28#issuecomment-991797352
Found what was troubling me back then. It didn't handle <span>
tags correctly. So it is either a bug or limitation in nim-markdown.
Well, to be fair in that example it cannot parse </span>
by itself correctly (which is indeed incorrect html by itself), if it had the opening span I would assume the closing one would be parsed correctly. It might still be a limitation of nim-markdown and other parsers might behave differently but I do not really see it as a limitation for footer handling only markdown (unlikely it will receive a fragment of invalid html).
It is indeed weird though that span fails but div does not
found a bug when using columns
twice, see: https://github.com/pietroppeter/nimconf22-nimib/commit/37f6b10e4b16e287c19f245101009b68c7265a8b
found a bug when using columns twice, see:
Good catch, I always forget that templates in templates aren't just available inside the code block 😅 should work if we just move it outside the columns template
And regarding the markdown html, I think I'll leave it as an option as it is now. So by default it treats it as markdown, but if the user had any similar problems, they can use the option to use raw html.
On a different note, I find the footer quite distracting. 😅 I might turn down the text size and opacity a bit (and I might as well add those as options to the template as well then)
it should be fixed now
@pietroppeter if I understood you correctly, it was what Quarto calls a "Logo" that you wanted as well?
Not really, a logo appears in all slides, I wanted a way to add something in one corner (like the logo, but I should be able to fix the corner) for a single slide
Ok, then I get it :+1: Do we want to use it only for images or allow text as well?
I guess it could be implemented using a div or similar that contains stuff, so in principle it could contain generic nimib blocks... the use case I had in mind though is about the QR code link to slides, so: image gets priority
My main concern with allowing anything is size. We want to limit the content in the corner's size, and if we allow anything in there, that will be very hard to do. If we only allow images for now, we could have the size of the image as a parameter to the template as well. So I think I'll go with image-only for now (and will name it something with image
to be clear). And then in the future we could perhaps add a template which allows anything in the corners
cornerImage
is now implemented. I think this will be it for this release. Unless someone finds anything urgent to add/fix, I will make a release this evening.
the only thing that came up to me that is simple enough is adding a template animateCode*(highlightLines: string, body: untyped)
, see #12
Here all changes for the v0.2 update will be added. It is planned to be released before NimConf 2022 (22 Oct).
Changes: