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

Nearby elements icons #19

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Nearby elements icons #19

wants to merge 13 commits into from

Conversation

sergioedo
Copy link
Member

added new icons for transit core (multiple transport providers: fgc, rodalies, ambici...)
new line icons by transit namespace
new update icons script, from s3 repository (mantained internally with a backoffice)
new index, show icons grouped by category and allows filter by format and resize icons

@sergioedo sergioedo requested a review from oscarfonts April 9, 2024 12:12
Copy link
Member

@oscarfonts oscarfonts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Además de lo comentado, quizá sobre el fichero sources.txt (y su referencia en el README) o deba actualizarse con las notas de copyright que corresponda. La trazabilidad de ese raw es dificil, pero los de meteo se ve que están "robados" de meteo.cat


const template = fs.readFileSync("index-template.html").toString();

const { icons } = config;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si se quiere ser modenno, este bloque se podría escribir con un reduce:

// Group icons by category
const categories = config.icons.reduce((categories, icon) => {
	if (!categories[icon.category]) {
		categories[icon.category] = [];
	}
	categories[icon.category].push(icon);
}, {});

@@ -8,7 +8,8 @@
"static"
],
"scripts": {
"clean": "rm -rf src static",
"clean": "rm -rf src static dist",
"update-icons": "node ./scripts/update-icons.js",
"svg2png": "cd scripts && ./svg2png.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

este script es lento y además no está convirtiendo bien las imágenes de mete(aparecen unos caracteres extraños en una esquina).

Instalar sharp-cli y usar aquí el comando sharp-cli -i svg/*.svg -o static/png/. Desinstalar la dependencia svg2png, borrar script y actualizar readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants