From 55d82ffec1d8977ce401768e0c2dcaadc375dcd6 Mon Sep 17 00:00:00 2001 From: Barry Date: Sun, 29 Nov 2020 21:41:53 +0000 Subject: [PATCH 1/2] Move Methodology code block to Rainbow styles to avoid duplication of code --- src/static/css/page.css | 20 ------------------- src/templates/en/2019/methodology.html | 20 +++++++++---------- src/templates/en/2020/methodology.html | 20 +++++++++---------- src/templates/fr/2019/methodology.html | 22 ++++++++++----------- src/templates/fr/2020/methodology.html | 24 +++++++++++------------ src/templates/hi/2019/methodology.html | 20 +++++++++---------- src/templates/hi/2020/methodology.html | 20 +++++++++---------- src/templates/ja/2019/methodology.html | 20 +++++++++---------- src/templates/ja/2020/methodology.html | 20 +++++++++---------- src/templates/ru/2019/methodology.html | 20 +++++++++---------- src/templates/ru/2020/methodology.html | 20 +++++++++---------- src/templates/zh-CN/2019/methodology.html | 22 ++++++++++----------- 12 files changed, 114 insertions(+), 134 deletions(-) diff --git a/src/static/css/page.css b/src/static/css/page.css index e30b4f22158..6ae2e79a1d8 100644 --- a/src/static/css/page.css +++ b/src/static/css/page.css @@ -690,23 +690,3 @@ pre { .code-block code { width: 100%; } - -.code-comment { - color: #006400; -} - -.code-keyword { - color: #4a3244; -} - -.code-function { - color: #1a2b49; -} - -.code-string { - color: #2c4a73; -} - -.code-number { - color: #00f; -} diff --git a/src/templates/en/2019/methodology.html b/src/templates/en/2019/methodology.html index 94c40a00eef..514e6815245 100644 --- a/src/templates/en/2019/methodology.html +++ b/src/templates/en/2019/methodology.html @@ -83,19 +83,19 @@

About the dataset
-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
diff --git a/src/templates/en/2020/methodology.html b/src/templates/en/2020/methodology.html index 077e9e3ca61..78d7295ceeb 100644 --- a/src/templates/en/2020/methodology.html +++ b/src/templates/en/2020/methodology.html @@ -88,19 +88,19 @@

About the dataset
-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
diff --git a/src/templates/fr/2019/methodology.html b/src/templates/fr/2019/methodology.html index a8bc2e14f98..4f8abacb7ac 100644 --- a/src/templates/fr/2019/methodology.html +++ b/src/templates/fr/2019/methodology.html @@ -67,7 +67,7 @@

Vue d’ensembleÀ propos du jeu de données

- Le jeu de données HTTP Archive est continuellement mis à jour avec de nouvelles données mensuelles. Pour l’édition 2019 du Web Almanac, sauf indication contraire dans le chapitre, tous les paramètres ont été obtenus à partir de l’index de juillet 2019. Ces résultats sont publiquement requêtables sur BigQuery dans des tables préfixées par 2019_07_01. + Le jeu de données HTTP Archive est continuellement mis à jour avec de nouvelles données mensuelles. Pour l’édition 2019 du Web Almanac, sauf indication contraire dans le chapitre, tous les paramètres ont été obtenus à partir de l’index de juillet 2019. Ces résultats sont publiquement requêtables sur BigQuery dans des tables préfixées par 2019_07_01.

@@ -83,19 +83,19 @@

À propos du jeu de donn

-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
diff --git a/src/templates/fr/2020/methodology.html b/src/templates/fr/2020/methodology.html index c6271fb6164..7239f9b151c 100644 --- a/src/templates/fr/2020/methodology.html +++ b/src/templates/fr/2020/methodology.html @@ -72,7 +72,7 @@

Vue d’ensembleÀ propos du jeu de données

- Le jeu de données HTTP Archive est continuellement mis à jour avec de nouvelles données mensuelles. Pour l’édition 2020 du Web Almanac, sauf indication contraire dans le chapitre, tous les paramètres ont été obtenus à partir de l’index de août 2020. Ces résultats sont publiquement requêtables sur BigQuery dans des tables préfixées par 2020_08_01. + Le jeu de données HTTP Archive est continuellement mis à jour avec de nouvelles données mensuelles. Pour l’édition 2020 du Web Almanac, sauf indication contraire dans le chapitre, tous les paramètres ont été obtenus à partir de l’index de août 2020. Ces résultats sont publiquement requêtables sur BigQuery dans des tables préfixées par 2020_08_01.

@@ -88,19 +88,19 @@

À propos du jeu de donn

-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
@@ -419,7 +419,7 @@

Planification

Les responsables du projet ont examiné toutes les nominations d’auteurs et d’autrices et se sont efforcés de sélectionner des personnes qui apportent de nouvelles perspectives et amplifient les voix des groupes sous-représentés dans la communauté. - +

Nous espérons réitérer ce processus à l’avenir afin de garantir que le Web Almanac soit un projet plus diversifié et inclusif avec des contributeurs et contributrices de tous horizons.

diff --git a/src/templates/hi/2019/methodology.html b/src/templates/hi/2019/methodology.html index 86d5c5e6366..4c6e19878d6 100644 --- a/src/templates/hi/2019/methodology.html +++ b/src/templates/hi/2019/methodology.html @@ -83,19 +83,19 @@

डेटासेट

-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
diff --git a/src/templates/hi/2020/methodology.html b/src/templates/hi/2020/methodology.html index 9dc5127f18b..a23fc306dc7 100644 --- a/src/templates/hi/2020/methodology.html +++ b/src/templates/hi/2020/methodology.html @@ -88,19 +88,19 @@

डेटासेट

-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
diff --git a/src/templates/ja/2019/methodology.html b/src/templates/ja/2019/methodology.html index 9a060072ff1..48dfe9b8967 100644 --- a/src/templates/ja/2019/methodology.html +++ b/src/templates/ja/2019/methodology.html @@ -83,19 +83,19 @@

データセットにつ

-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
diff --git a/src/templates/ja/2020/methodology.html b/src/templates/ja/2020/methodology.html index 59ab236a78f..517a65d8a5a 100644 --- a/src/templates/ja/2020/methodology.html +++ b/src/templates/ja/2020/methodology.html @@ -88,19 +88,19 @@

データセットにつ

-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
diff --git a/src/templates/ru/2019/methodology.html b/src/templates/ru/2019/methodology.html index 0ac54579133..40012f74e5d 100644 --- a/src/templates/ru/2019/methodology.html +++ b/src/templates/ru/2019/methodology.html @@ -83,19 +83,19 @@

О наборе данн

-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
diff --git a/src/templates/ru/2020/methodology.html b/src/templates/ru/2020/methodology.html index a7976c80741..301397c47e7 100644 --- a/src/templates/ru/2020/methodology.html +++ b/src/templates/ru/2020/methodology.html @@ -88,19 +88,19 @@

О наборе данн

-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
diff --git a/src/templates/zh-CN/2019/methodology.html b/src/templates/zh-CN/2019/methodology.html index 76ca8e81745..911f8fdc7fc 100644 --- a/src/templates/zh-CN/2019/methodology.html +++ b/src/templates/zh-CN/2019/methodology.html @@ -83,19 +83,19 @@

关于数据集

-
#standardSQL
-# 01_01b: Distribution of JS bytes by client
-SELECT
+          
#standardSQL
+# 01_01b: Distribution of JS bytes by client
+SELECT
   percentile,
-  _TABLE_SUFFIX AS client,
-  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
-FROM
-  `httparchive.summary_pages.2019_07_01_*`,
-  UNNEST([10, 25, 50, 75, 90]) AS percentile
-GROUP BY
+  _TABLE_SUFFIX AS client,
+  APPROX_QUANTILES(ROUND(bytesJs / 1024, 2), 1000)[OFFSET(percentile * 10)] AS js_kbytes
+FROM
+  `httparchive.summary_pages.2019_07_01_*`,
+  UNNEST([10, 25, 50, 75, 90]) AS percentile
+GROUP BY
   percentile,
   client
-ORDER BY
+ORDER BY
   percentile,
   client
@@ -305,7 +305,7 @@

Wappalyzer

- Wappalyzer为很多章节提供动力,它分析开发人员工具的流行程度,例如 WordPress,Bootstrap,和jQuery。比如 电商CMS 章节非常依赖于Wappalyzer探测出的各自的 电商CMS 类别。 + Wappalyzer为很多章节提供动力,它分析开发人员工具的流行程度,例如 WordPress,Bootstrap,和jQuery。比如 电商CMS 章节非常依赖于Wappalyzer探测出的各自的 电商CMS 类别。

From 3fc4d42f2aaa9e656f204aa3c47d423c98a46b09 Mon Sep 17 00:00:00 2001 From: Barry Date: Sun, 29 Nov 2020 22:00:31 +0000 Subject: [PATCH 2/2] Added comment on how to generate code block --- src/templates/en/2019/methodology.html | 1 + src/templates/en/2020/methodology.html | 1 + src/templates/fr/2019/methodology.html | 1 + src/templates/fr/2020/methodology.html | 1 + src/templates/hi/2019/methodology.html | 1 + src/templates/hi/2020/methodology.html | 1 + src/templates/ja/2019/methodology.html | 1 + src/templates/ja/2020/methodology.html | 1 + src/templates/ru/2019/methodology.html | 1 + src/templates/ru/2020/methodology.html | 1 + src/templates/zh-CN/2019/methodology.html | 1 + 11 files changed, 11 insertions(+) diff --git a/src/templates/en/2019/methodology.html b/src/templates/en/2019/methodology.html index 514e6815245..8f7d375531a 100644 --- a/src/templates/en/2019/methodology.html +++ b/src/templates/en/2019/methodology.html @@ -83,6 +83,7 @@

About the dataset
+ {# To generate this markup temporarily add a ```sql code block to a chapter and generate that chapter and you'll get the HTML #}
#standardSQL
 # 01_01b: Distribution of JS bytes by client
 SELECT
diff --git a/src/templates/en/2020/methodology.html b/src/templates/en/2020/methodology.html
index 78d7295ceeb..09bf6f6a3b6 100644
--- a/src/templates/en/2020/methodology.html
+++ b/src/templates/en/2020/methodology.html
@@ -88,6 +88,7 @@ 

About the dataset
+ {# To generate this markup temporarily add a ```sql code block to a chapter and generate that chapter and you'll get the HTML #}
#standardSQL
 # 01_01b: Distribution of JS bytes by client
 SELECT
diff --git a/src/templates/fr/2019/methodology.html b/src/templates/fr/2019/methodology.html
index 4f8abacb7ac..9c25973038d 100644
--- a/src/templates/fr/2019/methodology.html
+++ b/src/templates/fr/2019/methodology.html
@@ -83,6 +83,7 @@ 

À propos du jeu de donn

+ {# To generate this markup temporarily add a ```sql code block to a chapter and generate that chapter and you'll get the HTML #}
#standardSQL
 # 01_01b: Distribution of JS bytes by client
 SELECT
diff --git a/src/templates/fr/2020/methodology.html b/src/templates/fr/2020/methodology.html
index 7239f9b151c..57e91e878e4 100644
--- a/src/templates/fr/2020/methodology.html
+++ b/src/templates/fr/2020/methodology.html
@@ -88,6 +88,7 @@ 

À propos du jeu de donn

+ {# To generate this markup temporarily add a ```sql code block to a chapter and generate that chapter and you'll get the HTML #}
#standardSQL
 # 01_01b: Distribution of JS bytes by client
 SELECT
diff --git a/src/templates/hi/2019/methodology.html b/src/templates/hi/2019/methodology.html
index 4c6e19878d6..610be31400d 100644
--- a/src/templates/hi/2019/methodology.html
+++ b/src/templates/hi/2019/methodology.html
@@ -83,6 +83,7 @@ 

डेटासेट

+ {# To generate this markup temporarily add a ```sql code block to a chapter and generate that chapter and you'll get the HTML #}
#standardSQL
 # 01_01b: Distribution of JS bytes by client
 SELECT
diff --git a/src/templates/hi/2020/methodology.html b/src/templates/hi/2020/methodology.html
index a23fc306dc7..bc324c3b197 100644
--- a/src/templates/hi/2020/methodology.html
+++ b/src/templates/hi/2020/methodology.html
@@ -88,6 +88,7 @@ 

डेटासेट

+ {# To generate this markup temporarily add a ```sql code block to a chapter and generate that chapter and you'll get the HTML #}
#standardSQL
 # 01_01b: Distribution of JS bytes by client
 SELECT
diff --git a/src/templates/ja/2019/methodology.html b/src/templates/ja/2019/methodology.html
index 48dfe9b8967..e883b4f94f4 100644
--- a/src/templates/ja/2019/methodology.html
+++ b/src/templates/ja/2019/methodology.html
@@ -83,6 +83,7 @@ 

データセットにつ

+ {# To generate this markup temporarily add a ```sql code block to a chapter and generate that chapter and you'll get the HTML #}
#standardSQL
 # 01_01b: Distribution of JS bytes by client
 SELECT
diff --git a/src/templates/ja/2020/methodology.html b/src/templates/ja/2020/methodology.html
index 517a65d8a5a..6372f23c496 100644
--- a/src/templates/ja/2020/methodology.html
+++ b/src/templates/ja/2020/methodology.html
@@ -88,6 +88,7 @@ 

データセットにつ

+ {# To generate this markup temporarily add a ```sql code block to a chapter and generate that chapter and you'll get the HTML #}
#standardSQL
 # 01_01b: Distribution of JS bytes by client
 SELECT
diff --git a/src/templates/ru/2019/methodology.html b/src/templates/ru/2019/methodology.html
index 40012f74e5d..f6f3e043b03 100644
--- a/src/templates/ru/2019/methodology.html
+++ b/src/templates/ru/2019/methodology.html
@@ -83,6 +83,7 @@ 

О наборе данн