fix: restore custom vote icons (#1)

fixes the broken upvote-downvote icons on nodebb

Reviewed-on: #1
Reviewed-by: xtul <mpiasecki720@protonmail.com>
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
This commit was merged in pull request #1.
This commit is contained in:
2026-06-19 07:35:26 +00:00
committed by archvillainette
parent 8e7ddd2962
commit 4fcdc7351e
2 changed files with 37 additions and 18 deletions
+31
View File
@@ -0,0 +1,31 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const stylesheet = fs.readFileSync(
path.join(__dirname, "..", "scss", "westgate", "_posts.scss"),
"utf8"
);
assert(
!stylesheet.includes("Font Awesome 6 Free"),
"Post vote icons must not hard-code the retired Font Awesome 6 family"
);
assert.match(
stylesheet,
/i\.fa-chevron-up\s*\{[^}]*--fa:\s*"\\f004"/s,
"The upvote button should reuse Harmony's Font Awesome element with the fa-heart glyph"
);
assert.match(
stylesheet,
/i\.fa-chevron-down\s*\{[^}]*--fa:\s*"\\f7a9"/s,
"The downvote button should reuse Harmony's Font Awesome element with the fa-heart-crack glyph"
);
assert.doesNotMatch(
stylesheet,
/\[component="post\/(?:upvote|downvote)"\][\s\S]*?&::before\s*\{/,
"Vote icons should not bypass Font Awesome's element and family handling with custom pseudo-elements"
);