shuffle builtwith array
This commit is contained in:
parent
6d361d999c
commit
a58e8d3397
4 changed files with 10 additions and 15 deletions
|
|
@ -74,6 +74,10 @@ const splitlines = (input, maxCharLength) => {
|
|||
return lines;
|
||||
};
|
||||
|
||||
const shuffleArray = array => {
|
||||
return array.sort(() => Math.random() - 0.5);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
toISOString,
|
||||
formatDate,
|
||||
|
|
@ -81,5 +85,6 @@ module.exports = {
|
|||
stripHtml,
|
||||
minifyCss,
|
||||
minifyJs,
|
||||
splitlines
|
||||
splitlines,
|
||||
shuffleArray
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ const {
|
|||
stripHtml,
|
||||
minifyCss,
|
||||
minifyJs,
|
||||
splitlines
|
||||
splitlines,
|
||||
shuffleArray
|
||||
} = require('./config/filters/index.js');
|
||||
|
||||
// module import shortcodes
|
||||
|
|
@ -67,6 +68,7 @@ module.exports = eleventyConfig => {
|
|||
eleventyConfig.addFilter('stripHtml', stripHtml);
|
||||
eleventyConfig.addFilter('slugify', slugifyString);
|
||||
eleventyConfig.addFilter('splitlines', splitlines);
|
||||
eleventyConfig.addFilter('shuffle', shuffleArray);
|
||||
|
||||
eleventyConfig.addFilter('cssmin', minifyCss);
|
||||
eleventyConfig.addNunjucksAsyncFilter('jsmin', minifyJs);
|
||||
|
|
|
|||
|
|
@ -11,12 +11,6 @@
|
|||
"filename": "refugiolibertad",
|
||||
"link": "https://refugio.libre.org.ar"
|
||||
},
|
||||
{
|
||||
"name": "Lene Saile",
|
||||
"description": "My personal site! Really, this website came before the starter, and I built the starter based on it.",
|
||||
"filename": "lenesaile",
|
||||
"link": "https://www.lenesaile.com"
|
||||
},
|
||||
{
|
||||
"name": "Old man yelling at tech",
|
||||
"description": "Former software engineer turned manager rediscovers his love for coding and infrastructure.",
|
||||
|
|
@ -89,12 +83,6 @@
|
|||
"filename": "elan",
|
||||
"link": "https://elan.maltebaer.vercel.app"
|
||||
},
|
||||
{
|
||||
"name": "Manu Clavijo",
|
||||
"description": "Manu Clavijo is an experienced violinist who also performs his own repertoire of songs as a singer-songwriter",
|
||||
"filename": "manuclavijo",
|
||||
"link": "https://www.manuclavijo.com/"
|
||||
},
|
||||
{
|
||||
"name": "Colegio Marpe Ciudad Jardín",
|
||||
"description": "Website for a primary school in Las Palmas.",
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ widths: [400, 520]
|
|||
<h2>Based on, or built with Eleventy Excellent:</h2>
|
||||
<ul class="feature grid" role="list" style="--gutter: var(--space-xl) var(--space-m)">
|
||||
<!-- you find tha data for that in src/_data/builtwith.json -->
|
||||
{% for site in builtwith | reverse %}
|
||||
{% for site in builtwith | shuffle %}
|
||||
<li class="grid-card | text-step-min-1">
|
||||
{% eleventyImage "./src/assets/images/screenshots/" + site.filename + ".jpg", site.name, null, "lazy", null, sizes, widths %}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue