Skip to content
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

Feat: Custom crafting icon #196

Merged
merged 3 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.2
title: Fabricate 0.10.3
email: [email protected]
description: >-
End user documentation for the Foundry Virtual Tabletop (VTT) Module, "Fabricate".
Expand Down
6 changes: 3 additions & 3 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
globals: {
"ts-jest": {
transform: {
'^.+\\.tsx?$': ['ts-jest', {
isolatedModules: true
}
}]
}
};
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.2",
"version": "0.10.3",
"description": "A system-agnostic, flexible crafting module for FoundryVT",
"main": "index.js",
"type": "module",
Expand Down
Binary file added src/public/assets/fonts/fabricate-regular.eot
Binary file not shown.
11 changes: 11 additions & 0 deletions src/public/assets/fonts/fabricate-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/public/assets/fonts/fabricate-regular.ttf
Binary file not shown.
Binary file added src/public/assets/fonts/fabricate-regular.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion src/scripts/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Hooks.on("renderActorSheet", async (actorSheet: ActorSheet, html: any) => {
label: "Crafting",
tooltip: "Fabricate Crafting",
class: "fab-actor-sheet-header-button",
icon: "fa-solid fa-screwdriver-wrench",
icon: "fas fabricate-icon-logo",
onclick: async () => {
await fabricateUserInterfaceAPI.renderActorCraftingApp({
targetActorId: actorSheet.actor.id
Expand Down
33 changes: 32 additions & 1 deletion src/styles/module.less
Original file line number Diff line number Diff line change
Expand Up @@ -1284,4 +1284,35 @@ END COMMON STRUCTURAL STYLES
flex: 0;
justify-self: flex-end;
}
}
}

@font-face {
font-family: 'fabricate-regular';
src: url("modules/fabricate/assets/fonts/fabricate-regular.eot?uhkbys");
src: url("modules/fabricate/assets/fonts/fabricate-regular.eot?uhkbys#iefix") format("embedded-opentype"),
url("modules/fabricate/assets/fonts/fabricate-regular.ttf?uhkbys") format("truetype"),
url("modules/fabricate/assets/fonts/fabricate-regular.woff?uhkbys") format("woff"),
url("modules/fabricate/assets/fonts/fabricate-regular.svg?uhkbys#fabricate-regular") format("svg");
font-weight: normal;
font-style: normal;
font-display: block;
}

[class^="fabricate-icon-"], [class*=" fabricate-icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: "fabricate-regular" !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;

/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.fabricate-icon-logo:before {
content: "\e900";
}