mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
Merge pull request #1394 from hedgedoc/remove-cdn
This commit is contained in:
commit
957d7d553e
23 changed files with 70 additions and 244 deletions
|
@ -58,9 +58,9 @@ More info about that can be found in the configuration docs above.
|
||||||
To use HedgeDoc, your browser should match or exceed these versions:
|
To use HedgeDoc, your browser should match or exceed these versions:
|
||||||
|
|
||||||
- ![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/chrome/chrome_24x24.png) Chrome >= 47, ![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/chrome/chrome_24x24.png) Chrome for Android >= 47
|
- ![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/chrome/chrome_24x24.png) Chrome >= 47, ![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/chrome/chrome_24x24.png) Chrome for Android >= 47
|
||||||
- ![Safari](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/safari/safari_24x24.png) Safari >= 9, ![iOS Safarai](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/safari-ios/safari-ios_24x24.png) iOS Safari >= 8.4
|
- ![Safari](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/safari/safari_24x24.png) Safari >= 10.1, ![iOS Safari](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/safari-ios/safari-ios_24x24.png) iOS Safari >= 10.3
|
||||||
- ![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/firefox/firefox_24x24.png) Firefox >= 44
|
- ![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/firefox/firefox_24x24.png) Firefox >= 44
|
||||||
- ![Edge](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/edge/edge_24x24.png) Edge >= 12
|
- ![Edge](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/edge/edge_24x24.png) Edge >= 14
|
||||||
- ![Opera](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/opera/opera_24x24.png) Opera >=
|
- ![Opera](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/opera/opera_24x24.png) Opera >=
|
||||||
34, ![Opera Mini](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/opera-mini/opera-mini_24x24.png)
|
34, ![Opera Mini](https://raw.githubusercontent.com/alrra/browser-logos/HEAD/src/opera-mini/opera-mini_24x24.png)
|
||||||
Opera Mini not supported
|
Opera Mini not supported
|
||||||
|
|
1
app.js
1
app.js
|
@ -191,7 +191,6 @@ app.engine('ejs', ejs.renderFile)
|
||||||
// set view engine
|
// set view engine
|
||||||
app.set('view engine', 'ejs')
|
app.set('view engine', 'ejs')
|
||||||
// set generally available variables for all views
|
// set generally available variables for all views
|
||||||
app.locals.useCDN = config.useCDN
|
|
||||||
app.locals.serverURL = config.serverURL
|
app.locals.serverURL = config.serverURL
|
||||||
app.locals.sourceURL = config.sourceURL
|
app.locals.sourceURL = config.sourceURL
|
||||||
app.locals.allowAnonymous = config.allowAnonymous
|
app.locals.allowAnonymous = config.allowAnonymous
|
||||||
|
|
|
@ -100,7 +100,6 @@ these are rarely used for various reasons.
|
||||||
| config file | environment | **default** and example value | description |
|
| config file | environment | **default** and example value | description |
|
||||||
| --------------- | -------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| --------------- | -------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `allowGravatar` | `CMD_ALLOW_GRAVATAR` | **`true`** or `false` | set to `false` to disable [Libravatar](https://www.libravatar.org/) as profile picture source on your instance. Libravatar is a federated open-source alternative to Gravatar. |
|
| `allowGravatar` | `CMD_ALLOW_GRAVATAR` | **`true`** or `false` | set to `false` to disable [Libravatar](https://www.libravatar.org/) as profile picture source on your instance. Libravatar is a federated open-source alternative to Gravatar. |
|
||||||
| `useCDN` | `CMD_USECDN` | **`false`** or `true` | set to use CDN resources or not (default is `false`) |
|
|
||||||
|
|
||||||
## Users and Privileges
|
## Users and Privileges
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ module.exports = {
|
||||||
},
|
},
|
||||||
cookiePolicy: 'lax',
|
cookiePolicy: 'lax',
|
||||||
protocolUseSSL: false,
|
protocolUseSSL: false,
|
||||||
useCDN: false,
|
|
||||||
allowAnonymous: true,
|
allowAnonymous: true,
|
||||||
allowAnonymousEdits: false,
|
allowAnonymousEdits: false,
|
||||||
allowFreeURL: false,
|
allowFreeURL: false,
|
||||||
|
|
|
@ -29,7 +29,6 @@ module.exports = {
|
||||||
cookiePolicy: process.env.CMD_COOKIE_POLICY,
|
cookiePolicy: process.env.CMD_COOKIE_POLICY,
|
||||||
protocolUseSSL: toBooleanConfig(process.env.CMD_PROTOCOL_USESSL),
|
protocolUseSSL: toBooleanConfig(process.env.CMD_PROTOCOL_USESSL),
|
||||||
allowOrigin: toArrayConfig(process.env.CMD_ALLOW_ORIGIN),
|
allowOrigin: toArrayConfig(process.env.CMD_ALLOW_ORIGIN),
|
||||||
useCDN: toBooleanConfig(process.env.CMD_USECDN),
|
|
||||||
allowAnonymous: toBooleanConfig(process.env.CMD_ALLOW_ANONYMOUS),
|
allowAnonymous: toBooleanConfig(process.env.CMD_ALLOW_ANONYMOUS),
|
||||||
allowAnonymousEdits: toBooleanConfig(process.env.CMD_ALLOW_ANONYMOUS_EDITS),
|
allowAnonymousEdits: toBooleanConfig(process.env.CMD_ALLOW_ANONYMOUS_EDITS),
|
||||||
allowFreeURL: toBooleanConfig(process.env.CMD_ALLOW_FREEURL),
|
allowFreeURL: toBooleanConfig(process.env.CMD_ALLOW_FREEURL),
|
||||||
|
|
|
@ -20,7 +20,6 @@ module.exports = {
|
||||||
},
|
},
|
||||||
protocolUseSSL: toBooleanConfig(process.env.HMD_PROTOCOL_USESSL),
|
protocolUseSSL: toBooleanConfig(process.env.HMD_PROTOCOL_USESSL),
|
||||||
allowOrigin: toArrayConfig(process.env.HMD_ALLOW_ORIGIN),
|
allowOrigin: toArrayConfig(process.env.HMD_ALLOW_ORIGIN),
|
||||||
useCDN: toBooleanConfig(process.env.HMD_USECDN),
|
|
||||||
allowAnonymous: toBooleanConfig(process.env.HMD_ALLOW_ANONYMOUS),
|
allowAnonymous: toBooleanConfig(process.env.HMD_ALLOW_ANONYMOUS),
|
||||||
allowAnonymousEdits: toBooleanConfig(process.env.HMD_ALLOW_ANONYMOUS_EDITS),
|
allowAnonymousEdits: toBooleanConfig(process.env.HMD_ALLOW_ANONYMOUS_EDITS),
|
||||||
allowFreeURL: toBooleanConfig(process.env.HMD_ALLOW_FREEURL),
|
allowFreeURL: toBooleanConfig(process.env.HMD_ALLOW_FREEURL),
|
||||||
|
|
|
@ -6,7 +6,6 @@ module.exports = {
|
||||||
alloworigin: undefined,
|
alloworigin: undefined,
|
||||||
usessl: undefined,
|
usessl: undefined,
|
||||||
protocolusessl: undefined,
|
protocolusessl: undefined,
|
||||||
usecdn: undefined,
|
|
||||||
allowanonymous: undefined,
|
allowanonymous: undefined,
|
||||||
allowanonymousedits: undefined,
|
allowanonymousedits: undefined,
|
||||||
allowfreeurl: undefined,
|
allowfreeurl: undefined,
|
||||||
|
|
|
@ -26,12 +26,6 @@ const defaultDirectives = {
|
||||||
mediaSrc: ['*']
|
mediaSrc: ['*']
|
||||||
}
|
}
|
||||||
|
|
||||||
const cdnDirectives = {
|
|
||||||
scriptSrc: ['https://cdnjs.cloudflare.com', 'https://cdn.mathjax.org'],
|
|
||||||
styleSrc: ['https://cdnjs.cloudflare.com', 'https://fonts.googleapis.com'],
|
|
||||||
fontSrc: ['https://cdnjs.cloudflare.com', 'https://fonts.gstatic.com']
|
|
||||||
}
|
|
||||||
|
|
||||||
const disqusDirectives = {
|
const disqusDirectives = {
|
||||||
scriptSrc: ['https://disqus.com', 'https://*.disqus.com', 'https://*.disquscdn.com'],
|
scriptSrc: ['https://disqus.com', 'https://*.disqus.com', 'https://*.disquscdn.com'],
|
||||||
styleSrc: ['https://*.disquscdn.com'],
|
styleSrc: ['https://*.disquscdn.com'],
|
||||||
|
@ -59,7 +53,6 @@ CspStrategy.computeDirectives = function () {
|
||||||
const directives = {}
|
const directives = {}
|
||||||
mergeDirectives(directives, config.csp.directives)
|
mergeDirectives(directives, config.csp.directives)
|
||||||
mergeDirectivesIf(config.csp.addDefaults, directives, defaultDirectives)
|
mergeDirectivesIf(config.csp.addDefaults, directives, defaultDirectives)
|
||||||
mergeDirectivesIf(config.useCDN, directives, cdnDirectives)
|
|
||||||
mergeDirectivesIf(config.csp.addDisqus, directives, disqusDirectives)
|
mergeDirectivesIf(config.csp.addDisqus, directives, disqusDirectives)
|
||||||
mergeDirectivesIf(config.csp.addGoogleAnalytics, directives, googleAnalyticsDirectives)
|
mergeDirectivesIf(config.csp.addGoogleAnalytics, directives, googleAnalyticsDirectives)
|
||||||
mergeDirectivesIf(config.dropbox.appKey, directives, dropboxDirectives)
|
mergeDirectivesIf(config.dropbox.appKey, directives, dropboxDirectives)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic,300italic,300|Source+Serif+Pro|Source+Code+Pro:400,300,500&subset=latin,latin-ext);
|
|
|
@ -620,6 +620,18 @@ export function removeDOMEvents (view) {
|
||||||
}
|
}
|
||||||
window.removeDOMEvents = removeDOMEvents
|
window.removeDOMEvents = removeDOMEvents
|
||||||
|
|
||||||
|
function toDataURL (url, callback) {
|
||||||
|
fetch(url).then(response => {
|
||||||
|
const fr = new FileReader()
|
||||||
|
fr.onload = function () {
|
||||||
|
callback(this.result)
|
||||||
|
}
|
||||||
|
response.blob().then(blob => {
|
||||||
|
fr.readAsDataURL(blob)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function generateCleanHTML (view) {
|
function generateCleanHTML (view) {
|
||||||
const src = view.clone()
|
const src = view.clone()
|
||||||
const eles = src.find('*')
|
const eles = src.find('*')
|
||||||
|
@ -634,10 +646,9 @@ function generateCleanHTML (view) {
|
||||||
src.find('input.task-list-item-checkbox').attr('disabled', '')
|
src.find('input.task-list-item-checkbox').attr('disabled', '')
|
||||||
// replace emoji image path
|
// replace emoji image path
|
||||||
src.find('img.emoji').each((key, value) => {
|
src.find('img.emoji').each((key, value) => {
|
||||||
let name = $(value).attr('alt')
|
toDataURL($(value).attr('src'), dataURL => {
|
||||||
name = name.substr(1)
|
$(value).attr('src', dataURL)
|
||||||
name = name.slice(0, name.length - 1)
|
})
|
||||||
$(value).attr('src', `https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/images/basic/${name}.png`)
|
|
||||||
})
|
})
|
||||||
// replace video to iframe
|
// replace video to iframe
|
||||||
src.find('div[data-videoid]').each((key, value) => {
|
src.find('div[data-videoid]').each((key, value) => {
|
||||||
|
@ -681,11 +692,9 @@ export function exportToHTML (view) {
|
||||||
const tocAffix = $('#ui-toc-affix').clone()
|
const tocAffix = $('#ui-toc-affix').clone()
|
||||||
tocAffix.find('*').removeClass('active').find("a[href^='#'][smoothhashscroll]").removeAttr('smoothhashscroll')
|
tocAffix.find('*').removeClass('active').find("a[href^='#'][smoothhashscroll]").removeAttr('smoothhashscroll')
|
||||||
// generate html via template
|
// generate html via template
|
||||||
$.get(`${serverurl}/build/html.min.css`, css => {
|
$.get(`${serverurl}/build/htmlexport.html`, template => {
|
||||||
$.get(`${serverurl}/views/html.hbs`, template => {
|
|
||||||
let html = template.replace('{{{url}}}', serverurl)
|
let html = template.replace('{{{url}}}', serverurl)
|
||||||
html = html.replace('{{title}}', title)
|
html = html.replace('{{title}}', title)
|
||||||
html = html.replace('{{{css}}}', css)
|
|
||||||
html = html.replace('{{{html}}}', src[0].outerHTML)
|
html = html.replace('{{{html}}}', src[0].outerHTML)
|
||||||
html = html.replace('{{{ui-toc}}}', toc.html())
|
html = html.replace('{{{ui-toc}}}', toc.html())
|
||||||
html = html.replace('{{{ui-toc-affix}}}', tocAffix.html())
|
html = html.replace('{{{ui-toc-affix}}}', tocAffix.html())
|
||||||
|
@ -696,7 +705,6 @@ export function exportToHTML (view) {
|
||||||
})
|
})
|
||||||
saveAs(blob, filename, true)
|
saveAs(blob, filename, true)
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// jQuery sortByDepth
|
// jQuery sortByDepth
|
||||||
|
|
|
@ -1,6 +1,25 @@
|
||||||
|
require('bootstrap/dist/css/bootstrap.min.css')
|
||||||
|
require('fork-awesome/css/fork-awesome.min.css')
|
||||||
|
require('ionicons/css/ionicons.min.css')
|
||||||
|
require('prismjs/prism')
|
||||||
|
require('prismjs/themes/prism.css')
|
||||||
|
require('prismjs/components/prism-wiki')
|
||||||
|
require('prismjs/components/prism-haskell')
|
||||||
|
require('prismjs/components/prism-go')
|
||||||
|
require('prismjs/components/prism-typescript')
|
||||||
|
require('prismjs/components/prism-jsx')
|
||||||
|
require('prismjs/components/prism-makefile')
|
||||||
|
require('prismjs/components/prism-gherkin')
|
||||||
|
require('highlight.js/styles/github-gist.css')
|
||||||
|
require('emojify.js/dist/css/basic/emojify.min.css')
|
||||||
require('../css/github-extract.css')
|
require('../css/github-extract.css')
|
||||||
require('../css/markdown.css')
|
require('../css/markdown.css')
|
||||||
require('../css/extra.css')
|
require('../css/extra.css')
|
||||||
require('../css/slide-preview.css')
|
require('../css/slide-preview.css')
|
||||||
require('../css/google-font.css')
|
require('../css/font.css')
|
||||||
require('../css/site.css')
|
require('../css/site.css')
|
||||||
|
const $ = require('jquery')
|
||||||
|
window.jQuery = $
|
||||||
|
window.$ = $
|
||||||
|
require('bootstrap')
|
||||||
|
require('gist-embed/gist-embed.min')
|
||||||
|
|
|
@ -1,28 +1,5 @@
|
||||||
<script src="<%= serverURL %>/js/mathjax-config-extra.js"></script>
|
<script src="<%= serverURL %>/js/mathjax-config-extra.js"></script>
|
||||||
<% if(useCDN) { %>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.min.js" integrity="sha256-PieqE0QdEDMppwXrTzSZQr6tWFX3W5KkyRVyF1zN3eg=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.4.0/velocity.min.js" integrity="sha256-bhm0lgEt6ITaZCDzZpkr/VXVrLa5RP4u9v2AYsbzSUk=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.0/js/bootstrap.min.js" integrity="sha256-kJrlY+s09+QoWjpkOrXXwhxeaoDz9FW5SaxF8I0DibQ=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js" integrity="sha256-jnOjDTXIPqall8M0MyTSt98JetJuZ7Yu+1Jm7hLTF7U=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.7.0/js-yaml.min.js" integrity="sha256-8PanqYAVOGlOct+i65R+HqibK3KPsXINnrSfxN+Y/J0=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js" integrity="sha256-DViIOMYdwlM/axqoGDPeUyf0urLoHMN4QACBKyB58Uw=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-h37FgDAy5VfttFY2Jw5jcIQpvTvxY6QxTTwoDwlhg/E=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/config/Safe.js" integrity="sha256-y9JZetUlOMMh4hOP7XzJyCxx5xFrN4qSiBRIHfns3Dk=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js" integrity="sha256-vvT7Ok9u6GbfnBPXnbM6FVDEO8E1kTdgHOFZOAXrktA=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.8.2/mermaid.min.js" integrity="sha256-KqisLh8jVMBRjpNkOhH5W9VWs+F6x6vQksLqxs7+x9A=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/js/emojify.min.js" integrity="sha256-VAB5tAlKBvgaxw8oJ1crWMVbdmBVl4mP/2M8MNRl+4E=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.2/lodash.min.js" integrity="sha256-Cv5v4i4SuYvwRYzIONifZjoc99CkwfncROMSWat1cVA=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.1/socket.io.js" integrity="sha256-0FUwWDJ65tQsnnxtK/o5aTM880+kQzktw2mfTBF36Zs=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js" integrity="sha256-eOgo0OtLL4cdq7RdwRUiGKLX9XsIJ7nGhWEKbohmVAQ=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.6.0/gist-embed.min.js" integrity="sha256-KyF2D6xPIJUW5sUDSs93vWyZm+1RzIpKCexxElmxl8g=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/viz.js/1.7.0/viz.js" integrity="sha256-8t+rndrF+TU4JtelmOH1lDHTMe2ovhO2UbzDArp5lY8=" 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>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/abcjs/3.1.1/abcjs_basic-min.js" integrity="sha256-Sq1r2XXWXQoShQKsS0Wrf5r7fRkErd9Fat9vHYeU68s=" crossorigin="anonymous"></script>
|
|
||||||
<%- include('../build/index-scripts') %>
|
|
||||||
<% } else { %>
|
|
||||||
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
|
<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/TeX-AMS-MML_HTMLorMML.js" defer></script>
|
||||||
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
|
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
|
||||||
<%- include('../build/index-pack-scripts') %>
|
<%- include('../build/index-pack-scripts') %>
|
||||||
<% } %>
|
|
||||||
|
|
|
@ -15,15 +15,5 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
<base href="<%- serverURL %>/">
|
<base href="<%- serverURL %>/">
|
||||||
<title><%= title %></title>
|
<title><%= title %></title>
|
||||||
<% if(useCDN) { %>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.0/css/bootstrap.min.css" integrity="sha256-H0KfTigpUV+0/5tn2HXC0CPwhhDhWgSawJdnFd0CGCo=" crossorigin="anonymous" />
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.3/css/fork-awesome.min.css" integrity="sha256-ZhApazu+kejqTYhMF+1DzNKjIzP7KXu6AzyXcC1gMus=" crossorigin="anonymous" />
|
|
||||||
<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/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
|
|
||||||
<%- 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 %>/build/emojify.js/dist/css/basic/emojify.min.css'>
|
||||||
<%- include('../build/index-pack-header') %>
|
<%- include('../build/index-pack-header') %>
|
||||||
<% } %>
|
|
||||||
|
|
|
@ -19,22 +19,7 @@
|
||||||
<link rel="mask-icon" href="{{{url}}}/icons/safari-pinned-tab.svg" color="#b51f08">
|
<link rel="mask-icon" href="{{{url}}}/icons/safari-pinned-tab.svg" color="#b51f08">
|
||||||
<link rel="shortcut icon" href="{{{url}}}/icons/favicon.ico">
|
<link rel="shortcut icon" href="{{{url}}}/icons/favicon.ico">
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.0/css/bootstrap.min.css" integrity="sha256-H0KfTigpUV+0/5tn2HXC0CPwhhDhWgSawJdnFd0CGCo=" crossorigin="anonymous" />
|
<% _.forEach(htmlWebpackPlugin.files.css, function(cssFile) { %><style><%= compilation.assets[cssFile.substr(htmlWebpackPlugin.files.publicPath.length)].source() %></style><% }); %>
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.3/css/fork-awesome.min.css" integrity="sha256-ZhApazu+kejqTYhMF+1DzNKjIzP7KXu6AzyXcC1gMus=" crossorigin="anonymous" />
|
|
||||||
<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://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/themes/prism.min.css" integrity="sha256-vtR0hSWRc3Tb26iuN2oZHt3KRUomwTufNIf5/4oeCyg=" crossorigin="anonymous" />
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github-gist.min.css" integrity="sha256-tAflq+ymku3Khs+I/WcAneIlafYgDiOQ9stIHH985Wo=" crossorigin="anonymous" />
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
|
|
||||||
<style>
|
|
||||||
{{{css}}}
|
|
||||||
</style>
|
|
||||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
||||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" integrity="sha256-3Jy/GbSLrg0o9y5Z5n1uw0qxZECH7C6OQpVBgNFYa0g=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js" integrity="sha256-g6iAfvZp+nDQ2TdTR/VVKJf3bGro4ub5fvWSWVRi2NE=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.9/es5-shim.min.js" integrity="sha256-8E4Is26QH0bD52WoQpcB+R/tcWQtpzlCojrybUd7Mxo=" crossorigin="anonymous"></script>
|
|
||||||
<![endif]-->
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body translate="no">
|
<body translate="no">
|
||||||
|
@ -52,9 +37,7 @@
|
||||||
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="top:17px;display:none;" {{{lang}}} {{{dir}}}>
|
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="top:17px;display:none;" {{{lang}}} {{{dir}}}>
|
||||||
{{{ui-toc-affix}}}
|
{{{ui-toc-affix}}}
|
||||||
</div>
|
</div>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
<% _.forEach(htmlWebpackPlugin.files.js, function(jsFile) { %><script><%= compilation.assets[jsFile.substr(htmlWebpackPlugin.files.publicPath.length)].source() %></script><% }); %>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.0/js/bootstrap.min.js" integrity="sha256-kJrlY+s09+QoWjpkOrXXwhxeaoDz9FW5SaxF8I0DibQ=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.6.0/gist-embed.min.js" integrity="sha256-KyF2D6xPIJUW5sUDSs93vWyZm+1RzIpKCexxElmxl8g=" crossorigin="anonymous" defer></script>
|
|
||||||
<script>
|
<script>
|
||||||
var markdown = $(".markdown-body");
|
var markdown = $(".markdown-body");
|
||||||
//smooth all hash trigger scrolling
|
//smooth all hash trigger scrolling
|
|
@ -1,12 +1 @@
|
||||||
<% if(useCDN) { %>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.4.0/velocity.min.js" integrity="sha256-bhm0lgEt6ITaZCDzZpkr/VXVrLa5RP4u9v2AYsbzSUk=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.0/js/bootstrap.min.js" integrity="sha256-kJrlY+s09+QoWjpkOrXXwhxeaoDz9FW5SaxF8I0DibQ=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/list.pagination.js/0.1.1/list.pagination.min.js" integrity="sha256-WwTza96H3BgcQTfEfxX7MFaFc/dZA0QrPRKDRLdFHJo=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.js" integrity="sha256-HzzZFiY4t0PIv02Tm8/R3CVvLpcjHhO1z/YAUCp4oQ4=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js" integrity="sha256-vvT7Ok9u6GbfnBPXnbM6FVDEO8E1kTdgHOFZOAXrktA=" 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') %>
|
|
||||||
<% } else { %>
|
|
||||||
<%- include('../build/cover-pack-scripts') %>
|
<%- include('../build/cover-pack-scripts') %>
|
||||||
<% } %>
|
|
||||||
|
|
|
@ -16,14 +16,4 @@
|
||||||
<meta property="og:image:type" content="image/png">
|
<meta property="og:image:type" content="image/png">
|
||||||
<base href="<%- serverURL %>/">
|
<base href="<%- serverURL %>/">
|
||||||
<title>HedgeDoc - <%= __('Collaborative markdown notes') %></title>
|
<title>HedgeDoc - <%= __('Collaborative markdown notes') %></title>
|
||||||
<% if(useCDN) { %>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.0/css/bootstrap.min.css" integrity="sha256-H0KfTigpUV+0/5tn2HXC0CPwhhDhWgSawJdnFd0CGCo=" crossorigin="anonymous" />
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.3/css/fork-awesome.min.css" integrity="sha256-ZhApazu+kejqTYhMF+1DzNKjIzP7KXu6AzyXcC1gMus=" crossorigin="anonymous" />
|
|
||||||
<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.4/select2.min.css" integrity="sha256-ijlUKKj3hJCiiT2HWo1kqkI79NTEYpzOsw5Rs3k42dI=" crossorigin="anonymous" />
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2-bootstrap.min.css" integrity="sha256-NAWFcNIZdH+TS1xpWujF/EB/Y8gwBbEOCoaK/eqaer8=" crossorigin="anonymous" />
|
|
||||||
<%- include('../build/cover-header') %>
|
|
||||||
<%- include('../shared/polyfill') %>
|
|
||||||
<% } else { %>
|
|
||||||
<%- include('../build/cover-pack-header') %>
|
<%- include('../build/cover-pack-header') %>
|
||||||
<% } %>
|
|
||||||
|
|
|
@ -25,17 +25,8 @@
|
||||||
<base href="<%- serverURL %>/">
|
<base href="<%- serverURL %>/">
|
||||||
<title><%= title %></title>
|
<title><%= title %></title>
|
||||||
<%- include('includes/favicon.ejs') %>
|
<%- include('includes/favicon.ejs') %>
|
||||||
<% if(useCDN) { %>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.0/css/bootstrap.min.css" integrity="sha256-H0KfTigpUV+0/5tn2HXC0CPwhhDhWgSawJdnFd0CGCo=" crossorigin="anonymous" />
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.3/css/fork-awesome.min.css" integrity="sha256-ZhApazu+kejqTYhMF+1DzNKjIzP7KXu6AzyXcC1gMus=" crossorigin="anonymous" />
|
|
||||||
<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://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
|
|
||||||
<%- 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 %>/build/emojify.js/dist/css/basic/emojify.min.css'>
|
||||||
<%- include('build/pretty-pack-header') %>
|
<%- include('build/pretty-pack-header') %>
|
||||||
<% } %>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="display:none;">
|
<body style="display:none;">
|
||||||
|
@ -80,27 +71,8 @@
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
<script src="<%= serverURL %>/js/mathjax-config-extra.js"></script>
|
<script src="<%= serverURL %>/js/mathjax-config-extra.js"></script>
|
||||||
<% if(useCDN) { %>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.4.0/velocity.min.js" integrity="sha256-bhm0lgEt6ITaZCDzZpkr/VXVrLa5RP4u9v2AYsbzSUk=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.0/js/bootstrap.min.js" integrity="sha256-kJrlY+s09+QoWjpkOrXXwhxeaoDz9FW5SaxF8I0DibQ=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js" integrity="sha256-jnOjDTXIPqall8M0MyTSt98JetJuZ7Yu+1Jm7hLTF7U=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.7.0/js-yaml.min.js" integrity="sha256-8PanqYAVOGlOct+i65R+HqibK3KPsXINnrSfxN+Y/J0=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js" integrity="sha256-DViIOMYdwlM/axqoGDPeUyf0urLoHMN4QACBKyB58Uw=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-h37FgDAy5VfttFY2Jw5jcIQpvTvxY6QxTTwoDwlhg/E=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/config/Safe.js" integrity="sha256-h37FgDAy5VfttFY2Jw5jcIQpvTvxY6QxTTwoDwlhg/E=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js" integrity="sha256-vvT7Ok9u6GbfnBPXnbM6FVDEO8E1kTdgHOFZOAXrktA=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.8.2/mermaid.min.js" integrity="sha256-KqisLh8jVMBRjpNkOhH5W9VWs+F6x6vQksLqxs7+x9A=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/js/emojify.min.js" integrity="sha256-VAB5tAlKBvgaxw8oJ1crWMVbdmBVl4mP/2M8MNRl+4E=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js" integrity="sha256-eOgo0OtLL4cdq7RdwRUiGKLX9XsIJ7nGhWEKbohmVAQ=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.6.0/gist-embed.min.js" integrity="sha256-KyF2D6xPIJUW5sUDSs93vWyZm+1RzIpKCexxElmxl8g=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/viz.js/1.7.0/viz.js" integrity="sha256-8t+rndrF+TU4JtelmOH1lDHTMe2ovhO2UbzDArp5lY8=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/abcjs/3.1.1/abcjs_basic-min.js" integrity="sha256-Sq1r2XXWXQoShQKsS0Wrf5r7fRkErd9Fat9vHYeU68s=" crossorigin="anonymous"></script>
|
|
||||||
<%- include('build/pretty-scripts') %>
|
|
||||||
<% } else { %>
|
|
||||||
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
|
<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/TeX-AMS-MML_HTMLorMML.js" defer></script>
|
||||||
<script src="<%- serverURL %>/build/MathJax/config/Safe.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') %>
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
||||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" integrity="sha256-3Jy/GbSLrg0o9y5Z5n1uw0qxZECH7C6OQpVBgNFYa0g=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js" integrity="sha256-g6iAfvZp+nDQ2TdTR/VVKJf3bGro4ub5fvWSWVRi2NE=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.9/es5-shim.min.js" integrity="sha256-8E4Is26QH0bD52WoQpcB+R/tcWQtpzlCojrybUd7Mxo=" crossorigin="anonymous"></script>
|
|
||||||
<![endif]-->
|
|
|
@ -14,19 +14,9 @@
|
||||||
<base href="<%- serverURL %>/">
|
<base href="<%- serverURL %>/">
|
||||||
<title><%= title %></title>
|
<title><%= title %></title>
|
||||||
<%- include('includes/favicon.ejs') %>
|
<%- include('includes/favicon.ejs') %>
|
||||||
|
|
||||||
<% if(useCDN) { %>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.3/css/fork-awesome.min.css" integrity="sha256-ZhApazu+kejqTYhMF+1DzNKjIzP7KXu6AzyXcC1gMus=" crossorigin="anonymous" />
|
|
||||||
<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://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/css/reveal.min.css" integrity="sha256-9+Wg2bcNeiOMGXOUNqBdceY2lAH/eCiTDcdzHhHIl48=" crossorigin="anonymous" />
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
|
|
||||||
<%- 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/reveal.js/css/reveal.css">
|
||||||
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
|
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
|
||||||
<%- include('build/slide-pack-header') %>
|
<%- include('build/slide-pack-header') %>
|
||||||
<% } %>
|
|
||||||
|
|
||||||
<!-- For reveal.js theme -->
|
<!-- For reveal.js theme -->
|
||||||
<% if(typeof theme !== 'undefined' && theme) { %>
|
<% if(typeof theme !== 'undefined' && theme) { %>
|
||||||
|
@ -87,29 +77,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="<%= serverURL %>/js/mathjax-config-extra.js"></script>
|
<script src="<%= serverURL %>/js/mathjax-config-extra.js"></script>
|
||||||
<% if(useCDN) { %>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.9.2/js/reveal.js" integrity="sha512-VMwkG0MdbDSSM3wUzu6Ny450qkGMXTuBJdN1ssTZPTNWBkXxSYuvhW/o6eu7YQ2H1X2X1thKs6xdt8+obhX4Gg==" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.4.0/velocity.min.js" integrity="sha256-bhm0lgEt6ITaZCDzZpkr/VXVrLa5RP4u9v2AYsbzSUk=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js" integrity="sha256-jnOjDTXIPqall8M0MyTSt98JetJuZ7Yu+1Jm7hLTF7U=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.7.0/js-yaml.min.js" integrity="sha256-8PanqYAVOGlOct+i65R+HqibK3KPsXINnrSfxN+Y/J0=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js" integrity="sha256-DViIOMYdwlM/axqoGDPeUyf0urLoHMN4QACBKyB58Uw=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-h37FgDAy5VfttFY2Jw5jcIQpvTvxY6QxTTwoDwlhg/E=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/config/Safe.js" integrity="sha256-y9JZetUlOMMh4hOP7XzJyCxx5xFrN4qSiBRIHfns3Dk=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js" integrity="sha256-vvT7Ok9u6GbfnBPXnbM6FVDEO8E1kTdgHOFZOAXrktA=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.8.2/mermaid.min.js" integrity="sha256-KqisLh8jVMBRjpNkOhH5W9VWs+F6x6vQksLqxs7+x9A=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/js/emojify.min.js" integrity="sha256-VAB5tAlKBvgaxw8oJ1crWMVbdmBVl4mP/2M8MNRl+4E=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" integrity="sha256-/BfiIkHlHoVihZdc6TFuj7MmJ0TWcWsMXkeDFwhi0zw=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.6.0/gist-embed.min.js" integrity="sha256-KyF2D6xPIJUW5sUDSs93vWyZm+1RzIpKCexxElmxl8g=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/viz.js/1.7.0/viz.js" integrity="sha256-8t+rndrF+TU4JtelmOH1lDHTMe2ovhO2UbzDArp5lY8=" crossorigin="anonymous" defer></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/abcjs/3.1.1/abcjs_basic-min.js" integrity="sha256-Sq1r2XXWXQoShQKsS0Wrf5r7fRkErd9Fat9vHYeU68s=" crossorigin="anonymous"></script>
|
|
||||||
<%- include('build/slide-scripts') %>
|
|
||||||
<% } else { %>
|
|
||||||
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
|
<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/TeX-AMS-MML_HTMLorMML.js" defer></script>
|
||||||
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
|
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
|
||||||
<%- include('build/slide-pack-scripts') %>
|
<%- include('build/slide-pack-scripts') %>
|
||||||
<% } %>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
16
test/csp.js
16
test/csp.js
|
@ -27,7 +27,6 @@ describe('Content security policies', function () {
|
||||||
upgradeInsecureRequests: 'auto',
|
upgradeInsecureRequests: 'auto',
|
||||||
reportURI: undefined
|
reportURI: undefined
|
||||||
},
|
},
|
||||||
useCDN: true,
|
|
||||||
dropbox: {
|
dropbox: {
|
||||||
appKey: undefined
|
appKey: undefined
|
||||||
}
|
}
|
||||||
|
@ -44,21 +43,6 @@ describe('Content security policies', function () {
|
||||||
csp = mock.reRequire('../lib/csp')
|
csp = mock.reRequire('../lib/csp')
|
||||||
})
|
})
|
||||||
|
|
||||||
// beginnging Tests
|
|
||||||
it('Disable CDN', function () {
|
|
||||||
const testconfig = defaultConfig
|
|
||||||
testconfig.useCDN = false
|
|
||||||
mock('../lib/config', testconfig)
|
|
||||||
csp = mock.reRequire('../lib/csp')
|
|
||||||
|
|
||||||
assert(!csp.computeDirectives().scriptSrc.includes('https://cdnjs.cloudflare.com'))
|
|
||||||
assert(!csp.computeDirectives().scriptSrc.includes('https://cdn.mathjax.org'))
|
|
||||||
assert(!csp.computeDirectives().styleSrc.includes('https://cdnjs.cloudflare.com'))
|
|
||||||
assert(!csp.computeDirectives().styleSrc.includes('https://fonts.googleapis.com'))
|
|
||||||
assert(!csp.computeDirectives().fontSrc.includes('https://cdnjs.cloudflare.com'))
|
|
||||||
assert(!csp.computeDirectives().fontSrc.includes('https://fonts.gstatic.com'))
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Disable Google Analytics', function () {
|
it('Disable Google Analytics', function () {
|
||||||
const testconfig = defaultConfig
|
const testconfig = defaultConfig
|
||||||
testconfig.csp.addGoogleAnalytics = false
|
testconfig.csp.addGoogleAnalytics = false
|
||||||
|
|
|
@ -22,13 +22,6 @@ module.exports = {
|
||||||
'moment': 'moment',
|
'moment': 'moment',
|
||||||
CodeMirror: 'codemirror/lib/codemirror.js'
|
CodeMirror: 'codemirror/lib/codemirror.js'
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: 'public/views/includes/header.ejs',
|
|
||||||
chunks: ['font', 'index-styles', 'index'],
|
|
||||||
filename: path.join(__dirname, 'public/views/build/index-header.ejs'),
|
|
||||||
inject: false,
|
|
||||||
chunksSortMode: 'manual'
|
|
||||||
}),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'public/views/includes/header.ejs',
|
template: 'public/views/includes/header.ejs',
|
||||||
chunks: ['font-pack', 'index-styles-pack', 'index-styles', 'index'],
|
chunks: ['font-pack', 'index-styles-pack', 'index-styles', 'index'],
|
||||||
|
@ -36,12 +29,6 @@ module.exports = {
|
||||||
inject: false,
|
inject: false,
|
||||||
chunksSortMode: 'manual'
|
chunksSortMode: 'manual'
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: 'public/views/includes/scripts.ejs',
|
|
||||||
chunks: ['index'],
|
|
||||||
filename: path.join(__dirname, 'public/views/build/index-scripts.ejs'),
|
|
||||||
inject: false
|
|
||||||
}),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'public/views/includes/scripts.ejs',
|
template: 'public/views/includes/scripts.ejs',
|
||||||
chunks: ['common', 'index-pack'],
|
chunks: ['common', 'index-pack'],
|
||||||
|
@ -49,13 +36,6 @@ module.exports = {
|
||||||
inject: false,
|
inject: false,
|
||||||
chunksSortMode: 'manual'
|
chunksSortMode: 'manual'
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: 'public/views/includes/header.ejs',
|
|
||||||
chunks: ['font', 'cover'],
|
|
||||||
filename: path.join(__dirname, 'public/views/build/cover-header.ejs'),
|
|
||||||
inject: false,
|
|
||||||
chunksSortMode: 'manual'
|
|
||||||
}),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'public/views/includes/header.ejs',
|
template: 'public/views/includes/header.ejs',
|
||||||
chunks: ['font-pack', 'cover-styles-pack', 'cover'],
|
chunks: ['font-pack', 'cover-styles-pack', 'cover'],
|
||||||
|
@ -63,12 +43,6 @@ module.exports = {
|
||||||
inject: false,
|
inject: false,
|
||||||
chunksSortMode: 'manual'
|
chunksSortMode: 'manual'
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: 'public/views/includes/scripts.ejs',
|
|
||||||
chunks: ['cover'],
|
|
||||||
filename: path.join(__dirname, 'public/views/build/cover-scripts.ejs'),
|
|
||||||
inject: false
|
|
||||||
}),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'public/views/includes/scripts.ejs',
|
template: 'public/views/includes/scripts.ejs',
|
||||||
chunks: ['common', 'cover-pack'],
|
chunks: ['common', 'cover-pack'],
|
||||||
|
@ -76,13 +50,6 @@ module.exports = {
|
||||||
inject: false,
|
inject: false,
|
||||||
chunksSortMode: 'manual'
|
chunksSortMode: 'manual'
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: 'public/views/includes/header.ejs',
|
|
||||||
chunks: ['font', 'pretty-styles', 'pretty'],
|
|
||||||
filename: path.join(__dirname, 'public/views/build/pretty-header.ejs'),
|
|
||||||
inject: false,
|
|
||||||
chunksSortMode: 'manual'
|
|
||||||
}),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'public/views/includes/header.ejs',
|
template: 'public/views/includes/header.ejs',
|
||||||
chunks: ['font-pack', 'pretty-styles-pack', 'pretty-styles', 'pretty'],
|
chunks: ['font-pack', 'pretty-styles-pack', 'pretty-styles', 'pretty'],
|
||||||
|
@ -90,12 +57,6 @@ module.exports = {
|
||||||
inject: false,
|
inject: false,
|
||||||
chunksSortMode: 'manual'
|
chunksSortMode: 'manual'
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: 'public/views/includes/scripts.ejs',
|
|
||||||
chunks: ['pretty'],
|
|
||||||
filename: path.join(__dirname, 'public/views/build/pretty-scripts.ejs'),
|
|
||||||
inject: false
|
|
||||||
}),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'public/views/includes/scripts.ejs',
|
template: 'public/views/includes/scripts.ejs',
|
||||||
chunks: ['common', 'pretty-pack'],
|
chunks: ['common', 'pretty-pack'],
|
||||||
|
@ -103,13 +64,6 @@ module.exports = {
|
||||||
inject: false,
|
inject: false,
|
||||||
chunksSortMode: 'manual'
|
chunksSortMode: 'manual'
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: 'public/views/includes/header.ejs',
|
|
||||||
chunks: ['font', 'slide-styles', 'slide'],
|
|
||||||
filename: path.join(__dirname, 'public/views/build/slide-header.ejs'),
|
|
||||||
inject: false,
|
|
||||||
chunksSortMode: 'manual'
|
|
||||||
}),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'public/views/includes/header.ejs',
|
template: 'public/views/includes/header.ejs',
|
||||||
chunks: ['font-pack', 'slide-styles-pack', 'slide-styles', 'slide'],
|
chunks: ['font-pack', 'slide-styles-pack', 'slide-styles', 'slide'],
|
||||||
|
@ -117,12 +71,6 @@ module.exports = {
|
||||||
inject: false,
|
inject: false,
|
||||||
chunksSortMode: 'manual'
|
chunksSortMode: 'manual'
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: 'public/views/includes/scripts.ejs',
|
|
||||||
chunks: ['slide'],
|
|
||||||
filename: path.join(__dirname, 'public/views/build/slide-scripts.ejs'),
|
|
||||||
inject: false
|
|
||||||
}),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'public/views/includes/scripts.ejs',
|
template: 'public/views/includes/scripts.ejs',
|
||||||
chunks: ['slide-pack'],
|
chunks: ['slide-pack'],
|
||||||
|
@ -184,7 +132,6 @@ module.exports = {
|
||||||
],
|
],
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
font: path.join(__dirname, 'public/css/google-font.css'),
|
|
||||||
'font-pack': path.join(__dirname, 'public/css/font.css'),
|
'font-pack': path.join(__dirname, 'public/css/font.css'),
|
||||||
common: [
|
common: [
|
||||||
'expose-loader?exposes[]=$&exposes[]=jQuery!jquery',
|
'expose-loader?exposes[]=$&exposes[]=jQuery!jquery',
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'save-as-html',
|
name: 'save-as-html',
|
||||||
|
@ -10,6 +11,14 @@ module.exports = {
|
||||||
rules: [{
|
rules: [{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
use: [MiniCssExtractPlugin.loader, 'css-loader']
|
use: [MiniCssExtractPlugin.loader, 'css-loader']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'url-loader'
|
||||||
|
}
|
||||||
|
]
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
|
@ -18,8 +27,13 @@ module.exports = {
|
||||||
filename: '[name].js'
|
filename: '[name].js'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new MiniCssExtractPlugin({
|
new HtmlWebpackPlugin({
|
||||||
filename: 'html.min.css'
|
// Load a custom template (uses lodash templating)
|
||||||
})
|
template: 'public/views/htmlexport.ejs',
|
||||||
|
filename: 'htmlexport.html',
|
||||||
|
inject: false,
|
||||||
|
cache: false
|
||||||
|
}),
|
||||||
|
new MiniCssExtractPlugin({ filename: 'htmlexport.css' })
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,9 @@ module.exports = [
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: [
|
minimizer: [
|
||||||
|
new ESBuildMinifyPlugin({
|
||||||
|
target: 'es2015'
|
||||||
|
}),
|
||||||
new OptimizeCSSAssetsPlugin({})
|
new OptimizeCSSAssetsPlugin({})
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue