Skip to content

Commit

Permalink
Improve fonts styling
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed Jun 20, 2024
1 parent 22b7a66 commit 6660704
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 194 deletions.
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ module.json

**/*.js
**/*.cjs
**/*.mjs
**/*.mjs
**/fonts.css
**/_fonts.scss
10 changes: 3 additions & 7 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const distDirectory = "./dist";
const stylesDirectory = `${sourceDirectory}/styles`;
const stylesExtension = "scss";
const sourceFileExtension = "js";
const staticFiles = ["assets", "fonts", "lang", "lib", "packs", "templates", "module.json"];
const staticFiles = ["assets", "fonts", "lang", "lib", "packs", "styles/fonts.css", "templates", "module.json"];

/********************/
/* BUILD */
Expand Down Expand Up @@ -57,7 +57,7 @@ function buildCode() {
function buildStyles() {
return gulp.src([`${stylesDirectory}/**/*.${stylesExtension}`], { base: `${stylesDirectory}/` })
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(sass({ outputStyle: "expanded" }).on("error", sass.logError))
.pipe(sass({ outputStyle: "compressed" }).on("error", sass.logError))
.pipe(prefix({ cascade: false }))
.pipe(sourcemaps.write("."))
.pipe(gulp.dest(`${distDirectory}/styles`));
Expand Down Expand Up @@ -102,11 +102,7 @@ export const build = gulp.series(clean, gulp.parallel(buildCode, buildStyles, se
* Remove built files from `dist` folder while ignoring source files
*/
export async function clean() {
const files = [...staticFiles, "module"];

if (fs.existsSync(`${stylesDirectory}/${packageId}.${stylesExtension}`)) {
files.push("styles");
}
const files = [...staticFiles, "styles", "module"];

console.log(" ", "Files to clean:");
console.log(" ", files.join("\n "));
Expand Down
2 changes: 1 addition & 1 deletion src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"esmodules": ["module/polyglot.js"],
"scripts": ["lib/select2/select2.min.js"],
"styles": ["lib/select2/select2.min.css", "styles/polyglot.css"],
"styles": ["lib/select2/select2.min.css", "styles/fonts.css", "styles/polyglot.css"],
"languages": [
{
"lang": "en",
Expand Down
184 changes: 0 additions & 184 deletions src/styles/_fonts.scss

This file was deleted.

140 changes: 140 additions & 0 deletions src/styles/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
@font-face {
font-family:'ArCiela';
src:url('../fonts/ArCiela.ttf');
}
@font-face {
font-family:'Barazhad';
src:url('../fonts/Barazhad.otf');
}
@font-face {
font-family:'Celestial';
src:url('../fonts/Celestial.ttf');
}
@font-face {
font-family:'DarkEldar';
src:url('../fonts/DarkEldar.ttf');
}
@font-face {
font-family:'Dethek';
src:url('../fonts/Dethek.otf');
}
@font-face {
font-family:'ElderFuthark';
src:url('../fonts/ElderFutharkFS.ttf');
}
@font-face {
font-family:'Eltharin';
src:url('../fonts/Eltharin.ttf');
}
@font-face {
font-family:'Espruar';
src:url('../fonts/Espruar.otf');
}
@font-face {
font-family:'Floki';
src:url('../fonts/Floki.ttf');
}
@font-face {
font-family:'FingerAlphabet';
src:url('../fonts/FingerAlphabet.ttf');
}
@font-face {
font-family:'HighDrowic';
src:url('../fonts/HighDrowic.otf');
}
@font-face {
font-family:'HighschoolRunes';
src:url('../fonts/HighschoolRunes.ttf');
}
@font-face {
font-family:'Infernal';
src:url('../fonts/Infernal.ttf');
}
@font-face {
font-family:'Iokharic';
src:url('../fonts/Iokharic.otf');
}
@font-face {
font-family:'JungleSlang';
src:url('../fonts/JungleSlang.ttf');
}
@font-face {
font-family:'Kargi';
src:url('../fonts/Kargi.ttf');
}
@font-face {
font-family:'MarasEye';
src:url('../fonts/MarasEye.otf');
}
@font-face {
font-family:'MeroiticDemotic';
src:url('../fonts/MeroiticDemotic.ttf');
}
@font-face {
font-family:'MiroslavNormal';
src:url('../fonts/MiroslavNormal.ttf');
}
@font-face {
font-family:'OldeEspruar';
src:url('../fonts/OldeEspruar.otf');
}
@font-face {
font-family:'OldeThorass';
src:url('../fonts/OldeThorass.otf');
}
@font-face {
font-family:'Ophidian';
src:url('../fonts/Ophidian.otf');
}
@font-face {
font-family:'Pulsian';
src:url('../fonts/Pulsian.ttf');
}
@font-face {
font-family:'Oriental';
src:url('../fonts/Oriental.ttf');
}
@font-face {
font-family:'OrkGlyphs';
src:url('../fonts/OrkGlyphs.ttf');
}
@font-face {
font-family:'Qijomi';
src:url('../fonts/Qijomi.otf');
}
@font-face {
font-family:'Reanaarian';
src:url('../fonts/Reanaarian.otf');
}
@font-face {
font-family:'Saurian';
src:url('../fonts/Saurian.ttf');
}
@font-face {
font-family:'Semphari';
src:url('../fonts/Semphari.otf');
}
@font-face {
font-family:'Skaven';
src:url('../fonts/Skaven.ttf');
}
@font-face {
font-family:'Tengwar';
src:url('../fonts/Tengwar.ttf');
}
@font-face {
font-family:'Thassilonian';
src:url('../fonts/Thassilonian.ttf');
}
@font-face {
font-family:'Thorass';
src:url('../fonts/Thorass.otf');
}
@font-face {
font-family:'Tuzluca';
src:url('../fonts/Tuzluca.ttf');
}
@font-face {
font-family:'Valmaric';
src:url('../fonts/Valmaric.ttf');
}
1 change: 0 additions & 1 deletion src/styles/polyglot.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import "fonts";
@import "init";
@import "chat";

Expand Down

0 comments on commit 6660704

Please sign in to comment.