Fix editors insert + Error pages styling

pull/73/head
NGPixel 8 years ago
parent fec3eff3e7
commit 67bd4acdeb

67695
assets/js/bundle.min.js vendored

File diff suppressed because one or more lines are too long

@ -3,6 +3,9 @@
let logic = document.documentElement.dataset.logic
switch (logic) {
case 'error':
require('./scss/error.scss')
break
case 'login':
require('./scss/login.scss')
require('./js/login.js')

@ -54,7 +54,7 @@ $(() => {
// ====================================
require('./pages/view.js')(alerts)
// require('./pages/create.js')
require('./pages/create.js')(alerts, socket)
require('./pages/edit.js')(alerts, socket)
require('./pages/source.js')(alerts)
require('./pages/admin.js')(alerts)

@ -51,6 +51,7 @@ module.exports = (alerts, mde, mdeModalOpenState, socket) => {
vueImage.currentImage = imageId
},
insertImage: (ev) => {
console.log(mde)
if (mde.codemirror.doc.somethingSelected()) {
mde.codemirror.execCommand('singleSelection')
}

@ -16,14 +16,13 @@ module.exports = (alerts, pageEntryPath, socket) => {
return _.toUpper(filesize(v))
})
let mde
let mdeModalOpenState = false
let vueImage = require('./editor-image.js')(alerts, mde, mdeModalOpenState, socket)
let vueFile = require('./editor-file.js')(alerts, mde, mdeModalOpenState, socket)
let vueVideo = require('./editor-video.js')(mde, mdeModalOpenState)
let vueCodeBlock = require('./editor-codeblock.js')(mde, mdeModalOpenState)
let vueImage
let vueFile
let vueVideo
let vueCodeBlock
mde = new SimpleMDE({
let mde = new SimpleMDE({
autofocus: true,
autoDownloadFontAwesome: false,
element: $('#mk-editor').get(0),
@ -185,6 +184,11 @@ module.exports = (alerts, pageEntryPath, socket) => {
}
})
vueImage = require('./editor-image.js')(alerts, mde, mdeModalOpenState, socket)
vueFile = require('./editor-file.js')(alerts, mde, mdeModalOpenState, socket)
vueVideo = require('./editor-video.js')(mde, mdeModalOpenState)
vueCodeBlock = require('./editor-codeblock.js')(mde, mdeModalOpenState)
// -> Save
let saveCurrentDocument = (ev) => {

@ -1,7 +1,10 @@
/* global $ */
'use strict'
import $ from 'jquery'
module.exports = (alerts, socket) => {
if ($('#page-type-create').length) {
let pageEntryPath = $('#page-type-create').data('entrypath') // eslint-disable-line no-unused-vars
let pageEntryPath = $('#page-type-create').data('entrypath')
// -> Discard
@ -9,7 +12,6 @@ if ($('#page-type-create').length) {
$('#modal-create-discard').toggleClass('is-active')
})
/* eslint-disable spaced-comment */
//=include ../components/editor.js
/* eslint-enable spaced-comment */
require('../components/editor.js')(alerts, pageEntryPath, socket)
}
}

@ -1,5 +1,5 @@
doctype html
html
html(data-logic='error')
head
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(charset='UTF-8')
@ -17,9 +17,8 @@ html
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
link(rel='manifest', href='/manifest.json')
// CSS
link(type='text/css', rel='stylesheet', href='/css/libs.css')
link(type='text/css', rel='stylesheet', href='/css/error.css')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
body(class='is-forbidden')
.container

@ -1,5 +1,5 @@
doctype html
html
html(data-logic='error')
head
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(charset='UTF-8')
@ -17,9 +17,8 @@ html
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
link(rel='manifest', href='/manifest.json')
// CSS
link(type='text/css', rel='stylesheet', href='/css/libs.css')
link(type='text/css', rel='stylesheet', href='/css/error.css')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
body(class='is-notexist')
.container

@ -1,5 +1,5 @@
doctype html
html
html(data-logic='error')
head
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(charset='UTF-8')
@ -17,9 +17,8 @@ html
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
link(rel='manifest', href='/manifest.json')
// CSS
link(type='text/css', rel='stylesheet', href='/css/libs.css')
link(type='text/css', rel='stylesheet', href='/css/error.css')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
body(class='is-error')
.container

Loading…
Cancel
Save