mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-05 05:25:27 +02:00
Added misprints (#69)
* Added misprints * Rebuilt bundle in prod mode * Added config from .codexdocsrc * Updated .sample
This commit is contained in:
parent
09abc25c48
commit
98cb88f3af
9 changed files with 42 additions and 10 deletions
|
@ -14,6 +14,7 @@ import ModuleDispatcher from 'module-dispatcher';
|
|||
*/
|
||||
import Writing from './modules/writing';
|
||||
import Page from './modules/page';
|
||||
import Extensions from './modules/extensions';
|
||||
|
||||
/**
|
||||
* Main app class
|
||||
|
@ -25,6 +26,7 @@ class Docs {
|
|||
constructor() {
|
||||
this.writing = new Writing();
|
||||
this.page = new Page();
|
||||
this.extensions = new Extensions();
|
||||
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
this.docReady();
|
||||
|
|
17
src/frontend/js/modules/extensions.js
Normal file
17
src/frontend/js/modules/extensions.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
import Misprints from '@codexteam/misprints';
|
||||
|
||||
/**
|
||||
* @class Extensions
|
||||
* @classdesc Class for extensions module
|
||||
*/
|
||||
export default class Extensions {
|
||||
/**
|
||||
* Initialize extensions
|
||||
*/
|
||||
constructor() {
|
||||
this.misprints = new Misprints({
|
||||
chatId: window.config.chatId
|
||||
});
|
||||
}
|
||||
|
||||
}
|
|
@ -8,6 +8,12 @@
|
|||
<meta property="article:modified_time" content="{{ (page.body.time / 1000) | date("c") }}" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
</head>
|
||||
<script>
|
||||
window.config = {
|
||||
chatId: ''
|
||||
};
|
||||
window.config.chatId = Number("{{ config.chatId }}");
|
||||
</script>
|
||||
<body>
|
||||
{% include "components/header.twig" with res.locals.isAuthorized %}
|
||||
<div class="docs">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue