From 9a1bee1f283c635142e7fac4d0d1f0c477fbcb29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Fri, 21 May 2021 00:26:20 +0200 Subject: [PATCH] refacto: now using pagination to factor some code --- pages/_data/resume.json | 234 ------------------------------------- pages/_data/resume_fr.json | 230 ------------------------------------ pages/resume/en.njk | 194 ------------------------------ pages/resume/fr.njk | 193 ------------------------------ pages/resume/test.njk | 218 ++++++++++++++++++++++++++++++++++ 5 files changed, 218 insertions(+), 851 deletions(-) delete mode 100755 pages/_data/resume.json delete mode 100755 pages/_data/resume_fr.json delete mode 100755 pages/resume/en.njk delete mode 100644 pages/resume/fr.njk create mode 100644 pages/resume/test.njk diff --git a/pages/_data/resume.json b/pages/_data/resume.json deleted file mode 100755 index 030ad9d..0000000 --- a/pages/_data/resume.json +++ /dev/null @@ -1,234 +0,0 @@ -{ - "locale": "en", - "name": "Laurent Fainsin", - "info": { - "label": "CS Engineering Student", - "about": "I am an hardworking and punctual person, I work well in a team but also on my own as I like challenge myself. I have good listening and communication skills, I am well organized and rarely fail to meet deadlines." - }, - "contacts": [ - { - "contact": "laurentfainsin@protonmail.com", - "url": "mailto:laurentfainsin@protonmail.com", - "icon": "fa fa-envelope-o" - }, - { - "contact": "+33781492838", - "url": "https://signal.org/", - "icon": "fa fa-phone" - }, - { - "contact": "Brest, France", - "url": "https://www.openstreetmap.org/#map=12/48.3930/-4.4601", - "icon": "fa fa-location-arrow" - } - ], - "socials": [ - { - "network": "laurent-fainsin", - "url": "https://www.linkedin.com/in/laurent-fainsin/", - "icon": "fa fa-linkedin" - }, - { - "network": "Laurent2916", - "url": "https://github.com/Laurent2916", - "icon": "fa fa-github" - }, - { - "network": "@fainsil:inpt.fr", - "url": "https://matrix.to/#/@fainsil:inpt.fr", - "icon": "fa fa-matrix-org" - } - ], - "school_projects": [ - { - "title": "Pagerank", - "repo": "", - "pdf": "{{ '/content/pagerank.pdf' | url }}", - "role": "Author", - "description": "Implementation of an iterative algorithm in Ada to compute the pagerank of a given network as quickly and efficiently as possible." - }, - { - "title": "Frequency Modem", - "repo": "", - "pdf": "{{ '/content/modem.pdf' | url }}", - "role": "Author", - "description": "Matlab modeling of a modem capable of transmitting information (a sequence of bits) reliably via an imperfect transmission channel." - } - ], - "personnal_projects": [ - { - "title": "This website", - "repo": "https://project-repo.com", - "role": "Author", - "description": "I made this website almost entirely from scratch, I used the static site generetor 11ty.js to simplify the process thanks to its templating system. I learned a lot about HTML, CSS, Javascript and it also allowed me to strengthen my git skills." - } - ], - "education": { - "level": "Master degree", - "history": [ - { - "institution": "ENSEEIHT", - "title": "CS Engineer", - "url": "https://www.enseeiht.fr/", - "start": "2020", - "end": "Now", - "eqv": "Master (L3, M1, M2)" - }, - { - "institution": "Lycée Kérichen/Vauban", - "title": "CPGE PSI", - "url": "http://www.lycee-kerichen.org/", - "start": "2018", - "end": "2020", - "eqv": "License (L1, L2)" - }, - { - "institution": "Lycée de l'Harteloire", - "title": "Baccalauréat S", - "url": "https://www.harteloire.com/", - "start": "2015", - "end": "2018", - "eqv": "Highschool" - } - ] - }, - "skills": [ - { - "name": "General Softwares", - "level": "advanced", - "tags": [ - "Linux", - "LaTeX", - "Git", - "Word", - "Excel" - ] - }, - { - "name": "Web Development", - "level": "intermediate", - "tags": [ - "HTML5", - "CSS3", - "JavaScript", - "11ty.js" - ] - }, - { - "name": "Scientific Computing", - "level": "intermediate", - "tags": [ - "Numpy", - "Matlab" - ] - }, - { - "name": "Licenses", - "level": "french", - "tags": [ - "AM", - "B", - "B1" - ] - } - ], - "reading": [ - { - "title": "Data-Driven Science and Engineering", - "type": "book", - "url": "http://www.databookuw.com/" - }, - { - "title": "The Book of Shaders", - "type": "book", - "url": "https://thebookofshaders.com/" - }, - { - "title": "r/programming", - "type": "website", - "url": "https://www.reddit.com/r/programming" - }, - { - "title": "r/privacy", - "type": "website", - "url": "https://www.reddit.com/r/privacy" - } - ], - "languages": [ - { - "language": "French", - "level": "native", - "icon": "flag-icon flag-icon-fr" - }, - { - "language": "English", - "level": "proficient", - "icon": "flag-icon flag-icon-gb" - }, - { - "language": "Japanese", - "level": "beginner", - "icon": "flag-icon flag-icon-jp" - }, - { - "language": "Spanish", - "level": "elementary", - "icon": "flag-icon flag-icon-es" - }, - { - "language": "Python", - "level": "intermediate", - "icon": "devicon-python-plain" - }, - { - "language": "Java", - "level": "intermediate", - "icon": "devicon-java-plain" - }, - { - "language": "Rust", - "level": "beginner", - "icon": "devicon-rust-plain" - }, - { - "language": "C", - "level": "beginner", - "icon": "devicon-c-plain" - } - ], - "interests": [ - { - "name": "GitHub", - "summary": "Regular GitHub user and tinkerer.", - "tags": [ - "Git", - "Open Source" - ] - }, - { - "name": "Electronics", - "summary": "Maker at heart.", - "tags": [ - "Arduino", - "PCB Design" - ] - }, - { - "name": "Archery", - "summary": "Practiced for a couple years the art of precision & accuracy.", - "tags": [ - "Precision", - "Accuracy", - "Patience" - ] - }, - { - "name": "Fishkeeping", - "summary": "Tamagochis, but with real responsabilities.", - "tags": [ - "Patience", - "Perfectionism" - ] - } - ] -} \ No newline at end of file diff --git a/pages/_data/resume_fr.json b/pages/_data/resume_fr.json deleted file mode 100755 index b9a7128..0000000 --- a/pages/_data/resume_fr.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "locale": "fr", - "name": "Laurent Fainsin", - "info": { - "label": "Étudiant Ingénieur SN", - "about": "Je suis travailleur et ponctuel, je travaille bien en équipe mais aussi seul car j'aime me défier. J'ai de bonnes capacités d'écoute et de communication, je suis bien organisé et je respecte toujours les deadlines." - }, - "contacts": [ - { - "contact": "laurentfainsin@protonmail.com", - "url": "mailto:laurentfainsin@protonmail.com", - "icon": "fa fa-envelope-o" - }, - { - "contact": "+33781492838", - "url": "https://signal.org/", - "icon": "fa fa-phone" - }, - { - "contact": "Brest, France", - "url": "https://www.openstreetmap.org/#map=12/48.3930/-4.4601", - "icon": "fa fa-location-arrow" - } - ], - "socials": [ - { - "network": "laurent-fainsin", - "url": "https://www.linkedin.com/in/laurent-fainsin/", - "icon": "fa fa-linkedin" - }, - { - "network": "Laurent2916", - "url": "https://github.com/Laurent2916", - "icon": "fa fa-github" - }, - { - "network": "@fainsil:inpt.fr", - "url": "https://matrix.to/#/@fainsil:inpt.fr", - "icon": "fa fa-matrix-org" - } - ], - "school_projects": [ - { - "title": "Pagerank", - "repo": "", - "pdf": "{{ '/content/pagerank.pdf' | url }}", - "role": "Author", - "description": "Mise en œuvre d'un algorithme itératif en Ada pour calculer le pagerank d'un réseau donné, aussi rapidement et efficacement que possible." - }, - { - "title": "Modem de fréquence", - "repo": "", - "pdf": "{{ '/content/modem.pdf' | url }}", - "role": "Author", - "description": "Modélisation Matlab d'un modem capable de transmettre des informations (séquences de bits) de manière fiable via un canal de transmission imparfait." - } - ], - "personnal_projects": [ - { - "title": "Ce site web", - "repo": "https://project-repo.com", - "role": "Author", - "description": "J'ai fait ce site presque entièrement de zéro, pour simplifier le processus de création j'ai utilisé le générateur de site statique 11ty.js et son système de templates." - } - ], - "education": { - "level": "Master degree", - "history": [ - { - "institution": "ENSEEIHT", - "title": "Ingénieur SN", - "url": "https://www.enseeiht.fr/", - "start": "2020", - "end": "Maintenant" - }, - { - "institution": "Lycée Kérichen/Vauban", - "title": "CPGE PSI", - "url": "http://www.lycee-kerichen.org/", - "start": "2018", - "end": "2020" - }, - { - "institution": "Lycée de l'Harteloire", - "title": "Baccalauréat S", - "url": "https://www.harteloire.com/", - "start": "2015", - "end": "2018" - } - ] - }, - "skills": [ - { - "name": "Bureautique", - "level": "avancé", - "tags": [ - "Linux", - "LaTeX", - "Git", - "Word", - "Excel" - ] - }, - { - "name": "Développement web", - "level": "intermédiaire", - "tags": [ - "HTML5", - "CSS3", - "JavaScript", - "11ty.js" - ] - }, - { - "name": "Calcul scientifique", - "level": "intermédiaire", - "tags": [ - "Numpy", - "Matlab" - ] - }, - { - "name": "Permis", - "tags": [ - "AM", - "B", - "B1" - ] - } - ], - "reading": [ - { - "title": "Data-Driven Science and Engineering", - "type": "book", - "url": "http://www.databookuw.com/" - }, - { - "title": "The Book of Shaders", - "type": "book", - "url": "https://thebookofshaders.com/" - }, - { - "title": "r/programming", - "type": "website", - "url": "https://www.reddit.com/r/programming" - }, - { - "title": "r/privacy", - "type": "website", - "url": "https://www.reddit.com/r/privacy" - } - ], - "languages": [ - { - "language": "Français", - "level": "natif", - "icon": "flag-icon flag-icon-fr" - }, - { - "language": "Anglais", - "level": "bilingue", - "icon": "flag-icon flag-icon-gb" - }, - { - "language": "Japonais", - "level": "débutant", - "icon": "flag-icon flag-icon-jp" - }, - { - "language": "Espagnol", - "level": "élémentaire", - "icon": "flag-icon flag-icon-es" - }, - { - "language": "Python", - "level": "intermédiaire", - "icon": "devicon-python-plain" - }, - { - "language": "Java", - "level": "intermédiaire", - "icon": "devicon-java-plain" - }, - { - "language": "Rust", - "level": "débutant", - "icon": "devicon-rust-plain" - }, - { - "language": "C", - "level": "débutant", - "icon": "devicon-c-plain" - } - ], - "interests": [ - { - "name": "GitHub", - "summary": "Utilisateur régulier de GitHub et bricoleur.", - "tags": [ - "Git", - "Open Source" - ] - }, - { - "name": "Électronique", - "summary": "Créateur dans l'âme.", - "tags": [ - "Arduino", - "PCB Design" - ] - }, - { - "name": "Tir à l'arc", - "summary": "Pratique de l'art de la précision et de l'exactitude.", - "tags": [ - "Précision", - "Exactitude", - "Patience" - ] - }, - { - "name": "Aquariums", - "summary": "Des Tamagochis, mais avec de réelles responsabilités.", - "tags": [ - "Patience", - "Perfectionnisme" - ] - } - ] -} \ No newline at end of file diff --git a/pages/resume/en.njk b/pages/resume/en.njk deleted file mode 100755 index 43b5c74..0000000 --- a/pages/resume/en.njk +++ /dev/null @@ -1,194 +0,0 @@ ---- -username: Laureηt ---- - - - - - - - {{ username }} - - - - - - - - - - - -
- {{ username }} - _ - FR -
- - - -
-
- -

{{ resume.name }} ({{ resume.info.label }})

-

{{ resume.info.about }}

- -
- -

School Projects

- {% for project in resume.school_projects %} -
-

{{ project.title }}

-

{{ project.description }}

- report -
- {% endfor %} - -
- -

Personnal Projects

- {% for project in resume.personnal_projects %} -
-

{{ project.title }}

-

{{ project.description }}

-
- {% endfor %} - -
- -

Reading

-
    - {% for read in resume.reading %} -
  • - {# {% if read.type == 'website' %} #} - {{ read.title | safe }} - {# {% endif %} #} -
  • - {% endfor %} -
- -
- -

Interests

- {% for interest in resume.interests %} -
-

{{ interest.name }}

-

{{ interest.summary }}

-
    - {% for tag in interest.tags %} -
  • {{ tag }}
  • - {% endfor %} -
-
- {% endfor %} - -
- -
- -

Contacts

- - -
- -

Socials

- - -
- -

Education

- -
    - -
  • - -
  • {{ resume.education.history[0].end }}
  • - - {% for edu in resume.education.history %} -
  • - {{ edu.title }}
    - {{ edu.institution }}
    - {{ edu.eqv }} -
  • -
  • {{ edu.start }}
  • - {% endfor %} - -
  • -
- -
- -

Skills

-
    - {% for skill in resume.skills %} -
  • - {{ skill.name }} ({{ skill.level }}) -
      - {% for tag in skill.tags %} -
    • {{ tag }}
    • - {% endfor %} -
    -
  • - {% endfor %} -
- -
- -

Languages

-
    - {% for lang in resume.languages %} -
  • - - {{ lang.language }} ({{ lang.level }}) -
  • - {% endfor %} -
- -
-
- -
- « - Go back -
- - - - - - - \ No newline at end of file diff --git a/pages/resume/fr.njk b/pages/resume/fr.njk deleted file mode 100644 index 813ed23..0000000 --- a/pages/resume/fr.njk +++ /dev/null @@ -1,193 +0,0 @@ ---- -username: Laureηt ---- - - - - - - - {{ username }} - - - - - - - - - - - -
- {{ username }} - _ - EN -
- -
-
- -

{{ resume_fr.name }} ({{ resume_fr.info.label }})

-

{{ resume_fr.info.about }}

- -
- -

Projets scolaires

- {% for project in resume_fr.school_projects %} -
-

{{ project.title }}

-

{{ project.description }}

- rapport -
- {% endfor %} - -
- -

Projets personnels

- {% for project in resume_fr.personnal_projects %} -
-

{{ project.title }}

-

{{ project.description }}

-
- {% endfor %} - -
- -

Lecture

-
    - {% for read in resume_fr.reading %} -
  • - {% if read.type == 'website' %} - {{ read.title | safe }} - {% endif %} -
  • - {% endfor %} -
- -
- -

Centres d'intérêt

- {% for interest in resume_fr.interests %} -
-

{{ interest.name }}

-

{{ interest.summary }}

-
    - {% for tag in interest.tags %} -
  • {{ tag }}
  • - {% endfor %} -
-
- {% endfor %} - -
- -
- -

Contacts

- - -
- -

Socials

- - -
- -

Éducation

-
    - -
  • - -
  • {{ resume_fr.education.history[0].end }}
  • - - {% for edu in resume_fr.education.history %} -
  • - {{ edu.title }}
    - {{ edu.institution }} -
  • -
  • {{ edu.start }}
  • - {% endfor %} - -
  • -
- -
- -

Compétences

-
    - {% for skill in resume_fr.skills %} -
  • - {{ skill.name }} - {% if skill.level %} - ({{ skill.level }}) - {% endif %} -
      - {% for tag in skill.tags %} -
    • {{ tag }}
    • - {% endfor %} -
    -
  • - {% endfor %} -
- -
- -

Langues

-
    - {% for lang in resume_fr.languages %} -
  • - - {{ lang.language }} ({{ lang.level }}) -
  • - {% endfor %} -
- -
-
- -
- « - Revenir en arrière -
- - - - - - - \ No newline at end of file diff --git a/pages/resume/test.njk b/pages/resume/test.njk new file mode 100644 index 0000000..5b41629 --- /dev/null +++ b/pages/resume/test.njk @@ -0,0 +1,218 @@ +--- +username: Laureηt +pagination: + data: resumes + size: 1 + alias: resume + resolve: values +permalink: "resume/{{ resume.locale }}/index.html" +--- + + + + + + + {{ username }} + + + + + + + + + + + +
+ {{ username }} + _ + + {% for pageKey in pagination.pages %} + {% if page.url != pagination.hrefs[loop.index-1] %} + {{ pageKey[0].username }} + {{ resumes[loop.index-1].locale }} + + {% endif %} + {% endfor %} + +
+ +
+
+ +

{{ resume.name }} + ({{ resume.info.label }}) +

+

{{ resume.info.about }}

+ +
+ +

{{ resume.school_projects_title }}

+ {% for project in resume.school_projects %} +
+

{{ project.title }}

+

{{ project.description }}

+ + {{ resume.report }} +
+ {% endfor %} + +
+ +

{{ resume.personnal_projects_title }}

+ {% for project in resume.personnal_projects %} +
+

{{ project.title }}

+

{{ project.description }}

+
+ {% endfor %} + +
+ +

{{ resume.reading_title }}

+
    + {% for read in resume.reading %} +
  • + {% if read.type == 'website' %} + {{ read.title | safe }} + {% endif %} +
  • + {% endfor %} +
+ +
+ +

{{ resume.interests_title }}

+ {% for interest in resume.interests %} +
+

{{ interest.name }}

+

{{ interest.summary }}

+
    + {% for tag in interest.tags %} +
  • {{ tag }}
  • + {% endfor %} +
+
+ {% endfor %} + +
+ +
+ +

{{ resume.contacts_title }}

+ + +
+ +

{{ resume.socials_title }}

+ + +
+ +

{{ resume.education_title }}

+
    + +
  • + +
  • {{ resume.education.history[0].end }}
  • + + {% for edu in resume.education.history %} +
  • + {{ edu.title }}
    + {{ edu.institution }} +
  • +
  • {{ edu.start }}
  • + {% endfor %} + +
  • +
+ +
+ +

{{ resume.skills_title }}

+
    + {% for skill in resume.skills %} +
  • + {{ skill.name }} + {% if skill.level %} + ({{ skill.level }}) + {% endif %} +
      + {% for tag in skill.tags %} +
    • {{ tag }}
    • + {% endfor %} +
    +
  • + {% endfor %} +
+ +
+ +

{{ resume.languages_title }}

+
    + {% for lang in resume.languages %} +
  • + + {{ lang.language }} + ({{ lang.level }}) +
  • + {% endfor %} +
+ +
+
+ +
+ « + {{ resume.go_back }} +
+ + + + + + + \ No newline at end of file