From 11036a667faf8a82e5692e4520efdfb4701a2b01 Mon Sep 17 00:00:00 2001 From: "wang.jianbo" Date: Sun, 3 Nov 2024 13:49:43 +0900 Subject: [PATCH] add google analytics --- templates/base.html | 264 +++++++++++++++++++++++--------------------- 1 file changed, 139 insertions(+), 125 deletions(-) diff --git a/templates/base.html b/templates/base.html index c655b985..92a2d103 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,129 +1,143 @@ - - - - - - - {% if page.title %} - {% set title = page.title %} - {% elif section.title %} - {% set title = section.title %} - {% elif config.title %} - {% set title = config.title %} - {% endif %} - {% if page.extra.author %} - {% set author = page.extra.author %} - {% elif section.extra.author %} - {% set author = section.extra.author %} - {% elif config.extra.author %} - {% set author = config.extra.author %} - {% endif %} - {% if page.description %} - {% set description = page.description | truncate(length=150) %} - {% elif section.description %} - {% set description = section.description | truncate(length=150) %} - {% elif config.description %} - {% set description = config.description | truncate(length=150) %} - {% endif %} - {% if page.extra.image %} - {% set image = get_url(path=page.extra.image, trailing_slash=false) %} - {% elif section.extra.image %} - {% set image = get_url(path=section.extra.image, trailing_slash=false) %} - {% elif config.extra.favicon %} - {% set image = get_url(path=config.extra.favicon, trailing_slash=false) %} - {% endif %} - {% if page.permalink %} - {% set url = page.permalink %} - {% elif section.permalink %} - {% set url = section.permalink %} - {% elif config.base_url %} - {% set url = config.base_url %} - {% endif %} - {% if title %} - {{ title }} - {% endif %} - {% block metatags %} - {% if title %} - - {% endif %} - {% if author %} - - {% endif %} - {% if description %} - - {% endif %} - - - {% if title %} - - {% endif %} - {% if title %} - - {% endif %} - {% if description %} - - {% endif %} - {% if image %} - - {% endif %} - {% set twitter_card = config.extra.twitter_card | default(value=true) %} - {% if twitter_card != false %} - - - {% if title %} - - {% endif %} - {% if description %} - - {% endif %} - {% if image %} - - {% endif %} - {% endif %} - - {% if image %} - - {% endif %} - {% endblock metatags %} - {% if config.generate_feed %} - {% block feed %} - - {% endblock feed %} - {% endif %} - {% block css %} - - - - {% endblock css %} - - -
-
- {% if config.extra.header_nav %} - + + + + + + + + {% if page.title %} + {% set title = page.title %} + {% elif section.title %} + {% set title = section.title %} + {% elif config.title %} + {% set title = config.title %} + {% endif %} + {% if page.extra.author %} + {% set author = page.extra.author %} + {% elif section.extra.author %} + {% set author = section.extra.author %} + {% elif config.extra.author %} + {% set author = config.extra.author %} + {% endif %} + {% if page.description %} + {% set description = page.description | truncate(length=150) %} + {% elif section.description %} + {% set description = section.description | truncate(length=150) %} + {% elif config.description %} + {% set description = config.description | truncate(length=150) %} + {% endif %} + {% if page.extra.image %} + {% set image = get_url(path=page.extra.image, trailing_slash=false) %} + {% elif section.extra.image %} + {% set image = get_url(path=section.extra.image, trailing_slash=false) %} + {% elif config.extra.favicon %} + {% set image = get_url(path=config.extra.favicon, trailing_slash=false) %} + {% endif %} + {% if page.permalink %} + {% set url = page.permalink %} + {% elif section.permalink %} + {% set url = section.permalink %} + {% elif config.base_url %} + {% set url = config.base_url %} + {% endif %} + {% if title %} + {{ title }} + {% endif %} + {% block metatags %} + {% if title %} + + {% endif %} + {% if author %} + + {% endif %} + {% if description %} + + {% endif %} + + + {% if title %} + + {% endif %} + {% if title %} + + {% endif %} + {% if description %} + + {% endif %} + {% if image %} + + {% endif %} + {% set twitter_card = config.extra.twitter_card | default(value=true) %} + {% if twitter_card != false %} + + + {% if title %} + + {% endif %} + {% if description %} + + {% endif %} + {% if image %} + + {% endif %} + {% endif %} + + {% if image %} + + {% endif %} + {% endblock metatags %} + {% if config.generate_feed %} + {% block feed %} + + {% endblock feed %} + {% endif %} + {% block css %} + + + + {% endblock css %} + + + + + + +
+
+ {% if config.extra.header_nav %} +
+ {% endfor %} + + {% endif %} +
+ +
+ {% block content %}{% endblock content %} +
+
+ + -
- {% block content %}{% endblock content %} -
- - - - + \ No newline at end of file