added TOC and editorial content

This commit is contained in:
Nico 2022-12-26 23:15:27 +01:00
parent 346c154259
commit bf2221b9a9
25 changed files with 363 additions and 275 deletions

View File

@ -3,8 +3,8 @@ type SupportedLangCode = "en"
type LangCode = DefaultLangCode | SupportedLangCode
type RouteUri = | "/articles/[slug]" | "/articles" | "/tags/[tag]" | "/tags" | "/"
type RouteParams = {"/articles/[slug]": { "slug": string; }; "/articles": undefined; "/tags/[tag]": { "tag": string; }; "/tags": undefined; "/": undefined; }
type TranslationPath = "accueil" | "tagline" | "copyright" | "contact.title" | "contact.email" | "contact.tel" | "contenuVide" | "header.skipLink" | "header.mainNav" | "header.homeLink" | "sitemap" | "prevNext.contenus" | "prevNext.precedent" | "prevNext.suivant" | "article.titre" | "article.tagline" | "article.published" | "meta.publication" | "meta.modification" | "meta.credit" | "fragments.titre" | "fragments.tagline" | "projet.titre" | "projet.tagline" | "projet.cta" | "projet.lienTitle" | "projet.fenetre" | "erreur.introuvable" | "erreur.autre" | "erreur.lienRetour" | "seo.article.title" | "seo.article.description" | "seo.projet.title" | "seo.projet.description" | "seo.code.title" | "seo.code.description" | "index.articles.pageName" | "index.articles.subtitle" | "index.title" | "index.subtitle" | "index.quoi" | "index.comment" | "index.opensource" | "index.writing" | "index.latestProjects" | "index.latestArticles" | "contact.contenuVide"
type TranslationOptions = { "accueil": {} | undefined; "tagline": {} | undefined; "copyright": {} | undefined; "contact.title": {} | undefined; "contact.email": {} | undefined; "contact.tel": {} | undefined; "contenuVide": {} | undefined; "header.skipLink": {} | undefined; "header.mainNav": {} | undefined; "header.homeLink": {} | undefined; "sitemap": {} | undefined; "prevNext.contenus": {} | undefined; "prevNext.precedent": {} | undefined; "prevNext.suivant": {} | undefined; "article.titre": {} | undefined; "article.tagline": {} | undefined; "article.published": { datetime: unknown; options: unknown; }; "meta.publication": {} | undefined; "meta.modification": {} | undefined; "meta.credit": {} | undefined; "fragments.titre": {} | undefined; "fragments.tagline": {} | undefined; "projet.titre": {} | undefined; "projet.tagline": {} | undefined; "projet.cta": {} | undefined; "projet.lienTitle": {} | undefined; "projet.fenetre": {} | undefined; "erreur.introuvable": {} | undefined; "erreur.autre": {} | undefined; "erreur.lienRetour": {} | undefined; "seo.article.title": {} | undefined; "seo.article.description": {} | undefined; "seo.projet.title": {} | undefined; "seo.projet.description": {} | undefined; "seo.code.title": {} | undefined; "seo.code.description": {} | undefined; "index.articles.pageName": {} | undefined; "index.articles.subtitle": {} | undefined; "index.title": {} | undefined; "index.subtitle": {} | undefined; "index.quoi": {} | undefined; "index.comment": {} | undefined; "index.opensource": {} | undefined; "index.writing": {} | undefined; "index.latestProjects": {} | undefined; "index.latestArticles": {} | undefined; "contact.contenuVide": {} | undefined; }
type TranslationPath = "accueil" | "tagline" | "copyright" | "contact.title" | "contact.email" | "contact.tel" | "contenuVide" | "header.skipLink" | "header.mainNav" | "header.homeLink" | "sitemap" | "prevNext.contenus" | "prevNext.precedent" | "prevNext.suivant" | "article.titre" | "article.tagline" | "article.published" | "meta.publication" | "meta.modification" | "meta.credit" | "fragments.titre" | "fragments.tagline" | "projet.titre" | "projet.tagline" | "projet.cta" | "projet.lienTitle" | "projet.fenetre" | "erreur.introuvable" | "erreur.autre" | "erreur.lienRetour" | "seo.article.title" | "seo.article.description" | "seo.projet.title" | "seo.projet.description" | "seo.code.title" | "seo.code.description" | "index.articles.pageName" | "index.articles.subtitle" | "index.title" | "index.subtitle" | "index.quoi" | "index.comment" | "index.opensource" | "index.writing" | "index.latestProjects" | "index.latestArticles" | "index.scihub" | "contact.contenuVide"
type TranslationOptions = { "accueil": {} | undefined; "tagline": {} | undefined; "copyright": {} | undefined; "contact.title": {} | undefined; "contact.email": {} | undefined; "contact.tel": {} | undefined; "contenuVide": {} | undefined; "header.skipLink": {} | undefined; "header.mainNav": {} | undefined; "header.homeLink": {} | undefined; "sitemap": {} | undefined; "prevNext.contenus": {} | undefined; "prevNext.precedent": {} | undefined; "prevNext.suivant": {} | undefined; "article.titre": {} | undefined; "article.tagline": {} | undefined; "article.published": { datetime: unknown; options: unknown; }; "meta.publication": {} | undefined; "meta.modification": {} | undefined; "meta.credit": {} | undefined; "fragments.titre": {} | undefined; "fragments.tagline": {} | undefined; "projet.titre": {} | undefined; "projet.tagline": {} | undefined; "projet.cta": {} | undefined; "projet.lienTitle": {} | undefined; "projet.fenetre": {} | undefined; "erreur.introuvable": {} | undefined; "erreur.autre": {} | undefined; "erreur.lienRetour": {} | undefined; "seo.article.title": {} | undefined; "seo.article.description": {} | undefined; "seo.projet.title": {} | undefined; "seo.projet.description": {} | undefined; "seo.code.title": {} | undefined; "seo.code.description": {} | undefined; "index.articles.pageName": {} | undefined; "index.articles.subtitle": {} | undefined; "index.title": {} | undefined; "index.subtitle": {} | undefined; "index.quoi": {} | undefined; "index.comment": {} | undefined; "index.opensource": {} | undefined; "index.writing": {} | undefined; "index.latestProjects": {} | undefined; "index.latestArticles": {} | undefined; "index.scihub": {} | undefined; "contact.contenuVide": {} | undefined; }
declare module "astro-i18n" {
export * from "astro-i18n/"

View File

@ -8,5 +8,9 @@ export default defineAstroI18nConfig({
fr: "src/i18n/fr.json",
en: "src/i18n/en.json",
},
routeTranslations: {},
routeTranslations: {
en: {
"sci-hub-blocage": "sci-hub-unblock",
},
},
});

View File

@ -4,7 +4,7 @@
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"dev": "astro-i18n sync && astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
@ -16,7 +16,7 @@
"@astrojs/image": "^0.12.1",
"@astrojs/mdx": "^0.13.0",
"astro": "1.7.2",
"astro-i18n": "^1.4.1"
"astro-i18n": "^1.4.5"
},
"devDependencies": {
"autoprefixer": "^10.4.13",

View File

@ -4,7 +4,7 @@ specifiers:
'@astrojs/image': ^0.12.1
'@astrojs/mdx': ^0.13.0
astro: 1.7.2
astro-i18n: ^1.4.1
astro-i18n: ^1.4.5
autoprefixer: ^10.4.13
postcss: ^8.4.20
@ -12,7 +12,7 @@ dependencies:
'@astrojs/image': 0.12.1
'@astrojs/mdx': 0.13.0
astro: 1.7.2
astro-i18n: 1.4.1
astro-i18n: 1.4.5
devDependencies:
autoprefixer: 10.4.13_postcss@8.4.20
@ -183,25 +183,25 @@ packages:
'@babel/highlight': 7.18.6
dev: false
/@babel/compat-data/7.20.5:
resolution: {integrity: sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==}
/@babel/compat-data/7.20.10:
resolution: {integrity: sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==}
engines: {node: '>=6.9.0'}
dev: false
/@babel/core/7.20.5:
resolution: {integrity: sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==}
/@babel/core/7.20.7:
resolution: {integrity: sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw==}
engines: {node: '>=6.9.0'}
dependencies:
'@ampproject/remapping': 2.2.0
'@babel/code-frame': 7.18.6
'@babel/generator': 7.20.5
'@babel/helper-compilation-targets': 7.20.0_@babel+core@7.20.5
'@babel/helper-module-transforms': 7.20.2
'@babel/helpers': 7.20.6
'@babel/parser': 7.20.5
'@babel/template': 7.18.10
'@babel/traverse': 7.20.5
'@babel/types': 7.20.5
'@babel/generator': 7.20.7
'@babel/helper-compilation-targets': 7.20.7_@babel+core@7.20.7
'@babel/helper-module-transforms': 7.20.11
'@babel/helpers': 7.20.7
'@babel/parser': 7.20.7
'@babel/template': 7.20.7
'@babel/traverse': 7.20.10
'@babel/types': 7.20.7
convert-source-map: 1.9.0
debug: 4.3.4
gensync: 1.0.0-beta.2
@ -211,11 +211,11 @@ packages:
- supports-color
dev: false
/@babel/generator/7.20.5:
resolution: {integrity: sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==}
/@babel/generator/7.20.7:
resolution: {integrity: sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.20.5
'@babel/types': 7.20.7
'@jridgewell/gen-mapping': 0.3.2
jsesc: 2.5.2
dev: false
@ -224,19 +224,20 @@ packages:
resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.20.5
'@babel/types': 7.20.7
dev: false
/@babel/helper-compilation-targets/7.20.0_@babel+core@7.20.5:
resolution: {integrity: sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==}
/@babel/helper-compilation-targets/7.20.7_@babel+core@7.20.7:
resolution: {integrity: sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/compat-data': 7.20.5
'@babel/core': 7.20.5
'@babel/compat-data': 7.20.10
'@babel/core': 7.20.7
'@babel/helper-validator-option': 7.18.6
browserslist: 4.21.4
lru-cache: 5.1.1
semver: 6.3.0
dev: false
@ -249,26 +250,26 @@ packages:
resolution: {integrity: sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/template': 7.18.10
'@babel/types': 7.20.5
'@babel/template': 7.20.7
'@babel/types': 7.20.7
dev: false
/@babel/helper-hoist-variables/7.18.6:
resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.20.5
'@babel/types': 7.20.7
dev: false
/@babel/helper-module-imports/7.18.6:
resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.20.5
'@babel/types': 7.20.7
dev: false
/@babel/helper-module-transforms/7.20.2:
resolution: {integrity: sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==}
/@babel/helper-module-transforms/7.20.11:
resolution: {integrity: sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/helper-environment-visitor': 7.18.9
@ -276,9 +277,9 @@ packages:
'@babel/helper-simple-access': 7.20.2
'@babel/helper-split-export-declaration': 7.18.6
'@babel/helper-validator-identifier': 7.19.1
'@babel/template': 7.18.10
'@babel/traverse': 7.20.5
'@babel/types': 7.20.5
'@babel/template': 7.20.7
'@babel/traverse': 7.20.10
'@babel/types': 7.20.7
transitivePeerDependencies:
- supports-color
dev: false
@ -292,14 +293,14 @@ packages:
resolution: {integrity: sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.20.5
'@babel/types': 7.20.7
dev: false
/@babel/helper-split-export-declaration/7.18.6:
resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.20.5
'@babel/types': 7.20.7
dev: false
/@babel/helper-string-parser/7.19.4:
@ -317,13 +318,13 @@ packages:
engines: {node: '>=6.9.0'}
dev: false
/@babel/helpers/7.20.6:
resolution: {integrity: sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==}
/@babel/helpers/7.20.7:
resolution: {integrity: sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/template': 7.18.10
'@babel/traverse': 7.20.5
'@babel/types': 7.20.5
'@babel/template': 7.20.7
'@babel/traverse': 7.20.10
'@babel/types': 7.20.7
transitivePeerDependencies:
- supports-color
dev: false
@ -337,67 +338,67 @@ packages:
js-tokens: 4.0.0
dev: false
/@babel/parser/7.20.5:
resolution: {integrity: sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==}
/@babel/parser/7.20.7:
resolution: {integrity: sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==}
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
'@babel/types': 7.20.5
'@babel/types': 7.20.7
dev: false
/@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.20.5:
/@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.20.7:
resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.5
'@babel/core': 7.20.7
'@babel/helper-plugin-utils': 7.20.2
dev: false
/@babel/plugin-transform-react-jsx/7.19.0_@babel+core@7.20.5:
resolution: {integrity: sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg==}
/@babel/plugin-transform-react-jsx/7.20.7_@babel+core@7.20.7:
resolution: {integrity: sha512-Tfq7qqD+tRj3EoDhY00nn2uP2hsRxgYGi5mLQ5TimKav0a9Lrpd4deE+fcLXU8zFYRjlKPHZhpCvfEA6qnBxqQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.5
'@babel/core': 7.20.7
'@babel/helper-annotate-as-pure': 7.18.6
'@babel/helper-module-imports': 7.18.6
'@babel/helper-plugin-utils': 7.20.2
'@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.20.5
'@babel/types': 7.20.5
'@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.20.7
'@babel/types': 7.20.7
dev: false
/@babel/template/7.18.10:
resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==}
/@babel/template/7.20.7:
resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/code-frame': 7.18.6
'@babel/parser': 7.20.5
'@babel/types': 7.20.5
'@babel/parser': 7.20.7
'@babel/types': 7.20.7
dev: false
/@babel/traverse/7.20.5:
resolution: {integrity: sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==}
/@babel/traverse/7.20.10:
resolution: {integrity: sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/code-frame': 7.18.6
'@babel/generator': 7.20.5
'@babel/generator': 7.20.7
'@babel/helper-environment-visitor': 7.18.9
'@babel/helper-function-name': 7.19.0
'@babel/helper-hoist-variables': 7.18.6
'@babel/helper-split-export-declaration': 7.18.6
'@babel/parser': 7.20.5
'@babel/types': 7.20.5
'@babel/parser': 7.20.7
'@babel/types': 7.20.7
debug: 4.3.4
globals: 11.12.0
transitivePeerDependencies:
- supports-color
dev: false
/@babel/types/7.20.5:
resolution: {integrity: sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==}
/@babel/types/7.20.7:
resolution: {integrity: sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/helper-string-parser': 7.19.4
@ -594,8 +595,8 @@ packages:
/@types/babel__core/7.1.20:
resolution: {integrity: sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ==}
dependencies:
'@babel/parser': 7.20.5
'@babel/types': 7.20.5
'@babel/parser': 7.20.7
'@babel/types': 7.20.7
'@types/babel__generator': 7.6.4
'@types/babel__template': 7.4.1
'@types/babel__traverse': 7.18.3
@ -604,20 +605,20 @@ packages:
/@types/babel__generator/7.6.4:
resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==}
dependencies:
'@babel/types': 7.20.5
'@babel/types': 7.20.7
dev: false
/@types/babel__template/7.4.1:
resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==}
dependencies:
'@babel/parser': 7.20.5
'@babel/types': 7.20.5
'@babel/parser': 7.20.7
'@babel/types': 7.20.7
dev: false
/@types/babel__traverse/7.18.3:
resolution: {integrity: sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==}
dependencies:
'@babel/types': 7.20.5
'@babel/types': 7.20.7
dev: false
/@types/debug/4.1.7:
@ -778,8 +779,8 @@ packages:
hasBin: true
dev: false
/astro-i18n/1.4.1:
resolution: {integrity: sha512-l3/WqTnFW92sdEMzb6Om4cr/qkwn1fkbL50x/Iy6shzYTxoKzUCggUJRNgs4Z3vCpLzUT4RCmymrVrfuRwmSZg==}
/astro-i18n/1.4.5:
resolution: {integrity: sha512-f/u4OGFog2utuuWrPkfsTxWQuqjRRLnQuRa07+94R5W3uik/LF5U2TcYwDclbyaztL1rRPnfQ9XsFjQjoa7ZlQ==}
hasBin: true
dependencies:
get-file-exports: 1.2.1
@ -795,12 +796,12 @@ packages:
'@astrojs/markdown-remark': 1.1.3
'@astrojs/telemetry': 1.0.1
'@astrojs/webapi': 1.1.1
'@babel/core': 7.20.5
'@babel/generator': 7.20.5
'@babel/parser': 7.20.5
'@babel/plugin-transform-react-jsx': 7.19.0_@babel+core@7.20.5
'@babel/traverse': 7.20.5
'@babel/types': 7.20.5
'@babel/core': 7.20.7
'@babel/generator': 7.20.7
'@babel/parser': 7.20.7
'@babel/plugin-transform-react-jsx': 7.20.7_@babel+core@7.20.7
'@babel/traverse': 7.20.10
'@babel/types': 7.20.7
'@proload/core': 0.3.3
'@proload/plugin-tsm': 0.2.1_@proload+core@0.3.3
'@types/babel__core': 7.1.20
@ -2044,6 +2045,12 @@ packages:
resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==}
dev: false
/lru-cache/5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
dependencies:
yallist: 3.1.1
dev: false
/lru-cache/6.0.0:
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
engines: {node: '>=10'}
@ -3743,6 +3750,10 @@ packages:
strip-ansi: 7.0.1
dev: false
/yallist/3.1.1:
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
dev: false
/yallist/4.0.0:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
dev: false

View File

@ -1,15 +1,19 @@
---
import { l } from "astro-i18n";
const { item, routeName } = Astro.props;
---
<div class="card">
<div>
<h3>
<a class="card__link" href={`${routeName}/${item.frontmatter.slug}`}
>{item.frontmatter.title}</a
<a class="card__link" href={`${routeName}/${item.slug}`}
>{item.data.title}</a
>
</h3>
<h4>{item.frontmatter.subtitle}</h4>
<pre>
{item.slug}
</pre>
<!-- <h4>{item.data.subtitle}</h4> -->
<!-- <tags-list list={item.tags}></tags-list> -->
</div>
</div>

View File

@ -0,0 +1,32 @@
---
import TOC from "./TOC.astro";
const { content } = Astro.props;
const { Content, headings } = await content.render();
const toc = headings.map((heading) => {
return heading;
});
---
<div class="sidebar region">
<TOC toc={toc} />
<article class="flow editorial">
<h1>{content.data.title}</h1>
<p class="h2">{content.data.subtitle}</p>
<div class="flow content">
<Content />
</div>
</article>
</div>
<style>
h1 {
font-size: var(--size-4);
}
.editorial :global(h2),
.editorial :global(.h2) {
font-size: var(--size-3);
color: var(--color-blue);
}
</style>

View File

@ -7,7 +7,9 @@ import Navigation from "../components/Navigation.astro";
<header role="banner">
<a href="#skip-content" class="skip-link"> {t("header.skipLink")}</a>
<div class="container">
<a href={l("/")} class="logo" aria-label={t("header.homeLink")}>nardu.in</a>
<a href={l("/")} class="logo clean-link" aria-label={t("header.homeLink")}
>nardu.in</a
>
<Navigation />
</div>
</header>
@ -31,11 +33,6 @@ import Navigation from "../components/Navigation.astro";
justify-content: space-between;
}
}
:global(a) {
color: var(--color-dark);
font-weight: normal;
text-decoration: none;
}
.skip-link {
position: absolute;
top: 20px;

View File

@ -14,7 +14,12 @@ const currentRoute = Astro.url.pathname;
// create a list of available alternative locale
availableLocales.map((locale) => (
<li>
<a href={l(currentRoute as any, {}, locale as any)}>{locale}</a>
<a
href={l(currentRoute as any, {}, locale as any)}
class="clean-link nice-link"
>
{locale}
</a>
</li>
))
}

View File

@ -6,25 +6,25 @@ import LanguageSwitcher from "./LangSwitcher.astro";
<nav role="navigation" aria-label={t("header.mainNav")}>
<ul class="main-nav" role="list">
<li>
<a href={l("/articles")}>{t("article.titre")}</a>
<a href={l("/articles")} class="clean-link nice-link"
>{t("article.titre")}</a
>
<span aria-hidden="true">&middot;</span>
</li>
<li>
<a href={l("/")}>{t("projet.titre")}</a>
<a href={l("/")} class="clean-link nice-link">{t("projet.titre")}</a>
<span aria-hidden="true">&middot;</span>
</li>
<li>
<a href={}>{t("fragments.titre")}</a>
<a href={l("/")} class="clean-link nice-link">{t("fragments.titre")}</a>
<span aria-hidden="true">&middot;</span>
</li>
<li>
<a
href="mailto:contact@nardu.in"
class="nice-link"
title={t("contact.email")}
>{t("contact.title")}
</a>
<span aria-hidden="true">&#x7C;</span>
class="clean-link nice-link"
title={t("contact.email")}>{t("contact.title")}</a
><span aria-hidden="true">&nbsp;&#x7C;</span>
</li>
<li>
<LanguageSwitcher />
@ -39,7 +39,4 @@ import LanguageSwitcher from "./LangSwitcher.astro";
gap: var(--space-2xs);
justify-content: center;
}
a {
text-decoration: none;
}
</style>

86
src/components/TOC.astro Normal file
View File

@ -0,0 +1,86 @@
---
import { t } from "astro-i18n";
const { toc } = Astro.props;
---
<aside class="table-of-content">
<details open="true">
<summary>{t("toc")}</summary>
<nav role="navigation" aria-label={t("toc")}>
<ul class="table-of-content__list" role="list">
{
// loop over the toc
toc.map((heading) =>
// if h2, set as a li
heading.depth === 2 ? (
<li>
<a href={`#${heading.slug}`} class="toc-2">
{heading.text}
</a>
</li>
) : // if h3, set as inner ul > li
heading.depth === 3 ? (
<ul role="list">
<li>
<a href={`#${heading.slug}`} class="toc-3">
{heading.text}
</a>
</li>
</ul>
) : null
)
}
</ul>
</nav>
</details>
</aside>
<style>
/* Table of content */
.table-of-content {
margin: 0;
padding: 0;
position: relative;
display: block;
font-size: var(--size--1);
}
.table-of-content details {
position: sticky;
top: var(--space-m);
}
.table-of-content__list {
padding-bottom: 2rem;
}
.table-of-content__list a {
position: relative;
display: inline-block;
font-weight: normal;
color: var(--color-grey);
text-decoration: none;
}
.table-of-content__list a::before {
content: "·";
position: absolute;
top: 0;
left: 0;
transform: translate(-1rem, 0);
color: var(--color-grey);
}
.table-of-content__list a:visited::before {
color: white;
}
.table-of-content__list a:focus,
.table-of-content__list a:hover {
color: var(--color-violet);
text-decoration: underline;
}
.toc-2 {
margin: 0.8rem 0 0.3rem;
}
.toc-3 {
margin-left: 1rem;
margin-top: 0.4rem;
}
</style>

View File

@ -1,30 +0,0 @@
---
title: "My First Blog Post"
slug: "article-1"
lang: en
pubDate: 2022-07-01
description: "This is the first post of my new Astro blog."
author: "Astro Learner"
tags: ["astro", "blogging", "learning in public"]
---
export const image = {
url: "/oui.jpg",
alt: "oui oui oui",
width: "394",
height: "512",
};
Welcome to my _new blog_ about learning Astro! Here, I will share my learning journey as I build a new website.
## What I've accomplished
1. **Installing Astro**: First, I created a new Astro project and set up my online accounts.
2. **Making Pages**: I then learned how to make pages by creating new `.astro` files and placing them in the `src/pages/` folder.
3. **Making Blog Posts**: This is my first blog post! I now have Astro pages and Markdown posts!
## What's next
I will finish the Astro tutorial, and then keep adding more posts. Watch this space for more to come.

View File

@ -2,6 +2,8 @@
title: "Access blocked Sci-hub"
subtitle: "The science of sharing."
lang: en
slug: "sci-hub-unblock"
key: "scihub"
excerpt: "In March 2019, the Paris Regional Court ruled in favour of the publishers of scientific articles Elsevier and Springer Nature by ordering internet service providers to block access to these two websites. Here is how to access them if they are blocked in your country anyway."
tags: ["Internet", "Science"]
pubDate: "2019-10-18T07:47:36.000Z"

View File

@ -1,30 +0,0 @@
---
title: "Sci-Hub EN"
slug: "sci-hub"
lang: en
pubDate: 2022-10-11
description: "This is the first post of my new Astro blog."
author: "Astro Learner"
tags: ["astro", "blogging", "learning in public"]
---
export const image = {
url: "/oui.jpg",
alt: "oui oui oui",
width: "394",
height: "512",
};
Welcome to my _new blog_ about learning Astro! Here, I will share my learning journey as I build a new website.
## What I've accomplished
1. **Installing Astro**: First, I created a new Astro project and set up my online accounts.
2. **Making Pages**: I then learned how to make pages by creating new `.astro` files and placing them in the `src/pages/` folder.
3. **Making Blog Posts**: This is my first blog post! I now have Astro pages and Markdown posts!
## What's next
I will finish the Astro tutorial, and then keep adding more posts. Watch this space for more to come.

View File

@ -1,18 +0,0 @@
---
title: "Mon premier article"
slug: "article-1"
lang: fr
pubDate: 2022-07-01
description: "youpi"
author: "Astro Learner"
tags: ["astro", "blogging", "learning in public"]
---
export const image = {
url: "/oui.jpg",
alt: "oui oui oui",
width: "394",
height: "512",
};
Bienvenue les men in black

View File

@ -2,6 +2,8 @@
title: "Sci-hub bloqué, comment contourner"
subtitle: "La science du partage."
lang: fr
slug: "sci-hub-blocage"
key: "scihub"
excerpt: "Le tribunal de grande instance de Paris a ordonné aux fournisseurs daccès à internet de bloquer laccès à sci-hub. Voici comment contourner les blocages mis en place."
tags: ["Internet", "Science"]
pubDate: "2019-03-31T07:47:36.000Z"

View File

@ -1,30 +0,0 @@
---
title: "Sci-Hub FR"
slug: "sci-hub"
lang: fr
pubDate: 2022-10-11
description: "This is the first post of my new Astro blog."
author: "Astro Learner"
tags: ["astro", "blogging", "learning in public"]
---
export const image = {
url: "/oui.jpg",
alt: "oui oui oui",
width: "394",
height: "512",
};
Welcome to my _new blog_ about learning Astro! Here, I will share my learning journey as I build a new website.
## What I've accomplished
1. **Installing Astro**: First, I created a new Astro project and set up my online accounts.
2. **Making Pages**: I then learned how to make pages by creating new `.astro` files and placing them in the `src/pages/` folder.
3. **Making Blog Posts**: This is my first blog post! I now have Astro pages and Markdown posts!
## What's next
I will finish the Astro tutorial, and then keep adding more posts. Watch this space for more to come.

View File

@ -1,16 +1,11 @@
import { z, defineCollection } from "astro:content";
const articles = defineCollection({
slug: ({ defaultSlug, data }) => {
// Use `permalink` from the entrys frontmatter as the slug, if it exists.
// Otherwise, fall back to the default slug.
return data.slug || defaultSlug;
},
schema: {
title: z.string(),
subtitle: z.string(),
lang: z.enum(["fr", "en"]),
slug: z.string().optional(),
slug: z.string(),
tags: z.array(z.string()), // An array of strings
// Parse pubDate as a browser-standard `Date` object
pubDate: z

View File

@ -43,51 +43,23 @@ declare module 'astro:content' {
const entryMap: {
"articles": {
"en/post-0.mdx": {
id: "en/post-0.mdx",
slug: "en/post-0",
body: string,
collection: "articles",
data: any
},
"en/sci-hub-blocage.md": {
id: "en/sci-hub-blocage.md",
slug: "en/sci-hub-blocage",
body: string,
collection: "articles",
data: any
},
"en/sci-hub.mdx": {
id: "en/sci-hub.mdx",
slug: "en/sci-hub",
body: string,
collection: "articles",
data: any
},
"fr/post-0.mdx": {
id: "fr/post-0.mdx",
slug: "fr/post-0",
body: string,
collection: "articles",
data: any
data: InferEntrySchema<"articles">
},
"fr/sci-hub-blocage.md": {
id: "fr/sci-hub-blocage.md",
slug: "fr/sci-hub-blocage",
body: string,
collection: "articles",
data: any
},
"fr/sci-hub.mdx": {
id: "fr/sci-hub.mdx",
slug: "fr/sci-hub",
body: string,
collection: "articles",
data: any
data: InferEntrySchema<"articles">
},
},
};
type ContentConfig = never;
type ContentConfig = typeof import("./config");
}

View File

@ -6,7 +6,7 @@ import "../styles/style.css";
import Header from "../components/Header.astro";
const { pageTitle, titleColor, lang } = Astro.props;
const { pageTitle, titleColor } = Astro.props;
---
<html lang={astroI18n.langCode} dir="ltr">

View File

@ -1,26 +1,29 @@
---
import { astroI18n } from "astro-i18n";
import { l, t, astroI18n } from "astro-i18n";
import { log } from "astro/dist/core/logger/core";
import { literal } from "astro/zod";
astroI18n.init(Astro);
import { getCollection } from "astro:content";
import EditorialContent from "../../components/EditorialContent.astro";
import TOC from "../../components/TOC.astro";
import BaseLayout from "../../layouts/BaseLayout.astro";
export async function getStaticPaths({}) {
const allPosts = await Astro.glob("../../data/articles/**/*.mdx");
const localizedPost = allPosts.filter((post) => {
return post.frontmatter.lang === astroI18n.langCode;
});
return localizedPost.map((post) => {
return {
params: { slug: post.frontmatter.slug },
props: { post },
};
export async function getStaticPaths() {
const articles = await getCollection("articles", ({ data }) => {
return data.lang === astroI18n.langCode;
});
return articles.map((article) => ({
// temp 'split' workaround for i18n
params: { slug: article.data.slug },
props: { article },
}));
}
const { slug } = Astro.params;
const { post } = Astro.props;
const { article } = Astro.props;
---
<BaseLayout>
{post.frontmatter.title}
<BaseLayout pageTitle={article.data.title}>
<EditorialContent content={article} />
</BaseLayout>

View File

@ -1,14 +1,15 @@
---
import { l, t, astroI18n } from "astro-i18n";
astroI18n.init(Astro);
import "../../styles/style.css";
// New astro content collections
import { getCollection } from "astro:content";
import BaseLayout from "../../layouts/BaseLayout.astro";
import ContentPost from "../../components/ContentPost.astro";
const allPosts = await Astro.glob(`../../data/articles/**/*.mdx`);
const localizedPost = allPosts.filter((post) => {
return post.frontmatter.lang === astroI18n.langCode;
const localizedPost = await getCollection("articles", ({ data }) => {
return data.lang === astroI18n.langCode;
});
const pageTitle = t("index.articles.pageName");
@ -21,8 +22,8 @@ const pageTitle = t("index.articles.pageName");
{
localizedPost.map((post) => (
<li>
<a href={l(`/articles/${post.frontmatter.slug}`)}>
{post.frontmatter.title}
<a href={l("/articles/[slug]", { slug: post.data.slug })}>
{post.data.title}
</a>
</li>
))

View File

@ -6,5 +6,6 @@
"opensource": "I try to contribute to <a class='u-nice-links' href='https://git.nardu.in/explore/repos' title='Open source projects I worked on (new window)' target='_blank' rel='noreferer noopener'>open source projects</a> that I enjoy.",
"writing": "Oh and I write <a class='u-nice-links' href='/en/articles/'>articles!</a> Articles about design and the web in general.",
"latestProjects": "Latest projects",
"latestArticles": "Latest articles"
"latestArticles": "Latest articles",
"scihub": "schi-hub-unlock"
}

View File

@ -6,5 +6,6 @@
"opensource": "Jessaie de contribuer à des <a href='https://git.nardu.in/explore/repos' title='Projets sur lesquels jai travaillé (nouvelle fenêtre)' target='_blank' rel='noreferer noopener'>projets open source</a> qui me tiennent à cœur.",
"writing": "Ah et jécris <a href='/articles/'>des articles</a> aussi&nbsp;! Des articles sur le graphisme et linformatique.",
"latestProjects": "Derniers projets",
"latestArticles": "Derniers articles"
"latestArticles": "Derniers articles",
"scihub": "schi-hub-deblocage"
}

View File

@ -23,10 +23,10 @@ body {
main {
min-block-size: 100vh;
}
:where(h1, h2, h3) {
:where(h1, h2, h3, .h2, .h3) {
font-family: var(--font-secondary);
}
h1 {
:where(h1) {
max-width: 20ch;
font-size: var(--size-6);
font-weight: bold;
@ -63,13 +63,14 @@ h5,
a {
font-weight: 500;
color: var(--color-blue);
text-decoration: none;
text-decoration: underline;
}
a:visited {
color: currentColor;
}
a:hover {
text-decoration: underline;
a:hover,
a:focus {
text-decoration: none;
}
hr {
@ -154,3 +155,67 @@ button[disabled] {
.highlight {
color: var(--color-blue);
}
/* clean style link */
.clean-link {
text-decoration: none;
font-weight: normal;
color: currentColor;
}
.clean-link:hover {
text-decoration: none;
}
/* nice hover link */
.nice-link {
position: relative;
display: inline-block;
text-align: center;
text-decoration: none;
}
.nice-link:hover {
text-decoration: none;
}
.nice-link::after {
content: "";
position: absolute;
left: 0;
bottom: -2px;
width: 100%;
height: 2px;
text-decoration: none;
transform: scaleX(0);
opacity: 1;
transform-origin: 100% 50%;
background-color: var(--color-brique);
}
.nice-link:hover::after {
transform: scaleX(1);
transform-origin: 0% 50%;
}
@media (prefers-reduced-motion: no-preference) {
.nice-link::after {
transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}
}
/* blockquote */
blockquote {
margin: var(--space-s) 0;
padding: var(--space-s);
font-weight: normal;
line-height: 1.4;
border-left: 3px solid var(--color-blue);
border-radius: 3px;
background-color: var(--color-soft-blue);
}
blockquote cite {
font-weight: normal;
font-style: normal;
font-size: var(--size-0);
line-height: 1.2;
}
blockquote code {
font-weight: bold;
}

18
src/styles/style.css Normal file
View File

@ -0,0 +1,18 @@
/* @import "open-props/style"; */
/* @import "open-props/normalize"; */
@import "./global/reset.css";
@import "./global/fonts.css";
@import "./global/variables.css";
@import "./global/global-styles.css";
@import "./compositions/grid.css";
@import "./compositions/sidebar.css";
@import "./utilities/flow.css";
@import "./utilities/region.css";
@import "./utilities/wrapper.css";
/* @import-glob './blocks/*.css'; */
/* @import-glob './compositions/*.css'; */
/* @import-glob './utilities/*.css'; */