From 878b474f32a8edf4c870147ba8c2bc8098ac919e Mon Sep 17 00:00:00 2001 From: Tatiana Mac Date: Sat, 9 May 2020 19:31:20 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9A=A0=EF=B8=8F=20Add=20flag=20design=20for?= =?UTF-8?q?=20content=20warning=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ⚠️ Add flag design for content warning * Fix build error * Lol fix build error * Added terms --- .eleventy.js | 7 +++++++ .../components/table-of-content-item.njk | 5 +++++ 11ty/definitions/ableism.md | 15 +++++++++------ 11ty/definitions/ablelist-language.md | 8 ++++++++ 11ty/definitions/abuse.md | 8 ++++++++ 11ty/definitions/alcoholism.md | 8 ++++++++ 11ty/definitions/bullying.md | 8 ++++++++ 11ty/definitions/childhood-trauma.md | 8 ++++++++ 11ty/definitions/crazy.md | 2 +- 11ty/definitions/depression.md | 8 ++++++++ 11ty/definitions/fatphobia.md | 3 +++ 11ty/definitions/food.md | 8 ++++++++ 11ty/definitions/maniac.md | 2 +- 11ty/definitions/nudity.md | 8 ++++++++ 11ty/definitions/pedophilia.md | 8 ++++++++ 11ty/definitions/police-brutality.md | 8 ++++++++ 11ty/definitions/psych.md | 5 ++++- 11ty/definitions/racism.md | 3 +++ 11ty/definitions/racist-language.md | 8 ++++++++ 11ty/definitions/rape.md | 8 ++++++++ 11ty/definitions/self-harm.md | 8 ++++++++ 11ty/definitions/sexual-assault.md | 8 ++++++++ 11ty/definitions/stupid.md | 2 +- 11ty/definitions/suicide.md | 8 ++++++++ 11ty/definitions/transmisia.md | 8 ++++++++ 11ty/definitions/transphobia.md | 8 ++++++++ 11ty/definitions/trauma.md | 8 ++++++++ 11ty/definitions/weight-gain.md | 8 ++++++++ 11ty/definitions/weight-loss.md | 8 ++++++++ 11ty/definitions/white-feminism.md | 8 ++++++++ 11ty/definitions/xenophoba.md | 8 ++++++++ assets/css/abstracts/_mixins.scss | 4 ++++ assets/css/abstracts/_variables.scss | 6 +++++- assets/css/components/_flag.scss | 18 +++++++++++++++++- assets/css/components/_word.scss | 11 +++++++++-- assets/css/structures/_definition-content.scss | 13 +++++++++++-- 36 files changed, 256 insertions(+), 16 deletions(-) create mode 100644 11ty/definitions/ablelist-language.md create mode 100644 11ty/definitions/abuse.md create mode 100644 11ty/definitions/alcoholism.md create mode 100644 11ty/definitions/bullying.md create mode 100644 11ty/definitions/childhood-trauma.md create mode 100644 11ty/definitions/depression.md create mode 100644 11ty/definitions/food.md create mode 100644 11ty/definitions/nudity.md create mode 100644 11ty/definitions/pedophilia.md create mode 100644 11ty/definitions/police-brutality.md create mode 100644 11ty/definitions/racist-language.md create mode 100644 11ty/definitions/rape.md create mode 100644 11ty/definitions/self-harm.md create mode 100644 11ty/definitions/sexual-assault.md create mode 100644 11ty/definitions/suicide.md create mode 100644 11ty/definitions/transmisia.md create mode 100644 11ty/definitions/transphobia.md create mode 100644 11ty/definitions/trauma.md create mode 100644 11ty/definitions/weight-gain.md create mode 100644 11ty/definitions/weight-loss.md create mode 100644 11ty/definitions/white-feminism.md create mode 100644 11ty/definitions/xenophoba.md diff --git a/.eleventy.js b/.eleventy.js index 25f8c61f..6443a5d1 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -60,6 +60,13 @@ module.exports = function(config) { class: 'tool', text: '' } + ], + [ + 'warning', + { + class: 'warning', + text: 'Content warning' + } ] ]); diff --git a/11ty/_includes/components/table-of-content-item.njk b/11ty/_includes/components/table-of-content-item.njk index f9136784..7d20b6fb 100644 --- a/11ty/_includes/components/table-of-content-item.njk +++ b/11ty/_includes/components/table-of-content-item.njk @@ -5,6 +5,11 @@ definition.data.flag.text and (definition.data.flag.level == 'avoid') -%} {{ definition.data.flag.text }} + {%- elseif + definition.data.flag and + definition.data.flag.text and + (definition.data.flag.level == 'warning') -%} + {{ definition.data.flag.text }} {% endif %} {%- if definition.data.sub_terms -%}