mirror of https://github.com/Requarks/wiki.git
13 changed files with 141 additions and 35 deletions
Unified View
Diff Options
-
65CHANGELOG.md
-
2app/data.yml
-
9app/regex.js
-
16client/js/pages/view.js
-
8config.sample.yml
-
2controllers/uploads.js
-
55fuse.js
-
4libs/config.js
-
4libs/entries.js
-
2libs/local.js
-
5libs/markdown.js
-
2package.json
-
2views/layout.pug
@ -0,0 +1,9 @@ |
|||||
|
'use strict' |
||||
|
|
||||
|
module.exports = { |
||||
|
arabic: /([\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufc3f]|[\ufe70-\ufefc])/, |
||||
|
cjk: /([\u4E00-\u9FBF]|[\u3040-\u309F\u30A0-\u30FF]|[ㄱ-ㅎ가-힣ㅏ-ㅣ])/, |
||||
|
youtube: /(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|&v(?:i)?=))([^#&?]*).*/, |
||||
|
vimeo: /vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^/]*)\/videos\/|album\/(?:\d+)\/video\/|)(\d+)(?:$|\/|\?)/, |
||||
|
dailymotion: /(?:dailymotion\.com(?:\/embed)?(?:\/video|\/hub)|dai\.ly)\/([0-9a-z]+)(?:[-_0-9a-zA-Z]+(?:#video=)?([a-z0-9]+)?)?/ |
||||
|
} |
@ -1,11 +1,27 @@ |
|||||
'use strict' |
'use strict' |
||||
|
|
||||
import $ from 'jquery' |
import $ from 'jquery' |
||||
|
import MathJax from 'mathjax' |
||||
|
|
||||
module.exports = (alerts) => { |
module.exports = (alerts) => { |
||||
if ($('#page-type-view').length) { |
if ($('#page-type-view').length) { |
||||
let currentBasePath = ($('#page-type-view').data('entrypath') !== 'home') ? $('#page-type-view').data('entrypath') : '' |
let currentBasePath = ($('#page-type-view').data('entrypath') !== 'home') ? $('#page-type-view').data('entrypath') : '' |
||||
|
|
||||
|
// MathJax Render
|
||||
|
|
||||
|
MathJax.Hub.Config({ |
||||
|
jax: ['input/TeX', 'input/MathML', 'output/SVG'], |
||||
|
extensions: ['tex2jax.js', 'mml2jax.js'], |
||||
|
TeX: { |
||||
|
extensions: ['AMSmath.js', 'AMSsymbols.js', 'noErrors.js', 'noUndefined.js'] |
||||
|
}, |
||||
|
SVG: { |
||||
|
scale: 120, |
||||
|
font: 'STIX-Web' |
||||
|
}, |
||||
|
showMathMenu: false |
||||
|
}) |
||||
|
|
||||
require('../modals/create.js')(currentBasePath) |
require('../modals/create.js')(currentBasePath) |
||||
require('../modals/move.js')(currentBasePath, alerts) |
require('../modals/move.js')(currentBasePath, alerts) |
||||
} |
} |
||||
|
Write
Preview
Loading…
Cancel
Save