alexanderdavide / slidev-theme-academic

Academic presentations with Slidev made simple 🎓
https://slidev-theme-academic.alexeble.de
MIT License
99 stars 31 forks source link

Create cover slide with more authors #16

Closed george-gca closed 8 months ago

george-gca commented 1 year ago

First of all, I love this theme. It is really well thought.

One thing I was missing though, is to be able to add more authors, each with its own url. In my case I created a copy of the cover layout and manually added the needed structure, but maybe an option could be part of the theme itself.

One suggestion would be to have only 1 variable, as it currently is, but when creating the cover page split the values by commas, and then displaying them individually. What do you think?

alexanderdavide commented 1 year ago

Hey George,

thanks a lot for your suggestions and the kind words. This makes working on it a lot more fun!

I totally understand your point. After thinking about it, I'm not sure about the following aspects:

What do you think?

george-gca commented 1 year ago

In this specific case I would vote for the breaking change, as it would make things more explicit. I like the idea of creating an array of objects, with name and url as keys. That way would allow for even more possible customizations in the future. For example, suppose one would want to add an image per author. This way this information could be readily available as a new key: value pair in the already available list of authors.

As for the date location, maybe it could be a position variable, like the one already used for the pagination position. Also, having more authors would mean to decrease authors font size, inserting line breaks, or even just decrease the title font size to accommodate the authors names. In my case I just changed my title to ## instead of # and added a line break between authors, keeping the size and position of the date component.

alexanderdavide commented 1 year ago

You're right, an object is indeed more flexible for further adaptations. In a 2.0.0 release, I'd definitely consider this. However, currently this would be the only change requiring another major version. As for now, I'm thinking about quickly implementing the discussed solution based on delimiters within the existing variable.

I know what you mean but I'm not really into making it this complex. I mean, a lot of texts in Slidev don't scale appropriately when getting to long. Folks with edge cases still have the opportunity of leaving out author and date to add their own markup. Consequently, I'm pondering a different position of the date or leave it as it is.

george-gca commented 1 year ago

I agree with your solution. Maybe you could write something like "ideas for next release" somewhere to help keep track of these.

As for the line length and edge cases, I agree. This would only make sense if also added something like maxLineLength as a variable.

alexanderdavide commented 9 months ago

For now I'll leave this here as an issue labelled with enhancement.

I plan to implement and release this over the holidays.

alexanderdavide commented 8 months ago

In #20 I've added the possibility to pass arrays to coverAuthor and coverAuthorUrl, of course while keeping the current API intact. I found arrays to be more explicit than working with a delimited string.

@george-gca, do you mind testing this?

In a next major release, I still consider harmonizing this to a unified variable as an array of objects. I'll add a separate issue after finishing this one here.