Skip to content

Commit 5890e2e

Browse files
committed
🚛 Remove codekit config
2 parents b7cb9d2 + 873aae1 commit 5890e2e

File tree

20 files changed

+5643
-464
lines changed

20 files changed

+5643
-464
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root=true
2+
3+
[*]
4+
indent_size = 2
5+
indent_style = space
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
line_length = 120

.eleventy.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
module.exports = function (config) {
2+
// Add a filter using the Config API
3+
config.addFilter('linkTarget', (slug) => `#${slug}`);
4+
5+
config.addFilter('postInspect', function (post) {
6+
console.log(post);
7+
8+
})
9+
10+
config.addPassthroughCopy({'_site/css/': 'assets/css/'})
11+
12+
// Add collections here
13+
config.addCollection('definitions', collection => {
14+
return [
15+
...collection
16+
.getFilteredByGlob('./11ty/definitions/*.md')
17+
.sort((a, b) => {
18+
// `toLowerCase()` is just a safety measure, slugs should be lower case anyway
19+
// `localeCompare()` is super cool: http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare
20+
return a.data.slug.toLowerCase().localeCompare(b.data.slug.toLowerCase())
21+
})]
22+
})
23+
24+
config.addCollection('definedDefinitions', collection => {
25+
return [
26+
...collection
27+
.getFilteredByGlob('./11ty/definitions/*.md')
28+
.filter(word => word.data.defined)
29+
.sort((a, b) => {
30+
// `toLowerCase()` is just a safety measure, slugs should be lower case anyway
31+
// `localeCompare()` is super cool: http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare
32+
return a.data.slug.toLowerCase().localeCompare(b.data.slug.toLowerCase())
33+
})]
34+
})
35+
36+
// You can return your Config object (optional).
37+
return {
38+
dir: {
39+
input: '11ty',
40+
output: 'dist'
41+
},
42+
templateFormats: ['njk', 'md'],
43+
htmlTemplateEngine: 'njk',
44+
markdownTemplateEngine: 'njk',
45+
passthroughFileCopy: true
46+
};
47+
};

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
.DS_Store
2+
node_modules
3+
dist
4+
config.codekit3

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"useTabs": false
5+
}

11ty/_data/metadata.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"title": "selfdefined",
3+
"url": "https://www.selfdefined.app/",
4+
"description": "A modern dictionary about us.",
5+
"author": {
6+
"name": "Tatiana & the Crew",
7+
"email": "[email protected]"
8+
}
9+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<article id={{ definition.data.slug }} class="block__word word">
2+
<h3 class="word__title">
3+
{{ definition.data.title}}
4+
<span class="word__speech">{{ definition.data.speech}}</span>
5+
</h3>
6+
{{ definition.templateContent | safe }}
7+
{# <p>{{ definition.data.alt_words }}</p> #}
8+
{%- if definition.data.alt_words -%}
9+
<h4>Alt words</h4>
10+
<ul class="list-semicolon">
11+
{% for word in definition.data.alt_words %}
12+
<li>{{ word }}</li>
13+
{% endfor %}
14+
</ul>
15+
{% endif %}
16+
</article>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="auto-grid">
2+
{% for definition in collections.definedDefinitions %}
3+
{% include 'components/definition.njk' %}
4+
{% endfor %}
5+
</div>

11ty/_includes/layouts/base.njk

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta
6+
name="viewport"
7+
content="width=device-width, initial-scale=1.0"
8+
>
9+
10+
<title>{{ renderData.title or title or metadata.title }}</title>
11+
<meta
12+
name="description"
13+
content="{{ renderData.description or description or metadata.description }}"
14+
>
15+
16+
<link
17+
rel="stylesheet"
18+
href="{{ 'assets/css/base.css' | url }}"
19+
>
20+
</head>
21+
<body>
22+
<main>
23+
{{ content | safe }}
24+
<section>
25+
<h2>Table of Content</h2>
26+
<div class="auto-grid list">
27+
<ul>
28+
{% for definition in collections.definitions %}
29+
{% set renderedName %}
30+
{{ definition.data.title}}
31+
{%- if definition.data.flag and (definition.data.flag.level == 'avoid') -%}
32+
<span class="flag__red">{{ definition.data.flag.type }}</span>
33+
{% endif %}
34+
{% endset %}
35+
<li>
36+
{%- if definition.data.defined -%}
37+
<a
38+
href={{ definition.data.slug | linkTarget | url }}
39+
class="word__link"
40+
>{{ renderedName | safe }}</a>
41+
{%- else -%}
42+
{{ renderedName | safe }}
43+
{% endif %}
44+
</li>
45+
{% endfor %}
46+
</ul>
47+
</div>
48+
</section>
49+
<section>
50+
<h2>Words</h2>
51+
{% include 'components/defintions-list.njk' %}
52+
</section>
53+
</main>
54+
</body>

11ty/definitions/bierasure.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Bierasure
3+
slug: bierasure
4+
defined: false
5+
---

11ty/definitions/bisexual.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Bisexual
3+
slug: bisexual
4+
speech: adj
5+
defined: true
6+
---
7+
8+
of, relating to, or characterised by being sexually attracted to more than one gender.
9+
10+
---
11+
12+
#### Note
13+
14+
Bisexuality does not preclude attraction to [non-binary](#non-binary) or [transgender](#transgender) people.
15+
16+
#### Further Reading
17+
18+
[Am I Bisexual?](http://www.bisexualindex.org.uk/index.php/AmIBisexual)

0 commit comments

Comments
 (0)