-
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
Brew Themes #1899
Comments
Just for reference, here is the Journal theme that is mentioned. And I have no problem with it being included, nothing needed beyond the 'creator credit' in that |
This might be more appropriate as a general snippet, or included as a theme-specific snippet, but the recently released Dragon of Icespire Peak free preview has double-sided half page NPC cards on pages 11 through 16, which I personally think look great. I'm not sure if similar NPC cards have appeared in any other supplements or resources. I have included images of one here to demonstrate exactly what I'm talking about: This does seem like something that could be replicated in Homebrewery without too much difficulty. |
Alright, so Perhaps.... our built-in themes use a |
We also need to handle #1437 before allowing custom styles. |
Some further investigation has found that while this stops Adding a prop sanitization function to |
Just noticed that the Old Journal theme has a I'm not sure what is the best compromise on this. I could edit the original asset to include a bit of drop-shadow so it's baked into the image. I have this fuzzy idea that the |
I see this project lacks the task 'Preview images when hovering over a theme', is this still the case? If so, i have the time to build some simple previews. |
Yeah that would be nice if you are up for it. I'm thinking just like a single page that shows most of the components (titles, tables, various boxes, etc. as if it were a normal page in a book. Then we just show it popping up at like 1/4 size when you hover over the button. |
With all tasks completed, now the matter is keeping track of all the different themes that we might add: D&D related themes
Other themes (Gazook's Themes really)
|
A couple of thoughts on Custom Themes. These aren't first-release critical, but something to be considered for ongoing work. There needs to be a capacity for fonts, art assets, and a license to be attached to user-based custom themes. Possibly snippets as well. This supports the notion of the publisher's official themes without tying them to the Homebrewery license. |
An extension to Themes might be Theme versioning, to lock brews to a specific version of the styling. I imagine that this would work by a dropdown in the Metadata Editor, which lists all available versions of the currently selected theme. The style data itself could consist of a list of completed CSS files that are created during the build process from the LESS + diff files; using diffs should allow the changes between versions to be more easily identified. This is relatively simple in scope, but complicated to implement. Ideally, Themes will be more mature before we start adding features like this to it. |
#3227 will track Pathfinder 2e theme |
With custom themes already here, the lacking functionality is to use other people's brews for it. Talk on Gitter chat is about using a favourites system for this. |
With this implemented, Homebrewery is ideal for any tabletop game and system. |
I have the start of a guide here https://homebrewery.naturalcrit.com/share/36qyHG4Skvq2 The guide presently excludes CSS advice, which I suspect is more what you may be looking for at this stage? |
I believe Kaiburr is working on a guide as well, not sure about the overlap potential. |
The abovementioned guide covers the usage of existing themes (except the last header which isn't detailed) |
There are two ways themes can be deployed...
The former assumes the work for the latter has also been done, and does possibly allow for additional snippets to be installed when the theme is selected. We anticipate most user contributed themes will be via the second method. |
I've done a little updating on https://homebrewery.naturalcrit.com/share/36qyHG4Skvq2, but I'm a little to close to the subject to spot omissions. |
Swappable brew themes will allow users to change documents from PHB style to MM, DMG, non-WOTC styles, and eventually custom and shared styles from other users.
Built-in Themes
We already have the capability to live-swap style sheets (we do this to change between Legacy and V3), and we could get away with simply adding more styles to that list and swap them in a similar way. However, as the list of Theme grow, there are more special cases such as unique snippets, fonts, image resources, etc. that we may also need to consider part of the Theme. Hence, I propose that Themes consist of a set of multiple files linked together:
The
widgets.json
might have a structure similar to the following. Clicking on a line that matches theprefix
would signal to CodeMirror to pop up some widget (a color picker, checkboxes, number entry boxes, etc.):However, getting Widgets doesn't necessarily need to come in the first release of this. That's a bonus feature that will be filled out afterward via #1870. It's just important to see how it will fit into the file structure.
Themes would be selected via a dropdown menu in the Metadata tab of the Current Brew that the user is currently editing, preferably with some sort of image preview while hovering over options, including perhaps a "blank" theme with no CSS applied at all except for page sizes and basic column behavior for those who want to fully build a theme from scratch in their Style tab. Any styles a user has in their "style" tab will be applied over the top of the selected theme as normal.
Custom Themes
The next step would be to include an additional item in the dropdown menu of "Custom". This would reveal a textbox where the user can paste in the share link to another brew (referred to as the "Theme Brew" below), which will then use that brew's Style tab as the base Theme. Styling would be layered with priority as follows (later items override previous items):
wide
, italics and bold, etc.settings.json
of the theme selected in the Theme Brew (e.g., PHB)styles.less
of the Selected Theme (e.g., DMG)Note that we might need to prevent or limit how many layers deep Theme Brews can go depending on performance.
Future work might add an additional menu to the editor for custom snippets. This may be in the form of a simple fillable form with a button name and the example text to produce. Likely should not allow custom JS here as that opens up potential for malicious code being shared. As with the CSS, snippets in this format would override/merge with snippets of lower Themes.
Minimal Viable Product
I think as a first release, the minimal viable product can simply be:
style.less
settings.json
with at minimum therenderer
andBase Theme
defined.snippets.js
so each theme can have its own snippets (unless they are identical to the Base Theme, then not needed)Thoughts?
The text was updated successfully, but these errors were encountered: