Skip to content

Commit 87134f9

Browse files
authored
Merge pull request #392 from datamol-io/feat-google-analytics-support
add google analytics support and little tweaks
2 parents ba7e5f3 + 76ec9b5 commit 87134f9

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

docs/_assets/css/custom-graphium.css

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:root {
2-
--graphium-primary: #70ad47ff;
2+
--graphium-primary: #70ad47;
33
--graphium-secondary: #343a40;
44

55
/* Primary color shades */
@@ -17,59 +17,58 @@
1717
--md-accent-bg-color--light: var(--graphium-secondary);
1818
}
1919

20-
:root>* {
20+
:root > * {
2121
/* Code block color shades */
2222
--md-code-bg-color: hsla(0, 0%, 96%, 1);
2323
--md-code-fg-color: hsla(200, 18%, 26%, 1);
2424

2525
/* Footer */
26-
--md-footer-bg-color: var(--datamol-primary);
26+
--md-footer-bg-color: var(--graphium-primary);
2727
/* --md-footer-bg-color--dark: hsla(0, 0%, 0%, 0.32); */
2828
--md-footer-fg-color: var(--graphium-secondary);
2929
--md-footer-fg-color--light: var(--graphium-secondary);
3030
--md-footer-fg-color--lighter: var(--graphium-secondary);
31-
3231
}
3332

3433
.md-header {
35-
background-image: linear-gradient(to right, #70ad47ff, #70ad47ff);
34+
background-color: #70ad47;
3635
}
3736

3837
.md-footer {
39-
background-image: linear-gradient(to right, #70ad47ff, #70ad47ff);
38+
background-color: #70ad47;
4039
}
4140

4241
.md-tabs {
43-
background-image: linear-gradient(to right, #F4F6F9, #E2CEC3);
42+
background-image: linear-gradient(to right, #f4f6f9, #e2cec3);
4443
}
4544

4645
.md-header__topic {
47-
color: rgb(255, 255, 255);
46+
color: #fff;
4847
}
4948

5049
.md-source__repository,
5150
.md-source__icon,
5251
.md-search__input,
5352
.md-search__input::placeholder,
54-
.md-search__input~.md-search__icon,
53+
.md-search__input ~ .md-search__icon,
5554
.md-footer__inner.md-grid,
5655
.md-copyright__highlight,
5756
.md-copyright,
5857
.md-footer-meta.md-typeset a,
5958
.md-version {
60-
color: rgb(255, 255, 255) !important;
59+
color: #fff !important;
6160
}
6261

6362
.md-search__form {
6463
background-color: rgba(255, 255, 255, 0.2);
6564
}
6665

6766
.md-search__input {
68-
color: #222222 !important;
67+
color: #222 !important;
6968
}
7069

7170
.md-header__topic {
72-
color: rgb(255, 255, 255);
71+
color: #fff;
7372
font-size: 1.4em;
7473
}
7574

docs/_assets/css/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Indentation. */
22
div.doc-contents:not(.first) {
33
padding-left: 25px;
4-
border-left: 4px solid rgba(230, 230, 230);
4+
border-left: 4px solid #e6e6e6;
55
margin-bottom: 80px;
66
}
77

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var gtag_id = "G-K76VNHBRM4";
2+
3+
var script = document.createElement("script");
4+
script.src = "https://www.googletagmanager.com/gtag/js?id=" + gtag_id;
5+
document.head.appendChild(script);
6+
7+
window.dataLayer = window.dataLayer || [];
8+
function gtag() {
9+
dataLayer.push(arguments);
10+
}
11+
gtag("js", new Date());
12+
gtag("config", gtag_id);

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ nav:
4848
theme:
4949
name: material
5050
# NOTE(hadim): to customize the material primary and secondary
51-
# color check `docs/assets/css/datamol-custom.css`.
51+
# color check `docs/_assets/css/custom-graphium.css`.
5252
features:
5353
- navigation.tabs
5454
- navigation.expand
@@ -60,9 +60,9 @@ extra_css:
6060
- _assets/css/custom-graphium.css
6161

6262
extra_javascript:
63-
- javascripts/config.js
6463
- https://polyfill.io/v3/polyfill.min.js?features=es6
6564
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
65+
- _assets/js/google-analytics.js
6666

6767
markdown_extensions:
6868
- admonition

0 commit comments

Comments
 (0)