浏览代码

Remove traces of old AMP code (#478)

Vince Salvino 3 年之前
父节点
当前提交
e93f12d32c

+ 1 - 1
coderedcms/templates/coderedcms/blocks/button_block.html

@@ -1,5 +1,5 @@
 <a href="{{self.url}}"
-    {% if settings.coderedcms.AnalyticsSettings.ga_track_button_clicks and not format == 'amp' %}
+    {% if settings.coderedcms.AnalyticsSettings.ga_track_button_clicks %}
         data-ga-event-category='{{self.settings.ga_tracking_event_category|default:"Button"}}'
         data-ga-event-label='{{self.settings.ga_tracking_event_label|default:self.button_title}}'
     {% endif %}

+ 3 - 3
coderedcms/templates/coderedcms/blocks/download_block.html

@@ -1,7 +1,7 @@
 {% load wagtailcore_tags %}
 
 <a href="{{self.downloadable_file.url}}" download="{{self.downloadable_file.url}}"
-    {% if settings.coderedcms.AnalyticsSettings.ga_track_button_clicks and not format == 'amp' %}
+    {% if settings.coderedcms.AnalyticsSettings.ga_track_button_clicks %}
         data-ga-event-category='{{self.settings.ga_tracking_event_category|default:"Download"}}'
         data-ga-event-label='{{self.settings.ga_tracking_event_label|default:self.button_title}}'
     {% endif %}
@@ -15,10 +15,10 @@
 {% endif %}
 </a>
 
-{% if self.automatic_download and not format == 'amp' %}
+{% if self.automatic_download %}
 <script>
     $(document).ready(function(){
         window.open("{{self.downloadable_file.url}}", '_blank');
     });
 </script>
-{% endif %}
+{% endif %}

+ 0 - 12
coderedcms/templates/coderedcms/blocks/image_block.html

@@ -2,19 +2,7 @@
 
 {% image self.image max-1000x1000 as self_image %}
 
-{% if format == 'amp' %}
-
-<amp-img src="{{self_image.url}}"
-layout="responsive" width="{{self_image.width}}" height="{{self_image.height}}"
-class="{{self.settings.custom_css_class}}"
-{% if self.settings.custom_id %}id="{{self.settings.custom_id}}"{% endif %}
-alt="{{self_image.image.title}}"></amp-img>
-
-{% else %}
-
 <img src="{{self_image.url}}"
 class="w-100 {{self.settings.custom_css_class}}"
 {% if self.settings.custom_id %}id="{{self.settings.custom_id}}"{% endif %}
 alt="{{self_image.image.title}}" />
-
-{% endif %}

+ 2 - 2
coderedcms/templates/coderedcms/blocks/image_link_block.html

@@ -1,11 +1,11 @@
 {% load wagtailimages_tags %}
 
 <a href="{{self.url}}"
-    {% if settings.coderedcms.AnalyticsSettings.ga_track_button_clicks and not format == 'amp' %}
+    {% if settings.coderedcms.AnalyticsSettings.ga_track_button_clicks %}
         data-ga-event-category='{{self.settings.ga_tracking_event_category|default:"ImageLink"}}'
         data-ga-event-label='{{self.settings.ga_tracking_event_label|default:self.alt_text}}'
     {% endif %}
     title="{{ self.alt_text|safe }}" {% if self.settings.custom_id %}id="{{ self.settings.custom_id }}" {% endif %}>
     {% image self.image max-1000x1000 as self_image %}
     <img src="{{self_image.url}}" class="img-fluid {{self.settings.custom_css_class}}" alt="{{self.alt_text|safe}}" />
-</a>
+</a>

+ 2 - 2
coderedcms/templates/coderedcms/snippets/footer.html

@@ -5,9 +5,9 @@
 {% for footer in footers %}
     <div {% if footer.custom_id %} id="{{footer.custom_id}}"{% endif %} {% if footer.custom_css_class %} class="{{footer.custom_css_class}}"{% endif %}>
         {% for item in footer.content %}
-            {% include_block item with format=format settings=settings %}
+            {% include_block item with settings=settings %}
         {% endfor %}
     </div>
 {% endfor %}
 
-</footer>
+</footer>