feat: applied mega-linter locally

This commit is contained in:
Laureηt 2021-10-18 22:58:07 +02:00
parent 317d564318
commit 0cafbb84bc
No known key found for this signature in database
GPG key ID: D88C6B294FD40994
12 changed files with 56 additions and 60 deletions

View file

@ -1,55 +1,53 @@
const pluginNavigation = require("@11ty/eleventy-navigation") const pluginNavigation = require('@11ty/eleventy-navigation')
const htmlmin = require("html-minifier"); const htmlmin = require('html-minifier')
const markdownIt = require("markdown-it"); const markdownIt = require('markdown-it')
const markdownItAttrs = require('markdown-it-attrs'); const markdownItAttrs = require('markdown-it-attrs')
const options = { const options = {
html: true, html: true,
breaks: true, breaks: true,
linkify: true linkify: true
}; }
const markdownLib = markdownIt(options).use(markdownItAttrs); const markdownLib = markdownIt(options).use(markdownItAttrs)
module.exports = function (eleventyConfig) { module.exports = function (eleventyConfig) {
eleventyConfig.addGlobalData('username', 'Laureηt')
eleventyConfig.addGlobalData("username", "Laureηt"); eleventyConfig.addPlugin(pluginNavigation)
eleventyConfig.addPlugin(pluginNavigation); eleventyConfig.setLibrary('md', markdownLib)
eleventyConfig.setLibrary("md", markdownLib); eleventyConfig.addWatchTarget('./src/scss/')
eleventyConfig.addWatchTarget("./src/scss/");
eleventyConfig.addPassthroughCopy({ eleventyConfig.addPassthroughCopy({
"assets/": "./", 'assets/': './'
}); })
if (process.env.ELEVENTY_ENV == 'prod') { if (process.env.ELEVENTY_ENV === 'prod') {
eleventyConfig.addTransform("htmlmin", function (content, outputPath) { eleventyConfig.addTransform('htmlmin', function (content, outputPath) {
// Eleventy 1.0+: use this.inputPath and this.outputPath instead // Eleventy 1.0+: use this.inputPath and this.outputPath instead
if (outputPath && outputPath.endsWith(".html")) { if (outputPath && outputPath.endsWith('.html')) {
let minified = htmlmin.minify(content, { const minified = htmlmin.minify(content, {
useShortDoctype: true, useShortDoctype: true,
removeComments: true, removeComments: true,
collapseWhitespace: true, collapseWhitespace: true,
minifyJS: true, minifyJS: true,
minifyCSS: true, minifyCSS: true
}); })
return minified; return minified
} else { } else {
return content; return content
} }
}); })
} }
eleventyConfig.addShortcode("year", () => { eleventyConfig.addShortcode('year', () => {
let year = new Date().getFullYear(); const year = new Date().getFullYear()
return year.toString(); return year.toString()
}); })
return { return {
passthroughFileCopy: true, passthroughFileCopy: true,
dir: { dir: {
input: "src", input: 'src',
data: "_data", data: '_data',
output: "_site", output: '_site',
includes: "_includes", includes: '_includes'
}, }
} }
} }

1
.gitignore vendored
View file

@ -2,6 +2,7 @@ node_modules/
_site/ _site/
content/ content/
report/
src/_includes/css src/_includes/css
*.log *.log

2
.vscode/launch.json vendored
View file

@ -10,7 +10,7 @@
"runtimeArgs": [ "runtimeArgs": [
"run", "run",
"start" "start"
], ]
} }
] ]
} }

View file

@ -1,9 +1,9 @@
{ {
"editor.formatOnSave": true, "editor.formatOnSave": true,
"[nunjucks]": { "[nunjucks]": {
"editor.defaultFormatter": "okitavera.vscode-nunjucks-formatter", "editor.defaultFormatter": "okitavera.vscode-nunjucks-formatter"
}, },
"emmet.includeLanguages": { "emmet.includeLanguages": {
"nunjucks": "html", "nunjucks": "html"
} }
} }

View file

@ -55,7 +55,7 @@ yarn run build
This repository is under the [Contributing Covenant](https://www.contributor-covenant.org/) code of conduct. This repository is under the [Contributing Covenant](https://www.contributor-covenant.org/) code of conduct.
See [`CONTRIBUTING.md`](https://git.inpt.fr/fainsil/personnal-website/-/blob/master/CONTRIBUTING.md) for more information.\ See [`CONTRIBUTING.md`](https://git.inpt.fr/fainsil/personnal-website/-/blob/master/CONTRIBUTING.md) for more information.\
Please use [conventionnal commits](https://www.conventionalcommits.org/). Please use [conventional commits](https://www.conventionalcommits.org/).
## License ## License

View file

@ -235,7 +235,7 @@
}, },
{ {
"name": "Fishkeeping", "name": "Fishkeeping",
"summary": "Tamagochis, but with real responsabilities.", "summary": "Tamagochis, but with real responsibilities.",
"tags": [ "tags": [
"Patience", "Patience",
"Perfectionism" "Perfectionism"

View file

@ -10,12 +10,12 @@ This is the civic engagement that I am currently pursuing during my studies at E
--- ---
## Flyer : ## Flyer
<img src="{{ '/content/2021-01-16-flyer.png' | url }}" width="100%"> <img src="{{ '/content/2021-01-16-flyer.png' | url }}" width="100%">
--- ---
## Video presentation : ## Video presentation
<video src="{{ '/content/2021-01-16-video.mp4' | url }}" width="1080" height="720" controls></video> <video src="{{ '/content/2021-01-16-video.mp4' | url }}" width="1080" height="720" controls></video>

View file

@ -10,12 +10,12 @@ Here are small videos I had to make to present myself.
--- ---
## English Version : ## English Version
<video src="{{ '/content/2020-11-06-v1.mp4' | url }}" width="1080" height="720" controls></video> <video src="{{ '/content/2020-11-06-v1.mp4' | url }}" width="1080" height="720" controls></video>
--- ---
## Japanese Version : ## Japanese Version
<video src="{{ '/content/2020-12-19-v1.mp4' | url }}" width="1080" height="720" controls></video> <video src="{{ '/content/2020-12-19-v1.mp4' | url }}" width="1080" height="720" controls></video>

View file

@ -15,29 +15,29 @@
@keyframes blink { @keyframes blink {
0% { 0% {
opacity: 1.0; opacity: 1;
} }
50% { 50% {
opacity: 0.0; opacity: 0;
} }
100% { 100% {
opacity: 1.0; opacity: 1;
} }
} }
@-webkit-keyframes blink { @-webkit-keyframes blink {
0% { 0% {
opacity: 1.0; opacity: 1;
} }
50% { 50% {
opacity: 0.0; opacity: 0;
} }
100% { 100% {
opacity: 1.0; opacity: 1;
} }
} }

View file

@ -25,5 +25,5 @@ h2 {
margin-top: 2rem; margin-top: 2rem;
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: .2rem; gap: 0.2rem;
} }

View file

@ -43,7 +43,7 @@ section>ul {
} }
li.event { li.event {
padding: .8em 0 .8em 2.3em; padding: 0.8em 0 0.8em 2.3em;
margin-left: 1.25em; margin-left: 1.25em;
border-left: 2px #c0c5ce solid; border-left: 2px #c0c5ce solid;
} }
@ -52,17 +52,17 @@ li.event {
display: inline; display: inline;
border-bottom: 2px #942994 solid; border-bottom: 2px #942994 solid;
border-radius: 0.2em; border-radius: 0.2em;
margin-right: .3em; margin-right: 0.3em;
font-size: 17px; font-size: 17px;
} }
small { small {
font-size: .7em; font-size: 0.7em;
vertical-align: middle; vertical-align: middle;
} }
h1>small { h1>small {
font-size: .45em; font-size: 0.45em;
} }
section { section {
@ -77,7 +77,7 @@ section>p {
} }
section>h3 { section>h3 {
margin-bottom: .3em; margin-bottom: 0.3em;
} }
.project-links { .project-links {
@ -85,12 +85,12 @@ section>h3 {
} }
.project-links>a { .project-links>a {
padding-left: .3em; padding-left: 0.3em;
text-decoration: none; text-decoration: none;
} }
h2 { h2 {
margin: 1em 0 .3em 0; margin: 1em 0 0.3em 0;
} }
.arrow-up { .arrow-up {

View file

@ -12,17 +12,14 @@ $h1-size: 3rem;
body { body {
background-color: $background; background-color: $background;
color: $foreground-text; color: $foreground-text;
font-family: 'Lora', serif; font-family: 'Lora', serif;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
font-size: $font-size; font-size: $font-size;
width: 60rem; width: 60rem;
padding: 0 2rem; padding: 0 2rem;
margin: auto; margin: auto;
animation: intro 0.3s both;
animation: intro .3s both; animation-delay: 0.15s;
animation-delay: .15s;
} }
a { a {