Commit Graph
16 Commits
Author SHA1 Message Date
Maciej Smolinski 5aa889a63a Highlight: Use arrow functions (back-end rendering). 2016-08-03 07:55:23 +02:00
Maciej Smolinski 7f0fefc900 Highlight: Increase the contrast between the text background and code background. 2016-08-03 07:54:34 +02:00
Maciej Smolinski 6879b08fd0 Highlight: Make hljs theme code easily readable. 2016-08-03 07:53:51 +02:00
Maciej Smolinski 29d036c0fd Highlight: Use default theme. 2016-08-01 19:57:51 +02:00
Maciej Smolinski 4676d46a15 Highlight: Inline highlight.js styles so even more transfer is saved and notes render faster. 2016-08-01 19:52:51 +02:00
Maciej Smolinski 0f618cd50f Highlight: Apply some defaults to hljs themes (background, border radius). 2016-08-01 19:38:45 +02:00
Maciej Smolinski 093b0c95e1 Highlight: Use tomorrow (light) theme. 2016-08-01 19:38:29 +02:00
Maciej Smolinski dd2c69afdb Highlight: As per PR comments - preview becomes static (back-end rendered), edit more dynamic. No hooks. 2016-08-01 19:15:42 +02:00
Maciej Smolinski 55bfeeb156 Highlight: Use lighter theme with good contrast. 2016-07-26 19:58:36 +02:00
Maciej Smolinski 032b088529 Highlight: Node.js highlighting. 2016-07-26 19:33:04 +02:00
Maciej Smolinski dc7ecb7621 Highlight: Use highlight.js. 2016-07-26 19:32:48 +02:00
Maciej Smolinski 74ed0744ec Highlight: Use marked options. 2016-07-26 18:21:06 +02:00
Maciej Smolinski 262202fbad Styles: Prevent syntax-highlighted code from being over-sized. 2016-07-20 16:55:58 +02:00
Maciej Smolinski 38e6108000 Module: Use Prism own autoloader. 2016-07-20 09:42:22 +02:00
Maciej Smolinski 9690f717fe Modules: Add code highlighting using hooks.
Achieved using Prism.js (MIT licensed) library and its language addons.
Website: http://prismjs.com/
2016-07-19 19:06:21 +02:00
Maciej Smolinski e25926619e Events: Allow for easier application extension with hook points.
How does it work?

Every time someone wants to extend the application, instead of modifying original `publishing.js` file, he or she can subscribe to given events, e.g.

Scenario: Table Of Contents extension

```
// resources/public/js/toc.js

events.subscribe('content:rendered', function () {
  // Prepend table of contents in edit mode on updates
});

events.subscribe('document:loaded', function () {
  // Prepend table of contents on initial load in edit view and preview
});
```

Now, having structured way to hook into app allows to keep the main codebase maintainable and pretty stable and extremely extensible at the same time.
2016-07-19 19:03:20 +02:00