apollo-nico
Version:
对 nico 及 apollo-theme 的封装,方便跨平台使用
101 lines (99 loc) • 4.14 kB
HTML
<html lang="{{theme.lang}}">
<head>
<meta charset="UTF-8">
<title>{%- block title %}{{theme.name|title}}{% endblock -%}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="{{system.name}} {{system.version}}" />
{%- block assets %}
<link type="image/x-icon" href="{{static_url('css/favicon.ico')}}" rel="icon">
<link rel="stylesheet" href="{{static_url('css/normalize.css')}}" />
<link rel="stylesheet" href="{{static_url('css/site.css')}}" />
<link rel="stylesheet" href="{{static_url('css/solarized.css')}}" />
<!--new config-->
{%- if config.package.platform=='pc' %}
<link rel="stylesheet" href="{{config.baseURL}}{{config.apolloCoreSc}}"/>
{%- endif %}
{%- if config.package.platform=='mobile' %}
<link rel="stylesheet" href="{{config.baseURL}}{{config.apolloCoreMobile}}"/>
{%- endif %}
{%- if config.package.dependentStyle && config.package.dependentStyle|length > 0 %}
{%- set items = config.package.dependentStyle %}
{%- if items|length > 0 %}
{%- for item in items %}
<link rel="stylesheet" href="{{config.baseURL}}{{item}}"/>
{%- endfor %}
{%- endif %}
{%- endif %}
{%- if config.dependence && config.dependence|length > 0 %}
{%- set items = config.dependence %}
{%- if items|length > 0 %}
{%- for item in items %}
<link rel="stylesheet" href="{{config.baseURL}}{{item}}"/>
{%- endfor %}
{%- endif %}
{%- endif %}
<link rel="stylesheet" href="{{config.baseURL}}{{config.package.modURL}}"/>
<script src="{{config.baseURL}}{{config.atomSc}}"></script>
{%- if config.isDocs %}
<script src="http://www.alif2e.com/assets/javascript/ga.js"></script>
{%- endif %}
{%- include "snippet/head.html" %}
<script src="{{static_url('js/site.js')}}"></script>
<!--[if lt IE 9]>
<script src="{{static_url('js/html5shiv.js')}}"></script>
<![endif]-->
{%- endblock %}
{%- block afterstyle %}{% endblock %}
</head>
<body>
<div id="body-wrapper">
{%- block body %}
<aside id="sidebar-wrapper">
<h1>
<a href="{{content_url('index.html')}}">{{config.package.name|title}}</a><sup class="package-root"><a href="/">{{config.package.root}}{{config.package.family}}</a></sup>
</h1>
<p class="version">当前版本:<a href="javascript:;" >{{config.package.version}}</a></p>
<p class="description">{{config.package.description}}</p>
{%- if config.package.repository %}
<a class="source" href="{{config.package.repository.url}}" target="_blank">View the Project</a>
{%- endif %}
{%- if config.package.author %}
<p class="author">作者:{{config.package.author}}</p>
{%- endif %}
{%- block sidebar %}
<ul id="navigation" role="navigation">
<li><a href="{{content_url('index.html')}}">文档</a></li>
{%- set example = resource.pages|find('examples') %}
{%- if example %}
<li><a href="{{permalink_url(example)}}">演示</a></li>
{%- endif %}
{%- if theme.hasHistory %}
<li><a href="{{content_url('history.html')}}">历史</a></li>
{%- endif %}
{%- if theme.hasTest %}
<li><a class="test-link" href="{{content_url('tests/runner.html')}}" target="_blank">用例</a></li>
{%- endif %}
{%- if config.package.bugs %}
<li><a class="issue-link" href="{{config.package.bugs.url}}" target="_blank">讨论</a></li>
{%- endif %}
</ul>
{%- endblock %}
{%- block subsidebar %}
{%- endblock %}
</aside>
{%- block afterside %}{% endblock %}
<div id="content-wrapper">
<div id="content">{% block content %}{% endblock %}</div>
</div>
{%- endblock %}
</div>
<div id="footer-wrapper">
<footer>
<p class="powered">
{% block footer %}{% endblock %}
</p>
</footer>
</div>
</body>
</html>