diff --git a/content/Lectures/2023-05-02-micropolitiques-des-groupes.md b/content/Lectures/2023-05-02-micropolitiques-des-groupes.md index 8b3e2f6..31aef21 100644 --- a/content/Lectures/2023-05-02-micropolitiques-des-groupes.md +++ b/content/Lectures/2023-05-02-micropolitiques-des-groupes.md @@ -1,7 +1,7 @@ --- title: Micropolitiques des groupes author: David Vercauteren -headline: Une livre qui vise à créer une culture des précédents dans les collectifs (militants). Plusieurs chapitres et un découpage par sujets. A relire au fur et à mesure des expériences. +headline: Un livre qui vise à créer une culture des précédents dans les collectifs (militants). Plusieurs chapitres et un découpage par sujets. A relire au fur et à mesure des expériences. isbn: 9782354801786 --- ## Artifices @@ -75,4 +75,4 @@ Idée : prendre du recul sur nos mots d'ordre, pour voir ce qui nous traverse. -[micropolitiques des groupes - pour une écologie des pratiques collectives](https://micropolitiques.collectifs.net) \ No newline at end of file +[micropolitiques des groupes - pour une écologie des pratiques collectives](https://micropolitiques.collectifs.net) diff --git a/content/Lectures/2024-02-14-le-conflit-nest-pas-une-agression.md b/content/Lectures/2024-02-14-le-conflit-nest-pas-une-agression.md index de8c69a..7c410a8 100644 --- a/content/Lectures/2024-02-14-le-conflit-nest-pas-une-agression.md +++ b/content/Lectures/2024-02-14-le-conflit-nest-pas-une-agression.md @@ -5,6 +5,7 @@ headline: Rhétorique de la souffrance, responsabilité collective et devoir de tags: conflit, agression, facilitation isbn: 9782490077489 --- + J'ai commencé ce livre en fin d'été, et je l'ai lu par petits morceaux. Pas que ce soit difficile à lire, mais plutôt parce que j'avais envie/besoin de lire et de relire certains passages qui faisaient écho à des situations que j'ai pu traverser, que ce soit dans le cadre pro ou ailleurs. Si je devais ne retenir qu'une chose de ce livre, ce serait le travail autour de « l'escalade du conflit ». Le propos principal de Sarah Schulmann me semble être qu'il est important de detecter et d'éviter les mécaniques d'escalade (du conflit vers l'agression), cette escalade pouvant être une distraction pour éviter de discuter réellement des problèmes. @@ -20,13 +21,13 @@ Quelques morceaux choisis: > > — page 25. ---- +___ > Et si l'autre personne mettait le doigt sur quelque chose que je n'étais pas en mesure d'exprimer toute seule ? **Est-ce que ça me mettrait en colère ou est-ce que je refuserais de voir la réalité ? Plutôt que de me livrer à l'introspection, est-ce que je trouverais une manière de l'accuser ?** Et si elle m'aidait, au contraire, à reconnaître cette réalité ou à en prendre conscience ? Je trouve intéressante la manière dont les choses sont posées. L'idée étant de permettre à tout·e un·e chacun·e de mieux se connaitre, et de prendre conscience de nos fonctionnements construits pour pouvoir les dépasser. ---- +___ > **le refus de communiquer à toujours été la cause principale des accusations mensongères car il permet de nourrir toutes sortes de fantasmes négatifs à propos de l'autre**, surtout dans les domaines symboliquement chargés tels que la sexualité, l'amour, la communauté, la famille, les ressources matérielles, les identités de groupe, le genre, le pouvoir, le capital social et la violence. > Refuser catégoriquement d'adresser la parole à quelqu'un est un acte de destruction aussi étrange qu'immature; personne n'en sort gagnant. @@ -37,7 +38,7 @@ Je trouve intéressante la manière dont les choses sont posées. L'idée étant D'où l'importance de réussir à faire la différence entre un ressenti et un fantasme. J'apprécie ce que « projeter des fantasmes négatifs » apporte comme compréhension. Dans ces cas là, peut-être qu'on parle a nos peurs plutôt qu'a notre interlocuteur·ice. 😮‍💨 ---- +___ > Aujourd'hui, le caractère réducteur des slogans publicitaires est également appliqué à des domaines très sérieux tels que les droits humains ou la sécurité. Ces messages ne sont plus seulement destinés à vendre du liquide vaisselle, mais par exemple à aider les femmes à se protéger contre la violence masculine. Cependant, leur manque de subtilité peut également contribuer à renforcer le déni sur ces questions. **Le désaccord est un terrain complexe dont nous devons pourtant embrasser les nuances si nous voulons agir de manière constructive, avec honnêteté et sincérité.** @@ -72,7 +73,7 @@ Je me demande comment réussir à dépasser ça. L'obéissance n'étant bien sur Je ne connaissais pas cette distinction entre d'un côté la honte et de l'autre la culpabilité, et de ce que ça montre des différents *styles* qui peuvent être adoptés lorsque le stress s'en mêle. Je me demande quand même si l'explication n'est pas un peu simpliste (même si elle m'arrange bien 🫢). ---- +___ ## Elements déclancheurs > les situations vécues comme des éléments déclencheur sont des formes de réaction qui s'avère déterminantes dans l'amalgame entre un conflit et une agression. De manière générale dans la vie, nous sommes amenés à réagir en permanence. Nous ne nous rendons pas compte de la plupart de nos réactions car elles sont proportionnelles aux stimuli qui les ont provoqués. **Une réaction disproportionnée se démarque parce qu'elle est démesurée au regard de ce qui est réellement en train de se passer**. @@ -91,7 +92,7 @@ Je ne connaissais pas cette distinction entre d'un côté la honte et de l'autre Ah, la la. ---- +___ Il y a toute un chapitre ou l'autrice parle de différentes approches (psychologie, psychiatrie moderne et pop psychologie) qui convergent vers les mêmes conclusions concernant la définition d'une réaction et ses conséquences. (j'ai formaté le texte pour le rendre plus lisible) @@ -112,12 +113,12 @@ Il y a toute un chapitre ou l'autrice parle de différentes approches (psycholog > > — page 189 ---- +___ En guise de conclusion : > D'une certaine manière, on pourrait résumer la chose par « se sentir mieux » versus « aller mieux ». Refouler des informations (sur nous-mêmes, sur nos amis), créer des bouc-émissaires de sorte à nous détourner de nos problèmes, exclure afin d'unifier un collectif et de créer une identité de groupe : **tous ces mécanismes aident les gens à se sentir mieux, parce qu'ils leur permet de se sentir supérieurs**. Or la seule manière d'aller véritablement mieux et de nous confronter aux autres, de les regarder en face, de communiquer. ---- +___ > Si nous appartenons à des groupes qui ne sont pas capables d'autocritique, et qui sanctionnent en conséquence la différence, nous nous joindrons à l'effort collectif qui revient à fuir, exclure et mépriser. **Mais si nous nous trouvons dans des groupes qui promeuvent l'acceptation, qui font en sorte de créer des conditions de communication, et qui reconnaissent que les gens sont porteurs de contradiction, nous serons capables de composer avec la nature réelle du conflit** : son caractère collectif, d'une part, et, d'autre part, le fait qu'il ne peut pas se régler en faisant usage de cruauté, en faisant courir des rumeurs, en promulguant des lois, où on emprisonna des gens, en envahissant et en occupant leur territoire. diff --git a/content/Notes/2023-12-37C3.md b/content/Notes/2023-12-37C3.md deleted file mode 100644 index fa394b3..0000000 --- a/content/Notes/2023-12-37C3.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: The 37C3 -status: draft ---- - -For the past few days I've been at the 37C3, in Hambourg. It's the first time -I'm attending a tech conference in the last 7 years, and I've never been to any -CCC event before. - -There were definitely a lot going on a the same time: talks, assemblies, -workshops, concerts and just meeting and discussing with friends and community -members. - -It's all taking place in the CCH, the congress center of hambourg, which is… huge, to say the least. - -## Feelings - -I've seen a bunch of people tellming me this was a great conference, and this sets up expectations somehow for me. I didn't know exactly what to expect, but I definitely had some. - -I believe that's because of where the conference is at: the crossroads of different subjects that matters to me: open-source, privacy and ethics. - -## The talks - -There were a lot of different talks on different subjects. Some of them were in big large lecture halls, and some others - - diff --git a/content/Sans titre.md b/content/Sans titre.md deleted file mode 100644 index e69de29..0000000 diff --git a/content/code/2024-07-12-pydantic.md b/content/code/2024-07-12-pydantic.md index e454e8e..e56d2b6 100644 --- a/content/code/2024-07-12-pydantic.md +++ b/content/code/2024-07-12-pydantic.md @@ -1,5 +1,5 @@ --- -title: Parsing JSON into Specific Pydantic Models +title: Discriminate pydantic objects by field tags: pydantic, python, match --- @@ -7,8 +7,7 @@ tags: pydantic, python, match I really like [Pydantic](https://docs.pydantic.dev/latest/) because it makes it easy to define the the structure of the objects I want to use, using typing. -One use case I have at the moment is to parse a json object and build different -objects depending on some key in the json object. +I wanted to parse a json object and build a different object depending on the value of some specific key in the JSON object. Here, I have three types of messages: `OperationMessage`, `PeerMessage` and `ServerRequest`, as follows: @@ -21,9 +20,6 @@ from pydantic import BaseModel class OperationMessage(BaseModel): kind: Literal["operation"] = "operation" verb: Literal["upsert", "update", "delete"] - subject: Literal["map", "layer", "feature"] - metadata: Optional[dict] = None - key: Optional[str] = None class PeerMessage(BaseModel): @@ -33,13 +29,13 @@ class PeerMessage(BaseModel): message: dict -class ServerRequest(BaseModel): +class ServerMessage(BaseModel): kind: Literal["server"] = "server" action: Literal["list-peers"] ``` -Each of these classes share the same `kind` property, which can act as a discriminator. +Each of these classes share the same `kind` key, but each of them has a different value for it. it's our discriminator. Let's build a generic `Request` class that will be able to build for me the proper objects: @@ -49,7 +45,7 @@ from pydantic import Field, RootModel, ValidationError class Request(RootModel): - root: Union[ServerRequest, PeerMessage, OperationMessage] = Field( + root: Union[ServerMessage, PeerMessage, OperationMessage] = Field( discriminator="kind" ) ``` @@ -60,11 +56,11 @@ Which can be used this way: try: incoming = Request.model_validate_json(raw_message) except ValidationError as e: - # raise + # Oh noes. ``` -And, because we have classes, we can leverage the `match` statement: +Because we have classes, we can leverage the `match` statement: ```python match incoming.root: @@ -77,5 +73,5 @@ match incoming.root: peer = connections.get(_id) if peer: await peer.send(raw_message) - + # ... Etc. ``` diff --git a/content/pages/projets.md b/content/pages/projets.md index 78d8bc2..1afa834 100644 --- a/content/pages/projets.md +++ b/content/pages/projets.md @@ -1,8 +1,11 @@ --- save_as: projets/index.html slug: projets +subtitle: À propos --- +# Alexis Métaireau + ## 🌟 Valeurs et intérets Logiciel Libre @@ -30,7 +33,10 @@ J'ai pu jouer avec travailler sur plusieurs projets au fil des année Voici quelques logiciels auxquels j'ai participé. Vous pouvez aussi aller faire un tour sur mes dépots publics ([Github](https://github.com/almet) ou [Gitlab](https://gitlab.com/almet)) -🗺️ [uMap](https://umap-project.org) (2023-2024) +⚠️ [Dangerzone](https://dangerzone.rocks) (2024-*) +: Un logiciel pour transformer des documents potentiellement dangereux en documents sûrs, pour le compte de la foundation américaine pour la libérté de la presse ([Freedom of the Press Foundation](https://freedom.press)) + +🗺️ [uMap](https://umap-project.org) (2023-*) : Un logiciel de création de cartes pour le web. J'y travaille sur l'ajout de fonctionalités de collaboration, pour que plusieurs utilisateur·ices puissent voir les éditions des autres, en « temps réel ». 🚨 [Argos](https://framasoft.frama.io/framaspace/argos/) (2023-2024) diff --git a/content/pages/resume.md b/content/pages/resume.md index 9695284..fdcbfa9 100644 --- a/content/pages/resume.md +++ b/content/pages/resume.md @@ -1,9 +1,10 @@ --- save_as: resume/index.html slug: resume -title: Alexis Métaireau / Resume +title: Alexis Métaireau --- -# Alexis Métaireau - Resume + +Here is a resume. --- diff --git a/content/pages/worklog/dangerzone.md b/content/pages/worklog/dangerzone.md index 592aeff..9ccdeec 100644 --- a/content/pages/worklog/dangerzone.md +++ b/content/pages/worklog/dangerzone.md @@ -4,6 +4,88 @@ save_as: dangerzone/index.html template: worklog-en --- +## Jeudi 11 Juillet 2024 (5h, 5/5) + +- Update the REALEASE.md file with notes taken during the release +- Check how to run Dangerzone with Colima / explore the situation and give feedback to a user trying to make things work +- DZ biweekly meeting + +## Mercredi 10 Juillet 2024 (8h, 5/5) + +- We released 0.7.0, finally :-) + +## Mardi 09 Juillet 2024 (8h, 5/5) + +- Rebuilt all the Linux targeted distributions for the 0.7.0 release with the latest fixes, updated the pull requests on {apt,yum}-tools-prod repositories. +- Some poking around with L_ee to ensure the Windows virtualbox machine has access to the SmartCard. +- Rebuilt the Windows .msi +- Started thinking about what could be automated in our setup + +## Lundi 08 Juillet 2024 (8h, 5/5) + +- Sync up with a_pyrgio on the next steps for the release (when the mac mini will be back again). +- Documented myself on certificate transparency, and on how / if we should put trust in the Github releases pages for Dangerzone. I started an issue about that on the DZ repository. +- Discussed a bit with A_da about how the infra is setup and how we should use github PAT +- Read a bit about the latest SSL exploit, I didn't realized it was that problematic. + +## Mardi 02 Juillet 2024 (6h, 5/5) + +- 0.7.0 is almost there. Everything is signed and ready. Let's wait the green lights. + + We finished the last steps for the release. Building and signing everything, by pairing together most of the day with Alex_P. +- I now know how to juggle with three different keyboard layouts ! + +## Lundi 01 Juillet 2024 (6h, 5/5) + +- QA on my windows machine, and then +- Hopping to the windows VM to do the build and sign. Session with Alex_P where we did some debugging +- Reviewed a PR about adding timeouts on kill commands + +## Jeudi 27 Juin 2024 (8h, 5/5) + +- Today way mostly QAing for the 0.7.0 release, which is lining up. +- And we merged the drag-n-drop feature! +- Biweekly meeting, we discussed about how to deal with security problems when maintainers aren't around, and what's next for the redesign :-) + +## Mercredi 26 Juin 2024 (6h, 4/5) + +- Understanding how the mac minis are working, starting drafting a release there ; +- Reviewing Alex_P PR about using custom seccomp profiles on some specific Docker Desktop versions (see above) +- Started bumping python to 3.12 for Windows and macOS buildd, finding some bumps in the road. + + +## Mardi 25 Juin 2024 (8h, 5/5) + +- Sync with AlexP on the upcoming 0.7.0 release +- Debugged a seccomp filter related bug with runc old versions on silicon mac + Docker Desktop w/ AlexP +- Started drafting a solution for it +- Changelog-related discussions +- Attended the XZ postmortem meeting + +## Jeudi 20 Juin 2024 (8h, 5/5) + +- Started the 0.7.0 release + - Updated dependencies + - Removed support for Fedora 38 + - Started writing the CHANGELOG +- Synced w/ Alex +## Mercredi 19 Juin 2024 (8h, 4/5) + +- Merged the two PRs for testing packages for fedora and debian +- Found out an issue with line endings on windows, when building the docker image +- 1:1 Discussion with M_icah +- Got access to the release machines, and found some way to circumvent the network at my workplace being tempered. + +## Mardi 18 Juin 2024 (7h, 5/5) + +- Fixing the CI for .deb testing +- Installing a windows machine to check current work on drag-n-drop there +- Started working on a PR for CI checking fedora packages + +## Vendredi 14 Juin 2024 (6h, 4/5) + +- Added CI for testing the built debian images are working properly. +- Some more work on the drag-n-drop feature, it's now passing the CI tests and is working everywhere I tried. ## Jeudi 13 Juin 2024 (8h, 5/5) - Extended session with w/ Alex where we prepared the next 0.7.0 release, trying to see how much effort each task would be. @@ -25,12 +107,6 @@ Tomorrow looks like: - Sprint planning - Read about alternatives to Docker Desktop on macOS and windows. -- [ ] (2) Install Qubes -- [x] (1) Review [Illegal chars filenames - Pull Request #834](https://github.com/freedomofpress/dangerzone/pull/834) - -- [ ] -Quite a long day today, but spent a lot of time installing arch on my new machine. - ## Mardi 11 Juin 2024 (7h, 5/5) - Sync w/ Alex in the morning diff --git a/content/pages/worklog/umap.md b/content/pages/worklog/umap.md index 3a1355a..e1e93bd 100644 --- a/content/pages/worklog/umap.md +++ b/content/pages/worklog/umap.md @@ -4,6 +4,41 @@ save_as: umap/index.html template: worklog total_days: 90 --- +## Vendredi 04 Juillet 2024 (7h, 5/5) + +On se fait une session de pair avec Yohan le matin, continuée l'aprem, durant laquelle on a avancé des cas offline, et de comment réconcilier les messages manquants. + +David nous rejoint en fin d'aprèm. Une bonne session ! + +## Jeudi 04 Juillet 2024 (10h, 5/5) + +Je reprends le travail sur les messages échangés entre le serveur et les clients, pour trouver un moyen de récupérer les informations qui dates d'avant le "join". Je réussis finalement à trouver un moyen d'utiliser Pydantic comme je le veux, pour parser un message et avoir en retour différents objets, créés dynamiquement, en fonction du type de message. + +Je réussis à envoyer l'ensemble des messages d'un client de l'autre côté, et ça s'affiche ! +## Lundi 24 Juin 2024 (7h, 5/5) + +Un bug remonté par un utilisateur me fait me rendre compte d'un impensé dans le code, et en tirant le fil, je trouve quelques bugs assez génants. Je les corrige. + +Une discussion sur la gouvernance, qui débouche sur l'idée d'essayer d'avoir plus de clarté sur notre manière de nous organiser collectivement. Content devoir ce sujet pris en compte, et avancer. + +On pair-prog avec David, et c'est aussi l'occasion de discuter ensemble. + +## Lundi 17 Juin 2024 (5h, 5/5) + +Je commence par décrire ce que je compte faire pour avoir les idées un peu plus +claires, puis j'enchaine sur l'implémentation de la sauvegarde des messages, du +HLC et du protocole de discussion avec le serveur. + +Au passage, je me rends compte que le nombre de messages générés par le +`FormBuilder` est bien trop important, et qu'il faudrait plutôt utiliser +l'évènement `onBlur` pour éviter d'envoyer des messages à chaque modification +d'un `input`. + +Le serveur à maintenant la possibilité de gérer différents types de messages, et +j'en suis au moment où je fais la selection du pair pour que celui ci envoie ses +messages de l'autre côté. Il me reste à demander côté client, puis à recevoir la +le message et à y répondre, pour enfin récupérer la liste des opérations et les +appliquer localement. ## Lundi 10 Juin 2024 (6h, 4/5) diff --git a/content/weeknotes/34.md b/content/weeknotes/34.md index ed6dfbb..41a8b2d 100644 --- a/content/weeknotes/34.md +++ b/content/weeknotes/34.md @@ -2,10 +2,9 @@ date: 2024-07-12 headline: notes hebdo des semaines écoulées projects: dangerzone, umap -status: draft --- -# Notes hebdo +# Notes hebdo #34 J'ai eu beaucoup de mal à trouver du temps pour ces notes hebdo dans les dernières semaines. Pas mal d'énergie mise sur d'autres projets et d'autres @@ -42,12 +41,11 @@ point sur le mois passé, depuis la dernière note. - Je me sens reposé. Ça me fait bizarre de l'écrire, mais ça faisait longtemps que ça ne m'était pas arrivé. - Je m'autorise à prendre plus de pauses, ce qui fait que j'ai un rapport plus constructif au travail. - Voir que ça va faire trop, et m'autoriser à annuler ce qui ferait déborder le vase. -- Des rencontres à côté du boulot qui sont simples et motivantes, être à fond. -- Me remettre à faire des trucs fermentés (légumes lactofermentés, kombucha) +- Des rencontres à côté du boulot qui sont simples et motivantes, être à fond le temps d'un week-end. - Prendre le temps d'animer des ateliers d'autodéfense numérique. -- Sentir le temps se décaller, me coucher tard et me leve tard, me reposer quand +- Sentir le temps se décaller, me coucher tard et me lever tard, me reposer quand j'en ai envie. C'est surement ça que j'appelle « retrouver le contrôle de mon - temps »», un peu paradoxalement peut-être. + temps », un peu paradoxalement peut-être. ## Des peines 😬 diff --git a/mnmlist/static/css/main.css b/mnmlist/static/css/main.css index 1bd1a10..279af72 100644 --- a/mnmlist/static/css/main.css +++ b/mnmlist/static/css/main.css @@ -1,9 +1,13 @@ /* Theme Name: mnmlist modified by Alexis Métaireau + Theme URI: http://mathieu.agopian.info/mnmlist/theme.html - Description: Theme adapted from http://mnmlist.com/theme/ from Leo Babauta, a very clean minimalist theme, without comments, search, archives or other features. + Description: Theme adapted from http://mnmlist.com/theme/ from Leo Babauta, + a very clean minimalist theme, without comments, search, archives or other + features. + Author: Mathieu Agopian, Mathieu Leplatre, Alexis Métaireau - Autor URI: http://mathieu.agopian.info + Author URI: https://notmyidea.org This theme is uncopyrighted, free, and offered as is. */ @@ -11,36 +15,38 @@ @import url("pygment.css"); :root { - --main-bg-color: #ffffff; - --border-color: #ACACAC; - --code-bg-color: #f6f6f6; - --quote-bg-color: #f6f6f6; - --link-color: #BB7DD4; - --text-color: #2d2d2d; - --menu-color: #7971D0; - --link-color-menu: #36194D; - --headers-color: #000; - --citation-bold-color: #f5ff889a; - --highlight: #8f9fa926; - --highlight-hover: #84a59d; - --gray: #ACACAC; - --lightgray: #e0dcd3; + --main-bg-color: hsl(0, 0%, 100%); + --text-color: hsl(0, 0%, 18%); + --reverse-bg-color: hsl(0, 0%, 20%); + --reverse-text-color: hsl(0, 0%, 100%); + --border-color: hsl(0, 0%, 67%); + --code-bg-color: hsl(0, 0%, 96%); + --quote-bg-color: hsl(24, 100%, 98%); + --quote-bold-color: hsla(9, 100%, 60%, 0.3); + --highlight: hsla(200, 13%, 76%, 0.15); + --highlight-hover: hsl(165, 16%, 59%); + --link-color: hsl(9, 100%, 64%); + --link-color-menu: hsl(9, 100%, 64%); + --headers-color: hsl(0, 0%, 0%); + --headers-background-color: hsl(9, 100%, 64%); } @font-face { - font-family: "Luciole"; - src: url("../fonts/Luciole-Regular.ttf") format("ttf"); + font-family: "Caveat"; font-style: normal; - font-weight: 350; - font-stretch: 100%; + font-weight: 400 700; font-display: swap; + src: url("../fonts/Caveat.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } body { background: var(--main-bg-color); color: var(--text-color); - font-family: "Luciole", Arial, sans-serif; -/* background-image: url(/theme/white-waves.webp); */ + font-family: "Cantarell", "Luciole", Arial, sans-serif; + /* background-image: url(/theme/white-waves.webp); */ background-repeat: repeat; margin-left: auto; @@ -52,7 +58,6 @@ body { } @media only screen and (max-width: 768px) { - /* For mobile phones: */ body { padding: 5px; @@ -71,6 +76,7 @@ h2, h3, h4 { color: var(--headers-color); + text-transform: uppercase; } h1 { @@ -78,14 +84,12 @@ h1 { font-weight: normal; margin-bottom: 0; line-height: 1.2em; -} - -h1 a { - text-decoration-style: unset; -} - -h1 small { - font-size: 0.7em; + a { + text-decoration-style: unset; + } + small { + font-size: 0.7em; + } } h2 { @@ -101,10 +105,17 @@ h4 { } time { - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-family: + ui-monospace, + SFMono-Regular, + SF Mono, + Menlo, + Consolas, + Liberation Mono, + monospace; } -.book-container{ +.book-container { grid-template-columns: 1fr 1fr; display: grid; align-items: start; @@ -151,9 +162,8 @@ blockquote { } blockquote strong { - background-color: var(--citation-bold-color); + background-color: var(--quote-bold-color); font-weight: normal !important; - } blockquote::before, @@ -181,7 +191,6 @@ blockquote::after { content: "»"; } - p { line-height: 30px; margin: 30px auto; @@ -193,7 +202,6 @@ p.caption { margin-top: 0; } - a { color: inherit; text-decoration-color: var(--link-color); @@ -206,17 +214,16 @@ a:hover { a.tag { border-radius: 5px; - padding: 0 .1rem; + padding: 0 0.1rem; text-decoration: none; } .tag { border-radius: 5px; - padding: 0 .1rem; + padding: 0 0.1rem; font-size: 0.7em; text-decoration: none; display: inline-block; - } a.tag:hover { @@ -229,7 +236,6 @@ ol li { padding: 0; } - strong { font-weight: bold; } @@ -244,17 +250,75 @@ pre { font-size: 0.8em; overflow: auto; padding: 10px; - white-space: pre-wrap; } -header a { - text-decoration: none; +.ecriture { + font-family: "Caveat"; + font-size: 1.5em; } -header h1 { - margin-bottom: 30px; -} +header { + display: inline-block; + width: 100%; + word-break: keep-all; + overflow-wrap: break-word; + white-space: normal; + h1 { + margin-bottom: 30px; + } + a { + text-decoration: none; + } + + figure { + padding: 0px; + margin: 0px; + + h1 { + min-height: 2em; + font-size: clamp(5rem, 6rem, 6rem); + margin-bottom: 0px; + text-shadow: 10px 1px 3px var(--link-color); + font-weight: bold; + padding: 0.5em; + color: var(--headers-color); + background: repeating-linear-gradient( + 45deg, + var(--link-color) 0px, + var(--link-color) 3px, + transparent 2px, + transparent 9px + ); + margin-bottom: 0px; + text-align: center; + } + } + + figcaption { + top: -4rem; + right: 1rem; + position: relative; + background: white; + float: right; + font-size: 1.3em; + padding: 3px; + } + + @media screen and (max-width: 600px) { + figure { + h1 { + font-size: 3rem; + } + } + + figcaption { + font-size: 1em; + right: 1rem; + top: -3rem; + } + } +} dt { font-weight: bold; @@ -276,51 +340,99 @@ section.index h1 { border-bottom: none; } +#links { + li { + display: initial; + list-style-type: none; + white-space: nowrap; + } -#links {} + li:nth-child(1) { + display: inline-block; + } -#links li { - display: initial; - list-style-type: none; - white-space: nowrap; + ul { + padding: 0; + } + + a { + padding-top: 5px; + padding-bottom: 5px; + padding-left: 10px; + padding-right: 10px; + + text-decoration-color: var(--link-color-menu); + /*text-decoration-thickness: unset;*/ + } + + li a:not(.main) { + text-transform: lower-case; + } + + a:hover { + color: var(--link-color-menu); + } + + a.main { + color: #fff; + background-color: var(--link-color-menu); + } + + a.selected { + text-decoration-color: var(--link-color); + } + + a.selected:hover { + cursor: default; + } } -# links li:nth-child(1) { - display: inline-block; +article, +.index { + h1, + h2, + h3, + h4 { + border-left: 0.6em var(--headers-background-color) solid; + padding-left: 1em; + } + + ul { + position: relative; + list-style-type: none; + + li::before { + content: "→"; + position: absolute; + left: 0; + } + + h1, + h2, + h3, + h4, + h5 { + padding-left: 0px; + border: 0px; + } + } } -#links a { - padding-top: 5px; - padding-bottom: 5px; - padding-left: 10px; - padding-right: 10px; +.more { + color: var(--reverse-text-color); + background-color: var(--reverse-bg-color); + padding: 1em; - text-decoration-color: var(--link-color-menu); - /*text-decoration-thickness: unset;*/ + h1, + h2, + h3 { + color: var(--reverse-text-color); + } } - -#links li a:not(.main){ - text-transform: lower-case; +.more details { + padding-bottom: 1em; } -#links a:hover { - color: var(--link-color-menu); -} - -#links a.main { - color: #fff; - background-color: var(--link-color-menu); -} - -#links a.selected { - text-decoration-color: var(--link-color); -} - -#links a.selected:hover { - cursor: default; -} - - #article-list { margin-top: 100px; } @@ -332,10 +444,17 @@ section.index h1 { } p code { - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-family: + ui-monospace, + SFMono-Regular, + SF Mono, + Menlo, + Consolas, + Liberation Mono, + monospace; background: var(--code-bg-color); padding: 2px 4px; - font-size: .9em; + font-size: 0.9em; line-height: 1; border-radius: 6px; } @@ -357,10 +476,9 @@ p code { } .note p.first::after { - content: ' : '; + content: " : "; } - footer { text-align: center; color: var(--headers-color); @@ -398,7 +516,7 @@ table th { text-align: left; } -table tbody tr:nth-child(2n+1) { +table tbody tr:nth-child(2n + 1) { background-color: rgba(0, 0, 0, 0.025); } @@ -407,28 +525,18 @@ table td { } hr { - background-color: var(--lightgray); - color: var(--gray); - text-align: center; - border: none; width: 100%; - height: 1px; - margin: 3rem auto; - border-color: var(--gray); - overflow: visible; + height: 0.5em; + border: 0px; + background: repeating-linear-gradient( + 45deg, + var(--text-color) 0px, + var(--text-color) 3px, + transparent 2px, + transparent 9px + ); } - -hr::after { - content: "* * *"; - margin: -1em 0 .5em; - padding: .5em 1em; - font-size: 1.5em; - display: inline-block; - background-color: var(--main-bg-color); -} - - @media screen and (max-width: 710px) { ul li:nth-child(1):after { content: "\A"; @@ -436,10 +544,6 @@ hr::after { } } -#links ul { - padding: 0; -} - a[data-size]::after { content: attr(data-size); vertical-align: super; @@ -447,19 +551,19 @@ a[data-size]::after { font-size: 10px; } -a[data-size='2'] { +a[data-size="2"] { font-size: 1.3em; } -a[data-size='3'] { +a[data-size="3"] { font-size: 1.6em; } -a[data-size='4'] { +a[data-size="4"] { font-size: 1.8em; } -a[data-size='5'] { +a[data-size="5"] { font-size: 2.2em; } @@ -479,13 +583,10 @@ a[data-size='5'] { .book-cover { max-width: 128px; max-height: 192px; - margin: auto; - margin-top: 2em; - padding-right: 0.5em; + padding: 1em; + float: left; } - - dd { padding-bottom: 1em; } @@ -501,29 +602,34 @@ dd { float: left; } -.post-title { - margin-bottom: 0px; -} - .items { - padding-left: 0px; + padding-left: 0px; + + @media screen and (max-width: 600px) { + padding-left: 5px; + .item::before { + content: "→"; + position: absolute; + left: 5px; + } + } } .item { flex-direction: row; display: flex; padding-bottom: 0.5em; -} -.item>time { - flex: 1; - text-align: right; - color: #797878; - padding-left: 1em; -} + time { + flex: 1; + text-align: right; + color: #797878; + padding-left: 1em; -#content header{ - text-align: center; + @media screen and (max-width: 600px) { + display: none; + } + } } nav { @@ -547,6 +653,12 @@ nav { .navigation > li::after { content: " "; - letter-spacing: 1em; - background: linear-gradient(90deg, transparent calc(50% - 0.03125em), currentColor 0, currentColor calc(50% + 0.03125em), transparent 0); + letter-spacing: 1em; + background: linear-gradient( + 90deg, + transparent calc(50% - 0.03125em), + currentColor 0, + currentColor calc(50% + 0.03125em), + transparent 0 + ); } diff --git a/mnmlist/static/css/pygment.css b/mnmlist/static/css/pygment.css index 15aaf61..8d5e4b1 100644 --- a/mnmlist/static/css/pygment.css +++ b/mnmlist/static/css/pygment.css @@ -1,85 +1,125 @@ -pre { line-height: 125%; } -td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -.highlight .hll { background-color: #ffffcc } -.highlight { background: #282C34; color: #ABB2BF } -.highlight .c { color: #7F848E } /* Comment */ -.highlight .err { color: #ABB2BF } /* Error */ -.highlight .esc { color: #ABB2BF } /* Escape */ -.highlight .g { color: #ABB2BF } /* Generic */ -.highlight .k { color: #C678DD } /* Keyword */ -.highlight .l { color: #ABB2BF } /* Literal */ -.highlight .n { color: #E06C75 } /* Name */ -.highlight .o { color: #56B6C2 } /* Operator */ -.highlight .x { color: #ABB2BF } /* Other */ -.highlight .p { color: #ABB2BF } /* Punctuation */ -.highlight .ch { color: #7F848E } /* Comment.Hashbang */ -.highlight .cm { color: #7F848E } /* Comment.Multiline */ -.highlight .cp { color: #7F848E } /* Comment.Preproc */ -.highlight .cpf { color: #7F848E } /* Comment.PreprocFile */ -.highlight .c1 { color: #7F848E } /* Comment.Single */ -.highlight .cs { color: #7F848E } /* Comment.Special */ -.highlight .gd { color: #ABB2BF } /* Generic.Deleted */ -.highlight .ge { color: #ABB2BF } /* Generic.Emph */ -.highlight .ges { color: #ABB2BF } /* Generic.EmphStrong */ -.highlight .gr { color: #ABB2BF } /* Generic.Error */ -.highlight .gh { color: #ABB2BF } /* Generic.Heading */ -.highlight .gi { color: #ABB2BF } /* Generic.Inserted */ -.highlight .go { color: #ABB2BF } /* Generic.Output */ -.highlight .gp { color: #ABB2BF } /* Generic.Prompt */ -.highlight .gs { color: #ABB2BF } /* Generic.Strong */ -.highlight .gu { color: #ABB2BF } /* Generic.Subheading */ -.highlight .gt { color: #ABB2BF } /* Generic.Traceback */ -.highlight .kc { color: #E5C07B } /* Keyword.Constant */ -.highlight .kd { color: #C678DD } /* Keyword.Declaration */ -.highlight .kn { color: #C678DD } /* Keyword.Namespace */ -.highlight .kp { color: #C678DD } /* Keyword.Pseudo */ -.highlight .kr { color: #C678DD } /* Keyword.Reserved */ -.highlight .kt { color: #E5C07B } /* Keyword.Type */ -.highlight .ld { color: #ABB2BF } /* Literal.Date */ -.highlight .m { color: #D19A66 } /* Literal.Number */ -.highlight .s { color: #98C379 } /* Literal.String */ -.highlight .na { color: #E06C75 } /* Name.Attribute */ -.highlight .nb { color: #E5C07B } /* Name.Builtin */ -.highlight .nc { color: #E5C07B } /* Name.Class */ -.highlight .no { color: #E06C75 } /* Name.Constant */ -.highlight .nd { color: #61AFEF } /* Name.Decorator */ -.highlight .ni { color: #E06C75 } /* Name.Entity */ -.highlight .ne { color: #E06C75 } /* Name.Exception */ -.highlight .nf { color: #61AFEF; font-weight: bold } /* Name.Function */ -.highlight .nl { color: #E06C75 } /* Name.Label */ -.highlight .nn { color: #E06C75 } /* Name.Namespace */ -.highlight .nx { color: #E06C75 } /* Name.Other */ -.highlight .py { color: #E06C75 } /* Name.Property */ -.highlight .nt { color: #E06C75 } /* Name.Tag */ -.highlight .nv { color: #E06C75 } /* Name.Variable */ -.highlight .ow { color: #56B6C2 } /* Operator.Word */ -.highlight .pm { color: #ABB2BF } /* Punctuation.Marker */ -.highlight .w { color: #ABB2BF } /* Text.Whitespace */ -.highlight .mb { color: #D19A66 } /* Literal.Number.Bin */ -.highlight .mf { color: #D19A66 } /* Literal.Number.Float */ -.highlight .mh { color: #D19A66 } /* Literal.Number.Hex */ -.highlight .mi { color: #D19A66 } /* Literal.Number.Integer */ -.highlight .mo { color: #D19A66 } /* Literal.Number.Oct */ -.highlight .sa { color: #98C379 } /* Literal.String.Affix */ -.highlight .sb { color: #98C379 } /* Literal.String.Backtick */ -.highlight .sc { color: #98C379 } /* Literal.String.Char */ -.highlight .dl { color: #98C379 } /* Literal.String.Delimiter */ -.highlight .sd { color: #98C379 } /* Literal.String.Doc */ -.highlight .s2 { color: #98C379 } /* Literal.String.Double */ -.highlight .se { color: #98C379 } /* Literal.String.Escape */ -.highlight .sh { color: #98C379 } /* Literal.String.Heredoc */ -.highlight .si { color: #98C379 } /* Literal.String.Interpol */ -.highlight .sx { color: #98C379 } /* Literal.String.Other */ -.highlight .sr { color: #98C379 } /* Literal.String.Regex */ -.highlight .s1 { color: #98C379 } /* Literal.String.Single */ -.highlight .ss { color: #98C379 } /* Literal.String.Symbol */ -.highlight .bp { color: #E5C07B } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #56B6C2; font-weight: bold } /* Name.Function.Magic */ -.highlight .vc { color: #E06C75 } /* Name.Variable.Class */ -.highlight .vg { color: #E06C75 } /* Name.Variable.Global */ -.highlight .vi { color: #E06C75 } /* Name.Variable.Instance */ -.highlight .vm { color: #E06C75 } /* Name.Variable.Magic */ -.highlight .il { color: #D19A66 } /* Literal.Number.Integer.Long */ +:root { + --background-color: #f9f5f0; + --text-color: #333333; + --heading-color: #ff6347; /* tomato */ + --subdued-heading-color: #e55a40; /* slightly muted tomato for better contrast */ + --comment-color: #767676; + --keyword-color: #d73a49; + --string-color: #22863a; + --number-color: #005cc5; + --function-color: #6f42c1; + --class-color: #e36209; + --tag-color: #22863a; + --attribute-color: #005cc5; + --error-color: #cb2431; + --highlight-bg: #fff8e6; + --line-number-color: #999999; + --line-number-bg: #f0ece6; +} + +pre { + line-height: 125%; + background-color: var(--background-color); + color: var(--text-color); + border-radius: 5px; + overflow-x: auto; + display: block; + white-space: pre; + word-wrap: normal; +} + +td.linenos .normal, +span.linenos { + color: var(--comment-color); + background-color: transparent; + padding-left: 5px; + padding-right: 5px; +} + +td.linenos .special, +span.linenos.special { + color: var(--comment-color); + background-color: #ffffd7; + padding-left: 5px; + padding-right: 5px; +} + +.highlight .hll { + background-color: var(--highlight-bg); +} + +.highlight { + background: var(--background-color); + color: var(--text-color); +} + +.highlight .c { + color: var(--comment-color); +} /* Comment */ +.highlight .err { + color: var(--error-color); +} /* Error */ +.highlight .k { + color: var(--keyword-color); +} /* Keyword */ +.highlight .s { + color: var(--string-color); +} /* Literal.String */ +.highlight .n { + color: var(--text-color); +} /* Name */ +.highlight .o { + color: var(--keyword-color); +} /* Operator */ +.highlight .p { + color: var(--text-color); +} /* Punctuation */ + +.highlight .cm, +.highlight .cp, +.highlight .c1, +.highlight .cs { + color: var(--comment-color); +} /* Comments */ + +.highlight .gd { + color: var(--error-color); + background-color: #ffeef0; +} /* Generic.Deleted */ +.highlight .gi { + color: var(--tag-color); + background-color: #f0fff4; +} /* Generic.Inserted */ + +.highlight .kc, +.highlight .kd, +.highlight .kn, +.highlight .kp, +.highlight .kr { + color: var(--keyword-color); +} /* Keyword variations */ +.highlight .kt { + color: var(--class-color); +} /* Keyword.Type */ + +.highlight .m { + color: var(--number-color); +} /* Literal.Number */ + +.highlight .na { + color: var(--attribute-color); +} /* Name.Attribute */ +.highlight .nb { + color: var(--function-color); +} /* Name.Builtin */ +.highlight .nc { + color: var(--class-color); +} /* Name.Class */ +.highlight .nf { + color: var(--function-color); +} /* Name.Function */ +.highlight .nt { + color: var(--tag-color); +} /* Name.Tag */ + +/* Add more class definitions as needed, following the pattern above */ diff --git a/mnmlist/templates/archives.html b/mnmlist/templates/archives.html index 5be1143..286af1c 100644 --- a/mnmlist/templates/archives.html +++ b/mnmlist/templates/archives.html @@ -1,19 +1,30 @@ -{% extends "base.html" %} -{% block content %} -
-

Archives

-
-
- {% for year, articles in dates | groupby("date.year") | reverse %} -

{{ year }}

- - {% endfor %} -
+{% extends "base.html" %} {% block content %} +
+
+

Archives

+
+
+
+ {% for year, y_articles in dates | groupby("date.year") | reverse %} +

{{ year }}

+ + {% endfor %} +
{% endblock %} diff --git a/mnmlist/templates/article.html b/mnmlist/templates/article.html index e9f6450..b8196de 100644 --- a/mnmlist/templates/article.html +++ b/mnmlist/templates/article.html @@ -1,58 +1,73 @@ -{% extends "base.html" %} -{% block title %}{{ article.title }} - {{ super() }}{% endblock %} -{% block content %} -
- {% if article.category == "Lectures" %} -

- {{ article.title }} -
- de {{ article.author }}
-

- - {% else %} -

{{ article.title }}

- - {% endif %} - - {% if article.headline and article.category != "weeknotes" %} -

- {{ article.headline }} -

- {% endif %} - {% if article.isbn_cover %} -
- -
- {% endif %} +{% extends "base.html" %} {% block title %}{{ article.title }} - {{ super() }}{% +endblock %} {% block content %} {% set lectures = (article.category == +"Lectures") %} +
+
+

{{ article.title }}

+
+ {% if lectures %} Lu en {{ article.date | strftime("%B %Y") }} {% else %} + {{ article.locale_date }} {% endif %} +
+
+
-
- {{ article.content }} - {% if article.tags %} -

- {% for tag in article.tags %} - #{{ tag }} - {% if not loop.last %},{% endif %} - {% endfor %} - - Posté dans la catégorie {{ article.category }} -

+
+ {% if lectures %} +

{% if article.isbn_cover %}

+ +
+ +
+ {% endif %} +

de {{ article.author }}

+ {% if article.headline %} +

{{ article.headline }}

+ {% endif %} +
+ {% endif %} {{ article.content }} +
+{% if article.contraintes or article.tags %} {% if article.contraintes %} +
+ + d'infos sur ce texte (au risque de casser la magie)… + {% endif %} +
+ {% if article.contraintes %} +

Contraintes

+ {{ article.contraintes }} {% endif %} {% if article.tags %} +

+ {% for tag in article.tags %} + #{{ tag }} + {% if not loop.last %},{% endif %} {% endfor %} - Posté dans la catégorie + {{ article.category }} +

{% endif %} -
-{% endblock %} + + {% if article.contraintes %} + +{% endif %} {% endif %} {% endblock %} diff --git a/mnmlist/templates/base.html b/mnmlist/templates/base.html index 852aa74..8140a6d 100644 --- a/mnmlist/templates/base.html +++ b/mnmlist/templates/base.html @@ -1,51 +1,56 @@ - + - - - {% block title %}{{ SITENAME }}{% endblock %} - - - - - - - - - - {% if FEED_RSS %} - - {% endif %} - {% block extra_head %}{% endblock %} - - -
- {% block content %}{% endblock %} -
- -
- + + {% block title %}{{ SITENAME }}{% endblock %} + + + + + + + + + {% if FEED_RSS %} + + {% endif %} {% block extra_head %}{% endblock %} + + +
+ {% if page_name != "index" and not article %} + Aller à l'accueil + {% endif %} {% block content %}{% endblock %} +
+ +
+ diff --git a/mnmlist/templates/category.html b/mnmlist/templates/category.html index 89d66fb..63ae5a4 100644 --- a/mnmlist/templates/category.html +++ b/mnmlist/templates/category.html @@ -1,53 +1,35 @@ -{% extends "base.html" %} -{% block content %} +{% extends "base.html" %} {% block content %} +
+
{% if category in CATEGORIES_DESCRIPTION.keys() %} -

- {{ CATEGORIES_DESCRIPTION[category][0] }} - - - -

-

{{ CATEGORIES_DESCRIPTION[category][1] }}

+

{{ CATEGORIES_DESCRIPTION[category][0] }}

+
+ + Flux RSS + +
+

{{ CATEGORIES_DESCRIPTION[category][1] }}

{% else %} -

{{ category }}

- {% endif %} -
- {% if category != "lectures" %} - {% for year, year_articles in articles | groupby('date.year') | reverse %} -

En {{ year }}

-
    - {% for article in year_articles %} -
  • - {{ article.title }} - {% for tag in article.tags %}
    {{ tag }}
    {% endfor %} -
  • - {% endfor %} -
- {% endfor %} - {% else %} - {% for article in articles %} -
- {% if article.category == "Lectures" and article.isbn_cover %} -
- -
- {% endif %} -
-

- {{ article.title }} -
- par {{ article.author }}
-

- {% if article.headline %} -

- {{ article.headline }} -

- {% endif %} - -
-
-
- {% endfor %} -
+

{{ category }}

{% endif %} +
+
+
+ {% for year, year_articles in articles | groupby('date.year') | reverse %} +

{{ year }}

+ + {% endfor %} +
{% endblock %} diff --git a/mnmlist/templates/index.html b/mnmlist/templates/index.html index 79f26a0..a44f4cf 100644 --- a/mnmlist/templates/index.html +++ b/mnmlist/templates/index.html @@ -1,34 +1,65 @@ -{% extends "base.html" %} -{% block content %} -
-

{{ SITENAME }}

-
-
-

- 👋 Bienvenue par ici, -

-

- Vous retrouverez sur ce bout de toile mes notes hebdo, un - journal de bord, des notes de lectures, des bouts - de code et des textes que je veux partager. Aussi, une petite présentation. - Bonne lecture ! -

-

- Pour me contacter, envoyez-moi un email sur alexis@ ce domaine (en enlevant blog.). -

-
- {% if articles %} -
-

Les derniers articles

- - Voir toutes les archives - {% endif %} - {% endblock content %} +{% extends "base.html" %} {% block content %} +
+
+

{{ SITENAME }}

+
Carnets web d'Alexis M
+
+
+
+

👋 Bienvenue

+

+ Si vous êtes ici, c'est sûrement que vous vous êtes perdus lors d'une + exploration, au détour d'un clic, et que vous essayez d'en savoir plus. +

+

+ Ici, je range (enfin, j'essaye) certains bouts de réflexion et des notes que + je veux garder dans un coin. Vous pouvez trouver: +

+ +

+ Aussi, une présentation, parce que bon, ça se fait + pas de pas se présenter. +

+

+ Si vous voulez me contacter, envoyez-moi un email sur + alexis@ ce domaine (en enlevant blog.). +

+
+{% if articles %} +
+

Les derniers articles

+ +Voir toutes les archives +{% endif %} {% endblock content %} diff --git a/mnmlist/templates/page.html b/mnmlist/templates/page.html index 2e41c0e..c54f087 100644 --- a/mnmlist/templates/page.html +++ b/mnmlist/templates/page.html @@ -1,3 +1,12 @@ -{% extends "base.html" %} -{% block title %}{{ page.title }} - {{ super() }}{% endblock %} -{% block content %}
{{ page.content }}
{% endblock %} +{% extends "base.html" %} {% block title %}{{ page.title }} - {{ super() }}{% +endblock %} {% block content %} +
+
+

{{ page.title }}

+ {% if page.subtitle %} +
{{ page.subtitle}}
+ {% endif %} +
+
+
{{ page.content }}
+{% endblock %} diff --git a/mnmlist/templates/tag.html b/mnmlist/templates/tag.html index 21af7c8..430a5ca 100644 --- a/mnmlist/templates/tag.html +++ b/mnmlist/templates/tag.html @@ -1,3 +1,27 @@ -{% extends "index.html" %} -{% block title %}{{ tag }} - {{ super() }}{% endblock %} -{% block pagetitle %}Tag « {{ tag }} »{% endblock %} +{% extends "base.html" %} {% block title %}Tag {{ tag.name }} - {{ super() }}{% +endblock %} {% block content %} +
+
+

{{ tag }}

+
+ + Flux RSS + +
+
+
+
+ +
+{% endblock %} diff --git a/mnmlist/templates/worklog-en.html b/mnmlist/templates/worklog-en.html index 5636b89..d9fee58 100644 --- a/mnmlist/templates/worklog-en.html +++ b/mnmlist/templates/worklog-en.html @@ -1,94 +1,80 @@ -{% extends "page.html" %} -{% block extra_head %} - - - -{% endblock extra_head %} -{% block content %} -
-

{{ page.title }}

-
- Stats - {% if "total_days" in page.metadata.keys() %} - {% set percentage = page.metadata.worklog['percentage'] %} - {% set total_blocks = 10 %} - {% set percentage_value = (percentage / 100.0) %} - {% set full_blocks = ((percentage_value * total_blocks) | round(0, 'floor') ) | int %} - {% set empty_blocks = total_blocks - full_blocks %} -
- {# Display full blocks #} - {% for i in range(full_blocks) %}▓{% endfor %} - {# Display empty blocks #} - {% for i in range(empty_blocks) %}░{% endfor %} - {{ percentage }}% ({{ page.metadata.worklog['payed_hours'] }}h / {{ page.metadata.worklog['total_hours'] }} prévues) -
-
    -
  • {{ page.metadata.worklog['payed_hours'] }}h
  • -
- {% endif %} - - - - - - - - - {% for month, hours in page.metadata.worklog.monthly_hours.items() %} - - - - - {% endfor %} - -
MonthHours
{{ month }}{{ hours['payed'] }}
-
-
-
-
- {{ page.content }} -
- + + +{% endblock extra_head %} {% block content %} - vegaEmbed("#vis", spec) - // result.view provides access to the Vega View API - .then(result => console.log(result)) - .catch(console.warn); - +
+
+

{{ page.title }}

+
Work journal
+
+ +
+ Stats + + + + + + + + + {% for month, hours in page.metadata.worklog.monthly_hours.items() %} + + + + + {% endfor %} + +
MonthHours
{{ month }}{{ hours['payed'] }}
+
+
+
+
+ {{ page.content }} +
+ {% endblock content %} diff --git a/mnmlist/templates/worklog.html b/mnmlist/templates/worklog.html index 4e1c04e..4fd97b2 100644 --- a/mnmlist/templates/worklog.html +++ b/mnmlist/templates/worklog.html @@ -1,98 +1,98 @@ -{% extends "page.html" %} -{% block extra_head %} - - - -{% endblock extra_head %} -{% block content %} -
-

{{ page.title }}

-
- Stats - {% if "total_days" in page.metadata.keys() %} - {% set percentage = page.metadata.worklog['percentage'] %} - {% set total_blocks = 10 %} - {% set percentage_value = (percentage / 100.0) %} - {% set full_blocks = ((percentage_value * total_blocks) | round(0, 'floor') ) | int %} - {% set empty_blocks = total_blocks - full_blocks %} -
- {# Display full blocks #} - {% for i in range(full_blocks) %}▓{% endfor %} - {# Display empty blocks #} - {% for i in range(empty_blocks) %}░{% endfor %} - {{ percentage }}% ({{ page.metadata.worklog['payed_hours'] }}h / {{ page.metadata.worklog['total_hours'] }} prévues) -
-
    -
  • {{ page.metadata.worklog['payed_hours'] }}h rémunérées
  • -
  • {{ page.metadata.worklog['volunteer_hours'] }}h bénévoles
  • -
- {% endif %} - - - - - - - - - - {% for month, hours in page.metadata.worklog.monthly_hours.items() %} - - - - - - {% endfor %} - -
MoisJours rémunérésJours bénévoles
{{ month }}{{ (hours['payed'] / 7.0) | round(1) }}{{ (hours['volunteered'] / 7.0) | round(1) }}
-
-
-
-
- {{ page.content }} -
- + + +{% endblock extra_head %} {% block content %} +
+
+

Journal {{ page.title }}

+
+ {% if "total_days" in page.metadata.keys() %} {% set percentage = + page.metadata.worklog['percentage'] %} {% set total_blocks = 10 %} {% set + percentage_value = (percentage / 100.0) %} {% set full_blocks = + ((percentage_value * total_blocks) | round(0, 'floor') ) | int %} {% set + empty_blocks = total_blocks - full_blocks %} +
+ {# Display full blocks #} {% for i in range(full_blocks) %}▓{% endfor %} + {# Display empty blocks #} {% for i in range(empty_blocks) %}░{% endfor + %} {{ percentage }}% +
+ {% endif %} +
+
+
+ Stats +
    +
  • {{ page.metadata.worklog['total_hours'] }}h prévues
  • +
  • {{ page.metadata.worklog['payed_hours'] }}h rémunérées
  • +
  • {{ page.metadata.worklog['volunteer_hours'] }}h bénévoles
  • +
+ + + + + + + + + + {% for month, hours in page.metadata.worklog.monthly_hours.items() %} + + + + + + {% endfor %} + +
MoisJours rémunérésJours bénévoles
{{ month }}{{ (hours['payed'] / 7.0) | round(1) }}{{ (hours['volunteered'] / 7.0) | round(1) }}
+
+
+
+
+ {{ page.content }} +
+ + vegaEmbed("#vis", spec) + // result.view provides access to the Vega View API + .then(result => console.log(result)) + .catch(console.warn); + {% endblock content %} diff --git a/pelicanconf.py b/pelicanconf.py index f064769..2ccf338 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- PATH = "content" -SITENAME = "Alexis Métaireau" +SITENAME = "(not my) ideas" AUTHOR = "" THEME = "mnmlist" STATIC_PATHS = ["images", "audio", "extra", "docs"] @@ -14,10 +14,11 @@ EXTRA_PATH_METADATA = { "extra/apple-touch-icon.png": {"path": "apple-touch-icon.png"}, "extra/favicon-16x16.png": {"path": "favicon-16x16.png"}, "extra/favicon-32x32.png": {"path": "favicon-32x32.png"}, - "extra/favicon-32x32.png": {"path": "favicon-32x32.png"}, "extra/robots.txt": {"path": "robots.txt"}, } +FORMATTED_FIELDS = "contraintes" + SITEURL = "" RELATIVE_URLS = True diff --git a/plugins/simplereader.py b/plugins/simplereader.py index 62f2ca5..8cbacba 100644 --- a/plugins/simplereader.py +++ b/plugins/simplereader.py @@ -65,8 +65,7 @@ class WorklogPreprocessor(Preprocessor): happiness, ) = match.groups() - volunteer_hours = int( - volunteer_hours) if volunteer_hours else 0 + volunteer_hours = int(volunteer_hours) if volunteer_hours else 0 payed_hours = int(payed_hours) happiness = int(happiness) date = datetime.strptime(f"{day} {month} {year}", "%d %B %Y") @@ -76,8 +75,8 @@ class WorklogPreprocessor(Preprocessor): "happiness": happiness, } current_date = date.strftime("%Y/%m") - self.monthly_hours[current_date]['payed'] += payed_hours - self.monthly_hours[current_date]['volunteered'] += volunteer_hours + self.monthly_hours[current_date]["payed"] += payed_hours + self.monthly_hours[current_date]["volunteered"] += volunteer_hours displayed_date = date.strftime("%A %d %B %Y") # Replace the line with just the date @@ -93,8 +92,7 @@ class WorklogPreprocessor(Preprocessor): This is run once, after everything has been parsed """ payed_hours = sum([item["payed_hours"] for item in self.data.values()]) - volunteer_hours = sum([item["volunteer_hours"] - for item in self.data.values()]) + volunteer_hours = sum([item["volunteer_hours"] for item in self.data.values()]) data = dict( data=self.data, @@ -122,10 +120,10 @@ class SimpleReader(MarkdownReader): def __init__(self, *args, **kwargs): super(SimpleReader, self).__init__(*args, **kwargs) - self.settings["MARKDOWN"]["extensions"].append( - "markdown.extensions.toc") + self.settings["MARKDOWN"]["extensions"].append("markdown.extensions.toc") self.settings["MARKDOWN"]["extension_configs"].update( - {'markdown.extensions.toc': {'toc_depth': 3}}) + {"markdown.extensions.toc": {"toc_depth": 3}} + ) def read(self, source_path): self._source_path = source_path @@ -168,8 +166,7 @@ class SimpleReader(MarkdownReader): if "slug" not in metadata: metadata["slug"] = slugify( - metadata["title"], self.settings.get( - "SLUG_REGEX_SUBSTITUTIONS", []) + metadata["title"], self.settings.get("SLUG_REGEX_SUBSTITUTIONS", []) ) category = os.path.basename(