mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
Removed frontend components.
This commit is contained in:
parent
999c6067f0
commit
9c7215423e
@ -1,38 +0,0 @@
|
||||
/* jshint ignore:start */
|
||||
// Provides a common.js list of all the cards for front end import - this is quite yuck so a new sollution should be found
|
||||
|
||||
var fs = require('fs'),
|
||||
path = require('path');
|
||||
|
||||
var htmlCards = [],
|
||||
editorCards = [],
|
||||
ampCards = [],
|
||||
textCards = [],
|
||||
cards = [];
|
||||
|
||||
fs.readdirSync(__dirname).forEach(function(card) {
|
||||
|
||||
if(card !== 'index.js' && card!== 'common.js' && card.substr(card.length-7) !== '_dom.js' ) {
|
||||
var _card = require(path.resolve(__dirname, card));
|
||||
|
||||
// todo check last 7 characters of filename to see if it's html, amp, text
|
||||
|
||||
_card.type = 'html';
|
||||
|
||||
|
||||
htmlCards.push(_card);
|
||||
|
||||
|
||||
cards.push(_card);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = {
|
||||
editor: editorCards,
|
||||
html: htmlCards,
|
||||
amp: ampCards,
|
||||
text: textCards,
|
||||
all: cards
|
||||
};
|
||||
/* jshint ignore:end */
|
@ -1,12 +0,0 @@
|
||||
/* jshint ignore:start */
|
||||
// this has to be a node style module as it's imported by the front end and ember.
|
||||
// a card has to have an editor object, and an HTML object. In the future we might have AMP and Text (for FTS) renderers.
|
||||
|
||||
module.exports = {
|
||||
name: 'html-card',
|
||||
render: function(opts) {
|
||||
return opts.payload.html;
|
||||
}
|
||||
};
|
||||
|
||||
/* jshint ignore:end */
|
@ -1,12 +0,0 @@
|
||||
/* jshint ignore:start */
|
||||
// this has to be a node style module as it's imported by the front end and ember.
|
||||
// a card has to have an editor object, and an HTML object. In the future we might have AMP and Text (for FTS) renderers.
|
||||
|
||||
module.exports = {
|
||||
name: 'image-card',
|
||||
render: function(opts) {
|
||||
return '<img src="' + opts.payload.img + '" />';
|
||||
}
|
||||
};
|
||||
|
||||
/* jshint ignore:end */
|
@ -1,16 +0,0 @@
|
||||
/* jshint ignore:start */
|
||||
// this has to be a node style module as it's imported by the front end and ember.
|
||||
// a card has to have an editor object, and an HTML object. In the future we might have AMP and Text (for FTS) renderers.
|
||||
|
||||
var Showdown = require('showdown-ghost'),
|
||||
converter = new Showdown.converter({extensions: ['ghostgfm', 'footnotes', 'highlight']});
|
||||
|
||||
|
||||
module.exports = {
|
||||
name: 'markdown-card',
|
||||
render: function(opts) {
|
||||
return converter.makeHtml(opts.payload.markdown || "");
|
||||
}
|
||||
};
|
||||
|
||||
/* jshint ignore:end */
|
@ -1,3 +0,0 @@
|
||||
/**
|
||||
* Created by ryanmccarvill on 2/11/16.
|
||||
*/
|
@ -1,3 +0,0 @@
|
||||
/**
|
||||
* Created by ryanmccarvill on 2/11/16.
|
||||
*/
|
@ -12,7 +12,7 @@ export default function (editor, toolbar) {
|
||||
type: 'block',
|
||||
toolbar: true,
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleSection('h1');
|
||||
});
|
||||
},
|
||||
@ -30,7 +30,7 @@ export default function (editor, toolbar) {
|
||||
visibility: 'primary',
|
||||
toolbar: true,
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleSection('h2');
|
||||
});
|
||||
},
|
||||
@ -46,7 +46,7 @@ export default function (editor, toolbar) {
|
||||
type: 'block',
|
||||
visibility: 'primary',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleSection('h3');
|
||||
});
|
||||
},
|
||||
@ -61,7 +61,7 @@ export default function (editor, toolbar) {
|
||||
selected: false,
|
||||
type: 'block',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleSection('p');
|
||||
});
|
||||
},
|
||||
@ -78,7 +78,7 @@ export default function (editor, toolbar) {
|
||||
type: 'block',
|
||||
toolbar: true,
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleSection('blockquote');
|
||||
});
|
||||
},
|
||||
@ -93,7 +93,7 @@ export default function (editor, toolbar) {
|
||||
selected: false,
|
||||
type: 'block',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleSection('ul');
|
||||
});
|
||||
},
|
||||
@ -108,7 +108,7 @@ export default function (editor, toolbar) {
|
||||
selected: false,
|
||||
type: 'block',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleSection('ol');
|
||||
});
|
||||
},
|
||||
@ -125,7 +125,7 @@ export default function (editor, toolbar) {
|
||||
type: 'markup',
|
||||
visibility: 'primary',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleMarkup('strong');
|
||||
});
|
||||
},
|
||||
@ -142,7 +142,7 @@ export default function (editor, toolbar) {
|
||||
type: 'markup',
|
||||
visibility: 'primary',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleMarkup('em');
|
||||
});
|
||||
},
|
||||
@ -158,7 +158,7 @@ export default function (editor, toolbar) {
|
||||
selected: false,
|
||||
type: 'markup',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.toggleMarkup('s');
|
||||
});
|
||||
},
|
||||
@ -191,7 +191,7 @@ export default function (editor, toolbar) {
|
||||
icon: 'file-picture-add.svg',
|
||||
visibility: 'primary',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
let card = postEditor.builder.createCardSection('image-card', {pos: 'top'});
|
||||
postEditor.replaceSection(editor.range.headSection, card);
|
||||
|
||||
@ -209,7 +209,7 @@ export default function (editor, toolbar) {
|
||||
icon: 'html-five.svg',
|
||||
visibility: 'primary',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
let card = postEditor.builder.createCardSection('html-card', {pos: 'top'});
|
||||
postEditor.replaceSection(editor.range.headSection, card);
|
||||
});
|
||||
@ -226,7 +226,7 @@ export default function (editor, toolbar) {
|
||||
visibility: 'primary',
|
||||
icon: 'file-code-1.svg',
|
||||
onClick: (editor) => {
|
||||
editor.run(postEditor => {
|
||||
editor.run((postEditor) => {
|
||||
let card = postEditor.builder.createCardSection('markdown-card', {pos: 'top'});
|
||||
postEditor.replaceSection(editor.range.headSection, card);
|
||||
});
|
||||
|
@ -3,9 +3,6 @@
|
||||
var MergeTrees = require('broccoli-merge-trees');
|
||||
var Funnel = require('broccoli-funnel');
|
||||
var path = require('path');
|
||||
var cards = require('./addon/cards/common.js');
|
||||
|
||||
|
||||
|
||||
module.exports = {
|
||||
name: 'ghost-editor',
|
||||
@ -31,37 +28,6 @@ module.exports = {
|
||||
});
|
||||
},
|
||||
included: function (app) {
|
||||
// app.import('app/styles/globals.css');
|
||||
app.import('vendor/mobiledoc-kit/amd/mobiledoc-kit.js');
|
||||
// app.import('app/styles/ghost-editor.css');
|
||||
// app.import('app/styles/ghost-toolbar.css');
|
||||
// app.import('app/styles/ghost-toolbar-blockitem.css');
|
||||
// app.import('app/styles/slash-menu.css');
|
||||
|
||||
},
|
||||
|
||||
// temp
|
||||
htmlOptions:
|
||||
{
|
||||
cards: cards.html,
|
||||
atoms: [{
|
||||
name: 'soft-return',
|
||||
type: 'html',
|
||||
render: function() {
|
||||
return "<br />";
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
/*
|
||||
[
|
||||
{
|
||||
name: 'html-card',
|
||||
type: 'html',
|
||||
render: function(opts) {
|
||||
return opts.payload.html;
|
||||
}
|
||||
}
|
||||
]
|
||||
*/
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user