Skip to content

Commit

Permalink
Feat: Align actor sheet button DND5E2 (#281)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Potts <matt@@mrpotts.uk>
  • Loading branch information
misterpotts and Matt Potts authored Feb 16, 2024
1 parent c3b5244 commit 8877dea
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Fabricate 0.10.18
title: Fabricate 0.10.19
email: [email protected]
description: >-
End user documentation for the Foundry Virtual Tabletop (VTT) Module, "Fabricate".
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fabricate",
"version": "0.10.18",
"version": "0.10.19",
"description": "A system-agnostic, flexible crafting module for FoundryVT",
"main": "index.js",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ Hooks.on("renderActorSheet", async (actorSheet: ActorSheet, html: any) => {
const headerButton = {
label: "Crafting",
tooltip: "Fabricate Crafting",
class: "fab-actor-sheet-header-button",
class: "fab-actor-sheet-header-button header-button",
icon: "fas fabricate-icon-logo",
onclick: async () => {
await fabricateUserInterfaceAPI.renderActorCraftingApp({
targetActorId: actorSheet.actor.id
});
}
};
const button = $(`<a class="${headerButton.class}" data-tooltip="${headerButton.tooltip}"><i class="${headerButton.icon}"></i>${headerButton.label}</a>`);
const button = $(`<a class="${headerButton.class}" data-tooltip="${headerButton.tooltip}"><i class="${headerButton.icon}"></i><span class="fab-button-text">${headerButton.label}</span></a>`);
button.on("click", headerButton.onclick);
button.insertAfter(title);

Expand Down
21 changes: 20 additions & 1 deletion src/styles/module.less
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ BEGIN FABRICATE THEME STYLES
i.fa-circle-exclamation {
color: var(--color-error-bg);
position: absolute;
top: 1px;
font-size: var(--font-size-20);
right: -9px;
top: -9px;
Expand Down Expand Up @@ -1286,6 +1285,26 @@ END COMMON STRUCTURAL STYLES
}
}

/*
=====================================================================
BEGIN DND5E2 THEME STYLES
=====================================================================
*/

.dnd5e2 {
.fab-actor-sheet-header-button {
.fab-button-text {
display: none;
}
}
}

/*
=====================================================================
END DND5E2 THEME STYLES
=====================================================================
*/

/*
=====================================================================
BEGIN FABRICATE CUSTOM WEB FONT STYLES
Expand Down

0 comments on commit 8877dea

Please sign in to comment.