diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..d8e5c91b68cb --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.sass-cache +.jekyll-metadata +_site/ +node_modules/* +results/*/* \ No newline at end of file diff --git a/CNAME b/CNAME new file mode 100644 index 000000000000..3333efe27b02 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +demo.speedtracker.org \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000000..109959e849cd --- /dev/null +++ b/Gemfile @@ -0,0 +1,24 @@ +source "https://rubygems.org" +ruby RUBY_VERSION + +# Hello! This is where you manage which Jekyll version is used to run. +# When you want to use a different version, change it below, save the +# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: +# +# bundle exec jekyll serve +# +# This will help ensure the proper Jekyll version is running. +# Happy Jekylling! +gem "jekyll", "3.2.1" + +# This is the default theme for new Jekyll sites. You may change this to anything you like. +gem "minima" + +# If you want to use GitHub Pages, remove the "gem "jekyll"" above and +# uncomment the line below. To upgrade, run `bundle update github-pages`. +# gem "github-pages", group: :jekyll_plugins + +# If you have any plugins, put them here! +# group :jekyll_plugins do +# gem "jekyll-github-metadata", "~> 1.0" +# end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000000..1d894a3423cf --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,42 @@ +GEM + remote: https://rubygems.org/ + specs: + colorator (1.1.0) + ffi (1.9.14) + forwardable-extended (2.6.0) + jekyll (3.2.1) + colorator (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 3.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (~> 1.7) + safe_yaml (~> 1.0) + jekyll-sass-converter (1.4.0) + sass (~> 3.4) + jekyll-watch (1.5.0) + listen (~> 3.0, < 3.1) + kramdown (1.12.0) + liquid (3.0.6) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + mercenary (0.3.6) + minima (1.0.1) + pathutil (0.14.0) + forwardable-extended (~> 2.6) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + rouge (1.11.1) + safe_yaml (1.0.4) + sass (3.4.22) + +PLATFORMS + ruby + +DEPENDENCIES + jekyll (= 3.2.1) + minima diff --git a/README.md b/README.md new file mode 100644 index 000000000000..40fe81b750dd --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ + + +# SpeedTracker front-end \ No newline at end of file diff --git a/_config.yml b/_config.yml new file mode 100644 index 000000000000..1a40a95ca930 --- /dev/null +++ b/_config.yml @@ -0,0 +1,25 @@ +detach: false +port: 4820 +host: 0.0.0.0 + +exclude: + - app + - node_modules + - src/results + - public + - Gemfile* + - package.json + - speedtracker.yml + - webpack.config.js + +collections: + profiles: + output: true + +defaults: + - scope: + path: "" + type: "profiles" + values: + layout: data + permalink: /:path/ diff --git a/_includes/getCurrentProfile b/_includes/getCurrentProfile new file mode 100644 index 000000000000..52521058018d --- /dev/null +++ b/_includes/getCurrentProfile @@ -0,0 +1 @@ +{% assign currentProfile = '' %}{% for profile in site.profiles %}{% if page.slug %}{% if page.slug == profile.slug %}{% assign currentProfile = profile.slug %}{% endif %}{% else %}{% if profile.default %}{% assign currentProfile = profile.slug %}{% endif %}{% endif %}{% endfor %}{{ currentProfile }} \ No newline at end of file diff --git a/_includes/listAllProfiles b/_includes/listAllProfiles new file mode 100644 index 000000000000..42abd8a7b28b --- /dev/null +++ b/_includes/listAllProfiles @@ -0,0 +1 @@ +{% capture currentProfile %}{% include getCurrentProfile %}{% endcapture %}[{% for profile in site.profiles %}{slug:{{ profile.slug | jsonify }},name:{{ profile.name | jsonify }},budgets:{{ profile.budgets | jsonify }}{% if profile.slug == currentProfile %},active:true{% endif %}},{% endfor %}] \ No newline at end of file diff --git a/_includes/listProfileTests b/_includes/listProfileTests new file mode 100644 index 000000000000..598e7490e505 --- /dev/null +++ b/_includes/listProfileTests @@ -0,0 +1 @@ +{% assign paths = '' | split: '/' %}{% for file in site.static_files %}{% assign filePath = file.path | split: '/' %}{% if filePath[2] == include.profile %}{% assign filename = filePath[4] | split: '.' %}{% assign date = filePath[3] | append: filename[0] | plus: 0 %}{% assign paths = paths | push: date %}{% endif %}{% endfor %}{{ paths | jsonify }} \ No newline at end of file diff --git a/_includes/meta.html b/_includes/meta.html new file mode 100644 index 000000000000..e0d1f6c7f46f --- /dev/null +++ b/_includes/meta.html @@ -0,0 +1,37 @@ + + + + +{% assign currentProfile = '' %}{% for profile in site.profiles %}{% if page.slug %}{% if page.slug == profile.slug %}{% assign currentProfile = profile.name %}{% endif %}{% else %}{% if profile.default %}{% assign currentProfile = profile.name %}{% endif %}{% endif %}{% endfor %} + +{% assign pageTitle = 'SpeedTracker' %} + +{% if currentProfile != '' %} + {% assign pageTitle = pageTitle | append: ' - ' | append: currentProfile %} +{% endif %} + +