Skip to content

Commit

Permalink
Merge pull request #31 from ScottLogic/add-estimator
Browse files Browse the repository at this point in the history
Add tech carbon estimator to TCS
  • Loading branch information
sdun-scottlogic authored Jun 21, 2024
2 parents 8c2e19d + 34a555f commit a12199a
Show file tree
Hide file tree
Showing 8 changed files with 458 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

gem 'jekyll-node-module'
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ GEM
webrick (~> 1.7)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-node-module (0.1.3)
jekyll (>= 2.0, < 5.0)
jekyll-postcss-v2 (1.0.2)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
Expand Down Expand Up @@ -127,6 +129,7 @@ DEPENDENCIES
http_parser.rb (~> 0.6.0)
jekyll
jekyll-feed (~> 0.12)
jekyll-node-module
jekyll-postcss-v2
tzinfo (>= 1, < 3)
tzinfo-data
Expand Down
12 changes: 12 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ collections:
- glossary
- resources

plugins:
- jekyll-node-module

node_modules:
modules_dir: node_modules
assets:
js: assets/scripts
css: assets/styles
copy:
- source: "@scottlogic/tech-carbon-estimator"
target: assets/tech-carbon-estimator

# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
Expand Down
2 changes: 2 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
link: /glossary
- name: About
link: /about
#- name: Carbon Estimator
# link: /estimator
10 changes: 9 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title }}</title>
<link rel="stylesheet" href={{"/assets/css/main.css" | relative_url }}>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PRVD4KMH9C"></script>
<script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-PRVD4KMH9C');</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>

{% if page.includeEstimator == true %}
<!-- Tech carbon estimator -->
<script src={{ "assets/tech-carbon-estimator/polyfills.js" | relative_url }} type="module"></script>
<script src={{ "assets/tech-carbon-estimator/main.js" | relative_url }} type="module"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined" rel="stylesheet" />
<link rel="stylesheet" href={{"/assets/tech-carbon-estimator/styles.css" | relative_url }}>
{% endif %}
</head>
<body class="bg-gunmetal-50 text-charcoal dark:bg-gunmetal-950 dark:text-charcoal-100">
<!-- NAVIGATION -->
Expand Down
Loading

0 comments on commit a12199a

Please sign in to comment.