Skip to content

Commit

Permalink
Merge pull request #21 from GoOz/fix-reorder-skills
Browse files Browse the repository at this point in the history
  • Loading branch information
GoOz authored Feb 26, 2023
2 parents df273da + eeadef8 commit 91a5835
Show file tree
Hide file tree
Showing 6 changed files with 327 additions and 757 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2023-02-26

### Added

- Reorder basic skills by alphabetic order according to the current used language
- Versioning section in the settings modal


## [1.0.0] - 2023-02-22

### Added

- Initial release 🎉
- Auto-filled fields
- Auto-calculated final values (initial + advances)
- Responsive layout
- Dark mode
- Highlight career skills
- Import/Export data
- Internationalisation (EN/FR)

27 changes: 27 additions & 0 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,33 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("js");
eleventyConfig.addPassthroughCopy({ "root": "/" });

eleventyConfig.addFilter("characFull", function(value) {
return `charac.${value}.full`
});
eleventyConfig.addFilter("characAbbr", function(value) {
return `charac.${value}.abbr`
});

eleventyConfig.addCollection("skillsAlpha-en", (collectionApi) => {
const arr = Array.from(collectionApi.items[0].data.i18n.skills.basic);
arr.sort((a, b) => {
const aText = a.label.en.toLowerCase();
const bText = b.label.en.toLowerCase();
return aText.localeCompare(bText);
})
return arr
});

eleventyConfig.addCollection("skillsAlpha-fr", (collectionApi) => {
const arr = Array.from(collectionApi.items[0].data.i18n.skills.basic);
arr.sort((a, b) => {
const aText = a.label.fr.toLowerCase();
const bText = b.label.fr.toLowerCase();
return aText.localeCompare(bText);
})
return arr
});

return {
dir: {
input: "src",
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": "wfrp-sheet",
"version": "1.0.0",
"version": "1.1.0",
"scripts": {
"build": "npx eleventy",
"serve": "npx eleventy --serve",
Expand Down
Loading

0 comments on commit 91a5835

Please sign in to comment.