浏览代码

Enable opening links within the live preview panel

Nick Moreton 2 年之前
父节点
当前提交
13c5993f82
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      bakerydemo/templates/base.html

+ 5 - 0
bakerydemo/templates/base.html

@@ -17,6 +17,11 @@
         </title>
         <meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% endif %}">
         <meta name="viewport" content="width=device-width, initial-scale=1">
+        
+        {# Force all links in the live preview panel to be opened in a new tab #}
+        {% if request.in_preview_panel %}
+            <base target="_blank">
+        {% endif %}
 
         <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
         {% fontawesome_css %}