瀏覽代碼

Add conditional loading of banner script in development environment

codecalm 3 月之前
父節點
當前提交
08e4919ae1
共有 2 個文件被更改,包括 20 次插入2824 次删除
  1. 15 2824
      pnpm-lock.yaml
  2. 5 0
      shared/includes/layout/js.html

文件差異過大導致無法顯示
+ 15 - 2824
pnpm-lock.yaml


+ 5 - 0
shared/includes/layout/js.html

@@ -12,5 +12,10 @@
 <!-- BEGIN DEMO SCRIPTS -->
 <script src="{{ page | relative }}/preview/js/demo{% if environment != 'development' %}.min{% endif %}.js{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" defer></script>
 <!-- END DEMO SCRIPTS -->
+
+{% if environment == 'preview' %}
+<script src="https://scripts.tabler.io/banner.js" defer></script>
+{% endif %}
+
  
 {% scripts %}

部分文件因文件數量過多而無法顯示