Skip to content

Commit 620197f

Browse files
authored
Merge pull request #1580 from tamo/master
Convert "include" directives to functions
2 parents 4b78202 + ffac645 commit 620197f

File tree

11 files changed

+43
-43
lines changed

11 files changed

+43
-43
lines changed

public/views/codimd.ejs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<html lang="<%= getLocale() %>">
33

44
<head>
5-
<%- include codimd/head %>
5+
<%- include('codimd/head') %>
66
</head>
77

88
<body>
9-
<%- include codimd/header %>
10-
<%- include codimd/body %>
11-
<%- include codimd/footer %>
12-
<%- include codimd/foot %>
9+
<%- include('codimd/header') %>
10+
<%- include('codimd/body') %>
11+
<%- include('codimd/footer') %>
12+
<%- include('codimd/foot') %>
1313
</body>
1414

1515
</html>

public/views/codimd/body.ejs

+5-5
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@
246246
</div>
247247
</div>
248248
</div>
249-
<%- include ../shared/refresh-modal %>
250-
<%- include ../shared/signin-modal %>
251-
<%- include ../shared/help-modal %>
252-
<%- include ../shared/revision-modal %>
253-
<%- include ../shared/pandoc-export-modal %>
249+
<%- include('../shared/refresh-modal') %>
250+
<%- include('../shared/signin-modal') %>
251+
<%- include('../shared/help-modal') %>
252+
<%- include('../shared/revision-modal') %>
253+
<%- include('../shared/pandoc-export-modal') %>

public/views/codimd/foot.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
<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>
2626
<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>
2727
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha256-fNoRrwkP2GuYPbNSJmMJOCyfRB2DhPQe0rGTgzRsyso=" crossorigin="anonymous" defer></script>
28-
<%- include ../build/index-scripts %>
28+
<%- include('../build/index-scripts') %>
2929
<% } else { %>
3030
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
3131
<script src="<%- serverURL %>/build/MathJax/config/TeX-AMS-MML_HTMLorMML.js" defer></script>
3232
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
33-
<%- include ../build/index-pack-scripts %>
33+
<%- include('../build/index-pack-scripts') %>
3434
<% } %>

public/views/codimd/head.ejs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
1515
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/[email protected]/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
1616
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha256-SHMGCYmST46SoyGgo4YR/9AlK1vf3ff84Aq9yK4hdqM=" crossorigin="anonymous" />
17-
<%- include ../build/index-header %>
18-
<%- include ../shared/polyfill %>
17+
<%- include('../build/index-header') %>
18+
<%- include('../shared/polyfill') %>
1919
<% } else { %>
2020
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
2121
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
2222
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
23-
<%- include ../build/index-pack-header %>
23+
<%- include('../build/index-pack-header') %>
2424
<% } %>
2525
<link rel="stylesheet" href='<%- serverURL %>/markdown-lint/css/lint.css'>

public/views/error.ejs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
<html lang="<%= getLocale() %>">
33

44
<head>
5-
<%- include codimd/head %>
5+
<%- include('codimd/head') %>
66
<link rel="stylesheet" href="<%- serverURL %>/css/center.css">
77
</head>
88

99
<body>
10-
<%- include codimd/header %>
10+
<%- include('codimd/header') %>
1111
<div class="container-fluid text-center">
1212
<div class="vertical-center-row">
1313
<h1><%- code %> <%- detail %> <small><%- msg %></small></h1>
1414
</div>
1515
</div>
16-
<%- include codimd/footer %>
16+
<%- include('codimd/footer') %>
1717
</body>
1818

1919
</html>

public/views/index.ejs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<html lang="<%= getLocale() %>">
33

44
<head>
5-
<%- include index/head %>
5+
<%- include('index/head') %>
66
</head>
77

88
<body>
9-
<%- include index/header %>
10-
<%- include index/body %>
11-
<%- include index/footer %>
12-
<%- include index/foot %>
9+
<%- include('index/header') %>
10+
<%- include('index/body') %>
11+
<%- include('index/footer') %>
12+
<%- include('index/foot') %>
1313
</body>
1414

1515
</html>

public/views/index/body.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,4 @@
202202
</div>
203203
</div>
204204
</div>
205-
<%- include ../shared/signin-modal %>
205+
<%- include('../shared/signin-modal') %>

public/views/index/foot.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<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>
88
<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>
99
<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>
10-
<%- include ../build/cover-scripts %>
10+
<%- include('../build/cover-scripts') %>
1111
<% } else { %>
12-
<%- include ../build/cover-pack-scripts %>
12+
<%- include('../build/cover-pack-scripts') %>
1313
<% } %>

public/views/index/head.ejs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
<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" />
1616
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.css" integrity="sha256-k5tPXFBQl+dOk8OmqCtptRa7bRYNRJuvs37bcqsmDB0=" crossorigin="anonymous" />
1717
<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" />
18-
<%- include ../build/cover-header %>
19-
<%- include ../shared/polyfill %>
18+
<%- include('../build/cover-header') %>
19+
<%- include('../shared/polyfill') %>
2020
<% } else { %>
2121
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
2222
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
23-
<%- include ../build/cover-pack-header %>
23+
<%- include('../build/cover-pack-header') %>
2424
<% } %>

public/views/pretty.ejs

+7-7
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
2727
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/[email protected]/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
2828
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha256-SHMGCYmST46SoyGgo4YR/9AlK1vf3ff84Aq9yK4hdqM=" crossorigin="anonymous" />
29-
<%- include build/pretty-header %>
30-
<%- include shared/polyfill %>
29+
<%- include('build/pretty-header') %>
30+
<%- include('shared/polyfill') %>
3131
<% } else { %>
3232
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
3333
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
3434
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
35-
<%- include build/pretty-pack-header %>
35+
<%- include('build/pretty-pack-header') %>
3636
<% } %>
3737
</head>
3838

@@ -71,7 +71,7 @@
7171
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="display:none;"></div>
7272
<% if(typeof disqus !== 'undefined' && disqus) { %>
7373
<div class="container-fluid" style="max-width: 758px; margin-bottom: 40px;">
74-
<%- include shared/disqus %>
74+
<%- include('shared/disqus') %>
7575
</div>
7676
<% } %>
7777
</body>
@@ -100,11 +100,11 @@
100100
<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>
101101
<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>
102102
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha256-fNoRrwkP2GuYPbNSJmMJOCyfRB2DhPQe0rGTgzRsyso=" crossorigin="anonymous" defer></script>
103-
<%- include build/pretty-scripts %>
103+
<%- include('build/pretty-scripts') %>
104104
<% } else { %>
105105
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
106106
<script src="<%- serverURL %>/build/MathJax/config/TeX-AMS-MML_HTMLorMML.js" defer></script>
107107
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
108-
<%- include build/pretty-pack-scripts %>
108+
<%- include('build/pretty-pack-scripts') %>
109109
<% } %>
110-
<%- include shared/ga %>
110+
<%- include('shared/ga') %>

public/views/slide.ejs

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/reveal.min.css" integrity="sha256-h2NhWerL2k7KAzo6YqYMo1T5B6+QT2Bb/CprRV2aW20=" crossorigin="anonymous" />
2222
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/[email protected]/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
2323
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha256-SHMGCYmST46SoyGgo4YR/9AlK1vf3ff84Aq9yK4hdqM=" crossorigin="anonymous" />
24-
<%- include build/slide-header %>
25-
<%- include shared/polyfill %>
24+
<%- include('build/slide-header') %>
25+
<%- include('shared/polyfill') %>
2626
<% } else { %>
2727
<link rel="stylesheet" href="<%- serverURL %>/build/reveal.js/css/reveal.css">
2828
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
2929
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
3030
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
31-
<%- include build/slide-pack-header %>
31+
<%- include('build/slide-pack-header') %>
3232
<% } %>
3333

3434
<!-- For reveal.js theme -->
@@ -83,7 +83,7 @@
8383
</div>
8484
<% if(typeof disqus !== 'undefined' && disqus) { %>
8585
<div class="slides-disqus">
86-
<%- include shared/disqus %>
86+
<%- include('shared/disqus') %>
8787
</div>
8888
<% } %>
8989
</div>
@@ -112,14 +112,14 @@
112112
<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>
113113
<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>
114114
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha256-fNoRrwkP2GuYPbNSJmMJOCyfRB2DhPQe0rGTgzRsyso=" crossorigin="anonymous" defer></script>
115-
<%- include build/slide-scripts %>
115+
<%- include('build/slide-scripts') %>
116116
<% } else { %>
117117
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
118118
<script src="<%- serverURL %>/build/MathJax/config/TeX-AMS-MML_HTMLorMML.js" defer></script>
119119
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
120-
<%- include build/slide-pack-scripts %>
120+
<%- include('build/slide-pack-scripts') %>
121121
<% } %>
122122
</body>
123123
</html>
124124

125-
<%- include shared/ga %>
125+
<%- include('shared/ga') %>

0 commit comments

Comments
 (0)