From 4735fd488e531e4bf2d659526ef2ddb56816af13 Mon Sep 17 00:00:00 2001 From: Nicolas MASSART Date: Thu, 20 Dec 2018 11:39:39 +0100 Subject: [PATCH] Add Google analytics to doc site (#471) * Fixes #440 add analytics and move scripts and css to header by overriding blocks in main * Fixes domain namenow that we have doc.pantheon.pegasys.tech --- .../assets/stylesheets/pantheon_custom.css | 31 +++++++++++++ docs/custom_theme/main.html | 24 +++++++++++ docs/custom_theme/partials/footer.html | 43 +------------------ mkdocs.yml | 4 +- 4 files changed, 58 insertions(+), 44 deletions(-) create mode 100644 docs/custom_theme/assets/stylesheets/pantheon_custom.css create mode 100644 docs/custom_theme/main.html diff --git a/docs/custom_theme/assets/stylesheets/pantheon_custom.css b/docs/custom_theme/assets/stylesheets/pantheon_custom.css new file mode 100644 index 0000000000..e1f4be8f09 --- /dev/null +++ b/docs/custom_theme/assets/stylesheets/pantheon_custom.css @@ -0,0 +1,31 @@ +.feedback{ + padding: 1em; + text-align: center; + background-color: {{config.extra.support.footer_layout.background_color}}; +} +.feedback a { + color: {{config.extra.support.footer_layout.links_color}} !important; +} +.md-nav--secondary .md-nav__item .md-nav__item a.md-nav__link { + font-weight: normal; + font-size: inherit; +} +.md-nav--secondary a.md-nav__link { + font-weight: bolder; + +} +.rst-versions { + border-color: lightseagreen !important; + border-style: solid !important; + font-size: large; +} + +.rst-versions .rst-current-version { + background-color: #475c64 !important; +} + +.headerlink { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + font-size: small; +} \ No newline at end of file diff --git a/docs/custom_theme/main.html b/docs/custom_theme/main.html new file mode 100644 index 0000000000..2a3d29e76d --- /dev/null +++ b/docs/custom_theme/main.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block extrahead %} + + + +{% endblock %} + +{% block analytics %} + {% if config.google_analytics %} + + + + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/docs/custom_theme/partials/footer.html b/docs/custom_theme/partials/footer.html index c5ff1fc80c..d0a2d09e98 100644 --- a/docs/custom_theme/partials/footer.html +++ b/docs/custom_theme/partials/footer.html @@ -22,42 +22,6 @@ {% import "partials/language.html" as lang with context %} - - - -
Questions or feedback? You can discuss issues and obtain free support on Pegasys Pantheon Gitter room.
@@ -138,9 +102,4 @@ {% endblock %}
- - - \ No newline at end of file + \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 1e3deb2df0..000b31510e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -11,12 +11,12 @@ # Project information site_name: Pantheon -site_url: https://pantheon.readthedocs.io/ +site_url: https://doc.pantheon.pegasys.tech/ site_description: Pantheon Java Ethereum client documentation. site_author: Pantheon community copyright: Pantheon and its documentation are licensed under Apache 2.0 license / This Readthedocs.org documentation is maintained with love by PegaSys. -#google_analytics: ['UA-36723568-3', 'pantheon.readthedocs.io'] +google_analytics: ['UA-117921923-2', 'doc.pantheon.pegasys.tech'] #extra project info and template customisation extra: