Merge branch 'master' into release
This commit is contained in:
commit
ff1494c519
|
@ -28,6 +28,9 @@ services:
|
||||||
DB_DATABASE: bookstack-test
|
DB_DATABASE: bookstack-test
|
||||||
DB_USERNAME: bookstack-test
|
DB_USERNAME: bookstack-test
|
||||||
DB_PASSWORD: bookstack-test
|
DB_PASSWORD: bookstack-test
|
||||||
|
MAIL_DRIVER: smtp
|
||||||
|
MAIL_HOST: mailhog
|
||||||
|
MAIL_PORT: 1025
|
||||||
ports:
|
ports:
|
||||||
- ${DEV_PORT:-8080}:80
|
- ${DEV_PORT:-8080}:80
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -39,3 +42,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app
|
- ./:/app
|
||||||
entrypoint: /app/dev/docker/entrypoint.node.sh
|
entrypoint: /app/dev/docker/entrypoint.node.sh
|
||||||
|
mailhog:
|
||||||
|
image: mailhog/mailhog
|
||||||
|
ports:
|
||||||
|
- ${DEV_MAIL_PORT:-8025}:8025
|
||||||
|
|
|
@ -103,6 +103,8 @@ If needed, You'll be able to run any artisan commands via docker-compose like so
|
||||||
docker-compose run app php artisan list
|
docker-compose run app php artisan list
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The docker-compose setup runs an instance of [MailHog](https://github.com/mailhog/MailHog) and sets environment variables to redirect any BookStack-sent emails to MailHog. You can view this mail via the MailHog web interface on `localhost:8025`. You can change the port MailHog is accessible on by setting a `DEV_MAIL_PORT` environment variable.
|
||||||
|
|
||||||
## 🌎 Translations
|
## 🌎 Translations
|
||||||
|
|
||||||
All text strings can be found in the `resources/lang` folder where each language option has its own folder. To add a new language you should copy the `en` folder to an new folder (eg. `fr` for french) then go through and translate all text strings in those files, leaving the keys and file-names intact. If a language string is missing then the `en` translation will be used. To show the language option in the user preferences language drop-down you will need to add your language to the options found at the bottom of the `resources/lang/en/settings.php` file. A system-wide language can also be set in the `.env` file like so: `APP_LANG=en`.
|
All text strings can be found in the `resources/lang` folder where each language option has its own folder. To add a new language you should copy the `en` folder to an new folder (eg. `fr` for french) then go through and translate all text strings in those files, leaving the keys and file-names intact. If a language string is missing then the `en` translation will be used. To show the language option in the user preferences language drop-down you will need to add your language to the options found at the bottom of the `resources/lang/en/settings.php` file. A system-wide language can also be set in the `.env` file like so: `APP_LANG=en`.
|
||||||
|
|
|
@ -18,21 +18,18 @@ class MarkdownEditor {
|
||||||
this.markdown.use(mdTasksLists, {label: true});
|
this.markdown.use(mdTasksLists, {label: true});
|
||||||
|
|
||||||
this.display = this.elem.querySelector('.markdown-display');
|
this.display = this.elem.querySelector('.markdown-display');
|
||||||
this.displayDoc = this.display.contentDocument;
|
|
||||||
this.displayStylesLoaded = false;
|
this.displayStylesLoaded = false;
|
||||||
this.input = this.elem.querySelector('textarea');
|
this.input = this.elem.querySelector('textarea');
|
||||||
this.htmlInput = this.elem.querySelector('input[name=html]');
|
this.htmlInput = this.elem.querySelector('input[name=html]');
|
||||||
this.cm = code.markdownEditor(this.input);
|
this.cm = code.markdownEditor(this.input);
|
||||||
|
|
||||||
this.onMarkdownScroll = this.onMarkdownScroll.bind(this);
|
this.onMarkdownScroll = this.onMarkdownScroll.bind(this);
|
||||||
this.init();
|
|
||||||
|
|
||||||
// Scroll to text if needed.
|
this.display.addEventListener('load', () => {
|
||||||
const queryParams = (new URL(window.location)).searchParams;
|
this.displayDoc = this.display.contentDocument;
|
||||||
const scrollText = queryParams.get('content-text');
|
this.init();
|
||||||
if (scrollText) {
|
});
|
||||||
this.scrollToText(scrollText);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
@ -94,6 +91,13 @@ class MarkdownEditor {
|
||||||
|
|
||||||
this.codeMirrorSetup();
|
this.codeMirrorSetup();
|
||||||
this.listenForBookStackEditorEvents();
|
this.listenForBookStackEditorEvents();
|
||||||
|
|
||||||
|
// Scroll to text if needed.
|
||||||
|
const queryParams = (new URL(window.location)).searchParams;
|
||||||
|
const scrollText = queryParams.get('content-text');
|
||||||
|
if (scrollText) {
|
||||||
|
this.scrollToText(scrollText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the input content and render the display.
|
// Update the input content and render the display.
|
||||||
|
|
|
@ -207,7 +207,6 @@ body.mce-fullscreen .page-editor .edit-area {
|
||||||
}
|
}
|
||||||
a.button {
|
a.button {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #FFF;
|
|
||||||
}
|
}
|
||||||
.svg-icon {
|
.svg-icon {
|
||||||
width: 1.2em;
|
width: 1.2em;
|
||||||
|
|
|
@ -11,9 +11,13 @@
|
||||||
@import "lists";
|
@import "lists";
|
||||||
@import "pages";
|
@import "pages";
|
||||||
|
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
background-color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'DejaVu Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Roboto", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
font-family: 'DejaVu Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Roboto", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||||
background-color: #FFF;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<div class="editor-toolbar">
|
<div class="editor-toolbar">
|
||||||
<div class="editor-toolbar-label">{{ trans('entities.pages_md_preview') }}</div>
|
<div class="editor-toolbar-label">{{ trans('entities.pages_md_preview') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<iframe class="markdown-display" sandbox="allow-same-origin"></iframe>
|
<iframe srcdoc="" class="markdown-display" sandbox="allow-same-origin"></iframe>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="html"/>
|
<input type="hidden" name="html"/>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
@if(userCan('page-update', $page))
|
@if(userCan('page-update', $page))
|
||||||
<a href="{{ $page->getUrl('/edit') }}" id="pointer-edit" data-edit-href="{{ $page->getUrl('/edit') }}"
|
<a href="{{ $page->getUrl('/edit') }}" id="pointer-edit" data-edit-href="{{ $page->getUrl('/edit') }}"
|
||||||
class="button outline icon heading-edit-icon ml-s px-s" title="{{ trans('entities.pages_edit_content_link')}}">@icon('edit')</a>
|
class="button primary outline icon heading-edit-icon ml-s px-s" title="{{ trans('entities.pages_edit_content_link')}}">@icon('edit')</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue