naturalcrit / homebrewery

Create authentic looking D&D homebrews using only markdown
https://homebrewery.naturalcrit.com
MIT License
1.04k stars 317 forks source link

Card Mode #212

Open ryantheleach opened 7 years ago

ryantheleach commented 7 years ago

It would be awesome to have a "card mode" which could create Magic The Gathering sized cards that can fit into sleeves, and print to letter/A4

Homebrewery is so good, if it could just easily create cards from a template it would beat the absolute pants off of anything in existence.

stolksdorf commented 7 years ago

Cool idea! Design the template and I can add it.

ryantheleach commented 7 years ago

I'm not that great of a designer, when you say design the templates do you mean the CSS? some mockups? Or do you think creating some form of actual templating substitution, then loading from a datasource would be relevant to the project?

wrdclark commented 7 years ago

http://homebrewery.naturalcrit.com/share/HyXPzftR

Here's some ideas I've just played with. Lots of CSS work to be done (standard monster stat blocks don't work, as it looks like the blockquote isn't being parsed), but it's a start! Also, trying to lay the foundations for auto card numbering, but I can't crack it right now...

ryantheleach commented 7 years ago

@wrdclark That's a great start, but for cards I think it would be more flexible that instead of hard coding font's in cm that it used relative font sizes.

This would make it a lot easier for people to edit the default card template in case they wanted different sized cards (playing card vs MTG size sleeves) or printing onto index cards.

wrdclark commented 7 years ago

Oh yeah, 100% agree. This was just a hack, for first thoughts.

Sent from my iPhone

On 22 Oct 2016, at 13:06, Ryan Leach notifications@github.com wrote:

@wrdclark That's a great start, but for cards I think it would be more flexible that instead of hard coding font's in cm that it used relative font sizes.

This would make it a lot easier for people to edit the default card template in case they wanted different sized cards (playing card vs MTG size sleeves) or printing onto index cards.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

vlos commented 7 years ago

Looks intereseting - side note, you may want to switch to landscape. Think you could get 2 rows of 4? http://homebrewery.naturalcrit.com/share/BksQSJkrx

Problem I am seeing is that the Render engine is not "parsing" the text inside the DIV properly. If I add no styles, and just a DIV with a class of "card" logically it should do nothing but encapsulate the card content, but if I put something as simple as bold Bold it doesn't even process that properly.

I am trying to learn your app so I can help contribute more, but having problem finding where it does the parsing.

Gazook89 commented 3 years ago

I know this thread was opened 4 years ago, but wanted to thank @wrdclark for the idea to put cards inside the .phb div. I had played with cards previously but was only thinking about turning the .phb div into individual cards, which resulted in bad pdfs. I still like this method for just creating stuff online, but obviously if you are designing cards then you likely want to be able to print them too. These cards are set to "Tarot" dimensions.

Creating the cards within the normal pages means no issue with printing. Also, it means a table of contents could be created on the first page using the normal method (however...not sure if the ToC generator snippet even existed 3 years ago).

My new cards are styled to match Magic the Gathering, and likely can't be easily modified to do DnD cards (I don't know what that would even look like as it seems to me there is too much possible info/text needed on a card). It could also be said that my method relies too much on divs to be considered "general use". But posting here in case it helps.

AlexeySachkov commented 3 years ago

Tagging @G-Ambatte here since we have card snippet being developed in #1167. @Gazook89, your feedback and suggestions to the PR would be helpful as well

calculuschild commented 2 years ago

Blocked on #1899

Gazook89 commented 1 year ago

@calculuschild, could a theme be built now that includes the necessary stylesheet and custom snippets for this?

calculuschild commented 1 year ago

Yes... You would determine what theme to base it off of (for example the PHB or just the "blank" theme), then just copy one of the existing theme folders, update the "settings.json" appropriately to have the correct base theme and snippets.

G-Ambatte commented 1 year ago

This is a brew I made of a magic item card, using the best "standard" trading card sizing I could find online (2.5"x3.5"). It still needs some work, for example, the header ribbon is just a placeholder graphic right now, but in terms of layout and styling, I think it covers the main bases.

So the million dollar question: is this actually what we want the Homebrewery "Card" theme to look like? And if not, what changes need to be made?

image

5e-Cleric commented 1 month ago

Once #3085 is closed and #3321 merged, this should be closed.