Files
modern-cpp-tutorial/website/themes/moderncpp/layout/page.ejs
2018-06-26 19:13:23 +02:00

30 lines
1.4 KiB
Plaintext
Executable File

<% if (page.type) { %>
<%- partial('partials/sidebar', { type: page.type, index: page.index }) %>
<% } else { %>
<div class="sidebar">
<ul class="main-menu">
<%- partial('partials/main_menu', { context: 'sidebar' }) %>
</ul>
</div>
<% } %>
<div class="content <%- page.type ? page.type + ' with-sidebar' : '' %> <%- page.type ? page.path.replace(/.+\//, '').replace('.html', '') + '-guide' : '' %>">
<%- page.content %>
<div class="guide-links">
<% site.pages.find({ type: page.type, order: page.order - 1 }).each(function (page) { %>
<span>← <a href="<%- url_for(page.path) %>"><%- page.title %></a></span>
<% }) %>
<% site.pages.find({ type: page.type, order: page.order + 1 }).each(function (page) { %>
<span style="float: right;"><a href="<%- url_for(page.path) %>"><%- page.title %></a> →</span>
<% }) %>
</div>
<div class="footer">
<p>
<a href="https://changkun.de">欧长坤</a> &copy; 2016-<%- new Date().getFullYear() %> 版权所有,
采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议许可</a>,代码使用 <a href="https://opensource.org/licenses/MIT" target="_blank">MIT</a> 协议开源。</a>
</p>
<p>
如果你认为本书对你起到了帮助,可以<a href="/modern-cpp/about/donate.html">资助作者</a>。
</p>
</div>
</div>