Skip to content

Commit bda24ad

Browse files
authored
Add google analytics (#33)
* Add analytics * Remove unused
1 parent 5347b93 commit bda24ad

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

templates/doc/frame.html.jinja2

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<meta name="generator" content="pdoc {{ __version__ }}"/>
7+
<title>{% block title %}{% endblock %}</title>
8+
{% block favicon %}
9+
{% if favicon %}
10+
<link rel="icon" href="{{ favicon }}"/>
11+
{% endif %}
12+
{% endblock %}
13+
{% block head %}{% endblock %}
14+
{% filter minify_css | indent %}
15+
{% block style %}
16+
<style>{% include "resources/bootstrap-reboot.min.css" %}</style>
17+
<style>/*! syntax-highlighting.css */{% include "syntax-highlighting.css" %}</style>
18+
{#
19+
The style_pdoc, style_theme, style_layout, and style_content Jinja2 blocks are deprecated and will be
20+
removed in a future release. Custom templates should either provide alternatives for the specific CSS files,
21+
or append their own styles by providing `custom.css` (see examples/custom-template/).
22+
#}
23+
{% block style_pdoc %}
24+
{% block style_theme %}<style>/*! theme.css */{% include "theme.css" %}</style>{% endblock %}
25+
{% block style_layout %}<style>/*! layout.css */{% include "layout.css" %}</style>{% endblock %}
26+
{% block style_content %}<style>/*! content.css */{% include "content.css" %}</style>{% endblock %}
27+
{# Use this file in your custom template directory to add additional CSS styling: #}
28+
<style>/*! custom.css */{% include "custom.css" %}</style>
29+
{% endblock %}
30+
{% endblock %}
31+
{% endfilter %}
32+
{% if math %}{% include "math.html.jinja2" %}{% endif %}
33+
{% if mermaid %}{% include "mermaid.html.jinja2" %}{% endif %}
34+
</head>
35+
<!-- Google tag (gtag.js) -->
36+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-G3M2G8V4M7"></script>
37+
<script>
38+
window.dataLayer = window.dataLayer || [];
39+
function gtag() { dataLayer.push(arguments); }
40+
gtag('js', new Date());
41+
42+
gtag('config', 'G-G3M2G8V4M7');
43+
</script>
44+
<body>
45+
{% block body %}
46+
<nav class="pdoc">
47+
<label id="navtoggle" for="togglestate" class="pdoc-button">{% include 'resources/navtoggle.svg' %}</label>
48+
<input id="togglestate" type="checkbox" aria-hidden="true" tabindex="-1">
49+
<div>{% block nav %}{% endblock %}</div>
50+
</nav>
51+
{% block content %}{% endblock %}
52+
{% endblock body %}
53+
</body>
54+
</html>

0 commit comments

Comments
 (0)