rename _assets to assets and keeping underscores for dev folders only
35
.eleventy.js
|
|
@ -53,7 +53,7 @@ module.exports = eleventyConfig => {
|
|||
eleventyConfig.setUseGitIgnore(false);
|
||||
|
||||
// --------------------- Custom Watch Targets -----------------------
|
||||
eleventyConfig.addWatchTarget('./src/_assets');
|
||||
eleventyConfig.addWatchTarget('./src/assets');
|
||||
eleventyConfig.addWatchTarget('./utils/*.js');
|
||||
|
||||
// --------------------- layout aliases -----------------------
|
||||
|
|
@ -109,36 +109,47 @@ module.exports = eleventyConfig => {
|
|||
|
||||
// --------------------- Passthrough File Copy -----------------------
|
||||
|
||||
eleventyConfig.addPassthroughCopy('src/_assets/fonts/');
|
||||
eleventyConfig.addPassthroughCopy('src/_assets/images/');
|
||||
// node modules
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'node_modules/speedlify-score/speedlify-score.css': `assets/components/speedlify-score.css`,
|
||||
'node_modules/speedlify-score/speedlify-score.js': `assets/components/speedlify-score.js`,
|
||||
'node_modules/lite-youtube-embed/src/lite-yt-embed.css': `assets/components/lite-yt-embed.css`,
|
||||
'node_modules/lite-youtube-embed/src/lite-yt-embed.js': `assets/components/lite-yt-embed.js`,
|
||||
'node_modules/artificial-chart/artificial-chart.css': `assets/components/artificial-chart.css`,
|
||||
'node_modules/artificial-chart/artificial-chart.js': `assets/components/artificial-chart.js`,
|
||||
'node_modules/@11ty/is-land/is-land.js': `assets/components/is-land.js`
|
||||
});
|
||||
|
||||
eleventyConfig.addPassthroughCopy('src/assets/fonts/');
|
||||
eleventyConfig.addPassthroughCopy('src/assets/images/');
|
||||
|
||||
// social icons von images zu root
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'src/_assets/images/favicon/site.webmanifest': 'site.webmanifest'
|
||||
'src/assets/images/favicon/site.webmanifest': 'site.webmanifest'
|
||||
});
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'src/_assets/images/favicon/favicon.ico': 'favicon.ico'
|
||||
'src/assets/images/favicon/favicon.ico': 'favicon.ico'
|
||||
});
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'src/_assets/images/favicon/favicon.svg': 'favicon.svg'
|
||||
'src/assets/images/favicon/favicon.svg': 'favicon.svg'
|
||||
});
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'src/_assets/images/favicon/apple-touch-icon.png': 'apple-touch-icon.png'
|
||||
'src/assets/images/favicon/apple-touch-icon.png': 'apple-touch-icon.png'
|
||||
});
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'src/_assets/images/favicon/favicon-32x32.png': 'favicon-32x32.png'
|
||||
'src/assets/images/favicon/favicon-32x32.png': 'favicon-32x32.png'
|
||||
});
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'src/_assets/images/favicon/favicon-16x16.png': 'favicon-16x16.png'
|
||||
'src/assets/images/favicon/favicon-16x16.png': 'favicon-16x16.png'
|
||||
});
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'src/_assets/images/favicon/android-chrome-192x192.png': 'android-chrome-192x192.png'
|
||||
'src/assets/images/favicon/android-chrome-192x192.png': 'android-chrome-192x192.png'
|
||||
});
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'src/_assets/images/favicon/android-chrome-512x512.png': 'android-chrome-512x512.png'
|
||||
'src/assets/images/favicon/android-chrome-512x512.png': 'android-chrome-512x512.png'
|
||||
});
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
'src/_assets/images/favicon/maskable.png': 'maskable.png'
|
||||
'src/assets/images/favicon/maskable.png': 'maskable.png'
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -6,21 +6,21 @@ const dir = {
|
|||
includes: '_includes',
|
||||
layouts: '_layouts',
|
||||
data: '_data',
|
||||
assets: '_assets',
|
||||
assets: 'assets'
|
||||
};
|
||||
|
||||
const imagePaths = {
|
||||
source: path.join(dir.input, dir.assets, 'images'),
|
||||
output: path.join(dir.output, dir.assets, 'images'),
|
||||
output: path.join(dir.output, dir.assets, 'images')
|
||||
};
|
||||
|
||||
const scriptDirs = {
|
||||
source: path.join(dir.input, dir.assets, 'scripts'),
|
||||
output: path.join(dir.output, dir.assets, 'scripts'),
|
||||
output: path.join(dir.output, dir.assets, 'scripts')
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
dir,
|
||||
imagePaths,
|
||||
scriptDirs,
|
||||
scriptDirs
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,34 +2,34 @@ const Image = require('@11ty/eleventy-img');
|
|||
const path = require('path');
|
||||
|
||||
const imageShortcode = async (src, pcls, cls, alt, loading, sizes = '100vw') => {
|
||||
if (!alt) {
|
||||
throw new Error(`Missing \`alt\` on Image from: ${src}`);
|
||||
}
|
||||
if (!alt) {
|
||||
throw new Error(`Missing \`alt\` on Image from: ${src}`);
|
||||
}
|
||||
|
||||
let metadata = await Image(src, {
|
||||
widths: [400, 700, 1280],
|
||||
formats: ['avif', 'webp', 'jpeg'],
|
||||
urlPath: '/_assets/images/',
|
||||
outputDir: './dist/_assets/images/',
|
||||
// Custom Image Filename
|
||||
filenameFormat: function (id, src, width, format, options) {
|
||||
const extension = path.extname(src);
|
||||
const name = path.basename(src, extension);
|
||||
let metadata = await Image(src, {
|
||||
widths: [400, 700, 1280],
|
||||
formats: ['avif', 'webp', 'jpeg'],
|
||||
urlPath: '/assets/images/',
|
||||
outputDir: './dist/assets/images/',
|
||||
// Custom Image Filename
|
||||
filenameFormat: function (id, src, width, format, options) {
|
||||
const extension = path.extname(src);
|
||||
const name = path.basename(src, extension);
|
||||
|
||||
return `${name}-${width}w.${format}`;
|
||||
}
|
||||
});
|
||||
return `${name}-${width}w.${format}`;
|
||||
}
|
||||
});
|
||||
|
||||
let lowsrc = metadata.jpeg[0];
|
||||
let lowsrc = metadata.jpeg[0];
|
||||
|
||||
return `<picture class="${pcls}">
|
||||
return `<picture class="${pcls}">
|
||||
${Object.values(metadata)
|
||||
.map(imageFormat => {
|
||||
return ` <source type="${imageFormat[0].sourceType}" srcset="${imageFormat
|
||||
.map(entry => entry.srcset)
|
||||
.join(', ')}" sizes="${sizes}">`;
|
||||
})
|
||||
.join('\n')}
|
||||
.map(imageFormat => {
|
||||
return ` <source type="${imageFormat[0].sourceType}" srcset="${imageFormat
|
||||
.map(entry => entry.srcset)
|
||||
.join(', ')}" sizes="${sizes}">`;
|
||||
})
|
||||
.join('\n')}
|
||||
<img
|
||||
src="${lowsrc.url}"
|
||||
class="${cls}"
|
||||
|
|
|
|||
|
|
@ -3,54 +3,54 @@ const path = require('path');
|
|||
const htmlmin = require('html-minifier');
|
||||
|
||||
const imageShortcodePlaceholder = async (
|
||||
src,
|
||||
fcls,
|
||||
pcls,
|
||||
cls,
|
||||
alt,
|
||||
caption,
|
||||
sizes = '100vw'
|
||||
src,
|
||||
fcls,
|
||||
pcls,
|
||||
cls,
|
||||
alt,
|
||||
caption,
|
||||
sizes = '100vw'
|
||||
) => {
|
||||
if (!alt) {
|
||||
throw new Error(`Missing \`alt\` on myImage from: ${src}`);
|
||||
}
|
||||
if (!alt) {
|
||||
throw new Error(`Missing \`alt\` on myImage from: ${src}`);
|
||||
}
|
||||
|
||||
let metadata = await Image(src, {
|
||||
widths: [400, 700, 1280],
|
||||
formats: ['avif', 'webp', 'jpeg'],
|
||||
urlPath: '/_assets/images/',
|
||||
outputDir: './dist/_assets/images/',
|
||||
filenameFormat: function (id, src, width, format, options) {
|
||||
const extension = path.extname(src);
|
||||
const name = path.basename(src, extension);
|
||||
let metadata = await Image(src, {
|
||||
widths: [400, 700, 1280],
|
||||
formats: ['avif', 'webp', 'jpeg'],
|
||||
urlPath: '/assets/images/',
|
||||
outputDir: './dist/assets/images/',
|
||||
filenameFormat: function (id, src, width, format, options) {
|
||||
const extension = path.extname(src);
|
||||
const name = path.basename(src, extension);
|
||||
|
||||
return `${name}-${width}w.${format}`;
|
||||
}
|
||||
});
|
||||
return `${name}-${width}w.${format}`;
|
||||
}
|
||||
});
|
||||
|
||||
let lowsrc = metadata.jpeg[0];
|
||||
let lowsrc = metadata.jpeg[0];
|
||||
|
||||
// getting the url to use
|
||||
let imgSrc = src;
|
||||
if (!imgSrc.startsWith('.')) {
|
||||
const inputPath = this.page.inputPath;
|
||||
const pathParts = inputPath.split('/');
|
||||
pathParts.pop();
|
||||
imgSrc = pathParts.join('/') + '/' + src;
|
||||
}
|
||||
// getting the url to use
|
||||
let imgSrc = src;
|
||||
if (!imgSrc.startsWith('.')) {
|
||||
const inputPath = this.page.inputPath;
|
||||
const pathParts = inputPath.split('/');
|
||||
pathParts.pop();
|
||||
imgSrc = pathParts.join('/') + '/' + src;
|
||||
}
|
||||
|
||||
return htmlmin.minify(
|
||||
`<figure class="${fcls}">
|
||||
return htmlmin.minify(
|
||||
`<figure class="${fcls}">
|
||||
<picture class="${pcls}">
|
||||
${Object.values(metadata)
|
||||
.map(imageFormat => {
|
||||
return ` <source type="${imageFormat[0].sourceType}" srcset="${imageFormat
|
||||
.map(entry => entry.srcset)
|
||||
.join(', ')}" sizes="${sizes}">`;
|
||||
})
|
||||
.join('\n')}
|
||||
.map(imageFormat => {
|
||||
return ` <source type="${imageFormat[0].sourceType}" srcset="${imageFormat
|
||||
.map(entry => entry.srcset)
|
||||
.join(', ')}" sizes="${sizes}">`;
|
||||
})
|
||||
.join('\n')}
|
||||
<img
|
||||
src="/_assets/images/image-placeholder.png"
|
||||
src="/assets/images/image-placeholder.png"
|
||||
data-src="${lowsrc.url}"
|
||||
class="${cls}"
|
||||
width="${lowsrc.width}"
|
||||
|
|
@ -60,15 +60,15 @@ const imageShortcodePlaceholder = async (
|
|||
decoding="async">
|
||||
</picture>
|
||||
${
|
||||
caption
|
||||
? `<figcaption class="cluster font-display"><p>${caption}</p> <img
|
||||
src="/_assets/svg/arrow.svg" alt="Arrow icon" width="78" height="75" aria-hidden="true" />
|
||||
caption
|
||||
? `<figcaption class="cluster font-display"><p>${caption}</p> <img
|
||||
src="/assets/svg/arrow.svg" alt="Arrow icon" width="78" height="75" aria-hidden="true" />
|
||||
</figcaption>`
|
||||
: ``
|
||||
}
|
||||
: ``
|
||||
}
|
||||
</figure>`,
|
||||
{collapseWhitespace: true}
|
||||
);
|
||||
{collapseWhitespace: true}
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = imageShortcodePlaceholder;
|
||||
|
|
|
|||
|
|
@ -4,21 +4,21 @@ const markdownLib = require('../../plugins/markdown');
|
|||
// this is not working yet
|
||||
|
||||
const insertion = (img, figcaption, alt, children) => {
|
||||
if (!img) {
|
||||
throw new Error(`Must have an image-path.`);
|
||||
}
|
||||
if (!alt) {
|
||||
throw new Error('Images must have an alt text.');
|
||||
}
|
||||
if (!figcaption) {
|
||||
throw new Error('Must have a figcaption');
|
||||
}
|
||||
if (!children) {
|
||||
throw new Error('add a content.');
|
||||
}
|
||||
const content = markdownLib.render(children.trim());
|
||||
return outdent`<div class="switcher py-size-1 breakout">
|
||||
{% imagePlaceholder "./src/_assets/images/${img}", "bg-transparent pt-size-0", "
|
||||
if (!img) {
|
||||
throw new Error(`Must have an image-path.`);
|
||||
}
|
||||
if (!alt) {
|
||||
throw new Error('Images must have an alt text.');
|
||||
}
|
||||
if (!figcaption) {
|
||||
throw new Error('Must have a figcaption');
|
||||
}
|
||||
if (!children) {
|
||||
throw new Error('add a content.');
|
||||
}
|
||||
const content = markdownLib.render(children.trim());
|
||||
return outdent`<div class="switcher py-size-1 breakout">
|
||||
{% imagePlaceholder "./src/assets/images/${img}", "bg-transparent pt-size-0", "
|
||||
h-full", "object-cover w-full h-max rounded-tr-2xl", "${figcaption}", "${alt}", "
|
||||
(max-width: 463px) 400px, (max-width: 718px) 700px, (max-width: 912px) 400px, 700px" %}
|
||||
<div class="font-display text-size-2 opacity-80">
|
||||
|
|
|
|||
49
package-lock.json
generated
|
|
@ -16,12 +16,12 @@
|
|||
"@11ty/eleventy-plugin-webc": "^0.4.0",
|
||||
"@11ty/is-land": "^2.0.3",
|
||||
"gsap": "^3.11.3",
|
||||
"markdown-it-footnote": "^3.0.3",
|
||||
"tailwindcss": "^3.0.23"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@netlify/plugin-a11y": "^1.0.0-beta.1",
|
||||
"@toycode/markdown-it-class": "^1.2.4",
|
||||
"artificial-chart": "^2.0.3",
|
||||
"clean-css": "^5.3.1",
|
||||
"concurrently": "^7.4.0",
|
||||
"cross-env": "^7.0.3",
|
||||
|
|
@ -33,11 +33,13 @@
|
|||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"glob": "^8.0.3",
|
||||
"html-minifier": "^4.0.0",
|
||||
"lite-youtube-embed": "^0.2.0",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^13.0.1",
|
||||
"markdown-it-abbr": "^1.0.4",
|
||||
"markdown-it-anchor": "^8.6.5",
|
||||
"markdown-it-emoji": "^2.0.2",
|
||||
"markdown-it-footnote": "^3.0.3",
|
||||
"markdown-it-link-attributes": "^4.0.1",
|
||||
"markdown-it-mark": "^3.0.1",
|
||||
"markdown-it-prism": "^2.3.0",
|
||||
|
|
@ -52,7 +54,8 @@
|
|||
"prettier": "^2.3.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"sanitize-html": "^2.7.2",
|
||||
"slugify": "^1.6.5"
|
||||
"slugify": "^1.6.5",
|
||||
"speedlify-score": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
|
|
@ -701,6 +704,12 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/artificial-chart": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/artificial-chart/-/artificial-chart-2.0.3.tgz",
|
||||
"integrity": "sha512-14/cyhERovLs2+2UoObESKuYNfD8dOmQWoxEMc2O4yxJaKz9l72AeH9fNq8B0d0LN6yQOlEoIcp45p/HjWHxaw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/asap": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
|
||||
|
|
@ -3651,6 +3660,12 @@
|
|||
"resolved": "https://registry.npmjs.org/list-to-array/-/list-to-array-1.1.0.tgz",
|
||||
"integrity": "sha512-+dAZZ2mM+/m+vY9ezfoueVvrgnHIGi5FvgSymbIgJOFwiznWyA59mav95L+Mc6xPtL3s9gm5eNTlNtxJLbNM1g=="
|
||||
},
|
||||
"node_modules/lite-youtube-embed": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/lite-youtube-embed/-/lite-youtube-embed-0.2.0.tgz",
|
||||
"integrity": "sha512-XXXAk5sbvtjjwbie3XG+6HppgTm1HTGL/Uk9z9NkJH53o7puZLur434heHzAjkS60hZB3vT4ls25zl5rMiX4EA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/load-json-file": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
|
||||
|
|
@ -3783,7 +3798,8 @@
|
|||
"node_modules/markdown-it-footnote": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
|
||||
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
|
||||
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/markdown-it-link-attributes": {
|
||||
"version": "4.0.1",
|
||||
|
|
@ -6383,6 +6399,12 @@
|
|||
"integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/speedlify-score": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/speedlify-score/-/speedlify-score-2.0.2.tgz",
|
||||
"integrity": "sha512-FAFunl3H/faGETUX0tMh/fU0CZs5afqPR6Qm3I8xPVo9iLOZVhiDA6pUm5owXq4rSEb45y3Pf8iJqE6DmZiNvA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
|
|
@ -7618,6 +7640,12 @@
|
|||
"resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
|
||||
"integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug=="
|
||||
},
|
||||
"artificial-chart": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/artificial-chart/-/artificial-chart-2.0.3.tgz",
|
||||
"integrity": "sha512-14/cyhERovLs2+2UoObESKuYNfD8dOmQWoxEMc2O4yxJaKz9l72AeH9fNq8B0d0LN6yQOlEoIcp45p/HjWHxaw==",
|
||||
"dev": true
|
||||
},
|
||||
"asap": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
|
||||
|
|
@ -9655,6 +9683,12 @@
|
|||
"resolved": "https://registry.npmjs.org/list-to-array/-/list-to-array-1.1.0.tgz",
|
||||
"integrity": "sha512-+dAZZ2mM+/m+vY9ezfoueVvrgnHIGi5FvgSymbIgJOFwiznWyA59mav95L+Mc6xPtL3s9gm5eNTlNtxJLbNM1g=="
|
||||
},
|
||||
"lite-youtube-embed": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/lite-youtube-embed/-/lite-youtube-embed-0.2.0.tgz",
|
||||
"integrity": "sha512-XXXAk5sbvtjjwbie3XG+6HppgTm1HTGL/Uk9z9NkJH53o7puZLur434heHzAjkS60hZB3vT4ls25zl5rMiX4EA==",
|
||||
"dev": true
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
|
||||
|
|
@ -9772,7 +9806,8 @@
|
|||
"markdown-it-footnote": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
|
||||
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
|
||||
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==",
|
||||
"dev": true
|
||||
},
|
||||
"markdown-it-link-attributes": {
|
||||
"version": "4.0.1",
|
||||
|
|
@ -11596,6 +11631,12 @@
|
|||
"integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==",
|
||||
"dev": true
|
||||
},
|
||||
"speedlify-score": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/speedlify-score/-/speedlify-score-2.0.2.tgz",
|
||||
"integrity": "sha512-FAFunl3H/faGETUX0tMh/fU0CZs5afqPR6Qm3I8xPVo9iLOZVhiDA6pUm5owXq4rSEb45y3Pf8iJqE6DmZiNvA==",
|
||||
"dev": true
|
||||
},
|
||||
"sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
|
|
|
|||
15
package.json
|
|
@ -8,12 +8,12 @@
|
|||
"main": ".eleventy.js",
|
||||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"dev:postcss": "postcss src/_assets/css/global.css --o dist/_assets/css/global.css --watch --verbose",
|
||||
"dev:scripts": "esbuild src/_assets/scripts/app.js src/_assets/scripts/is-land.js --bundle --watch --outdir=dist/_assets",
|
||||
"dev:postcss": "postcss src/assets/css/global.css --o dist/assets/css/global.css --watch --verbose",
|
||||
"dev:scripts": "esbuild src/assets/scripts/app.js src/assets/scripts/is-land.js --bundle --watch --outdir=dist/assets",
|
||||
"dev:11ty": "eleventy --serve --watch",
|
||||
"build:postcss": "NODE_ENV=production postcss src/_assets/css/global.css -o dist/_assets/css/global.css",
|
||||
"build:postcss": "NODE_ENV=production postcss src/assets/css/global.css -o dist/assets/css/global.css",
|
||||
"build:11ty": "cross-env ELEVENTY_ENV=production eleventy",
|
||||
"build:scripts": "esbuild src/_assets/scripts/app.js src/_assets/scripts/is-land.js --bundle --minify --outdir=dist/_assets --platform=node --tree-shaking=true",
|
||||
"build:scripts": "esbuild src/assets/scripts/app.js src/assets/scripts/is-land.js --bundle --minify --outdir=dist/assets --platform=node --tree-shaking=true",
|
||||
"start": "run-p dev:*",
|
||||
"build": "run-s clean build:*"
|
||||
},
|
||||
|
|
@ -32,12 +32,12 @@
|
|||
"@11ty/eleventy-plugin-webc": "^0.4.0",
|
||||
"@11ty/is-land": "^2.0.3",
|
||||
"gsap": "^3.11.3",
|
||||
"markdown-it-footnote": "^3.0.3",
|
||||
"tailwindcss": "^3.0.23"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@netlify/plugin-a11y": "^1.0.0-beta.1",
|
||||
"@toycode/markdown-it-class": "^1.2.4",
|
||||
"artificial-chart": "^2.0.3",
|
||||
"clean-css": "^5.3.1",
|
||||
"concurrently": "^7.4.0",
|
||||
"cross-env": "^7.0.3",
|
||||
|
|
@ -49,11 +49,13 @@
|
|||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"glob": "^8.0.3",
|
||||
"html-minifier": "^4.0.0",
|
||||
"lite-youtube-embed": "^0.2.0",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^13.0.1",
|
||||
"markdown-it-abbr": "^1.0.4",
|
||||
"markdown-it-anchor": "^8.6.5",
|
||||
"markdown-it-emoji": "^2.0.2",
|
||||
"markdown-it-footnote": "^3.0.3",
|
||||
"markdown-it-link-attributes": "^4.0.1",
|
||||
"markdown-it-mark": "^3.0.1",
|
||||
"markdown-it-prism": "^2.3.0",
|
||||
|
|
@ -68,6 +70,7 @@
|
|||
"prettier": "^2.3.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"sanitize-html": "^2.7.2",
|
||||
"slugify": "^1.6.5"
|
||||
"slugify": "^1.6.5",
|
||||
"speedlify-score": "^2.0.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
permalink: /humans.txt
|
||||
eleventyExcludeFromCollections: true
|
||||
excludeFromSitemap: true
|
||||
---
|
||||
|
||||
/* TEAM */
|
||||
Developer: {{ meta.author }}
|
||||
Contact: {{ meta.authorEmail }}
|
||||
Site: {{ meta.siteURL }}
|
||||
{% if meta.meta_data.twitterCreator %}Twitter: {{ meta.meta_data.twitterCreator }}{% endif %}
|
||||
|
||||
/* SITE */
|
||||
Doctype: HTML5
|
||||
|
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
meta_data: {
|
||||
twitterSite: '@lenesaile',
|
||||
twitterCreator: '@lenesaile',
|
||||
opengraph_default: '/_assets/images/opengraph-default.jpg'
|
||||
opengraph_default: '/assets/images/opengraph-default.jpg'
|
||||
},
|
||||
pagination: {
|
||||
itemsPerPage: 20
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"@id": "{{ url }}",
|
||||
"headline": "{{ title or meta.siteName }}",
|
||||
"description": "{{ excerpt or meta.siteDescription }}",
|
||||
"image": "{% if seo.image %}/_assets/images/{{ seo.image }}{% else %}{{ meta.siteImage }}{% endif %}",
|
||||
"image": "{% if seo.image %}/assets/images/{{ seo.image }}{% else %}{{ meta.siteImage }}{% endif %}",
|
||||
"inLanguage": "{{ meta[locale].localeCode }}",
|
||||
"publisher": {
|
||||
"@type": "{{ meta.siteType }}",
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
<script type="application/ld+json">
|
||||
{
|
||||
"@type": "WebPage",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage"
|
||||
},
|
||||
"isPartOf": {
|
||||
"@id": "{{ meta.siteURL }}#website"
|
||||
},
|
||||
"headline": "{{ title or meta.siteName }}",
|
||||
"description": "{{ seo.description or meta.siteDescription }}",
|
||||
"image": "{% if seo.image %}/_assets/images/{{ seo.image }}{% else %}{{ meta.siteImage }}{% endif %}",
|
||||
"inLanguage": "{{ meta.locale }}",
|
||||
"publisher": {
|
||||
"@type": "{{ meta.siteType }}",
|
||||
"name": "{{ meta.authorName }}",
|
||||
"url": "{{ meta.siteURL }}"
|
||||
}
|
||||
}
|
||||
{
|
||||
"@type": "WebPage",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage"
|
||||
},
|
||||
"isPartOf": {
|
||||
"@id": "{{ meta.siteURL }}#website"
|
||||
},
|
||||
"headline": "{{ title or meta.siteName }}",
|
||||
"description": "{{ seo.description or meta.siteDescription }}",
|
||||
"image": "{% if seo.image %}/assets/images/{{ seo.image }}{% else %}{{ meta.siteImage }}{% endif %}",
|
||||
"inLanguage": "{{ meta.locale }}",
|
||||
"publisher": {
|
||||
"@type": "{{ meta.siteType }}",
|
||||
"name": "{{ meta.authorName }}",
|
||||
"url": "{{ meta.siteURL }}"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,6 @@
|
|||
</style>
|
||||
|
||||
<script>
|
||||
import {testGSAP} from '../../_assets/scripts/components/gsap.js';
|
||||
import {testGSAP} from '../../assets/scripts/components/gsap.js';
|
||||
gsap();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<!-- fonts preload -->
|
||||
<link
|
||||
rel="preload"
|
||||
href="/_assets/fonts/outfit/outfit-v5-latin-regular.woff2"
|
||||
href="/assets/fonts/outfit/outfit-v5-latin-regular.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
crossorigin
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<style @html="this.getCSS(this.page.url)"></style>
|
||||
{% endrenderTemplate %}
|
||||
|
||||
<link rel="stylesheet" href="/_assets/css/global.css?{{ assetHash }}" />
|
||||
<link rel="stylesheet" href="/assets/css/global.css?{{ assetHash }}" />
|
||||
|
||||
<!-- Add facility for pages to declare an array of stylesheet paths -->
|
||||
{% if pageStylesheets %} {% for item in pageStylesheets %}
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
{% endrenderTemplate %}
|
||||
|
||||
<!-- defer js -->
|
||||
<script type="module" src="/_assets/app.js" defer></script>
|
||||
<script type="module" src="/_assets/is-land.js" defer></script>
|
||||
<script type="module" src="/assets/app.js" defer></script>
|
||||
<script type="module" src="/assets/components/is-land.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 400;
|
||||
src: local(''), url(/_assets/fonts/outfit/outfit-v5-latin-regular.woff2) format('woff2'),
|
||||
src: local(''), url(/assets/fonts/outfit/outfit-v5-latin-regular.woff2) format('woff2'),
|
||||
url(/assets/fonts/outfit/outfit-v5-latin-regular.woff) format('woff');
|
||||
}
|
||||
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
font-display: swap;
|
||||
font-weight: 700;
|
||||
src: local(''),
|
||||
url(/_assets/fonts/outfit/outfit-v5-latin-700-webfont.woff2) format('woff2'),
|
||||
url(/assets/fonts/outfit/outfit-v5-latin-700-webfont.woff2) format('woff2'),
|
||||
url(/assets/fonts/outfit/outfit-v5-latin-700-webfont.woff) format('woff');
|
||||
}
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 400;
|
||||
src: local(''), url(/_assets/fonts/charter/charter_regular.woff2) format('woff2'),
|
||||
src: local(''), url(/assets/fonts/charter/charter_regular.woff2) format('woff2'),
|
||||
url(/assets/fonts/charter/charter_regular.woff) format('woff');
|
||||
}
|
||||
@font-face {
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 700;
|
||||
src: local(''), url(/_assets/fonts/charter/charter_bold.woff2) format('woff2'),
|
||||
src: local(''), url(/assets/fonts/charter/charter_bold.woff2) format('woff2'),
|
||||
url(/assets/fonts/charter/charter_bold.woff) format('woff');
|
||||
}
|
||||
|
||||
|
|
@ -40,8 +40,7 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
src: local(''),
|
||||
url(/_assets/fonts/robotomono/robotomono-variablefont_wght-webfont.woff2)
|
||||
url(/assets/fonts/robotomono/robotomono-variablefont_wght-webfont.woff2)
|
||||
format('woff2'),
|
||||
url(/_assets/fonts/robotomono/robotomono-variablefont_wght-webfont.woff)
|
||||
format('woff');
|
||||
url(/assets/fonts/robotomono/robotomono-variablefont_wght-webfont.woff) format('woff');
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ article [href^='http']:not([href*='lene.dev'])::after {
|
|||
display: inline-block;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
background-image: url('/_assets/images/icn-external.svg');
|
||||
background-image: url('/assets/images/icn-external.svg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 60% auto;
|
||||
9
src/assets/helperfiles/humans.njk
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
permalink: /humans.txt
|
||||
eleventyExcludeFromCollections: true
|
||||
excludeFromSitemap: true
|
||||
---
|
||||
|
||||
/* TEAM */ Developer: {{ meta.author }} Contact: {{ meta.authorEmail }} Site:
|
||||
{{ meta.siteURL }} {% if meta.meta_data.twitterCreator %}Twitter:
|
||||
{{ meta.meta_data.twitterCreator }}{% endif %} /* SITE */ Doctype: HTML5
|
||||
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 871 B After Width: | Height: | Size: 871 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 346 B |
|
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 510 KiB After Width: | Height: | Size: 510 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
|
@ -2,14 +2,14 @@ const plugin = require('tailwindcss/plugin');
|
|||
const postcss = require('postcss');
|
||||
const postcssJs = require('postcss-js');
|
||||
|
||||
const clampGenerator = require('./src/_assets/css-utils/clamp-generator.js');
|
||||
const tokensToTailwind = require('./src/_assets/css-utils/tokens-to-tailwind.js');
|
||||
const clampGenerator = require('./src/assets/css-utils/clamp-generator.js');
|
||||
const tokensToTailwind = require('./src/assets/css-utils/tokens-to-tailwind.js');
|
||||
|
||||
// Raw design tokens
|
||||
const colorTokens = require('./src/_assets/design-tokens/colors.json');
|
||||
const fontTokens = require('./src/_assets/design-tokens/fonts.json');
|
||||
const spacingTokens = require('./src/_assets/design-tokens/spacing.json');
|
||||
const textSizeTokens = require('./src/_assets/design-tokens/text-sizes.json');
|
||||
const colorTokens = require('./src/assets/design-tokens/colors.json');
|
||||
const fontTokens = require('./src/assets/design-tokens/fonts.json');
|
||||
const spacingTokens = require('./src/assets/design-tokens/spacing.json');
|
||||
const textSizeTokens = require('./src/assets/design-tokens/text-sizes.json');
|
||||
|
||||
// Process design tokens
|
||||
const colors = tokensToTailwind(colorTokens.items);
|
||||
|
|
|
|||