<head>
{% init html_title = None %}
{% init _user_name = None %}
{% init _user_id = 0 %}
{% init FONT_SCALE = 100 %}
{% init show_menu  = True %}
{% init show_aside = False %}
{% init show_search = True %}
{% init load_base_layout = True %}

{% import xconfig %}

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{% if FONT_SCALE == 80 %}
  <meta name="viewport" content="width=device-width,initial-scale=0.8,maximum-scale=0.8,user-scalable=0"/>
{% elif FONT_SCALE == 120 %}
  <meta name="viewport" content="width=300,initial-scale=1.2,maximum-scale=1.2,user-scalable=0"/>
{% else %}
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=0"/>
{% end %}

<meta name="referrer" content="no-referrer">

<title>{{xconfig.WebConfig.ui_title_prefix}}{%if html_title%} | {{T(html_title)}}{%end%}</title>

<link rel="shortcut icon" href="{{_server_home}}/_static/favicon.ico"/>
<link rel="bookmark" href="{{_server_home}}/_static/favicon.ico"/>
<link rel="stylesheet" href="{{_server_home}}/_static/css/app.build.css?ts={{_ts}}"/>
<link rel="stylesheet" href="{{_server_home}}/_static/css/common-card.css?ts={{_ts}}"/>

<script type="text/javascript" src="{{_server_home}}/_static/lib/jquery/jquery-1.12.4.min.js"></script>
<!-- 弹层组件 -->
<script type="text/javascript" src="{{_server_home}}/_static/lib/layer/layer.js"></script>
<!-- 模板引擎 -->
<script type="text/javascript" src="{{_server_home}}/_static/lib/art-template/template-web-4.13.2.js"></script>
<!-- 应用JS脚本,优先级更高，所以放在后面 -->
<script type="text/javascript" src="{{_server_home}}/_static/js/app.build.js?ts={{_ts}}"></script>

{% if xconfig.WebConfig.record_location %}
<script type="text/javascript" src="{{_server_home}}/system/stats"></script>
{% end %}

{# 自定义的样式 #}
{% if xconfig.USER_CSS != None %}
  <link rel="stylesheet" type="text/css" href="{{_server_home}}/system/user.css?ts={{_ts}}">
{% end %}

{# 自定义脚本 #}
{% if xconfig.USER_JS != None %}
  <script type="text/javascript" src="{{_server_home}}/system/user.js?ts={{_ts}}" async="true"></script>
{% end %}

<script type="text/javascript">
  var xnoteRole = '{{xconfig.WebConfig.cluster_node_role}}';
  xnote.state.system.isAdmin = Boolean("{{_is_admin}}");
  xnote.config.serverHome = "{{_server_home}}";
  xnote.config.nodeRole = xnoteRole;
  xnote.config.isMaster = "{{xconfig.WebConfig.is_leader()}}";
</script>

{% if load_base_layout %}
  <!-- 布局脚本 -->
  {% include common/layout/base_layout.html %}
{% end %}

<!-- 页面自定义的样式区块,放在后面可以重写基础样式 -->
{% block head %} {% end %}

</head>
