Skip to content

Commit

Permalink
Quick improvements here and there
Browse files Browse the repository at this point in the history
 - Add some Schema.org metadata
 - Improve the "non-exhaustive" display of the "Job experience" part
 - SVG icons of the "about" block are now a bit smaller on the PDF version
 - Better code semantics in "theme.py"
 - Some new djLint rules
  • Loading branch information
olivierphi committed Jan 17, 2024
1 parent 441a703 commit b857c7a
Show file tree
Hide file tree
Showing 23 changed files with 160 additions and 73 deletions.
2 changes: 1 addition & 1 deletion myresume/data/en/bio.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ birth = 1980-07-11
job_title = "Web Developer"
email = "olivier@dunsap.com"
url = "https://dunsap.com/"
linked_in = "https://www.linkedin.com/in/olivierphilippon/"
linked_in = "/in/olivierphilippon/"
devblog = "https://devblog.dunsap.com/"
mastodon = "https://fosstodon.org/@dunsap"
github_id = "olivierphi"
2 changes: 1 addition & 1 deletion myresume/data/en/i18n.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ source_code = "The source code of this web page is available on"

[misc]
contributor = "contributor"
non_exhaustive_list = "(non-exhaustive list)"
exhaustive_list_link = "exhaustive list on "
11 changes: 10 additions & 1 deletion myresume/data/en/job_experience.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,59 @@ period = "May 2023 - Present"
content = """
<b>Senior Python developer</b> for the Web agency
<a href="https://www.torchbox.com/">Torchbox</a>. (Django/Wagtail)"""
organisation = { name="Torchbox", url="https://www.torchbox.com/" }
current = true
[[jobs]]
period = "September 2022 - April 2023"
content = """
<b>Senior Django developer</b> as a contractor for
<a href="https://www.sporteasy.net/">SportEasy</a>."""
organisation = { name="SportEasy", url="https://www.sporteasy.net/en/" }
[[jobs]]
period = "March 2022 - July 2022"
content = """
<b>Senior software engineer</b> at
<a href="https://www.textualize.io/">Textualize</a>. (Python/Next.js)"""
organisation = { name="Textualize", url="https://www.textualize.io/" }
not_on_pdf = true
[[jobs]]
period = "February 2022 - March 2022"
content = """
<b>Senior product engineer</b> at
<a href="https://www.wayflyer.com/">Wayflyer</a>. (Django/React)"""
organisation = { name="Wayflyer", url="https://www.wayflyer.com/" }
not_on_pdf = true
[[jobs]]
period = "October 2021 - January 2022"
content = """
<b>Senior backend developer</b> as a contractor for
<a href="https://www.planhub.ca/">PlanHub.ca</a> (Go) and
<a href="https://www.inclusive.energy/cloud-solar">Inclusive Energy</a>. (Django)"""
organisation = { name="Wayflyer", url="https://www.planhub.ca/" }
[[jobs]]
period = "October 2018 - May 2021"
content = """
<b>Lead developer</b> at
<a href="https://inclusive.energy/charge-controllers">Inclusive Energy</a>. (Django/React)"""
organisation = { name="Inclusive Energy", url="https://inclusive.energy/" }
[[jobs]]
period = "December 2017 - May 2018"
content = """
Remote <b>lead PHP developer</b> as a contractor for
<a href="https://moovone.eu/en/">MoovOne</a>."""
<a href="https://www.coachhub.com/en/moovone/">MoovOne</a>."""
not_on_pdf = true
[[jobs]]
period = "2016 - November 2017"
content = """
<b>Lead PHP APIs developer</b> at
<a href="https://www.postcodelottery.co.uk/">People's Postcode Lottery</a>."""
organisation = { name="People's Postcode Lottery", url="https://www.postcodelottery.co.uk/" }
[[jobs]]
period = "2014 - 2016"
content = """
<b>Symfony / JavaScript consultant</b> for the Web agency
<a href="https://knplabs.com/en/">KNP Labs</a>."""
organisation = { name="KNP Labs", url="https://knplabs.com/en/" }
[[jobs]]
period = "2008 - 2014"
content = """
Expand Down
2 changes: 1 addition & 1 deletion myresume/data/fr/bio.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ birth = 1980-07-11
job_title = "Développeur Web"
email = "olivier@dunsap.com"
url = "https://dunsap.com/"
linked_in = "https://www.linkedin.com/in/olivierphilippon/"
linked_in = "/in/olivierphilippon/"
devblog = "https://devblog.dunsap.com/"
mastodon = "https://fosstodon.org/@dunsap"
github_id = "olivierphi"
2 changes: 1 addition & 1 deletion myresume/data/fr/i18n.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ source_code = "Le code source de cette page web est disponible sur"

[misc]
contributor = "contributeur"
non_exhaustive_list = "(liste non exhaustive)"
exhaustive_list_link = "liste exhaustive sur "
11 changes: 10 additions & 1 deletion myresume/data/fr/job_experience.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,59 @@ period = "Mai 2023 - Aujourd'hui"
content = """
<b>Senior Python developer</b> chez l'agence Web
<a href="https://www.torchbox.com/">Torchbox</a>. (Django/Wagtail)"""
organisation = { name="Torchbox", url="https://www.torchbox.com/" }
current = true
[[jobs]]
period = "Septembre 2022 - Avril 2023"
content = """
<b>Développeur Django senior</b> en freelance chez
<a href="https://www.sporteasy.net/">SportEasy</a>."""
organisation = { name="SportEasy", url="https://www.sporteasy.net/" }
[[jobs]]
period = "Mars 2022 - Juillet 2022"
content = """
<b>Senior software engineer</b> chez
<a href="https://www.textualize.io/">Textualize</a>. (Python/Next.js)"""
organisation = { name="Textualize", url="https://www.textualize.io/" }
not_on_pdf = true
[[jobs]]
period = "Février et Mars 2022"
content = """
<b>Senior product engineer</b> chez
<a href="https://www.wayflyer.com/">Wayflyer</a>. (Django/React)"""
organisation = { name="Wayflyer", url="https://www.wayflyer.com/" }
not_on_pdf = true
[[jobs]]
period = "Octobre 2021 - Janvier 2022"
content = """
<b>Senior backend developer</b> en freelance chez
<a href="https://www.planhub.ca/">PlanHub.ca</a> (Go) et
<a href="https://www.inclusive.energy/cloud-solar">Inclusive Energy</a> (Django)."""
organisation = { name="Wayflyer", url="https://www.planhub.ca/" }
[[jobs]]
period = "Octobre 2018 - Mai 2021"
content = """
<b>Lead developer</b> chez
<a href="https://inclusive.energy/charge-controllers">Inclusive Energy</a>. (Django/React)"""
organisation = { name="Inclusive Energy", url="https://inclusive.energy/" }
[[jobs]]
period = "Decembre 2017 - Mai 2018"
content = """
<b>lead PHP developer</b> en freelance chez
<a href="https://moovone.eu/">MoovOne</a>."""
<a href="https://www.coachhub.com/fr/moovone/">MoovOne</a>."""
not_on_pdf = true
[[jobs]]
period = "2016 - Novembre 2017"
content = """
<b>Lead PHP APIs developer</b> chez
<a href="https://www.postcodelottery.co.uk/">People's Postcode Lottery</a>."""
organisation = { name="People's Postcode Lottery", url="https://www.postcodelottery.co.uk/" }
[[jobs]]
period = "2014 - 2016"
content = """
<b>Consultant Symfony / JavaScript</b> chez les clients de
<a href="https://knplabs.com/">KNP Labs</a>."""
organisation = { name="KNP Labs", url="https://knplabs.com/" }
[[jobs]]
period = "2008 - 2014"
content = """
Expand Down
6 changes: 6 additions & 0 deletions myresume/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,16 @@ class OtherTechnologyData(TypedDict):
class JobExperiencesData(TypedDict):
jobs: list["JobData"]

class OrganisationData(TypedDict):
name: str
url: NotRequired[str]

class JobData(TypedDict):
period: str
content: str
organisation: NotRequired[OrganisationData]
not_on_pdf: NotRequired[bool]
current: NotRequired[bool]

class ProjectsData(TypedDict):
projects: list["ProjectData"]
Expand Down
6 changes: 3 additions & 3 deletions myresume/templates/myresume/about.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{% load myresume_tags %}
{% load static %}
<aside itemscope
itemtype="https://schema.org/Person"
class="md:w-1/3 {% theme element_id="BLOCK_ABOUT" %} print:text-sm {% layout_debug border_color="cyan-800" %}">

<aside class="md:w-1/3 {% theme element_id="BLOCK_ABOUT" %} print:text-sm {% layout_debug border_color="cyan-800" %}">
<img src="{% static "img/me.jpg" %}" alt="A photo of me" width="112" height="112" class="block size-28 mx-auto my-4 rounded-full border-2 border-slate-50 border-solid print:!mb-0">
<div class="grid grid-cols-2 md:grid-cols-1 gap-8 p-8 print:gap-5 print:p-5">
{% include "myresume/about/bio.html" %}
Expand All @@ -11,5 +10,6 @@
{% include "myresume/about/hobbies.html" %}
{% include "myresume/about/teaching.html" %}
{% include "myresume/about/education.html" %}

</div>
</aside>
15 changes: 6 additions & 9 deletions myresume/templates/myresume/about/bio.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
{% load static myresume_tags %}

<section>
{% svg_icon "bio" classes="size-8" %}
{% svg_icon "bio" classes="size-8 print:size-6" %}
<div class="mt-4">
<p>
<span itemprop="name">{{ bio_data.name }}</span>
</p>
<p class="hidden">
<span itemprop="jobTitle">{{ bio_data.job_title }}</span>
</p>
<p>
<a itemprop="email" href="mailto:{{ bio_data.email }}" class="underline">{{ bio_data.email }}</a>
</p>
<p class="hidden">
<span itemprop="url">{{ bio_data.url }}</span>
</p>
<meta itemprop="jobTitle" content="{{ bio_data.job_title }}" />
<meta itemprop="url" content="{{ bio_data.url }}" />
</div>
<div class="mt-4">
<p>
<span>LinkedIn:</span>
<br>
<a href="{{ bio_data.linked_in }}"
<a href="https://www.linkedin.com{{ bio_data.linked_in }}"
class="underline"
itemprop="sameAs"
target="_blank"
rel="noopener">{{ bio_data.linked_in | cut:"https://www.linkedin.com" }}</a>
rel="noopener">{{ bio_data.linked_in }}</a>
</p>
</div>
<div class="mt-4">
Expand Down
3 changes: 2 additions & 1 deletion myresume/templates/myresume/about/education.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% load myresume_tags %}

<section>
{% svg_icon "education" classes="size-8" %}
{% svg_icon "education" classes="size-8 print:size-6" %}
{% about_section_title i18n_data.education.title %}
<p>
{{ i18n_data.education.src }}
Expand Down
3 changes: 2 additions & 1 deletion myresume/templates/myresume/about/hobbies.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% load myresume_tags %}

<section>
{% svg_icon "hobbies" classes="size-8" %}
{% svg_icon "hobbies" classes="size-8 print:size-6" %}
{% about_section_title i18n_data.hobbies.title %}
<p itemprop="knowsAbout">{{ i18n_data.hobbies.content }}</p>
</section>
3 changes: 2 additions & 1 deletion myresume/templates/myresume/about/languages.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% load myresume_tags %}

<section>
{% svg_icon "languages" classes="size-8" %}
{% svg_icon "languages" classes="size-8 print:size-6" %}
{% about_section_title i18n_data.languages.title %}
{% for lang in i18n_data.languages.list %}
<p itemprop="knowsLanguage">{{ lang }}</p>
Expand Down
3 changes: 2 additions & 1 deletion myresume/templates/myresume/about/open_source.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% load myresume_tags %}

<section>
{% svg_icon "open-source" classes="size-8" %}
{% svg_icon "open-source" classes="size-8 print:size-6" %}
{% about_section_title i18n_data.open_source_projects.title %}
<p>
<a class="underline"
Expand Down
3 changes: 2 additions & 1 deletion myresume/templates/myresume/about/teaching.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% load myresume_tags %}

<section>
{% svg_icon "teaching" classes="size-8" %}
{% svg_icon "teaching" classes="size-8 print:size-6" %}
{% about_section_title i18n_data.teaching.title %}
<p>{{ i18n_data.teaching.content|safe }}</p>
</section>
9 changes: 7 additions & 2 deletions myresume/templates/myresume/layout.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{% load myresume_tags %}

<!DOCTYPE html>
<html lang="{{ current_lang }}">
{% load static tailwind_cli %}

<head>
<meta charset="utf-8">
<title>{{ document_data.meta.title }}</title>
Expand All @@ -19,14 +21,17 @@
{% tailwind_css %}
<link rel="stylesheet" href="{% static 'fonts/ubuntu.css' %}">
<link rel="stylesheet" href="{% static 'fonts/pressstart2p.css' %}">
{% include "myresume/pdf_and_language_toolbar.js.html" %}
</head>
<body class=" font-sans {% theme element_id="BODY" %}">
<body class="font-sans {% theme element_id="BODY" %}"
itemscope
itemtype="https://schema.org/Person">
<div class="relative flex items-stretch flex-col-reverse md:mx-auto md:max-w-256 md:flex-row {% layout_debug border_color="black" %}">
{% include "myresume/pdf_and_language_toolbar.html" %}
{% include "myresume/about.html" %}
{% include "myresume/main.html" %}

</div>
{% include "myresume/footer.html" %}

</body>
</html>
30 changes: 28 additions & 2 deletions myresume/templates/myresume/main/job_experience.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
{% extends "myresume/main/_base_section.html" %}

{% load myresume_tags %}

{% block title %}
{% main_section_title i18n_data.captions.job_experience icon="job-experience" print_suffix=i18n_data.misc.non_exhaustive_list %}
{% main_section_title i18n_data.captions.job_experience icon="job-experience" %}
{% endblock title %}

{% block content %}
<ul class="pl-4 pr-1 list-disc sm:pr-0 print:text-sm print:pl-4">
{% for job in jobs_data.jobs %}
<li class="mb-1 text-justify {% if job.not_on_pdf %}print:hidden{% endif %}">
<li class="mb-1 text-justify
{% if job.not_on_pdf %}print:hidden{% endif %}"
{% if job.organisation %}
itemscope itemtype="https://schema.org/Organization" itemprop="
{% if job.current %}
worksFor
{% else %}
alumniOf
{% endif %}
"
{% endif %}>
{% if job.organisation %}
<meta itemprop="name" content="{{ job.organisation.name }}" />
{% if job.organisation.url %}
<meta itemprop="url" content="{{ job.organisation.url }}" />
{% endif %}
{% endif %}
<span class="font-bold">{{ job.period }}:</span>
<span class="*:decoration-dotted *:underline-offset-2">{{ job.content|processed_job_content|safe }}</span>
</li>
{% endfor %}
</ul>
<div class="hidden my-1 font-semibold italic {% theme element_id="HIGHLIGHT" %} print:!block">
⇒ {{ i18n_data.misc.exhaustive_list_link }}
<a href="https://www.linkedin.com{{ bio_data.linked_in }}"
class="underline"
target="_blank"
rel="noopener">LinkedIn</a>
</div>
{% endblock content %}
6 changes: 3 additions & 3 deletions myresume/templates/myresume/main/tags/main_section_title.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% load myresume_tags %}

<h3 class="flex items-center text-3xl my-3 text-bold {% theme element_id="MAIN_SECTION_TITLE" %} md:-ml-2 md:text-4xl print:!text-lg print:!mt-2 print:!mb-1">
<span class="size-10 aspect-square mr-2 flex justify-center items-center rounded-full {% theme element_id="MAIN_SECTION_TITLE_ICON" %} print:!size-6 print:!mr-1">
{% svg_icon icon classes="size-6 print:!size-4" %}
<span class="size-10 aspect-square mr-2 flex justify-center items-center rounded-full {% theme element_id="MAIN_SECTION_TITLE_ICON" %} print:!size-8">
{% svg_icon icon classes="size-6 print:!size-5" %}
</span>
{{ title }}
{{ print_suffix }}
</h3>
7 changes: 5 additions & 2 deletions myresume/templates/myresume/main/tags/main_tech.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{% load myresume_tags %}

<span class="flex">
<img src="{{ icon_url }}"
alt=""
class="size-6 mr-2"
width="24"
height="24">
{% if url %}
<a href="{{ url }}" class="underline" target="_blank" rel="noopener">{{ title }}</a>
<a href="{{ url }}" class="underline" target="_blank" rel="noopener">
{% tech_with_schema title=title url=url %}
</a>
{% else %}
{{ title }}
{% tech_with_schema title=title %}
{% endif %}
</span>
8 changes: 6 additions & 2 deletions myresume/templates/myresume/main/tags/other_tech.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% load myresume_tags %}

<div {% if not_on_pdf %}class="print:hidden"{% endif %}>
<div class="flex">
<img src="{{ icon_url }}"
Expand All @@ -6,9 +8,11 @@
width="16"
height="16">
{% if url %}
<a href="{{ url }}" class="underline" target="_blank" rel="noopener">{{ title }}</a>
<a href="{{ url }}" class="underline" target="_blank" rel="noopener">
{% tech_with_schema title=title url=url %}
</a>
{% else %}
{{ title }}
{% tech_with_schema title=title %}
{% endif %}
</div>
{% if contributor_url %}
Expand Down
Loading

0 comments on commit b857c7a

Please sign in to comment.