diff --git a/README.md b/README.md index f53edaa..fa2302b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -# Hello there ! Wave hand -I'm Lucàs, a passionate developer from Rodez, France. -
Currently, the weather is: **17.4°C**, **Few showers** + +# Hello there ! Wave hand + +I'm Lucàs, a passionate developer from France Image Icon Rodez, France. +
Currently, the weather is: **18.5°C**, **Very cloudy** ### I code with ![Symfony](https://img.shields.io/static/v1?label=&message=Symfony&color=%23000000&logo=symfony&logoColor=white) @@ -21,6 +23,7 @@ I'm Lucàs, a passionate developer from Rodez, France. ![SQLite](https://img.shields.io/static/v1?label=&message=SQLite&color=%23003B57&logo=sqlite&logoColor=white) ![Visual Studio Code](https://img.shields.io/static/v1?label=&message=Visual+Studio+Code&color=%23007ACC&logo=visualstudiocode&logoColor=white) ![CSS3](https://img.shields.io/static/v1?label=&message=CSS3&color=%231572B6&logo=css3&logoColor=white) +![Cplusplus](https://img.shields.io/static/v1?label=&message=C%2B%2B&color=%2300599C&logo=cplusplus&logoColor=white) ![MySQL](https://img.shields.io/static/v1?label=&message=MySQL&color=%234479A1&logo=mysql&logoColor=white) ![Windows](https://img.shields.io/static/v1?label=&message=Windows&color=%230078D6&logo=windows&logoColor=white) ![Python](https://img.shields.io/static/v1?label=&message=Python&color=%233776AB&logo=python&logoColor=white) @@ -33,16 +36,16 @@ I'm Lucàs, a passionate developer from Rodez, France. ### Where to find me -[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/LucasVbr) -[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/lucasvbr) -[![FreeCodeCamp](https://img.shields.io/badge/freecodecamp-27273D?style=for-the-badge&logo=freecodecamp&logoColor=white)](https://www.freecodecamp.org/LucasVbr) +[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](image.href) +[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](image.href) +[![FreeCodeCamp](https://img.shields.io/badge/freecodecamp-27273D?style=for-the-badge&logo=freecodecamp&logoColor=white)](image.href) ---
This README is generated every day.
-Last refresh: **Sunday 05 June 22, 12:07**
+Last refresh: **Sunday 05 June 22, 12:34**
![Profile Views](https://komarev.com/ghpvc/?username=lucasvbr&label=Profile%20views&color=0e75b6&style=flat) ![FreeCodeCamp Points](https://img.shields.io/freecodecamp/points/lucasvbr?label=FreeCodeCamp%20points) ![Made with love](https://img.shields.io/badge/-made%20with%20%E2%9D%A4%EF%B8%8F-red) diff --git a/Utils.py b/Utils.py index 49d1cdc..bc4ad58 100644 --- a/Utils.py +++ b/Utils.py @@ -32,7 +32,7 @@ def getDataSubfiles(files: list): def convertToolBadges(listToolName: list) -> list[dict[str, str]]: tools = [Badge(toolName) for toolName in listToolName] tools.sort(key=getBadgeColor) # Sort by color - return [{"url": badge.url, "name": badge.name} for badge in tools] + return [{"src": badge.url, "alt": badge.name} for badge in tools] def getWeather(city: str) -> dict: diff --git a/config.json b/config.json index 22b569e..a670855 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,17 @@ { "info": { "name": "Lucàs", - "city": "Rodez" + "city": "Rodez", + "hi_img": { + "src": "./img/Hi.gif", + "alt": "Wave hand", + "size": "50" + }, + "france_img": { + "src": "https://camo.githubusercontent.com/810c0059ec880d3bf22c12f8ecd24d39ae1c9ee5d294cd397e6f414738d9cdd8/68747470733a2f2f63646e2d69636f6e732d706e672e666c617469636f6e2e636f6d2f3531322f3139372f3139373536302e706e67", + "alt": "France Image Icon", + "size": "12" + } }, "template_file": "index.md.jinja", "output_file": "README.md", diff --git a/templates/index.md.jinja b/templates/index.md.jinja index c83bc9f..d0f8c0f 100644 --- a/templates/index.md.jinja +++ b/templates/index.md.jinja @@ -1,16 +1,18 @@ -# Hello there ! Wave hand +{% from 'macro/image.md.jinja' import image, imageWithSize, imageWithLink %} -I'm {{ data.info.name }}, a passionate developer from {{ data.info.city }}, France. +# Hello there ! {{ imageWithSize(data.info.hi_img) }} + +I'm {{ data.info.name }}, a passionate developer from {{ imageWithSize(data.info.france_img) }} {{ data.info.city }}, France.
Currently, the weather is: **{{ data.weather.temperature }}°C**, **{{ data.weather.description }}** ### I code with -{% for image in data.tools -%} - ![{{ image.name }}]({{ image.url }}) +{% for img in data.tools -%} + {{ image(img) }} {% endfor %} ### Where to find me -{% for image in data.links -%} - [![{{ image.alt }}]({{ image.src }})]({{ image.href }}) +{% for img in data.links -%} + {{ imageWithLink(img) }} {% endfor %} --- @@ -18,8 +20,8 @@ I'm {{ data.info.name }}, a passionate developer from {{ data.info.city }}, Fran This README is generated every day.
Last refresh: **{{ data.today }}**
-{% for image in data.footer_badges -%} - ![{{ image.alt }}]({{ image.src }}) +{% for img in data.footer_badges -%} + {{ image(img) }} {% endfor %} *inspired by [Thomas Guibert](https://github.com/thmsgbrt)* diff --git a/templates/macro/image.md.jinja b/templates/macro/image.md.jinja new file mode 100644 index 0000000..c1bfb4c --- /dev/null +++ b/templates/macro/image.md.jinja @@ -0,0 +1,11 @@ +{% macro image(image) -%} + ![{{ image.alt }}]({{ image.src }}) +{%- endmacro %} + +{% macro imageWithLink(image) -%} + [![{{ image.alt }}]({{ image.src }})](image.href) +{%- endmacro %} + +{% macro imageWithSize(image) -%} + {{ image.alt }} +{%- endmacro %} \ No newline at end of file