Merge pull request #1580 from tamo/master

Convert "include" directives to functions
This commit is contained in:
Raccoon 2021-07-09 15:06:06 +08:00 committed by GitHub
commit 620197faf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 43 additions and 43 deletions

View File

@ -2,14 +2,14 @@
<html lang="<%= getLocale() %>">
<head>
<%- include codimd/head %>
<%- include('codimd/head') %>
</head>
<body>
<%- include codimd/header %>
<%- include codimd/body %>
<%- include codimd/footer %>
<%- include codimd/foot %>
<%- include('codimd/header') %>
<%- include('codimd/body') %>
<%- include('codimd/footer') %>
<%- include('codimd/foot') %>
</body>
</html>

View File

@ -246,8 +246,8 @@
</div>
</div>
</div>
<%- include ../shared/refresh-modal %>
<%- include ../shared/signin-modal %>
<%- include ../shared/help-modal %>
<%- include ../shared/revision-modal %>
<%- include ../shared/pandoc-export-modal %>
<%- include('../shared/refresh-modal') %>
<%- include('../shared/signin-modal') %>
<%- include('../shared/help-modal') %>
<%- include('../shared/revision-modal') %>
<%- include('../shared/pandoc-export-modal') %>

View File

@ -25,10 +25,10 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.17.0/vega-lite.min.js" integrity="sha512-GUsnbKvdacPXIFZvHFFFnWEulYU74fanU2z9aie8g3/F/xcX9vxZuQFLwv9NjdV261fxj9SyAJ3Cf65jvYWMxw==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.14.2/vega-embed.min.js" integrity="sha512-Nhf4uoYFL/Mu9UESXLF9Mo22qmhuWEhAQWHAZOHpNntSvtzjsg5dWn8PBQN6l573WPNWgL6F7VwzTY9Y+l+RPg==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha256-fNoRrwkP2GuYPbNSJmMJOCyfRB2DhPQe0rGTgzRsyso=" crossorigin="anonymous" defer></script>
<%- include ../build/index-scripts %>
<%- include('../build/index-scripts') %>
<% } else { %>
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/TeX-AMS-MML_HTMLorMML.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
<%- include ../build/index-pack-scripts %>
<%- include('../build/index-pack-scripts') %>
<% } %>

View File

@ -14,12 +14,12 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/emojify.js@2.1.0/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha256-SHMGCYmST46SoyGgo4YR/9AlK1vf3ff84Aq9yK4hdqM=" crossorigin="anonymous" />
<%- include ../build/index-header %>
<%- include ../shared/polyfill %>
<%- include('../build/index-header') %>
<%- include('../shared/polyfill') %>
<% } else { %>
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
<%- include ../build/index-pack-header %>
<%- include('../build/index-pack-header') %>
<% } %>
<link rel="stylesheet" href='<%- serverURL %>/markdown-lint/css/lint.css'>

View File

@ -2,18 +2,18 @@
<html lang="<%= getLocale() %>">
<head>
<%- include codimd/head %>
<%- include('codimd/head') %>
<link rel="stylesheet" href="<%- serverURL %>/css/center.css">
</head>
<body>
<%- include codimd/header %>
<%- include('codimd/header') %>
<div class="container-fluid text-center">
<div class="vertical-center-row">
<h1><%- code %> <%- detail %> <small><%- msg %></small></h1>
</div>
</div>
<%- include codimd/footer %>
<%- include('codimd/footer') %>
</body>
</html>

View File

@ -2,14 +2,14 @@
<html lang="<%= getLocale() %>">
<head>
<%- include index/head %>
<%- include('index/head') %>
</head>
<body>
<%- include index/header %>
<%- include index/body %>
<%- include index/footer %>
<%- include index/foot %>
<%- include('index/header') %>
<%- include('index/body') %>
<%- include('index/footer') %>
<%- include('index/foot') %>
</body>
</html>

View File

@ -202,4 +202,4 @@
</div>
</div>
</div>
<%- include ../shared/signin-modal %>
<%- include('../shared/signin-modal') %>

View File

@ -7,7 +7,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment-with-locales.min.js" integrity="sha256-AdQN98MVZs44Eq2yTwtoKufhnU+uZ7v2kXnD5vqzZVo=" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-url/2.3.0/url.min.js" integrity="sha256-HOZJz4x+1mn1Si84WT5XKXPtOlTytmZLnMb6n1v4+5Q=" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.8/validator.min.js" integrity="sha256-LHeY7YoYJ0SSXbCx7sR14Pqna+52moaH3bhv0Mjzd/M=" crossorigin="anonymous" defer></script>
<%- include ../build/cover-scripts %>
<%- include('../build/cover-scripts') %>
<% } else { %>
<%- include ../build/cover-pack-scripts %>
<%- include('../build/cover-pack-scripts') %>
<% } %>

View File

@ -15,10 +15,10 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/4.9.0/bootstrap-social.min.css" integrity="sha256-02JtFTurpwBjQJ6q13iJe82/NF0RbZlJroDegK5g87Y=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.css" integrity="sha256-k5tPXFBQl+dOk8OmqCtptRa7bRYNRJuvs37bcqsmDB0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2-bootstrap.min.css" integrity="sha256-HbewCP50syA/2d3zPv+/CdQ4ufX6bI2ntjD3MwsA0UE=" crossorigin="anonymous" />
<%- include ../build/cover-header %>
<%- include ../shared/polyfill %>
<%- include('../build/cover-header') %>
<%- include('../shared/polyfill') %>
<% } else { %>
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
<%- include ../build/cover-pack-header %>
<%- include('../build/cover-pack-header') %>
<% } %>

View File

@ -26,13 +26,13 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/emojify.js@2.1.0/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha256-SHMGCYmST46SoyGgo4YR/9AlK1vf3ff84Aq9yK4hdqM=" crossorigin="anonymous" />
<%- include build/pretty-header %>
<%- include shared/polyfill %>
<%- include('build/pretty-header') %>
<%- include('shared/polyfill') %>
<% } else { %>
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
<%- include build/pretty-pack-header %>
<%- include('build/pretty-pack-header') %>
<% } %>
</head>
@ -71,7 +71,7 @@
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="display:none;"></div>
<% if(typeof disqus !== 'undefined' && disqus) { %>
<div class="container-fluid" style="max-width: 758px; margin-bottom: 40px;">
<%- include shared/disqus %>
<%- include('shared/disqus') %>
</div>
<% } %>
</body>
@ -100,11 +100,11 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.17.0/vega-lite.min.js" integrity="sha512-GUsnbKvdacPXIFZvHFFFnWEulYU74fanU2z9aie8g3/F/xcX9vxZuQFLwv9NjdV261fxj9SyAJ3Cf65jvYWMxw==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.14.2/vega-embed.min.js" integrity="sha512-Nhf4uoYFL/Mu9UESXLF9Mo22qmhuWEhAQWHAZOHpNntSvtzjsg5dWn8PBQN6l573WPNWgL6F7VwzTY9Y+l+RPg==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha256-fNoRrwkP2GuYPbNSJmMJOCyfRB2DhPQe0rGTgzRsyso=" crossorigin="anonymous" defer></script>
<%- include build/pretty-scripts %>
<%- include('build/pretty-scripts') %>
<% } else { %>
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/TeX-AMS-MML_HTMLorMML.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
<%- include build/pretty-pack-scripts %>
<%- include('build/pretty-pack-scripts') %>
<% } %>
<%- include shared/ga %>
<%- include('shared/ga') %>

View File

@ -21,14 +21,14 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js@3.9.2/css/reveal.min.css" integrity="sha256-h2NhWerL2k7KAzo6YqYMo1T5B6+QT2Bb/CprRV2aW20=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/emojify.js@2.1.0/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha256-SHMGCYmST46SoyGgo4YR/9AlK1vf3ff84Aq9yK4hdqM=" crossorigin="anonymous" />
<%- include build/slide-header %>
<%- include shared/polyfill %>
<%- include('build/slide-header') %>
<%- include('shared/polyfill') %>
<% } else { %>
<link rel="stylesheet" href="<%- serverURL %>/build/reveal.js/css/reveal.css">
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
<%- include build/slide-pack-header %>
<%- include('build/slide-pack-header') %>
<% } %>
<!-- For reveal.js theme -->
@ -83,7 +83,7 @@
</div>
<% if(typeof disqus !== 'undefined' && disqus) { %>
<div class="slides-disqus">
<%- include shared/disqus %>
<%- include('shared/disqus') %>
</div>
<% } %>
</div>
@ -112,14 +112,14 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.17.0/vega-lite.min.js" integrity="sha512-GUsnbKvdacPXIFZvHFFFnWEulYU74fanU2z9aie8g3/F/xcX9vxZuQFLwv9NjdV261fxj9SyAJ3Cf65jvYWMxw==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.14.2/vega-embed.min.js" integrity="sha512-Nhf4uoYFL/Mu9UESXLF9Mo22qmhuWEhAQWHAZOHpNntSvtzjsg5dWn8PBQN6l573WPNWgL6F7VwzTY9Y+l+RPg==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha256-fNoRrwkP2GuYPbNSJmMJOCyfRB2DhPQe0rGTgzRsyso=" crossorigin="anonymous" defer></script>
<%- include build/slide-scripts %>
<%- include('build/slide-scripts') %>
<% } else { %>
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/TeX-AMS-MML_HTMLorMML.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
<%- include build/slide-pack-scripts %>
<%- include('build/slide-pack-scripts') %>
<% } %>
</body>
</html>
<%- include shared/ga %>
<%- include('shared/ga') %>