-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE]: Special Text Boxes #826
Comments
Could you attach an image of what you mean -- probably very possible with some CSS |
Inserting just an image with the text works, but I can imagine it would be handy to have a small collection of images of blank scraps and a snippet with the necessary CSS style to get the text to appear there, rotated as needed. Adding a snippet would be a small tweak. Help-wanted to figure out the css code |
Gazook already did some work on this; I dug out the Reddit post and his share link, we should just need to extract the relevant parts to a snippet. https://www.reddit.com/r/homebrewery/comments/k4u1e5/how_to_flavor_text |
From the brew, the CSS should be as follows:
|
We can put the css into 5e.Phb.Style.css, and the snippet would be something like:
(only, point to an official homebrewery managed brew) |
I'm working on this now, but need some input. First, relevant Share Link. Which is better? I'm leaning towards (b) because it keeps things simple yet demonstrates the addition of a parchment scrap. |
a) I don't want any built-in functionality of the site to rely on imgur. The images for this should be hosted on the HB servers. The snippet should also "just work" without a user needing to visit a whole separate site and dig through a album. b) I also prefer not using an c) I prefer this, but in particular using the method settled on in #1549 . That is, using variations on the class name (flavor1, flavor2...) to determine the background image: {{watercolor1,top:0px,left:0px,height:300px,background-color:#b0720b,opacity:100%}} [class*="watercolor"] {
position:absolute;
width:800px; /* dimensions need to be real big so the user can set */
height:800px; /* height or width and the image will maintain aspect ratio */
-webkit-mask-image:var(--wc);
-webkit-mask-size:contain;
-webkit-mask-repeat:no-repeat;
mask-image:var(--wc);
mask-size:contain;
mask-repeat:no-repeat;
background-color:red;
--wc : url(https://i.imgur.com/ogGTcCh.png); /*default image*/
z-index:-2;
}
.watercolor1 {
--wc : url(https://i.imgur.com/ogGTcCh.png);
}
.watercolor2 {
--wc : url(https://i.imgur.com/UPUX4zG.png);
}
.watercolor3 {
--wc : url(https://i.imgur.com/Q6Uquv9.png);
}
.watercolor4 {
--wc : url(https://i.imgur.com/UOtaJpJ.png);
} This way the user doesn't have to deal with any urls when selecting their image. They just use one of the different numbers and it "just works". This also gives us the option to individually style each image on a per-theme basis if we need to since each image will have a separate class name. I.e., the images maybe appear with a bluish tint in the DMG theme, or the image changes entirely to a "sci-fi console" in the StarFinder theme. |
So when I first started this today I started with the watercolor splatter as a base to work from. I actually wanted to allow for changing the color as well, but for some reason couldn't get it working. I think the issue is that the watercolor stains are to some degree transparent throughout, thus when used as a mask over a background color the color is able to show through. But these note images have no transparency (besides around the edges), so when used as a mask it is opaque, and shows ALL of the background color. Ideally, I think this could work the same as the spatters, using only "red" notes that just have colors applied in the css. Just have to take a harder look at it. Just fyi, all of the images in the imgur gallery are mine, free to use, and I'm happy to make more if needed. |
I think we could manage something with Then in the snippet we could randomly generate a parchment-colored tone over a range of "brown - yellow - whitish", or picked from an array of colors we pre-determine. |
Which theme should this snippet be collected under? |
Tough question, many books use this, so i'd attach it to the PHB, but the PHB might be the only book that doesn't have them. The main problem with this snippet idea, and the reason it is not done yet, is because of the intended variety of the boxes, images and positioning make for very specific styling for every note. In other words, this snippet is pure suffering to build. This is my best: https://homebrewery.naturalcrit.com/share/uCIbBo_D4tra |
To clarify, the main problem is that these snippets need dozens of fixes every time you change rotation, position, background image, font, anything. As opposed to other snippets with can be easily customized. |
Can we use CSS properties to genericize the things needing the tweaks? |
Description
I think it would be nice to have the ability to create side quotes/passages, as found on volo's page 6 and 7 or MM page 250, 253, and 257
The text was updated successfully, but these errors were encountered: