Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert "include" directives to functions #1580

Merged
merged 2 commits into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions public/views/codimd.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html lang="en">

<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>
10 changes: 5 additions & 5 deletions public/views/codimd/body.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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') %>
4 changes: 2 additions & 2 deletions public/views/codimd/foot.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.4.0/vega-lite.min.js" integrity="sha256-ollz/GSuG0/f7aV4v8LGDYxPs4G2DwEk9+hALicqp9I=" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.2.2/vega-embed.min.js" integrity="sha256-AW13lGYqQzWT9PymwqUEJqQHaz9ntM5m5jQVkvtzja4=" 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') %>
<% } %>
6 changes: 3 additions & 3 deletions public/views/codimd/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]/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'>
6 changes: 3 additions & 3 deletions public/views/error.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<html lang="en">

<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>
10 changes: 5 additions & 5 deletions public/views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html lang="en">

<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>
2 changes: 1 addition & 1 deletion public/views/index/body.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@
</div>
</div>
</div>
<%- include ../shared/signin-modal %>
<%- include('../shared/signin-modal') %>
4 changes: 2 additions & 2 deletions public/views/index/foot.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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') %>
<% } %>
6 changes: 3 additions & 3 deletions public/views/index/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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') %>
<% } %>
14 changes: 7 additions & 7 deletions public/views/pretty.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]/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>

Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -100,11 +100,11 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.4.0/vega-lite.min.js" integrity="sha256-ollz/GSuG0/f7aV4v8LGDYxPs4G2DwEk9+hALicqp9I=" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.2.2/vega-embed.min.js" integrity="sha256-AW13lGYqQzWT9PymwqUEJqQHaz9ntM5m5jQVkvtzja4=" 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') %>
14 changes: 7 additions & 7 deletions public/views/slide.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/reveal.min.css" integrity="sha256-h2NhWerL2k7KAzo6YqYMo1T5B6+QT2Bb/CprRV2aW20=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/[email protected]/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 -->
Expand Down Expand Up @@ -83,7 +83,7 @@
</div>
<% if(typeof disqus !== 'undefined' && disqus) { %>
<div class="slides-disqus">
<%- include shared/disqus %>
<%- include('shared/disqus') %>
</div>
<% } %>
</div>
Expand Down Expand Up @@ -112,14 +112,14 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.4.0/vega-lite.min.js" integrity="sha256-ollz/GSuG0/f7aV4v8LGDYxPs4G2DwEk9+hALicqp9I=" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.2.2/vega-embed.min.js" integrity="sha256-AW13lGYqQzWT9PymwqUEJqQHaz9ntM5m5jQVkvtzja4=" 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') %>