Skip to content

Commit b9522fd

Browse files
authored
Merge pull request #5 from thegreenwebfoundation/hs-impact-dimensions-concept
Hs impact dimensions concept
2 parents 1fcc976 + 513e6d4 commit b9522fd

17 files changed

Lines changed: 258 additions & 44 deletions

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ gem "github-pages", "~> 232", group: :jekyll_plugins
1717
group :jekyll_plugins do
1818
gem "jekyll-feed", "~> 0.12"
1919
gem "jekyll-tailwind"
20+
gem "jekyll-tabs"
2021
end
2122

2223
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ GEM
179179
jekyll-sitemap (1.4.0)
180180
jekyll (>= 3.7, < 5.0)
181181
jekyll-swiss (1.0.0)
182+
jekyll-tabs (1.2.1)
183+
jekyll (>= 3.0, < 5.0)
182184
jekyll-tailwind (2.1)
183185
jekyll (>= 3.0, < 5.0)
184186
tailwindcss-ruby
@@ -338,6 +340,7 @@ DEPENDENCIES
338340
github-pages (~> 232)
339341
http_parser.rb (~> 0.6.0)
340342
jekyll-feed (~> 0.12)
343+
jekyll-tabs
341344
jekyll-tailwind
342345
tzinfo (>= 1, < 3)
343346
tzinfo-data

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ theme: minima
1717
plugins:
1818
- jekyll-feed
1919
- jekyll-tailwind
20+
- jekyll-tabs
2021
tailwind:
2122
input: assets/app.css
2223
minify: true

_data/categoryLabels.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,41 @@
44
# The Category Items are mapped and accessible using thier item name.
55
# - category: is actually a css class that is passed through to set the colour of the item (background to the icon).
66
# - title: used as the label text for the item.
7-
# - GHGScope: is the GHG protocol scope that the category aligns to.
7+
# - impactDimensions: a nested structure to hold customisations relevant to each impact dimension.
8+
# - carbon: customisations relevant to the carbon impact dimension.
9+
# - GHGScope: expected to be a number, what scope of the GHG Protocol does a category map to.
810

911
CatU:
1012
category: cat-u
1113
title: Category U
12-
GHGScope: 3
14+
impactDimensions:
15+
carbon:
16+
GHGScope: 3
1317

1418
CatO:
1519
category: cat-o
1620
title: Category O
17-
GHGScope: 2
21+
impactDimensions:
22+
carbon:
23+
GHGScope: 2
1824

1925
CatG:
2026
category: cat-g
2127
title: Category G
22-
GHGScope: 1
28+
impactDimensions:
29+
carbon:
30+
GHGScope: 1
2331

2432
CatC:
2533
category: cat-c
2634
title: Category C
27-
GHGScope: 3
35+
impactDimensions:
36+
carbon:
37+
GHGScope: 3
2838

2939
CatD:
3040
category: cat-d
3141
title: Category D
32-
GHGScope: 3
42+
impactDimensions:
43+
carbon:
44+
GHGScope: 3

_data/taxonomy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
# - icon: used as the icon of the item (required and default). Maps to the assets/images/icons.svg.
1818
# - selected: when true, this highlights the item. Used for the contextual overlay views (false by default).
1919
# - description: adds additional text under the title providing som context. Used for the contextual overlay views (optional).
20-
# - link: Creates a link to another page (further details). These are setup by default to the relevant pages, but may be overridden for specific use cases, typically in the overlay views (optional, but defaults to a page).
21-
# - noLink: Provides an overide to prevent any navigation to a page. Renders the component in a <div> instead of an <a>.
20+
# - link: creates a link to another page (further details). These are setup by default to the relevant pages, but may be overridden for specific use cases, typically in the overlay views (optional, but defaults to a page).
21+
# - noLink: provides an overide to prevent any navigation to a page. Renders the component in a <div> instead of an <a>.
22+
2223

2324
CatU:
2425
description: The embodied impacts of hardware, the development of software, content & data.

_includes/DIST/categoryLabel.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{% assign label = include.label %}
2+
{% assign dimension = include.dimension %}
23
{% assign title = site.data.categoryLabels[label].title %}
3-
{% assign scope = site.data.categoryLabels[label].GHGScope %}
44
{% assign colour = site.data.categoryLabels[label].category %}
55

6+
{% if dimension == "carbon" %}
7+
{% assign scope = site.data.categoryLabels[label].impactDimensions.carbon.GHGScope %}
8+
{% endif %}
9+
610
<div class="inline-flex items-baseline {{ colour }} border border-white rounded text-sm">
711
<div class="px-3 py-1 text-white">
812
{{ title }}
913
</div>
10-
{% if scope %}
14+
{% if dimension == "carbon" and scope %}
1115
<div class="flex justify-center w-6 py-1 font-medium bg-charcoal-100 text-charcoal">
1216
{{ scope }}
1317
</div>
Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
<div class="prose">
1+
{% assign title = include.title | false %}
22

3-
<h2>Impact Categories</h2>
3+
{% if title == true %}
4+
<h2 class="text-2xl">Impact Categories</h2>
5+
{% endif %}
46

5-
<p>DIST categorises impacts into three key sections:</p>
7+
<div class="prose mt-4">
8+
<p class="">DIST's taxonomy groups impacts into three key categories:</p>
9+
</div>
610

7-
<ol>
8-
<li>Upstream Impacts - {{ site.data.taxonomy.CatU.description }} <a href="/taxonomy/upstream/">Read more.</a></li>
9-
<li>Operational Impacts - {{ site.data.taxonomy.OperationalEmissions.description }} <a href="/taxonomy/operational/">Read more.</a></li>
10-
<li>Downstream Impacts - {{ site.data.taxonomy.CatD.description }} <a href="/taxonomy/downstream/">Read more.</a></li>
11-
</ol>
11+
<div class="grid gap-x-10 gap-y-6 sm:grid-cols-3 sm:grid-rows-[repeat(3,minmax(0,auto))] sm:grid-flow-col sm:auto-rows-auto mt-10 mb-16">
12+
<div class=""><h3 class="text-xl mb-0 border-blue border-b-2">1. Upstream Impacts</h3></div>
13+
<div class="">{{ site.data.taxonomy.CatU.description }}</div>
14+
<div class=""><a href="/taxonomy/upstream/">Read more.</a></div>
15+
<div class=""><h3 class="text-xl mb-0 border-purple border-b-2">2. Operational Impacts</h3></div>
16+
<div class="">{{ site.data.taxonomy.OperationalEmissions.description }}</div>
17+
<div class=""><a href="/taxonomy/operational/">Read more.</a></div>
18+
<div class=""><h3 class="text-xl mb-0 border-orange border-b-2">3. Downstream Impacts</h3></div>
19+
<div class="">{{ site.data.taxonomy.CatD.description }}</div>
20+
<div class=""><a href="/taxonomy/downstream/">Read more.</a></div>
1221
</div>

_includes/DIST/taxonomy-title.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<h3 class="text-2xl lg:text-3xl font-medium border-none">
2+
Impact dimension:
3+
4+
<span class="px-4 py-2 bg-black text-white font-bold">
5+
{% if include.dimension == "carbon" %}
6+
Carbon
7+
{% else %}
8+
Default
9+
{% endif %}
10+
</span>
11+
12+
</h3>

_includes/DIST/taxonomy-visual.html

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
{% assign dimension = include.dimension | "default" %}
2+
13
<!-- DIST taxonomy visual overview -->
24
<header class="flex flex-col lg:flex-row justify-between leading-tight lg:items-center py-4 px-4 gap-2 lg:gap-0 bg-white dark:bg-black/30">
3-
<h2 class="text-2xl lg:text-3xl font-medium">Digital Impacts Taxonomy</h2>
5+
6+
{% include DIST/taxonomy-title.html dimension=dimension %}
7+
48
<div class="flex flex-col gap-1">
59
<div class="flex h-8 gap-2 items-center">
610
<div class="relative h-full w-24 flex border border-white rounded overflow-hidden">
@@ -13,10 +17,13 @@ <h2 class="text-2xl lg:text-3xl font-medium">Digital Impacts Taxonomy</h2>
1317
</div>
1418
<div class="h-8 flex items-center"><span>DIST Category</span></div>
1519
</div>
16-
<div class="flex h-8 gap-2">
17-
<div class="flex items-center justify-center w-24 h-full bg-charcoal-100 rounded border border-white font-medium text-sm dark:text-charcoal">1/2/3</div>
18-
<div class="flex items-center"><span>GHG Protocol Scope</span></div>
19-
</div>
20+
21+
{% if dimension == "carbon" %}
22+
<div class="flex h-8 gap-2">
23+
<div class="flex items-center justify-center w-24 h-full bg-charcoal-100 rounded border border-white font-medium text-sm dark:text-charcoal">1/2/3</div>
24+
<div class="flex items-center"><span>GHG Protocol Scope</span></div>
25+
</div>
26+
{% endif %}
2027
</div>
2128
</header>
2229

@@ -29,7 +36,7 @@ <h2 class="text-2xl lg:text-3xl font-medium">Digital Impacts Taxonomy</h2>
2936
<div class="relative">
3037
<h3 class="pl-2 pb-0 mb-0 text-xl font-medium text-white border-none"><a class="text-inherit hover:text-inherit hover:opacity-80" href="/taxonomy/upstream">Upstream Impacts</a></h3>
3138
<div class="absolute right-0 top-8">
32-
{% include DIST/categoryLabel.html label="CatU" %}
39+
{% include DIST/categoryLabel.html label="CatU" dimension=dimension %}
3340
</div>
3441
</div>
3542
</div>
@@ -40,7 +47,7 @@ <h3 class="pl-2 pb-0 mb-0 text-xl font-medium text-white border-none"><a class="
4047
<p class="my-4">{{ site.data.taxonomy.CatU.description }}</p>
4148

4249
<h4 class="mt-8 mb-2 text-lg font-medium">Software</h4>
43-
{% include DIST/categoryItem.html item="CatUSoftware" %}
50+
{% include DIST/categoryItem.html item="CatUSoftware" dimension=dimension %}
4451

4552
<h4 class="mt-8 mb-2 text-lg font-medium">Hardware Manufacture, Transport and Installation</h4>
4653
{% include DIST/categoryItem.html item="CatUEmployeeHardware" %}
@@ -75,19 +82,19 @@ <h3 class="lg:pl-[3rem] pb-0 mb-0 text-xl font-medium border-none"><a class="tex
7582
<div class="relative px-2 py-2 border-2 border-white rounded-md">
7683
<h4 class="mb-2 text-lg font-medium">Direct</h4>
7784
<div class="absolute right-2 -top-2">
78-
{% include DIST/categoryLabel.html label="CatO" %}
85+
{% include DIST/categoryLabel.html label="CatO" dimension=dimension %}
7986
</div>
8087
<p class="my-4">{{ site.data.taxonomy.CatO.description }}</p>
8188

8289
{% include DIST/categoryItem.html item="CatOEmployeeDevices" %}
83-
{% include DIST/categoryItem.html item="CatONetworkDevices" %}
90+
{% include DIST/categoryItem.html item="CatONetworkDevices"%}
8491
{% include DIST/categoryItem.html item="CatOServers" %}
8592

8693
<!-- DIRECT (Category G) -->
8794
<div class="relative">
8895
<hr class="border-white mb-2">
8996
<div class="absolute right-2 -top-2">
90-
{% include DIST/categoryLabel.html label="CatG" %}
97+
{% include DIST/categoryLabel.html label="CatG" dimension=dimension %}
9198
</div>
9299
{% include DIST/categoryItem.html item="CatGGenerators" %}
93100
</div>
@@ -97,7 +104,7 @@ <h4 class="mb-2 text-lg font-medium">Direct</h4>
97104
<div class="relative px-2 py-2 border-2 border-white rounded-md">
98105
<h4 class="mb-2 text-lg font-medium">Indirect</h4>
99106
<div class="absolute right-2 -top-2">
100-
{% include DIST/categoryLabel.html label="CatC" %}
107+
{% include DIST/categoryLabel.html label="CatC" dimension=dimension %}
101108
</div>
102109
<p class="mb-2">{{ site.data.taxonomy.CatC.description }}</p>
103110

@@ -119,7 +126,7 @@ <h4 class="mb-2 text-lg font-medium">Indirect</h4>
119126
<div class="relative">
120127
<h3 class="lg:pl-[3rem] pb-0 mb-0 text-xl font-medium border-none"><a class="text-inherit hover:text-inherit hover:opacity-80" href="/taxonomy/downstream">Downstream Impacts</a></h3>
121128
<div class="absolute right-0 top-8">
122-
{% include DIST/categoryLabel.html label="CatD" %}
129+
{% include DIST/categoryLabel.html label="CatD" dimension=dimension %}
123130
</div>
124131
</div>
125132
</div>

_layouts/base-tabs.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ page.lang | default: site.lang | default: 'en' }}">
3+
4+
{%- include head.html -%}
5+
6+
<body class="min-h-[100vh] flex flex-col">
7+
8+
{%- include header.html -%}
9+
10+
<div class="relative flex-auto">
11+
<div class="hidden lg:block fixed -z-50 w-11/12 -top-24" style="background: radial-gradient(circle, rgba(187,247,187,1) 0%, rgba(255,255,255,1) 71%); height: calc(100% + 100px); right: -50vw;"></div>
12+
<main class="page-content container mx-auto pt-6 md:pt-8 px-2 sm:px-4" aria-label="Content">
13+
<div class="wrapper">
14+
{{ content }}
15+
</div>
16+
</main>
17+
</div>
18+
{%- include footer.html -%}
19+
20+
{%- include sub-footer.html -%}
21+
22+
<script src="/assets/js/tabs.js"></script>
23+
24+
</body>
25+
26+
</html>

0 commit comments

Comments
 (0)