├── .babelrc ├── .bowerrc ├── .editorconfig ├── .eslintrc ├── .gitignore ├── 001-MakingDevelopers-proxy.conf ├── README.md ├── bower.json ├── db ├── content.sql └── main.sql ├── gulpfile.babel.js ├── package.json ├── src ├── app │ ├── api │ │ └── api.controller.js │ ├── auth │ │ └── auth.controller.js │ ├── blog │ │ ├── blog.api.js │ │ ├── blog.dashboard.js │ │ └── blog.model.js │ ├── configuration │ │ ├── configuration.dashboard.js │ │ └── configuration.model.js │ ├── content │ │ ├── content.controller.js │ │ ├── content.dashboard.js │ │ ├── content.model.js │ │ └── getContent.model.js │ ├── dashboard │ │ └── dashboard.controller.js │ ├── home │ │ └── home.controller.js │ ├── media │ │ └── media.dashboard.js │ ├── pages │ │ ├── pages.dashboard.js │ │ └── pages.model.js │ └── users │ │ ├── users.controller.js │ │ └── users.model.js ├── config │ ├── default.json │ └── development.json ├── frontend │ ├── actions │ │ └── actionTypes.js │ ├── components │ │ └── Default │ │ │ ├── Blog │ │ │ ├── Post.js │ │ │ └── Posts.js │ │ │ ├── Global │ │ │ ├── Content │ │ │ │ └── Content.js │ │ │ ├── Footer │ │ │ │ ├── CopyRight.js │ │ │ │ └── Footer.js │ │ │ └── Header │ │ │ │ ├── Header.js │ │ │ │ ├── Logo.js │ │ │ │ └── MainNav.js │ │ │ └── Ui │ │ │ ├── Helmet.js │ │ │ ├── Icon.js │ │ │ └── Link.js │ ├── configureStore.js │ ├── constants │ │ └── api.js │ ├── containers │ │ ├── App.js │ │ ├── Blog │ │ │ ├── actions.js │ │ │ ├── api.js │ │ │ ├── index.js │ │ │ ├── model.js │ │ │ └── reducer.js │ │ ├── Home │ │ │ └── index.js │ │ └── Page404 │ │ │ └── index.js │ ├── reducers │ │ ├── contentReducer.js │ │ ├── deviceReducer.js │ │ ├── index.js │ │ └── languageReducer.js │ └── routes.js ├── lib │ ├── cache.js │ ├── config.js │ ├── content.js │ ├── db │ │ └── mysql.js │ ├── env.js │ ├── form.js │ ├── handlebars.js │ ├── i18n.js │ ├── media.js │ ├── model.js │ ├── pagination.js │ ├── post.js │ ├── session.js │ ├── table.js │ ├── templates.js │ ├── twitter.js │ ├── user.js │ └── utils │ │ ├── api.js │ │ ├── date.js │ │ ├── device.js │ │ ├── files.js │ │ ├── frontend.js │ │ ├── is.js │ │ ├── object.js │ │ ├── options.js │ │ ├── security.js │ │ ├── string.js │ │ └── url.js ├── main.js ├── public │ ├── assets │ │ ├── flags │ │ │ └── flags.png │ │ └── fonts │ │ │ ├── Comfortaa │ │ │ ├── font.woff │ │ │ └── font.woff2 │ │ │ ├── OpenSans │ │ │ ├── font.woff │ │ │ └── font.woff2 │ │ │ ├── Oswald │ │ │ ├── font.woff │ │ │ └── font.woff2 │ │ │ └── SourceCodePro │ │ │ ├── font.woff │ │ │ └── font.woff2 │ ├── content │ │ └── data │ │ │ └── blog │ │ │ └── posts.json │ ├── images │ │ └── dashboard │ │ │ └── bg.gif │ ├── js │ │ ├── dashboard │ │ │ ├── events.js │ │ │ └── main.js │ │ └── vendors │ │ │ └── ckeditor │ │ │ ├── basepath.js │ │ │ ├── plugins │ │ │ └── codemirror │ │ │ │ ├── css │ │ │ │ └── codemirror.min.css │ │ │ │ ├── icons │ │ │ │ ├── autocomplete.png │ │ │ │ ├── autoformat.png │ │ │ │ ├── commentselectedrange.png │ │ │ │ ├── searchcode.png │ │ │ │ └── uncommentselectedrange.png │ │ │ │ ├── js │ │ │ │ ├── beautify.min.js │ │ │ │ ├── codemirror.addons.min.js │ │ │ │ ├── codemirror.addons.search.min.js │ │ │ │ ├── codemirror.min.js │ │ │ │ ├── codemirror.mode.bbcode.min.js │ │ │ │ ├── codemirror.mode.bbcodemixed.min.js │ │ │ │ ├── codemirror.mode.htmlmixed.min.js │ │ │ │ ├── codemirror.mode.javascript.min.js │ │ │ │ └── codemirror.mode.php.min.js │ │ │ │ ├── lang │ │ │ │ ├── af.js │ │ │ │ ├── ar.js │ │ │ │ ├── bg.js │ │ │ │ ├── bn.js │ │ │ │ ├── bs.js │ │ │ │ ├── ca.js │ │ │ │ ├── cs.js │ │ │ │ ├── cy.js │ │ │ │ ├── da.js │ │ │ │ ├── de.js │ │ │ │ ├── el.js │ │ │ │ ├── en-au.js │ │ │ │ ├── en-ca.js │ │ │ │ ├── en-gb.js │ │ │ │ ├── en.js │ │ │ │ ├── eo.js │ │ │ │ ├── es.js │ │ │ │ ├── et.js │ │ │ │ ├── eu.js │ │ │ │ ├── fa.js │ │ │ │ ├── fi.js │ │ │ │ ├── fo.js │ │ │ │ ├── fr-ca.js │ │ │ │ ├── fr.js │ │ │ │ ├── gl.js │ │ │ │ ├── gu.js │ │ │ │ ├── he.js │ │ │ │ ├── hi.js │ │ │ │ ├── hr.js │ │ │ │ ├── hu.js │ │ │ │ ├── is.js │ │ │ │ ├── it.js │ │ │ │ ├── ja.js │ │ │ │ ├── ka.js │ │ │ │ ├── km.js │ │ │ │ ├── ko.js │ │ │ │ ├── ku.js │ │ │ │ ├── lt.js │ │ │ │ ├── lv.js │ │ │ │ ├── mk.js │ │ │ │ ├── mn.js │ │ │ │ ├── ms.js │ │ │ │ ├── nb.js │ │ │ │ ├── nl.js │ │ │ │ ├── no.js │ │ │ │ ├── pl.js │ │ │ │ ├── pt-br.js │ │ │ │ ├── pt.js │ │ │ │ ├── ro.js │ │ │ │ ├── ru.js │ │ │ │ ├── sk.js │ │ │ │ ├── sl.js │ │ │ │ ├── sr-latn.js │ │ │ │ ├── sr.js │ │ │ │ ├── sv.js │ │ │ │ ├── th.js │ │ │ │ ├── tr.js │ │ │ │ ├── ug.js │ │ │ │ ├── uk.js │ │ │ │ ├── vi.js │ │ │ │ ├── zh-cn.js │ │ │ │ └── zh.js │ │ │ │ ├── plugin.js │ │ │ │ └── theme │ │ │ │ ├── 3024-day.css │ │ │ │ ├── 3024-night.css │ │ │ │ ├── abcdef.css │ │ │ │ ├── ambiance-mobile.css │ │ │ │ ├── ambiance.css │ │ │ │ ├── base16-dark.css │ │ │ │ ├── base16-light.css │ │ │ │ ├── bespin.css │ │ │ │ ├── blackboard.css │ │ │ │ ├── cobalt.css │ │ │ │ ├── colorforth.css │ │ │ │ ├── dracula.css │ │ │ │ ├── eclipse.css │ │ │ │ ├── elegant.css │ │ │ │ ├── erlang-dark.css │ │ │ │ ├── hopscotch.css │ │ │ │ ├── icecoder.css │ │ │ │ ├── isotope.css │ │ │ │ ├── lesser-dark.css │ │ │ │ ├── liquibyte.css │ │ │ │ ├── material.css │ │ │ │ ├── mbo.css │ │ │ │ ├── mdn-like.css │ │ │ │ ├── midnight.css │ │ │ │ ├── monokai.css │ │ │ │ ├── neat.css │ │ │ │ ├── neo.css │ │ │ │ ├── night.css │ │ │ │ ├── paraiso-dark.css │ │ │ │ ├── paraiso-light.css │ │ │ │ ├── pastel-on-dark.css │ │ │ │ ├── railscasts.css │ │ │ │ ├── rubyblue.css │ │ │ │ ├── seti.css │ │ │ │ ├── solarized.css │ │ │ │ ├── the-matrix.css │ │ │ │ ├── tomorrow-night-bright.css │ │ │ │ ├── tomorrow-night-eighties.css │ │ │ │ ├── ttcn.css │ │ │ │ ├── twilight.css │ │ │ │ ├── vibrant-ink.css │ │ │ │ ├── xq-dark.css │ │ │ │ ├── xq-light.css │ │ │ │ ├── yeti.css │ │ │ │ └── zenburn.css │ │ │ └── skins │ │ │ └── office │ │ │ ├── dialog.css │ │ │ ├── editor.css │ │ │ ├── icons.png │ │ │ ├── icons_hidpi.png │ │ │ ├── images │ │ │ ├── arrow.png │ │ │ ├── close.png │ │ │ ├── hidpi │ │ │ │ ├── close.png │ │ │ │ ├── lock-open.png │ │ │ │ ├── lock.png │ │ │ │ └── refresh.png │ │ │ ├── lock-open.png │ │ │ ├── lock.png │ │ │ └── refresh.png │ │ │ └── skin.js │ ├── media │ │ └── .gitkeep │ └── themes │ │ └── Default │ │ └── images │ │ ├── favicon.png │ │ └── logo.png ├── server │ ├── imports.js │ ├── index.js │ ├── router.js │ └── servers │ │ ├── backendServer.js │ │ ├── frontendServer.js │ │ └── index.js ├── stylus │ ├── _alerts.styl │ ├── _elements.styl │ ├── _flags.styl │ ├── _fonts.styl │ ├── _global.styl │ ├── _mixins.styl │ ├── _pagination.styl │ ├── _tables.styl │ ├── _utils.styl │ ├── _vars.styl │ ├── dashboard │ │ ├── _content.styl │ │ ├── _global.styl │ │ ├── _header.styl │ │ ├── _media.styl │ │ ├── _sidebar.styl │ │ └── style.styl │ └── themes │ │ └── Default │ │ ├── _global.styl │ │ ├── _vars.styl │ │ ├── blog.styl │ │ └── components │ │ ├── Blog │ │ └── Post.styl │ │ └── Global │ │ ├── Content │ │ └── Content.styl │ │ ├── Footer │ │ └── Footer.styl │ │ └── Header │ │ ├── Header.styl │ │ ├── Logo.styl │ │ └── MainNav.styl └── views │ ├── app │ ├── blog │ │ ├── dashboard │ │ │ ├── create.hbs │ │ │ ├── read.hbs │ │ │ └── update.hbs │ │ └── index.hbs │ ├── configuration │ │ └── dashboard │ │ │ ├── read.hbs │ │ │ └── update.hbs │ ├── content │ │ └── dashboard │ │ │ ├── create.hbs │ │ │ ├── read.hbs │ │ │ └── update.hbs │ ├── dashboard │ │ └── index.hbs │ ├── home │ │ └── index.hbs │ ├── pages │ │ └── dashboard │ │ │ ├── create.hbs │ │ │ ├── read.hbs │ │ │ └── update.hbs │ └── users │ │ ├── register.hbs │ │ └── registered.hbs │ ├── error.hbs │ ├── frontend │ └── index.hbs │ ├── layouts │ └── dashboard.hbs │ └── partials │ └── dashboard │ ├── header.hbs │ └── sidebar.hbs ├── test ├── fixtures │ ├── content │ │ └── i18n │ │ │ ├── en.json │ │ │ └── es.json │ └── frontend │ │ └── initialState.json ├── frontend │ └── components │ │ └── Global │ │ ├── HeaderTest.js │ │ └── LogoTest.js ├── globalTest.js └── lib │ ├── cacheTest.js │ ├── configTest.js │ ├── contentTest.js │ ├── db │ └── mysqlTest.js │ ├── envTest.js │ ├── formTest.js │ ├── handlebarsTest.js │ ├── i18nTest.js │ ├── mediaTest.js │ ├── modelTest.js │ ├── paginationTest.js │ ├── postTest.js │ ├── sessionTest.js │ ├── tableTest.js │ ├── templatesTest.js │ ├── twitterTest.js │ ├── userTest.js │ └── utils │ ├── dateTest.js │ ├── deviceTest.js │ ├── filesTest.js │ ├── isTest.js │ ├── objectTest.js │ ├── optionsTest.js │ ├── securityTest.js │ ├── stringTest.js │ └── urlTest.js └── webpack.config.babel.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react", "es2015", "stage-0", "stage-1"] 3 | } 4 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "src/public/bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.hbs] 12 | indent_size = 4 13 | 14 | [*.styl] 15 | indent_size = 4 16 | 17 | [*.md] 18 | trim_trailing_whitespace = false 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | git-info.txt 3 | node_modules 4 | npm-debug.log 5 | src/public/bower_components 6 | src/public/css/**/*.css 7 | src/public/css/*.css 8 | src/content/i18n/*.json 9 | src/public/js/all.js 10 | src/public/js/vendor.js 11 | src/public/bundle.js 12 | src/public/media/**/* 13 | !src/public/media/.gitkeep 14 | dump.rdb 15 | yarn.lock 16 | -------------------------------------------------------------------------------- /001-MakingDevelopers-proxy.conf: -------------------------------------------------------------------------------- 1 | NameVirtualHost local.makingdevelopers.com:80 2 | 3 | LoadModule proxy_module modules/mod_proxy.so 4 | LoadModule proxy_http_module modules/mod_proxy_http.so 5 | 6 | 7 | ServerName local.makingdevelopers.com 8 | ProxyPass / http://localhost:3333/ 9 | ProxyPassReverse / http://localhost:3333/ 10 | ProxyPassReverseCookieDomain localhost makingdevelopers.com 11 | 12 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "makingdevelopers", 3 | "version": "0.0.1", 4 | "author": "Carlos Santana", 5 | "license": "MIT", 6 | "dependencies": { 7 | "ckeditor": "*", 8 | "font-awesome": "*", 9 | "jquery": "*", 10 | "normalize-css": "*" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/app/api/api.controller.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import express from 'express'; 3 | 4 | // Utils 5 | import { isFunction } from '../../lib/utils/is'; 6 | import { camelCase, sanitize } from '../../lib/utils/string'; 7 | 8 | // Express Router 9 | const Router = express.Router(); 10 | 11 | Router.get('/blog/:endpoint*?', (req, res, next) => { 12 | const endpointMethod = camelCase(req.params.endpoint); 13 | const data = sanitize(req.query); 14 | 15 | if (isFunction(res.blogAPI[endpointMethod])) { 16 | return res.blogAPI[endpointMethod](data, (cache, response) => { 17 | if (response) { 18 | res.json({ 19 | information: { 20 | cache, 21 | total: response.length, 22 | params: data 23 | }, 24 | response 25 | }); 26 | } else { 27 | res.json({ 28 | error: res.content('Api.errors.noData') 29 | }); 30 | } 31 | }); 32 | } else { 33 | res.json({ 34 | error: res.content('Api.errors.invalidMethod') 35 | }); 36 | } 37 | }); 38 | 39 | export default Router; 40 | -------------------------------------------------------------------------------- /src/app/auth/auth.controller.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import express from 'express'; 3 | 4 | // Helpers 5 | import { getAuthenticateUrl, getOAuthAccessToken, getOAuthRequestToken } from '../../lib/twitter'; 6 | 7 | // Express Router 8 | const Router = express.Router(); 9 | 10 | /** 11 | * Redirects to twitter to do the login 12 | */ 13 | Router.get('/twitter', (req, res) => { 14 | getOAuthRequestToken(tokens => { 15 | const oauthSession = { 16 | 'token': tokens[0], 17 | 'tokenSecret': tokens[1] 18 | }; 19 | 20 | res.session('oauth', oauthSession); 21 | res.redirect(getAuthenticateUrl(tokens[0])); 22 | }); 23 | }); 24 | 25 | /** 26 | * If twitter login was successful, we save oauth & user sessions 27 | */ 28 | Router.get('/twitter/callback', (req, res) => { 29 | const data = res.session('oauth'); 30 | let oauthVerifier; 31 | 32 | if (data) { 33 | oauthVerifier = req.query.oauth_verifier; 34 | 35 | getOAuthAccessToken(data.token, data.tokenSecret, oauthVerifier, sessions => { 36 | res.session('oauth', sessions[0]); 37 | res.session('user', sessions[1]); 38 | /* eslint no-console: 0 */ 39 | console.log('>>>> AUTH INFO:', sessions); 40 | res.redirect(`${res.locals.basePath}/users/validation`); 41 | }); 42 | } 43 | }); 44 | 45 | export default Router; 46 | -------------------------------------------------------------------------------- /src/app/blog/blog.api.js: -------------------------------------------------------------------------------- 1 | export default (req, res, next) => { 2 | // Methods 3 | res.blogAPI = { 4 | post, 5 | posts 6 | }; 7 | 8 | function post(query, callback) { 9 | query.state = 'Active'; 10 | 11 | res.blogModel.cms().post({ 12 | query 13 | }, (cache, results) => { 14 | return callback(cache, results); 15 | }); 16 | } 17 | 18 | function posts(query, callback) { 19 | const { 20 | page = 1, 21 | language = 'en', 22 | state = 'Active' 23 | } = query; 24 | 25 | res.blogModel.cms().count(total => { 26 | res.blogModel.cms().posts({ 27 | total, 28 | page, 29 | language, 30 | state 31 | }, (cache, results) => { 32 | return callback(cache, results); 33 | }); 34 | }); 35 | } 36 | 37 | return next(); 38 | }; 39 | -------------------------------------------------------------------------------- /src/app/content/getContent.model.js: -------------------------------------------------------------------------------- 1 | // Helpers 2 | import * as Content from '../../lib/model'; 3 | 4 | /** 5 | * Returns content from database 6 | * 7 | * @param {string} language Language 8 | * @param {function} callback Callback 9 | * @returns {function} Callback 10 | */ 11 | export function getContent(language, callback) { 12 | let procedure; 13 | 14 | if (language) { 15 | procedure = Content.getProcedure('getContent', language, ['language']); 16 | } else { 17 | procedure = Content.getProcedure('getAllContent'); 18 | } 19 | 20 | Content.query(procedure, callback, (result, callback) => { 21 | const data = result[0].length > 0 ? result[0] : false; 22 | 23 | return callback(data); 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /src/app/dashboard/dashboard.controller.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import express from 'express'; 3 | 4 | // Helpers 5 | import { getMedia } from '../../lib/media'; 6 | 7 | // Express Router 8 | const Router = express.Router(); 9 | 10 | /** 11 | * Dashboard index 12 | */ 13 | Router.get('/', (req, res) => { 14 | // Setting layout 15 | res.renderScope.default({ 16 | layout: 'dashboard.hbs' 17 | }); 18 | 19 | // If user is connected... 20 | res.profileAllowed(connectedUser => { 21 | res.render('app/dashboard/index', res.renderScope.get()); 22 | }); 23 | }); 24 | 25 | /** 26 | * Dashboard: Blog Actions 27 | */ 28 | Router.use('/blog/:action*?', (req, res) => { 29 | // Setting layout & media 30 | res.renderScope.default({ 31 | layout: 'dashboard.hbs', 32 | media: getMedia() 33 | }); 34 | 35 | res.blogDashboard[res.action()](); 36 | }); 37 | 38 | /** 39 | * Dashboard: Configuration Actions 40 | */ 41 | Router.use('/configuration/:action*?', (req, res) => { 42 | // Setting layout 43 | res.renderScope.default({ 44 | layout: 'dashboard.hbs' 45 | }); 46 | 47 | res.configurationDashboard[res.action()](); 48 | }); 49 | 50 | /** 51 | * Dashboard: Content Actions 52 | */ 53 | Router.use('/content/:action*?', (req, res) => { 54 | // Setting layout 55 | res.renderScope.default({ 56 | layout: 'dashboard.hbs' 57 | }); 58 | 59 | res.contentDashboard[res.action()](); 60 | }); 61 | 62 | /** 63 | * Dashboard: Media Actions 64 | */ 65 | Router.use('/media/upload', (req, res) => { 66 | res.mediaDashboard.upload(); 67 | }); 68 | 69 | /** 70 | * Dashboard: Pages Actions 71 | */ 72 | Router.use('/pages/:action*?', (req, res) => { 73 | // Setting layout & media 74 | res.renderScope.default({ 75 | layout: 'dashboard.hbs', 76 | media: getMedia() 77 | }); 78 | 79 | res.pagesDashboard[res.action()](); 80 | }); 81 | 82 | export default Router; 83 | -------------------------------------------------------------------------------- /src/app/home/home.controller.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import express from 'express'; 3 | 4 | // Express Router 5 | const Router = express.Router(); 6 | 7 | Router.get('/', (req, res, next) => { 8 | res.render('app/home/index', { 9 | avatar: res.session('user').avatar, 10 | user: res.session('user').username 11 | }); 12 | }); 13 | 14 | export default Router; 15 | -------------------------------------------------------------------------------- /src/app/media/media.dashboard.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import fs from 'fs'; 3 | 4 | // Utils 5 | import { getFileInfo } from '../../lib/utils/files'; 6 | import { randomCode } from '../../lib/utils/security'; 7 | 8 | export default (req, res, next) => { 9 | // * Application name 10 | const app = 'media'; 11 | 12 | // Methods 13 | res[`${app}Dashboard`] = { 14 | upload 15 | }; 16 | 17 | return next(); 18 | 19 | /** 20 | * Upload 21 | * 22 | * @returns {void} void 23 | */ 24 | function upload() { 25 | res.profileAllowed(connectedUser => { 26 | if (res.isPost()) { 27 | let fstream; 28 | const uploadedFiles = []; 29 | 30 | req.pipe(req.busboy); 31 | 32 | req.busboy.on('file', (fieldname, file, filename) => { 33 | const fileInfo = getFileInfo(filename); 34 | const name = `${fileInfo.name}-${randomCode(5)}`; 35 | const extension = fileInfo.extension; 36 | const filePath = `media/${name}.${extension}`; 37 | const url = `${__dirname}/../../public/${filePath}`; 38 | 39 | fstream = fs.createWriteStream(url); 40 | 41 | uploadedFiles.push({ 42 | url: `${res.baseUrl}/${filePath}`, 43 | name: `${name}.${extension}`, 44 | extension 45 | }); 46 | 47 | file.pipe(fstream); 48 | 49 | fstream.on('finish', () => { 50 | res.json(uploadedFiles); 51 | }); 52 | }); 53 | } 54 | }); 55 | } 56 | }; 57 | -------------------------------------------------------------------------------- /src/app/users/users.model.js: -------------------------------------------------------------------------------- 1 | // Helpers 2 | import * as Users from '../../lib/model'; 3 | 4 | // Global vars 5 | const fields = [ 6 | 'network', 7 | 'networkId', 8 | 'username', 9 | 'password', 10 | 'email', 11 | 'avatar', 12 | 'subscribed' 13 | ]; 14 | 15 | /** 16 | * Returns the user privilege (god, admin or user) 17 | * 18 | * @param {string} user Username 19 | * @param {function} callback Callback 20 | * @returns {callback} Callback 21 | */ 22 | export function getPrivilege(user, callback) { 23 | const procedure = Users.getProcedure('getUserPrivilege', user, fields); 24 | 25 | Users.query(procedure, callback, (result, callback) => { 26 | const data = result && result[0].length > 0 ? result[0] : false; 27 | 28 | return callback(data); 29 | }); 30 | } 31 | 32 | /** 33 | * Returns the user information 34 | * 35 | * @param {string} user Username 36 | * @param {function} callback Callback 37 | * @returns {callback} Callback 38 | */ 39 | export function getUser(user, callback) { 40 | const procedure = Users.getProcedure('getUser', user, fields); 41 | 42 | Users.query(procedure, callback, (result, callback) => { 43 | const data = result && result[0].length > 0 ? result[0] : false; 44 | 45 | return callback(data); 46 | }); 47 | } 48 | 49 | /** 50 | * Saves a user in the database 51 | * 52 | * @param {string} user Username 53 | * @param {function} callback Callback 54 | * @returns {callback} Callback 55 | */ 56 | export function save(user, callback) { 57 | // TODO: Remove the filter and encrypt the password 58 | const procedure = Users.getProcedure('saveUser', user, fields, { 59 | password: 'encrypt' 60 | }); 61 | 62 | Users.query(procedure, callback, (result, callback) => { 63 | return callback(result); 64 | }); 65 | } 66 | -------------------------------------------------------------------------------- /src/frontend/actions/actionTypes.js: -------------------------------------------------------------------------------- 1 | // Blog Actions 2 | export const BLOG_LIST_POSTS = 'BLOG_LIST_POSTS'; 3 | export const BLOG_SHOW_SINGLE_POST = 'BLOG_SHOW_SINGLE_POST'; 4 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Blog/Posts.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | import { connect } from 'react-redux'; 4 | 5 | // Actions 6 | import * as actions from '../../../containers/Blog/actions'; 7 | 8 | // Utils 9 | import { isFirstRender, loadComponent } from '../../../../lib/utils/frontend'; 10 | 11 | // Components 12 | const Helmet = loadComponent('Ui/Helmet'); 13 | const Post = loadComponent('Blog/Post'); 14 | 15 | class Posts extends React.Component { 16 | static propTypes = { 17 | __: PropTypes.object.isRequired, 18 | loadPosts: PropTypes.func.isRequired, 19 | posts: PropTypes.array.isRequired, 20 | params: PropTypes.object.isRequired 21 | }; 22 | 23 | componentWillMount() { 24 | const { language, year, month, day, slug } = this.props.params; 25 | 26 | if (!year && !month && !day && !slug) { 27 | this.props.loadPosts(language); 28 | } 29 | } 30 | 31 | isSinglePost(params) { 32 | const { year, month, day, slug } = params; 33 | 34 | return year && month && day && slug; 35 | } 36 | 37 | renderPosts(posts) { 38 | return posts.map((post, key) => { 39 | return ; 40 | }); 41 | } 42 | 43 | render() { 44 | const { posts, params } = this.props; 45 | 46 | if (this.isSinglePost(params)) { 47 | return ( 48 |
49 | 50 | 51 |
52 | ); 53 | } 54 | 55 | if (isFirstRender(posts)) { 56 | return null; 57 | } 58 | 59 | return ( 60 |
61 | 67 | {this.renderPosts(posts)} 68 |
69 | ); 70 | } 71 | } 72 | 73 | export default connect(state => ({ 74 | __: state.content.__, 75 | posts: state.blog.posts 76 | }), actions)(Posts); 77 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Global/Content/Content.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | import { connect } from 'react-redux'; 4 | 5 | class Content extends React.Component { 6 | static propTypes = { 7 | __: PropTypes.object.isRequired, 8 | content: PropTypes.object.isRequired 9 | }; 10 | 11 | render() { 12 | const { content } = this.props; 13 | 14 | return ( 15 |
16 |
17 | {content} 18 |
19 |
20 | ); 21 | } 22 | } 23 | 24 | export default connect(state => ({ 25 | __: state.content.__ 26 | }), null)(Content); 27 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Global/Footer/CopyRight.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | import { connect } from 'react-redux'; 4 | 5 | // Utils 6 | import { loadComponent } from '../../../../../lib/utils/frontend'; 7 | 8 | // Components 9 | const Link = loadComponent('Ui/Link'); 10 | 11 | class CopyRight extends React.Component { 12 | static propTypes = { 13 | __: PropTypes.object.isRequired 14 | }; 15 | 16 | render() { 17 | return ( 18 |
19 | Copyright © MakingDevelopers. 2017 • All rights reserved. 20 |
21 | ); 22 | } 23 | } 24 | 25 | export default connect(state => ({ 26 | __: state.content.__ 27 | }), null)(CopyRight); 28 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Global/Footer/Footer.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React from 'react'; 3 | 4 | // Components 5 | import CopyRight from './CopyRight'; 6 | 7 | class Footer extends React.Component { 8 | render() { 9 | return ( 10 | 13 | ); 14 | } 15 | } 16 | 17 | export default Footer; 18 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Global/Header/Header.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | import { connect } from 'react-redux'; 4 | 5 | // Components 6 | import Logo from './Logo'; 7 | import MainNav from './MainNav'; 8 | 9 | class Header extends React.Component { 10 | static propTypes = { 11 | __: PropTypes.object.isRequired 12 | }; 13 | 14 | render() { 15 | return ( 16 |
17 | 18 | 19 |
20 | ); 21 | } 22 | } 23 | 24 | export default connect(state => ({ 25 | __: state.content.__ 26 | }), null)(Header); 27 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Global/Header/Logo.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React from 'react'; 3 | 4 | // Utils 5 | import { loadComponent } from '../../../../../lib/utils/frontend'; 6 | 7 | // Components 8 | const Link = loadComponent('Ui/Link'); 9 | 10 | class Logo extends React.Component { 11 | render() { 12 | return ( 13 |
14 | 15 | 16 | Making 17 | Developers 18 | 19 | 20 |
21 | ); 22 | } 23 | } 24 | 25 | export default Logo; 26 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Global/Header/MainNav.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | import { connect } from 'react-redux'; 4 | 5 | // Utils 6 | import { 7 | loadComponent, 8 | setClass 9 | } from '../../../../../lib/utils/frontend'; 10 | 11 | // Components 12 | const Icon = loadComponent('Ui/Icon'); 13 | const Link = loadComponent('Ui/Link'); 14 | 15 | class MainNav extends React.Component { 16 | static propTypes = { 17 | isMobile: PropTypes.bool.isRequired 18 | }; 19 | 20 | constructor(props) { 21 | super(props); 22 | 23 | this.state = { 24 | showMenu: false 25 | }; 26 | 27 | this.handleToggleClick = this.handleToggleClick.bind(this); 28 | } 29 | 30 | handleToggleClick() { 31 | this.setState({ 32 | showMenu: !this.state.showMenu 33 | }); 34 | } 35 | 36 | render() { 37 | const { isMobile } = this.props; 38 | 39 | const mobileClass = setClass(isMobile, ' mobile'); 40 | let hiddenClass = ''; 41 | let hiddenToggleClass = ' hidden'; 42 | 43 | if (isMobile) { 44 | hiddenClass = setClass(this.state.showMenu, '', ' hidden'); 45 | hiddenToggleClass = ''; 46 | } 47 | 48 | return ( 49 | 65 | ); 66 | } 67 | } 68 | 69 | export default connect(state => ({ 70 | isMobile: state.device.isMobile 71 | }), null)(MainNav); 72 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Ui/Helmet.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | 4 | // Configuration 5 | import { $app } from '../../../../lib/config'; 6 | 7 | // Utils 8 | import { removeHTML } from '../../../../lib/utils/string'; 9 | 10 | class Helmet extends React.Component { 11 | static propTypes = { 12 | title: PropTypes.string.isRequired, 13 | meta: PropTypes.array 14 | } 15 | 16 | componentDidMount() { 17 | const { title, meta } = this.props; 18 | 19 | // Updating the title 20 | document.title = `${$app().mainTitle} - ${title}`; 21 | 22 | // Updating metatags 23 | meta.forEach(meta => { 24 | let metaTag = document.head.querySelector(`[name="${meta.name}"]`); 25 | 26 | if (metaTag) { 27 | metaTag.setAttribute('content', removeHTML(meta.content)); 28 | } else { 29 | metaTag = document.createElement('meta'); 30 | metaTag.setAttribute('name', meta.name); 31 | metaTag.setAttribute('content', meta.content); 32 | 33 | document.head.appendChild(metaTag); 34 | } 35 | }); 36 | } 37 | 38 | render() { 39 | return null; 40 | } 41 | } 42 | 43 | export default Helmet; 44 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Ui/Icon.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | 4 | class Icon extends React.Component { 5 | static propTypes = { 6 | type: PropTypes.string.isRequired 7 | } 8 | 9 | render() { 10 | const { type, className } = this.props; 11 | const iconProps = {...this.props}; 12 | 13 | delete iconProps.type; 14 | delete iconProps.className; 15 | 16 | return ( 17 | 18 | ); 19 | } 20 | } 21 | 22 | export default Icon; 23 | -------------------------------------------------------------------------------- /src/frontend/components/Default/Ui/Link.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | import { connect } from 'react-redux'; 4 | import { Link as ReactRouterLink } from 'react-router'; 5 | 6 | class Link extends React.Component { 7 | static propTypes = { 8 | to: PropTypes.string.isRequired, 9 | currentLanguage: PropTypes.string.isRequired 10 | } 11 | 12 | render() { 13 | const { to, currentLanguage } = this.props; 14 | const linkProps = {...this.props}; 15 | let newToURL = `/${currentLanguage}/${to}`; 16 | 17 | delete linkProps.dispatch; 18 | delete linkProps.currentLanguage; 19 | 20 | if (to === '/' || to.indexOf('http') !== -1) { 21 | newToURL = to; 22 | } 23 | 24 | return ( 25 | 26 | ); 27 | } 28 | } 29 | 30 | export default connect(state => ({ 31 | currentLanguage: state.language.currentLanguage 32 | }), null)(Link); 33 | -------------------------------------------------------------------------------- /src/frontend/configureStore.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import isomorphicFetch from 'isomorphic-fetch'; 3 | import promiseMiddleware from 'redux-promise-middleware'; 4 | import reduxImmutableStateInvariant from 'redux-immutable-state-invariant'; 5 | import { createStore, applyMiddleware } from 'redux'; 6 | 7 | // Reducers 8 | import rootReducer from './reducers'; 9 | 10 | const injectMiddleware = deps => ({ dispatch, getState }) => next => action => 11 | next(typeof action === 'function' 12 | ? action({ ...deps, dispatch, getState }) 13 | : action 14 | ); 15 | 16 | export default function configureStore(options) { 17 | const { initialState = {} } = options; 18 | 19 | const middleware = [ 20 | injectMiddleware({ 21 | fetch: isomorphicFetch 22 | }), 23 | promiseMiddleware({ 24 | promiseTypeSuffixes: ['START', 'SUCCESS', 'ERROR'] 25 | }), 26 | reduxImmutableStateInvariant() 27 | ]; 28 | 29 | return createStore( 30 | rootReducer, 31 | initialState, 32 | applyMiddleware(...middleware) 33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /src/frontend/constants/api.js: -------------------------------------------------------------------------------- 1 | export const API = Object.freeze({ 2 | BLOG: { 3 | POST: 'blog/post', 4 | POSTS: 'blog/posts' 5 | } 6 | }); 7 | -------------------------------------------------------------------------------- /src/frontend/containers/App.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | 4 | // Utils 5 | import { loadComponent } from '../../lib/utils/frontend'; 6 | 7 | // Components 8 | const Header = loadComponent('Global/Header/Header'); 9 | const Content = loadComponent('Global/Content/Content'); 10 | const Footer = loadComponent('Global/Footer/Footer'); 11 | 12 | class App extends React.Component { 13 | static propTypes = { 14 | children: PropTypes.object.isRequired 15 | }; 16 | 17 | render() { 18 | return ( 19 |
20 |
21 | 22 |
23 |
24 | ); 25 | } 26 | } 27 | 28 | export default App; 29 | -------------------------------------------------------------------------------- /src/frontend/containers/Blog/actions.js: -------------------------------------------------------------------------------- 1 | // Actions Types 2 | import * as types from '../../actions/actionTypes'; 3 | 4 | // Api 5 | import blogApi from './api'; 6 | 7 | export function loadPosts(language) { 8 | return { 9 | type: types.BLOG_LIST_POSTS, 10 | payload: blogApi.getAllPosts(language) 11 | }; 12 | } 13 | 14 | export function loadSinglePost(day, month, year, slug, language) { 15 | return { 16 | type: types.BLOG_SHOW_SINGLE_POST, 17 | payload: blogApi.getSinglePost(day, month, year, slug, language) 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /src/frontend/containers/Blog/api.js: -------------------------------------------------------------------------------- 1 | // Constants 2 | import { API } from '../../constants/api'; 3 | 4 | // Utils 5 | import { apiFetch } from '../../../lib/utils/api'; 6 | 7 | class BlogApi { 8 | static getAllPosts(language) { 9 | const query = { 10 | language 11 | }; 12 | 13 | return apiFetch(API.BLOG.POSTS, {}, query); 14 | } 15 | 16 | static getSinglePost(year, month, day, slug, language) { 17 | const query = { 18 | slug, 19 | day, 20 | month, 21 | year, 22 | language 23 | }; 24 | 25 | return apiFetch(API.BLOG.POST, {}, query); 26 | } 27 | } 28 | 29 | export default BlogApi; 30 | -------------------------------------------------------------------------------- /src/frontend/containers/Blog/index.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React, { PropTypes } from 'react'; 3 | import { connect } from 'react-redux'; 4 | 5 | // Utils 6 | import { loadComponent } from '../../../lib/utils/frontend'; 7 | 8 | // Components 9 | const Posts = loadComponent('Blog/Posts'); 10 | 11 | class Blog extends React.Component { 12 | static propTypes = { 13 | isMobile: PropTypes.bool 14 | }; 15 | 16 | render() { 17 | const { 18 | isMobile, 19 | router 20 | } = this.props; 21 | 22 | return ( 23 |
24 | 25 |
26 | ); 27 | } 28 | } 29 | 30 | export default connect(state => ({ 31 | isMobile: state.device.isMobile 32 | }), null)(Blog); 33 | -------------------------------------------------------------------------------- /src/frontend/containers/Blog/model.js: -------------------------------------------------------------------------------- 1 | import { Record } from 'immutable'; 2 | 3 | export default Record({ 4 | id: '', 5 | title: '', 6 | slug: '', 7 | excerpt: '', 8 | content: '', 9 | codes: '', 10 | tags: '', 11 | author: '', 12 | createdAt: '', 13 | day: '', 14 | month: '', 15 | year: '', 16 | language: '', 17 | activeComments: 0, 18 | state: '' 19 | }); 20 | -------------------------------------------------------------------------------- /src/frontend/containers/Blog/reducer.js: -------------------------------------------------------------------------------- 1 | import PostRecord from './model'; 2 | import { Record } from 'immutable'; 3 | 4 | const InitialState = Record({ 5 | posts: [], 6 | post: [] 7 | }); 8 | 9 | const initialState = new InitialState; 10 | 11 | const jsonToList = list => list && list.map(json => new PostRecord(json)); 12 | 13 | const revive = ({ posts, post }) => initialState.merge({ 14 | posts: jsonToList(posts), 15 | post: new PostRecord(post) 16 | }); 17 | 18 | export default function blogReducer(state = initialState, action) { 19 | if (!(state instanceof InitialState)) { 20 | return revive(state); 21 | } 22 | 23 | switch (action.type) { 24 | case 'BLOG_LIST_POSTS_SUCCESS': { 25 | const response = action.payload ? action.payload.response : []; 26 | const posts = jsonToList(response); 27 | 28 | return state.set('posts', posts); 29 | } 30 | 31 | case 'BLOG_SHOW_SINGLE_POST_SUCCESS': { 32 | const response = action.payload ? action.payload.response : []; 33 | const post = jsonToList(response); 34 | 35 | return state.set('post', post); 36 | } 37 | 38 | default: 39 | return state; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/frontend/containers/Home/index.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React from 'react'; 3 | import { Link } from 'react-router'; 4 | 5 | class Home extends React.Component { 6 | render() { 7 | return ( 8 |
9 |

Homepage2

10 |

Lorem ipsum...

11 | Blog 12 |
13 | ); 14 | } 15 | } 16 | 17 | export default Home; 18 | -------------------------------------------------------------------------------- /src/frontend/containers/Page404/index.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React from 'react'; 3 | import { Link } from 'react-router'; 4 | 5 | class Page404 extends React.Component { 6 | render() { 7 | return ( 8 |
9 |

404 Error

10 |

Go back

11 | Home 12 |
13 | ); 14 | } 15 | } 16 | 17 | export default Page404; 18 | -------------------------------------------------------------------------------- /src/frontend/reducers/contentReducer.js: -------------------------------------------------------------------------------- 1 | export default function contentReducer(state = {}) { 2 | return state; 3 | } 4 | -------------------------------------------------------------------------------- /src/frontend/reducers/deviceReducer.js: -------------------------------------------------------------------------------- 1 | export default function deviceReducer(state = {}) { 2 | if (state.isMobile) { 3 | state.isMobile = state.isMobile === 'false' ? false : true; 4 | } 5 | 6 | return state; 7 | } 8 | -------------------------------------------------------------------------------- /src/frontend/reducers/index.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import { combineReducers } from 'redux'; 3 | 4 | // Components Reducers 5 | import blog from '../containers/Blog/reducer'; 6 | 7 | // Shared Reducers 8 | import content from './contentReducer'; 9 | import device from './deviceReducer'; 10 | import language from './languageReducer'; 11 | 12 | const rootReducer = combineReducers({ 13 | blog, 14 | content, 15 | device, 16 | language 17 | }); 18 | 19 | export default rootReducer; 20 | -------------------------------------------------------------------------------- /src/frontend/reducers/languageReducer.js: -------------------------------------------------------------------------------- 1 | export default function languageReducer(state = {}) { 2 | return state; 3 | } 4 | -------------------------------------------------------------------------------- /src/frontend/routes.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import React from 'react'; 3 | import { IndexRoute, Route } from 'react-router'; 4 | 5 | // Components 6 | import App from './containers/App'; 7 | import Blog from './containers/Blog'; 8 | import Home from './containers/Home'; 9 | import Page404 from './containers/Page404'; 10 | 11 | export default ( 12 | 13 | {/* Index */} 14 | 15 | 16 | 17 | 18 | {/* Blog Routes */} 19 | 20 | 21 | 22 | 23 | 24 | {/* 404 Error */} 25 | 26 | 27 | ); 28 | -------------------------------------------------------------------------------- /src/lib/content.js: -------------------------------------------------------------------------------- 1 | // Utils 2 | import { pick } from './utils/object'; 3 | 4 | export default (req, res, next) => { 5 | let contentBase; 6 | 7 | res.content = content; 8 | 9 | return next(); 10 | 11 | /** 12 | * Returns content from given key 13 | * 14 | * @param {string} contentKey Content Key 15 | * @param {string} base Base to shortcut the keys 16 | * @returns {string} Content 17 | */ 18 | function content(contentKey, base) { 19 | if (base) { 20 | contentBase = contentKey; 21 | } else if (contentBase && pick(contentKey, res.__) === contentKey) { 22 | contentKey = `${contentBase}.${contentKey}`; 23 | } 24 | 25 | return pick(contentKey, res.__); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /src/lib/env.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Gets the current environment based on NODE_ENV var. 3 | * 4 | * @returns {object} Environment 5 | */ 6 | export default function getEnv() { 7 | return { 8 | name: process.env.NODE_ENV ? process.env.NODE_ENV : 'production' 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /src/lib/media.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import path from 'path'; 3 | 4 | // Utils 5 | import { glob } from './utils/files'; 6 | 7 | export function getMedia() { 8 | return glob(path.join(__dirname, '../public/media')); 9 | } 10 | -------------------------------------------------------------------------------- /src/lib/templates.js: -------------------------------------------------------------------------------- 1 | // Global vars 2 | let renderOptions = {}; 3 | let defaultOptions = {}; 4 | 5 | export default (req, res, next) => { 6 | const { defaultScope, get, set } = Templates(); 7 | 8 | res.renderScope = { 9 | default: defaultScope, 10 | get, 11 | set 12 | }; 13 | 14 | return next(); 15 | }; 16 | 17 | export function Templates() { 18 | return { 19 | defaultScope, 20 | get, 21 | set 22 | }; 23 | 24 | /** 25 | * Sets default templates options 26 | * 27 | * @param {object} scope Scope 28 | * @returns {void} void 29 | */ 30 | function defaultScope(scope) { 31 | defaultOptions = scope; 32 | renderOptions = scope; 33 | } 34 | 35 | /** 36 | * Retrieves the template options 37 | * 38 | * @param {string} key Key 39 | * @returns {string} render option 40 | */ 41 | function get(key) { 42 | let scope; 43 | 44 | if (!key) { 45 | scope = renderOptions; 46 | renderOptions = defaultOptions; 47 | 48 | return scope; 49 | } 50 | 51 | return renderOptions[key] || false; 52 | } 53 | 54 | /** 55 | * Set a value in the renderOptions 56 | * 57 | * @param {string} key Key 58 | * @param {mixed} value Value 59 | * @returns {void} void 60 | */ 61 | function set(key, value) { 62 | renderOptions[key] = value; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/lib/user.js: -------------------------------------------------------------------------------- 1 | // Utils 2 | import { isArray, isDefined } from './utils/is'; 3 | 4 | // Model 5 | import * as Users from '../app/users/users.model'; 6 | 7 | export default (req, res, next) => { 8 | const { 9 | profileAllowed 10 | } = User(req, res); 11 | 12 | // Methods 13 | res.profileAllowed = profileAllowed; 14 | 15 | return next(); 16 | }; 17 | 18 | export function User(req, res) { 19 | // Methods 20 | return { 21 | profileAllowed 22 | }; 23 | 24 | /** 25 | * Returns user information if is a profileAllowed 26 | * 27 | * @param {function} callback Callback 28 | * @returns {callback} Callback or redirects if the user is not allowed 29 | */ 30 | function profileAllowed(callback) { 31 | const connectedUser = res.session('user'); 32 | 33 | if (isDefined(connectedUser) && isDefined(res.session('oauth'))) { 34 | Users.getPrivilege({ 35 | network: connectedUser.network, 36 | networkId: connectedUser.networkId, 37 | username: connectedUser.username, 38 | password: false 39 | }, (userInfo) => { 40 | const privilege = isArray(userInfo) ? userInfo[0].privilege : false; 41 | 42 | if (privilege === 'god' || privilege === 'admin') { 43 | res.renderScope.set('connectedUser', connectedUser); 44 | 45 | return callback(connectedUser); 46 | } else { 47 | return res.redirect('/'); 48 | } 49 | }); 50 | } else { 51 | return res.redirect('/'); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/lib/utils/api.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import queryString from 'query-string'; 3 | 4 | // Config 5 | import { $api, $baseUrl } from '../config'; 6 | 7 | export function apiFetch(endpoint, options, query = false) { 8 | let qs; 9 | 10 | if (query) { 11 | qs = queryString.stringify(query); 12 | } 13 | 14 | const getPromise = async () => { 15 | try { 16 | const response = await fetch(apiEndpoint(endpoint, qs), apiOptions(options)); 17 | return response.json(); 18 | } catch (e) { 19 | throw e; 20 | } 21 | }; 22 | 23 | return getPromise(); 24 | } 25 | 26 | export function apiEndpoint(endpoint, qs) { 27 | let query = ''; 28 | 29 | if (qs) { 30 | query = `?${qs}`; 31 | } 32 | 33 | if ($api().enable) { 34 | return `${$api().url}${endpoint}${query}`; 35 | } 36 | 37 | return `${$baseUrl()}/content/data/${endpoint}.json`; 38 | } 39 | 40 | export function apiOptions(options = {}) { 41 | const { 42 | method = 'GET', 43 | headers = { 44 | 'Content-Type': 'application/json' 45 | }, 46 | body = false 47 | } = options; 48 | 49 | const newOptions = { 50 | method, 51 | headers 52 | }; 53 | 54 | if (body) { 55 | newOptions.body = body; 56 | } 57 | 58 | return newOptions; 59 | } 60 | -------------------------------------------------------------------------------- /src/lib/utils/date.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import dateFormat from 'date-format'; 3 | 4 | /** 5 | * Returns current day in 'dd' format 6 | * 7 | * @returns {string} Current day in 'dd' format 8 | */ 9 | export function day() { 10 | return dateFormat('dd', new Date()); 11 | } 12 | 13 | /** 14 | * Returns current day in 'MM' format 15 | * 16 | * @returns {string} Current month in 'MM' format 17 | */ 18 | export function month() { 19 | return dateFormat('MM', new Date()); 20 | } 21 | 22 | /** 23 | * Returns current date 24 | * 25 | * @returns {string} Datetime 26 | */ 27 | export function now() { 28 | return dateFormat(new Date()); 29 | } 30 | 31 | /** 32 | * Returns current year in 'yyyy' format 33 | * 34 | * @returns {string} Current year in 'yyyy' format 35 | */ 36 | export function year() { 37 | return dateFormat('yyyy', new Date()); 38 | } 39 | -------------------------------------------------------------------------------- /src/lib/utils/device.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns current device (desktop or mobile) 3 | * 4 | * @param {string} ua User Agent 5 | * @returns {string} Current device 6 | */ 7 | export function getCurrentDevice(ua) { 8 | return /mobile/i.test(ua) ? 'mobile' : 'desktop'; 9 | } 10 | 11 | /** 12 | * Validates if the User Agent is a Desktop Browser 13 | * 14 | * @param {string} ua User Agent 15 | * @returns {boolean} True if is a Desktop Browser 16 | */ 17 | export function isDesktop(ua) { 18 | return !/mobile/i.test(ua); 19 | } 20 | 21 | /** 22 | * Validates if the User Agent is a Mobile Browser 23 | * 24 | * @param {string} ua User Agent 25 | * @returns {boolean} True if is a Mobile Browser 26 | */ 27 | export function isMobile(ua) { 28 | return /mobile/i.test(ua); 29 | } 30 | 31 | export function isClient() { 32 | return typeof window !== 'undefined'; 33 | } 34 | 35 | export function isServer() { 36 | return typeof window === 'undefined'; 37 | } 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/lib/utils/frontend.js: -------------------------------------------------------------------------------- 1 | // Configuration 2 | import { $html } from '../config'; 3 | 4 | export function isFirstRender(items) { 5 | return items && items.length === 0; 6 | } 7 | 8 | export function loadComponent(componentPath, returnClass) { 9 | try { 10 | const Component = require(`../../frontend/components/${$html().theme}/${componentPath}`); 11 | 12 | if (returnClass) { 13 | const parts = componentPath.split('/'); 14 | const componentName = parts.length > 1 ? parts[1] : parts[0]; 15 | 16 | return Component[componentName]; 17 | } 18 | 19 | return Component.default; 20 | } catch (e) { 21 | throw e; 22 | } 23 | } 24 | 25 | export function loadImage(imagePath) { 26 | return `themes/${$html().theme}/images/${imagePath}`; 27 | } 28 | 29 | export function setClass(condition, className1, className2) { 30 | return condition ? className1 : className2 ? className2 : ''; 31 | } 32 | -------------------------------------------------------------------------------- /src/lib/utils/security.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import crypto from 'crypto'; 3 | 4 | // Utils 5 | import { isDefined } from './is'; 6 | 7 | // Configuration 8 | import { $security } from './../config'; 9 | 10 | // Secret Salt 11 | const salt = $security().secret; 12 | 13 | /** 14 | * Encrypt a string with sha1 & md5 15 | * 16 | * @param {string} str String 17 | * @returns {string} Encrypted sha1 string 18 | */ 19 | export function encrypt(str) { 20 | return sha1(md5(str)); 21 | } 22 | 23 | /** 24 | * Encrypt a string with md5 25 | * 26 | * @param {string} str String 27 | * @returns {string} Encrypted md5 string 28 | */ 29 | export function md5(str) { 30 | if (isDefined(str)) { 31 | return crypto 32 | .createHash('md5') 33 | .update(`${salt}${str.toString()}`) 34 | .digest('hex'); 35 | } 36 | 37 | return false; 38 | } 39 | 40 | /** 41 | * Encrypt a string with sha1 42 | * 43 | * @param {string} str String 44 | * @returns {string} Encrypted sha1 string 45 | */ 46 | export function sha1(str) { 47 | if (isDefined(str)) { 48 | return crypto 49 | .createHash('sha1') 50 | .update(`${salt}${str.toString()}`) 51 | .digest('hex'); 52 | } 53 | 54 | return false; 55 | } 56 | 57 | /** 58 | * Generates a random code 59 | * 60 | * @param {number} max Max Size 61 | * @param {string} charset Custom charset 62 | * @returns {string} Cleaned string. 63 | */ 64 | export function randomCode(max, charset) { 65 | let randomCode = ''; 66 | let randomPoz; 67 | 68 | max = max || 12; 69 | charset = charset || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 70 | 71 | for (let i = 0; i < max; i++) { 72 | randomPoz = Math.floor(Math.random() * charset.length); 73 | randomCode += charset.substring(randomPoz, randomPoz + 1); 74 | } 75 | 76 | return randomCode; 77 | } 78 | -------------------------------------------------------------------------------- /src/lib/utils/string.js: -------------------------------------------------------------------------------- 1 | // Utils 2 | import { isDefined, isString, isObject } from './is'; 3 | import { forEach } from './object'; 4 | 5 | export function capitalize(str) { 6 | return str && str[0].toUpperCase() + str.slice(1); 7 | } 8 | 9 | /** 10 | * Cleans a string from special characters 11 | * 12 | * @param {string} str String 13 | * @returns {string} Cleaned string. 14 | */ 15 | export function clean(str) { 16 | if (isDefined(str)) { 17 | return removeHTML(str).replace(/[`ª´·¨Ç~¿!#$%^&*()|+\=?;'",<>\{\}\[\]\\]/gi, ''); 18 | } 19 | 20 | return false; 21 | } 22 | 23 | export function sanitize(data) { 24 | const sanitizedData = {}; 25 | 26 | if (isString(data)) { 27 | return clean(data); 28 | } else if (isObject(data)) { 29 | forEach(data, (key) => { 30 | sanitizedData[key] = clean(data[key]); 31 | }); 32 | } 33 | 34 | return sanitizedData; 35 | } 36 | 37 | /** 38 | * Escapes a string 39 | * 40 | * @param {string} str String 41 | * @returns {string} Escaped string. 42 | */ 43 | export function escapeString(str) { 44 | if (isDefined(str)) { 45 | return str 46 | .replace(/'/g, '\\\'') 47 | .replace(/"/g, '\\\\"') 48 | .replace(/&/g, '&') 49 | .replace(//g, '>'); 51 | } 52 | 53 | return false; 54 | } 55 | 56 | export function addSlashes(str, doubleQuotesAlso) { 57 | if (isDefined(str)) { 58 | if (doubleQuotesAlso) { 59 | return str 60 | .replace(/'/g, '\\\'') 61 | .replace(/"/g, '\\\\"'); 62 | } 63 | 64 | return str.replace(/'/g, '\\\''); 65 | } 66 | 67 | return false; 68 | } 69 | 70 | /** 71 | * Removes HTML from string 72 | * 73 | * @param {string} str String 74 | * @returns {string} Cleaned string. 75 | */ 76 | export function removeHTML(str) { 77 | if (isDefined(str)) { 78 | return str.replace(/(<([^>]+)>)/ig, ''); 79 | } 80 | 81 | return false; 82 | } 83 | 84 | export function camelCase(str) { 85 | return str.replace(/^([A-Z])|[\s-_](\w)/g, (match, p1, p2, offset) => { 86 | if (p2) { 87 | return p2.toUpperCase(); 88 | } 89 | 90 | return p1.toLowerCase(); 91 | }); 92 | } 93 | -------------------------------------------------------------------------------- /src/lib/utils/url.js: -------------------------------------------------------------------------------- 1 | // Configuration 2 | import { $app } from '../config'; 3 | 4 | // Utils 5 | import { isDefined, isLanguage, isString } from './is'; 6 | import { exists } from './object'; 7 | 8 | /** 9 | * Return all the params from the url (splits slashes) 10 | * 11 | * @param {string} url Url Params with slashes (/es/blog/post-title) 12 | * @returns {array} Params as array 13 | */ 14 | export function getParamsFromUrl(url) { 15 | if (isString(url)) { 16 | const params = url.split('/'); 17 | params.shift(); 18 | 19 | return params; 20 | } 21 | 22 | return false; 23 | } 24 | 25 | export function getCurrentApp(url, dashboard) { 26 | const urlParams = getParamsFromUrl(url); 27 | const allowedApps = $app().allowed; 28 | 29 | if (dashboard) { 30 | return isLanguage(urlParams[0]) && isDefined(urlParams[2]) ? urlParams[2] : urlParams[1]; 31 | } 32 | 33 | const currentApp = isLanguage(urlParams[0]) ? urlParams[1] : urlParams[0]; 34 | 35 | return exists(currentApp, allowedApps) ? currentApp : $app().default; 36 | } 37 | 38 | export function getValueFromParam(param) { 39 | const value = param.replace('/', ''); 40 | 41 | return value; 42 | } 43 | 44 | export function getPaginationPageFromParam(params) { 45 | return isDefined(params.action) && params.action === 'page' && isDefined(params[0]) 46 | ? getValueFromParam(params[0]) 47 | : 0; 48 | } 49 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import 'babel-polyfill'; 3 | import Bluebird from 'bluebird'; 4 | import React from 'react'; 5 | import { browserHistory, Router } from 'react-router'; 6 | import { Provider } from 'react-redux'; 7 | import { render } from 'react-dom'; 8 | 9 | // Routes 10 | import routes from './frontend/routes'; 11 | 12 | // Redux 13 | import configureStore from './frontend/configureStore'; 14 | 15 | // Bluebird configuration 16 | window.Promise = Bluebird; 17 | Bluebird.config({ warnings: false }); 18 | 19 | window.addEventListener('unhandledrejection', error => { 20 | if (process.env.NODE_ENV === 'production') { 21 | error.preventDefault(); 22 | } else { 23 | error.preventDefault(); 24 | console.warn('Unhandled promise rejection warning.'); // eslint-disable-line no-console 25 | } 26 | }); 27 | 28 | // Configuring redux store 29 | const store = configureStore({ 30 | initialState: window.initialState 31 | }); 32 | 33 | // App container (div.id) 34 | const app = document.querySelector('#App'); 35 | 36 | // Rendering the app 37 | render( 38 | 39 | 40 | , 41 | app 42 | ); 43 | -------------------------------------------------------------------------------- /src/public/assets/flags/flags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/assets/flags/flags.png -------------------------------------------------------------------------------- /src/public/assets/fonts/Comfortaa/font.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/assets/fonts/Comfortaa/font.woff -------------------------------------------------------------------------------- /src/public/assets/fonts/Comfortaa/font.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/assets/fonts/Comfortaa/font.woff2 -------------------------------------------------------------------------------- /src/public/assets/fonts/OpenSans/font.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/assets/fonts/OpenSans/font.woff -------------------------------------------------------------------------------- /src/public/assets/fonts/OpenSans/font.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/assets/fonts/OpenSans/font.woff2 -------------------------------------------------------------------------------- /src/public/assets/fonts/Oswald/font.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/assets/fonts/Oswald/font.woff -------------------------------------------------------------------------------- /src/public/assets/fonts/Oswald/font.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/assets/fonts/Oswald/font.woff2 -------------------------------------------------------------------------------- /src/public/assets/fonts/SourceCodePro/font.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/assets/fonts/SourceCodePro/font.woff -------------------------------------------------------------------------------- /src/public/assets/fonts/SourceCodePro/font.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/assets/fonts/SourceCodePro/font.woff2 -------------------------------------------------------------------------------- /src/public/images/dashboard/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/images/dashboard/bg.gif -------------------------------------------------------------------------------- /src/public/js/dashboard/main.js: -------------------------------------------------------------------------------- 1 | /* eslint no-unused-vars:0 */ 2 | init(); 3 | 4 | function init() { 5 | loadCKEditor(); 6 | } 7 | 8 | function slug(str) { 9 | str = str.replace(/^\s+|\s+$/g, '').toLowerCase(); 10 | 11 | const from = 'ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;'; 12 | const to = 'aaaaaeeeeeiiiiooooouuuunc------'; 13 | 14 | for (let i = 0, l = from.length; i < l; i++) { 15 | str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); 16 | } 17 | 18 | return str.replace(/[^a-z0-9 -]/g, '').replace(/\s+/g, '-').replace(/-+/g, '-'); 19 | } 20 | 21 | function loadCKEditor() { 22 | CKEDITOR.plugins.addExternal('codemirror', '/js/vendors/ckeditor/plugins/codemirror/'); 23 | 24 | const config = { 25 | allowedContent: true, 26 | extraPlugins: 'codemirror', 27 | format_tags: 'p;h1;h2;h3;pre', 28 | removeButtons: 'Underline,Subscript,Superscript', 29 | removeDialogTabs: 'image:advanced;link:advanced', 30 | skin: 'office,/js/vendors/ckeditor/skins/office/', 31 | toolbar: [ 32 | { name:'group1', items: ['Bold','Italic','Underline','StrikeThrough','PasteFromWord'] }, 33 | { name:'group2', items: ['Format'] }, 34 | { name:'group3', items: ['Outdent','Indent','NumberedList','BulletedList','Blockquote','PageBreak'] }, 35 | { name:'group4', items: ['Image','Link','Unlink','Source'] } 36 | ], 37 | width: '91%' 38 | }; 39 | 40 | $('.editor').each(function() { 41 | const id = $(this).attr('id'); 42 | 43 | if (id !== 'codes' && id !== 'value') { 44 | config.height = id === 'excerpt' ? '150px' : '400px'; 45 | CKEDITOR.replace(id, config); 46 | } else if (id === 'value') { 47 | $(this).css('height', '140px'); 48 | } 49 | }); 50 | } 51 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/basepath.js: -------------------------------------------------------------------------------- 1 | /* Setting the CKEditor Basepath */ 2 | var CKEDITOR_BASEPATH = '/bower_components/ckeditor/'; 3 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/icons/autocomplete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/plugins/codemirror/icons/autocomplete.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/icons/autoformat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/plugins/codemirror/icons/autoformat.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/icons/commentselectedrange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/plugins/codemirror/icons/commentselectedrange.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/icons/searchcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/plugins/codemirror/icons/searchcode.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("bbcode",function(b){var e,a,g;e={bbCodeTags:"b i u s img quote code list table tr td size color url",bbCodeUnaryTags:"* :-) hr cut"};if(b.hasOwnProperty("bbCodeTags")){e.bbCodeTags=b.bbCodeTags}if(b.hasOwnProperty("bbCodeUnaryTags")){e.bbCodeUnaryTags=b.bbCodeUnaryTags}var f={cont:function(i,h){g=h;return i},escapeRegEx:function(h){return h.replace(/([\:\-\)\(\*\+\?\[\]])/g,"\\$1")}};var d={validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/,tags:new RegExp("(?:"+f.escapeRegEx(e.bbCodeTags).split(" ").join("|")+")"),unaryTags:new RegExp("(?:"+f.escapeRegEx(e.bbCodeUnaryTags).split(" ").join("|")+")")};var c={tokenizer:function(i,h){if(i.eatSpace()){return null}if(i.match("[",true)){h.tokenize=c.bbcode;return f.cont("tag","startTag")}i.next();return null},inAttribute:function(h){return function(k,i){var l=null;var j=null;while(!k.eol()){j=k.peek();if(k.next()==h&&l!=="\\"){i.tokenize=c.bbcode;break}l=j}return"string"}},bbcode:function(k,i){if(a=k.match("]",true)){i.tokenize=c.tokenizer;return f.cont("tag",null)}if(k.match("[",true)){return f.cont("tag","startTag")}var h=k.next();if(d.stringChar.test(h)){i.tokenize=c.inAttribute(h);return f.cont("string","string")}else{if(/\d/.test(h)){k.eatWhile(/\d/);return f.cont("number","number")}else{if(i.last=="whitespace"){k.eatWhile(d.validIdentifier);return f.cont("attribute","modifier")}if(i.last=="property"){k.eatWhile(d.validIdentifier);return f.cont("property",null)}else{if(/\s/.test(h)){g="whitespace";return null}}var j="";if(h!="/"){j+=h}var l=null;while(l=k.eat(d.validIdentifier)){j+=l}if(d.unaryTags.test(j)){return f.cont("atom","atom")}if(d.tags.test(j)){return f.cont("keyword","keyword")}if(/\s/.test(h)){return null}return f.cont("tag","tag")}}}};return{startState:function(){return{tokenize:c.tokenizer,mode:"bbcode",last:null}},token:function(j,i){var h=i.tokenize(j,i);i.last=g;return h},electricChars:""}});CodeMirror.defineMIME("text/x-bbcode","bbcode"); -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("bbcode",function(b){var e,a,g;e={bbCodeTags:"b i u s img quote code list table tr td size color url",bbCodeUnaryTags:"* :-) hr cut"};if(b.hasOwnProperty("bbCodeTags")){e.bbCodeTags=b.bbCodeTags}if(b.hasOwnProperty("bbCodeUnaryTags")){e.bbCodeUnaryTags=b.bbCodeUnaryTags}var f={cont:function(i,h){g=h;return i},escapeRegEx:function(h){return h.replace(/([\:\-\)\(\*\+\?\[\]])/g,"\\$1")}};var d={validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/,tags:new RegExp("(?:"+f.escapeRegEx(e.bbCodeTags).split(" ").join("|")+")"),unaryTags:new RegExp("(?:"+f.escapeRegEx(e.bbCodeUnaryTags).split(" ").join("|")+")")};var c={tokenizer:function(i,h){if(i.eatSpace()){return null}if(i.match("[",true)){h.tokenize=c.bbcode;return f.cont("tag","startTag")}i.next();return null},inAttribute:function(h){return function(k,i){var l=null;var j=null;while(!k.eol()){j=k.peek();if(k.next()==h&&l!=="\\"){i.tokenize=c.bbcode;break}l=j}return"string"}},bbcode:function(k,i){if(a=k.match("]",true)){i.tokenize=c.tokenizer;return f.cont("tag",null)}if(k.match("[",true)){return f.cont("tag","startTag")}var h=k.next();if(d.stringChar.test(h)){i.tokenize=c.inAttribute(h);return f.cont("string","string")}else{if(/\d/.test(h)){k.eatWhile(/\d/);return f.cont("number","number")}else{if(i.last=="whitespace"){k.eatWhile(d.validIdentifier);return f.cont("attribute","modifier")}if(i.last=="property"){k.eatWhile(d.validIdentifier);return f.cont("property",null)}else{if(/\s/.test(h)){g="whitespace";return null}}var j="";if(h!="/"){j+=h}var l=null;while(l=k.eat(d.validIdentifier)){j+=l}if(d.unaryTags.test(j)){return f.cont("atom","atom")}if(d.tags.test(j)){return f.cont("keyword","keyword")}if(/\s/.test(h)){return null}return f.cont("tag","tag")}}}};return{startState:function(){return{tokenize:c.tokenizer,mode:"bbcode",last:null}},token:function(j,i){var h=i.tokenize(j,i);i.last=g;return h},electricChars:""}});CodeMirror.defineMIME("text/x-bbcode","bbcode"); -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/af.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'af', { 6 | toolbar: 'Bron', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ar.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ar', { 6 | toolbar: 'المصدر', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/bg.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'bg', { 6 | toolbar: 'Източник', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/bn.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'bn', { 6 | toolbar: 'সোর্স', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/bs.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'bs', { 6 | toolbar: 'HTML kôd', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ca.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ca', { 6 | toolbar: 'Codi font', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/cs.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'cs', { 6 | toolbar: 'Zdroj', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/cy.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'cy', { 6 | toolbar: 'HTML', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/da.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'da', { 6 | toolbar: 'Kilde', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/de.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'de', { 6 | toolbar: 'Quellcode', 7 | searchCode: 'Quellcode durchsuchen', 8 | autoFormat: 'Auswahl formatieren', 9 | commentSelectedRange: 'Auswahl auskommentieren', 10 | uncommentSelectedRange: 'Auskommentierung entfernen', 11 | autoCompleteToggle: 'HTML Tag Autovervollständigen de-/aktivieren' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/el.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'el', { 6 | toolbar: 'HTML κώδικας', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/en-au.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'en-au', { 6 | toolbar: 'Source', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/en-ca.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'en-ca', { 6 | toolbar: 'Source', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/en-gb.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'en-gb', { 6 | toolbar: 'Source', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/en.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'en', { 6 | toolbar: 'Source', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/eo.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'eo', { 6 | toolbar: 'Fonto', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/es.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'es', { 6 | toolbar: 'Fuente HTML', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/et.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'et', { 6 | toolbar: 'Lähtekood', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/eu.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'eu', { 6 | toolbar: 'HTML Iturburua', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/fa.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'fa', { 6 | toolbar: 'منبع', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/fi.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'fi', { 6 | toolbar: 'Koodi', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/fo.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'fo', { 6 | toolbar: 'Kelda', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/fr-ca.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'fr-ca', { 6 | toolbar: 'Source', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/fr.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'fr', { 6 | toolbar: 'Source', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/gl.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'gl', { 6 | toolbar: 'Código Fonte', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/gu.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'gu', { 6 | toolbar: 'મૂળ કે પ્રાથમિક દસ્તાવેજ', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/he.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'he', { 6 | toolbar: 'מקור', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/hi.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'hi', { 6 | toolbar: 'सोर्स', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/hr.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'hr', { 6 | toolbar: 'Kôd', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/hu.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'hu', { 6 | toolbar: 'Forráskód', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/is.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'is', { 6 | toolbar: 'Kóði', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/it.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'it', { 6 | toolbar: 'Codice Sorgente', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ja.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ja', { 6 | toolbar: 'ソース', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ka.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ka', { 6 | toolbar: 'კოდები', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/km.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'km', { 6 | toolbar: 'កូត', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ko.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ko', { 6 | toolbar: '소스', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ku.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ku', { 6 | toolbar: 'سەرچاوە', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/lt.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'lt', { 6 | toolbar: 'Šaltinis', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/lv.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'lv', { 6 | toolbar: 'HTML kods', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/mk.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'mk', { 6 | toolbar: 'Source', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/mn.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'mn', { 6 | toolbar: 'Код', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ms.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ms', { 6 | toolbar: 'Sumber', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/nb.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'nb', { 6 | toolbar: 'Kilde', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/nl.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'nl', { 6 | toolbar: 'Broncode', 7 | searchCode: 'Zoek in broncode', 8 | autoFormat: 'Formatteer selectie', 9 | commentSelectedRange: 'Zet selectie in commentaar', 10 | uncommentSelectedRange: 'Haal selectie uit commentaar', 11 | autoCompleteToggle: 'Zet automatisch aanvullen van HTML tags aan/uit' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/no.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'no', { 6 | toolbar: 'Kilde', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/pl.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'pl', { 6 | toolbar: 'Źródło dokumentu', 7 | autoFormat: 'Sformatuj zaznaczenie', 8 | commentSelectedRange: 'Zakomentuj zaznaczenie', 9 | uncommentSelectedRange: 'Odkomentuj zaznaczenie', 10 | searchCode: 'Wyszukaj w źródle', 11 | autoCompleteToggle: 'Włącza/Wyłącza automatyczne uzupełniania tagów HTML' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/pt-br.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'pt-br', { 6 | toolbar: 'Código-Fonte', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/pt.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'pt', { 6 | toolbar: 'Fonte', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ro.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ro', { 6 | toolbar: 'Sursa', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ru.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ru', { 6 | toolbar: 'Источник', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/sk.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'sk', { 6 | toolbar: 'Zdroj', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/sl.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'sl', { 6 | toolbar: 'Izvorna koda', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/sr-latn.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'sr-latn', { 6 | toolbar: 'Kôd', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/sr.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'sr', { 6 | toolbar: 'Kôд', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/sv.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'sv', { 6 | toolbar: 'Källa', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/th.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'th', { 6 | toolbar: 'ดูรหัส HTML', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/tr.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'tr', { 6 | toolbar: 'Kaynak', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/ug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'ug', { 6 | toolbar: 'مەنبە', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/uk.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'uk', { 6 | toolbar: 'Джерело', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/vi.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'vi', { 6 | toolbar: 'Mã HTML', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'zh-cn', { 6 | toolbar: '源码', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/lang/zh.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang( 'codemirror', 'zh', { 6 | toolbar: '原始碼', 7 | searchCode: 'Search Source', 8 | autoFormat: 'Format Selection', 9 | commentSelectedRange: 'Comment Selection', 10 | uncommentSelectedRange: 'Uncomment Selection', 11 | autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' 12 | }); 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/3024-day.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: 3024 day 4 | Author: Jan T. Sott (http://github.com/idleberg) 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-3024-day.CodeMirror { background: #f7f7f7; color: #3a3432; } 12 | .cm-s-3024-day div.CodeMirror-selected { background: #d6d5d4; } 13 | 14 | .cm-s-3024-day .CodeMirror-line::selection, .cm-s-3024-day .CodeMirror-line > span::selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d6d5d4; } 15 | .cm-s-3024-day .CodeMirror-line::-moz-selection, .cm-s-3024-day .CodeMirror-line > span::-moz-selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d9d9d9; } 16 | 17 | .cm-s-3024-day .CodeMirror-gutters { background: #f7f7f7; border-right: 0px; } 18 | .cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; } 19 | .cm-s-3024-day .CodeMirror-guttermarker-subtle { color: #807d7c; } 20 | .cm-s-3024-day .CodeMirror-linenumber { color: #807d7c; } 21 | 22 | .cm-s-3024-day .CodeMirror-cursor { border-left: 1px solid #5c5855; } 23 | 24 | .cm-s-3024-day span.cm-comment { color: #cdab53; } 25 | .cm-s-3024-day span.cm-atom { color: #a16a94; } 26 | .cm-s-3024-day span.cm-number { color: #a16a94; } 27 | 28 | .cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute { color: #01a252; } 29 | .cm-s-3024-day span.cm-keyword { color: #db2d20; } 30 | .cm-s-3024-day span.cm-string { color: #fded02; } 31 | 32 | .cm-s-3024-day span.cm-variable { color: #01a252; } 33 | .cm-s-3024-day span.cm-variable-2 { color: #01a0e4; } 34 | .cm-s-3024-day span.cm-def { color: #e8bbd0; } 35 | .cm-s-3024-day span.cm-bracket { color: #3a3432; } 36 | .cm-s-3024-day span.cm-tag { color: #db2d20; } 37 | .cm-s-3024-day span.cm-link { color: #a16a94; } 38 | .cm-s-3024-day span.cm-error { background: #db2d20; color: #5c5855; } 39 | 40 | .cm-s-3024-day .CodeMirror-activeline-background { background: #e8f2ff; } 41 | .cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: #a16a94 !important; } 42 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/3024-night.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: 3024 night 4 | Author: Jan T. Sott (http://github.com/idleberg) 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-3024-night.CodeMirror { background: #090300; color: #d6d5d4; } 12 | .cm-s-3024-night div.CodeMirror-selected { background: #3a3432; } 13 | .cm-s-3024-night .CodeMirror-line::selection, .cm-s-3024-night .CodeMirror-line > span::selection, .cm-s-3024-night .CodeMirror-line > span > span::selection { background: rgba(58, 52, 50, .99); } 14 | .cm-s-3024-night .CodeMirror-line::-moz-selection, .cm-s-3024-night .CodeMirror-line > span::-moz-selection, .cm-s-3024-night .CodeMirror-line > span > span::-moz-selection { background: rgba(58, 52, 50, .99); } 15 | .cm-s-3024-night .CodeMirror-gutters { background: #090300; border-right: 0px; } 16 | .cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; } 17 | .cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; } 18 | .cm-s-3024-night .CodeMirror-linenumber { color: #5c5855; } 19 | 20 | .cm-s-3024-night .CodeMirror-cursor { border-left: 1px solid #807d7c; } 21 | 22 | .cm-s-3024-night span.cm-comment { color: #cdab53; } 23 | .cm-s-3024-night span.cm-atom { color: #a16a94; } 24 | .cm-s-3024-night span.cm-number { color: #a16a94; } 25 | 26 | .cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute { color: #01a252; } 27 | .cm-s-3024-night span.cm-keyword { color: #db2d20; } 28 | .cm-s-3024-night span.cm-string { color: #fded02; } 29 | 30 | .cm-s-3024-night span.cm-variable { color: #01a252; } 31 | .cm-s-3024-night span.cm-variable-2 { color: #01a0e4; } 32 | .cm-s-3024-night span.cm-def { color: #e8bbd0; } 33 | .cm-s-3024-night span.cm-bracket { color: #d6d5d4; } 34 | .cm-s-3024-night span.cm-tag { color: #db2d20; } 35 | .cm-s-3024-night span.cm-link { color: #a16a94; } 36 | .cm-s-3024-night span.cm-error { background: #db2d20; color: #807d7c; } 37 | 38 | .cm-s-3024-night .CodeMirror-activeline-background { background: #2F2F2F; } 39 | .cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } 40 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/abcdef.css: -------------------------------------------------------------------------------- 1 | .cm-s-abcdef.CodeMirror { background: #0f0f0f; color: #defdef; } 2 | .cm-s-abcdef div.CodeMirror-selected { background: #515151; } 3 | .cm-s-abcdef .CodeMirror-line::selection, .cm-s-abcdef .CodeMirror-line > span::selection, .cm-s-abcdef .CodeMirror-line > span > span::selection { background: rgba(56, 56, 56, 0.99); } 4 | .cm-s-abcdef .CodeMirror-line::-moz-selection, .cm-s-abcdef .CodeMirror-line > span::-moz-selection, .cm-s-abcdef .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 56, 56, 0.99); } 5 | .cm-s-abcdef .CodeMirror-gutters { background: #555; border-right: 2px solid #314151; } 6 | .cm-s-abcdef .CodeMirror-guttermarker { color: #222; } 7 | .cm-s-abcdef .CodeMirror-guttermarker-subtle { color: azure; } 8 | .cm-s-abcdef .CodeMirror-linenumber { color: #FFFFFF; } 9 | .cm-s-abcdef .CodeMirror-cursor { border-left: 1px solid #00FF00; } 10 | 11 | .cm-s-abcdef span.cm-keyword { color: darkgoldenrod; font-weight: bold; } 12 | .cm-s-abcdef span.cm-atom { color: #77F; } 13 | .cm-s-abcdef span.cm-number { color: violet; } 14 | .cm-s-abcdef span.cm-def { color: #fffabc; } 15 | .cm-s-abcdef span.cm-variable { color: #abcdef; } 16 | .cm-s-abcdef span.cm-variable-2 { color: #cacbcc; } 17 | .cm-s-abcdef span.cm-variable-3 { color: #def; } 18 | .cm-s-abcdef span.cm-property { color: #fedcba; } 19 | .cm-s-abcdef span.cm-operator { color: #ff0; } 20 | .cm-s-abcdef span.cm-comment { color: #7a7b7c; font-style: italic;} 21 | .cm-s-abcdef span.cm-string { color: #2b4; } 22 | .cm-s-abcdef span.cm-meta { color: #C9F; } 23 | .cm-s-abcdef span.cm-qualifier { color: #FFF700; } 24 | .cm-s-abcdef span.cm-builtin { color: #30aabc; } 25 | .cm-s-abcdef span.cm-bracket { color: #8a8a8a; } 26 | .cm-s-abcdef span.cm-tag { color: #FFDD44; } 27 | .cm-s-abcdef span.cm-attribute { color: #DDFF00; } 28 | .cm-s-abcdef span.cm-error { color: #FF0000; } 29 | .cm-s-abcdef span.cm-header { color: aquamarine; font-weight: bold; } 30 | .cm-s-abcdef span.cm-link { color: blueviolet; } 31 | 32 | .cm-s-abcdef .CodeMirror-activeline-background { background: #314151; } 33 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/ambiance-mobile.css: -------------------------------------------------------------------------------- 1 | .cm-s-ambiance.CodeMirror { 2 | -webkit-box-shadow: none; 3 | -moz-box-shadow: none; 4 | box-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/bespin.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Bespin 4 | Author: Mozilla / Jan T. Sott 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-bespin.CodeMirror {background: #28211c; color: #9d9b97;} 12 | .cm-s-bespin div.CodeMirror-selected {background: #36312e !important;} 13 | .cm-s-bespin .CodeMirror-gutters {background: #28211c; border-right: 0px;} 14 | .cm-s-bespin .CodeMirror-linenumber {color: #666666;} 15 | .cm-s-bespin .CodeMirror-cursor {border-left: 1px solid #797977 !important;} 16 | 17 | .cm-s-bespin span.cm-comment {color: #937121;} 18 | .cm-s-bespin span.cm-atom {color: #9b859d;} 19 | .cm-s-bespin span.cm-number {color: #9b859d;} 20 | 21 | .cm-s-bespin span.cm-property, .cm-s-bespin span.cm-attribute {color: #54be0d;} 22 | .cm-s-bespin span.cm-keyword {color: #cf6a4c;} 23 | .cm-s-bespin span.cm-string {color: #f9ee98;} 24 | 25 | .cm-s-bespin span.cm-variable {color: #54be0d;} 26 | .cm-s-bespin span.cm-variable-2 {color: #5ea6ea;} 27 | .cm-s-bespin span.cm-def {color: #cf7d34;} 28 | .cm-s-bespin span.cm-error {background: #cf6a4c; color: #797977;} 29 | .cm-s-bespin span.cm-bracket {color: #9d9b97;} 30 | .cm-s-bespin span.cm-tag {color: #cf6a4c;} 31 | .cm-s-bespin span.cm-link {color: #9b859d;} 32 | 33 | .cm-s-bespin .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 34 | .cm-s-bespin .CodeMirror-activeline-background { background: #404040; } 35 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/blackboard.css: -------------------------------------------------------------------------------- 1 | /* Port of TextMate's Blackboard theme */ 2 | 3 | .cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; } 4 | .cm-s-blackboard div.CodeMirror-selected { background: #253B76; } 5 | .cm-s-blackboard .CodeMirror-line::selection, .cm-s-blackboard .CodeMirror-line > span::selection, .cm-s-blackboard .CodeMirror-line > span > span::selection { background: rgba(37, 59, 118, .99); } 6 | .cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99); } 7 | .cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; } 8 | .cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; } 9 | .cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; } 10 | .cm-s-blackboard .CodeMirror-linenumber { color: #888; } 11 | .cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7; } 12 | 13 | .cm-s-blackboard .cm-keyword { color: #FBDE2D; } 14 | .cm-s-blackboard .cm-atom { color: #D8FA3C; } 15 | .cm-s-blackboard .cm-number { color: #D8FA3C; } 16 | .cm-s-blackboard .cm-def { color: #8DA6CE; } 17 | .cm-s-blackboard .cm-variable { color: #FF6400; } 18 | .cm-s-blackboard .cm-operator { color: #FBDE2D; } 19 | .cm-s-blackboard .cm-comment { color: #AEAEAE; } 20 | .cm-s-blackboard .cm-string { color: #61CE3C; } 21 | .cm-s-blackboard .cm-string-2 { color: #61CE3C; } 22 | .cm-s-blackboard .cm-meta { color: #D8FA3C; } 23 | .cm-s-blackboard .cm-builtin { color: #8DA6CE; } 24 | .cm-s-blackboard .cm-tag { color: #8DA6CE; } 25 | .cm-s-blackboard .cm-attribute { color: #8DA6CE; } 26 | .cm-s-blackboard .cm-header { color: #FF6400; } 27 | .cm-s-blackboard .cm-hr { color: #AEAEAE; } 28 | .cm-s-blackboard .cm-link { color: #8DA6CE; } 29 | .cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; } 30 | 31 | .cm-s-blackboard .CodeMirror-activeline-background { background: #3C3636; } 32 | .cm-s-blackboard .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; } 33 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/cobalt.css: -------------------------------------------------------------------------------- 1 | .cm-s-cobalt.CodeMirror { background: #002240; color: white; } 2 | .cm-s-cobalt div.CodeMirror-selected { background: #b36539; } 3 | .cm-s-cobalt .CodeMirror-line::selection, .cm-s-cobalt .CodeMirror-line > span::selection, .cm-s-cobalt .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); } 4 | .cm-s-cobalt .CodeMirror-line::-moz-selection, .cm-s-cobalt .CodeMirror-line > span::-moz-selection, .cm-s-cobalt .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); } 5 | .cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } 6 | .cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; } 7 | .cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; } 8 | .cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; } 9 | .cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white; } 10 | 11 | .cm-s-cobalt span.cm-comment { color: #08f; } 12 | .cm-s-cobalt span.cm-atom { color: #845dc4; } 13 | .cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; } 14 | .cm-s-cobalt span.cm-keyword { color: #ffee80; } 15 | .cm-s-cobalt span.cm-string { color: #3ad900; } 16 | .cm-s-cobalt span.cm-meta { color: #ff9d00; } 17 | .cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; } 18 | .cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; } 19 | .cm-s-cobalt span.cm-bracket { color: #d8d8d8; } 20 | .cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; } 21 | .cm-s-cobalt span.cm-link { color: #845dc4; } 22 | .cm-s-cobalt span.cm-error { color: #9d1e15; } 23 | 24 | .cm-s-cobalt .CodeMirror-activeline-background { background: #002D57; } 25 | .cm-s-cobalt .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; } 26 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/colorforth.css: -------------------------------------------------------------------------------- 1 | .cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; } 2 | .cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } 3 | .cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; } 4 | .cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; } 5 | .cm-s-colorforth .CodeMirror-linenumber { color: #bababa; } 6 | .cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white; } 7 | 8 | .cm-s-colorforth span.cm-comment { color: #ededed; } 9 | .cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; } 10 | .cm-s-colorforth span.cm-keyword { color: #ffd900; } 11 | .cm-s-colorforth span.cm-builtin { color: #00d95a; } 12 | .cm-s-colorforth span.cm-variable { color: #73ff00; } 13 | .cm-s-colorforth span.cm-string { color: #007bff; } 14 | .cm-s-colorforth span.cm-number { color: #00c4ff; } 15 | .cm-s-colorforth span.cm-atom { color: #606060; } 16 | 17 | .cm-s-colorforth span.cm-variable-2 { color: #EEE; } 18 | .cm-s-colorforth span.cm-variable-3 { color: #DDD; } 19 | .cm-s-colorforth span.cm-property {} 20 | .cm-s-colorforth span.cm-operator {} 21 | 22 | .cm-s-colorforth span.cm-meta { color: yellow; } 23 | .cm-s-colorforth span.cm-qualifier { color: #FFF700; } 24 | .cm-s-colorforth span.cm-bracket { color: #cc7; } 25 | .cm-s-colorforth span.cm-tag { color: #FFBD40; } 26 | .cm-s-colorforth span.cm-attribute { color: #FFF700; } 27 | .cm-s-colorforth span.cm-error { color: #f00; } 28 | 29 | .cm-s-colorforth div.CodeMirror-selected { background: #333d53; } 30 | 31 | .cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); } 32 | 33 | .cm-s-colorforth .CodeMirror-activeline-background { background: #253540; } 34 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/dracula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: dracula 4 | Author: Michael Kaminsky (http://github.com/mkaminsky11) 5 | 6 | Original dracula color scheme by Zeno Rocha (https://github.com/zenorocha/dracula-theme) 7 | 8 | */ 9 | 10 | 11 | .cm-s-dracula.CodeMirror, .cm-s-dracula .CodeMirror-gutters { 12 | background-color: #282a36 !important; 13 | color: #f8f8f2 !important; 14 | border: none; 15 | } 16 | .cm-s-dracula .CodeMirror-gutters { color: #282a36; } 17 | .cm-s-dracula .CodeMirror-cursor { border-left: solid thin #f8f8f0; } 18 | .cm-s-dracula .CodeMirror-linenumber { color: #6D8A88; } 19 | .cm-s-dracula.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); } 20 | .cm-s-dracula .CodeMirror-line::selection, .cm-s-dracula .CodeMirror-line > span::selection, .cm-s-dracula .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); } 21 | .cm-s-dracula .CodeMirror-line::-moz-selection, .cm-s-dracula .CodeMirror-line > span::-moz-selection, .cm-s-dracula .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); } 22 | .cm-s-dracula span.cm-comment { color: #6272a4; } 23 | .cm-s-dracula span.cm-string, .cm-s-dracula span.cm-string-2 { color: #f1fa8c; } 24 | .cm-s-dracula span.cm-number { color: #bd93f9; } 25 | .cm-s-dracula span.cm-variable { color: #50fa7b; } 26 | .cm-s-dracula span.cm-variable-2 { color: white; } 27 | .cm-s-dracula span.cm-def { color: #ffb86c; } 28 | .cm-s-dracula span.cm-keyword { color: #ff79c6; } 29 | .cm-s-dracula span.cm-operator { color: #ff79c6; } 30 | .cm-s-dracula span.cm-keyword { color: #ff79c6; } 31 | .cm-s-dracula span.cm-atom { color: #bd93f9; } 32 | .cm-s-dracula span.cm-meta { color: #f8f8f2; } 33 | .cm-s-dracula span.cm-tag { color: #ff79c6; } 34 | .cm-s-dracula span.cm-attribute { color: #50fa7b; } 35 | .cm-s-dracula span.cm-qualifier { color: #50fa7b; } 36 | .cm-s-dracula span.cm-property { color: #66d9ef; } 37 | .cm-s-dracula span.cm-builtin { color: #50fa7b; } 38 | .cm-s-dracula span.cm-variable-3 { color: #50fa7b; } 39 | 40 | .cm-s-dracula .CodeMirror-activeline-background { background: rgba(255,255,255,0.1); } 41 | .cm-s-dracula .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } 42 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/eclipse.css: -------------------------------------------------------------------------------- 1 | .cm-s-eclipse span.cm-meta { color: #FF1717; } 2 | .cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } 3 | .cm-s-eclipse span.cm-atom { color: #219; } 4 | .cm-s-eclipse span.cm-number { color: #164; } 5 | .cm-s-eclipse span.cm-def { color: #00f; } 6 | .cm-s-eclipse span.cm-variable { color: black; } 7 | .cm-s-eclipse span.cm-variable-2 { color: #0000C0; } 8 | .cm-s-eclipse span.cm-variable-3 { color: #0000C0; } 9 | .cm-s-eclipse span.cm-property { color: black; } 10 | .cm-s-eclipse span.cm-operator { color: black; } 11 | .cm-s-eclipse span.cm-comment { color: #3F7F5F; } 12 | .cm-s-eclipse span.cm-string { color: #2A00FF; } 13 | .cm-s-eclipse span.cm-string-2 { color: #f50; } 14 | .cm-s-eclipse span.cm-qualifier { color: #555; } 15 | .cm-s-eclipse span.cm-builtin { color: #30a; } 16 | .cm-s-eclipse span.cm-bracket { color: #cc7; } 17 | .cm-s-eclipse span.cm-tag { color: #170; } 18 | .cm-s-eclipse span.cm-attribute { color: #00c; } 19 | .cm-s-eclipse span.cm-link { color: #219; } 20 | .cm-s-eclipse span.cm-error { color: #f00; } 21 | 22 | .cm-s-eclipse .CodeMirror-activeline-background { background: #e8f2ff; } 23 | .cm-s-eclipse .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } 24 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/elegant.css: -------------------------------------------------------------------------------- 1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom { color: #762; } 2 | .cm-s-elegant span.cm-comment { color: #262; font-style: italic; line-height: 1em; } 3 | .cm-s-elegant span.cm-meta { color: #555; font-style: italic; line-height: 1em; } 4 | .cm-s-elegant span.cm-variable { color: black; } 5 | .cm-s-elegant span.cm-variable-2 { color: #b11; } 6 | .cm-s-elegant span.cm-qualifier { color: #555; } 7 | .cm-s-elegant span.cm-keyword { color: #730; } 8 | .cm-s-elegant span.cm-builtin { color: #30a; } 9 | .cm-s-elegant span.cm-link { color: #762; } 10 | .cm-s-elegant span.cm-error { background-color: #fdd; } 11 | 12 | .cm-s-elegant .CodeMirror-activeline-background { background: #e8f2ff; } 13 | .cm-s-elegant .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } 14 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/hopscotch.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Hopscotch 4 | Author: Jan T. Sott 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-hopscotch.CodeMirror {background: #322931; color: #d5d3d5;} 12 | .cm-s-hopscotch div.CodeMirror-selected {background: #433b42 !important;} 13 | .cm-s-hopscotch .CodeMirror-gutters {background: #322931; border-right: 0px;} 14 | .cm-s-hopscotch .CodeMirror-linenumber {color: #797379;} 15 | .cm-s-hopscotch .CodeMirror-cursor {border-left: 1px solid #989498 !important;} 16 | 17 | .cm-s-hopscotch span.cm-comment {color: #b33508;} 18 | .cm-s-hopscotch span.cm-atom {color: #c85e7c;} 19 | .cm-s-hopscotch span.cm-number {color: #c85e7c;} 20 | 21 | .cm-s-hopscotch span.cm-property, .cm-s-hopscotch span.cm-attribute {color: #8fc13e;} 22 | .cm-s-hopscotch span.cm-keyword {color: #dd464c;} 23 | .cm-s-hopscotch span.cm-string {color: #fdcc59;} 24 | 25 | .cm-s-hopscotch span.cm-variable {color: #8fc13e;} 26 | .cm-s-hopscotch span.cm-variable-2 {color: #1290bf;} 27 | .cm-s-hopscotch span.cm-def {color: #fd8b19;} 28 | .cm-s-hopscotch span.cm-error {background: #dd464c; color: #989498;} 29 | .cm-s-hopscotch span.cm-bracket {color: #d5d3d5;} 30 | .cm-s-hopscotch span.cm-tag {color: #dd464c;} 31 | .cm-s-hopscotch span.cm-link {color: #c85e7c;} 32 | 33 | .cm-s-hopscotch .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 34 | .cm-s-hopscotch .CodeMirror-activeline-background { background: #302020; } 35 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/isotope.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Isotope 4 | Author: David Desandro / Jan T. Sott 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-isotope.CodeMirror {background: #000000; color: #e0e0e0;} 12 | .cm-s-isotope div.CodeMirror-selected {background: #404040 !important;} 13 | .cm-s-isotope .CodeMirror-gutters {background: #000000; border-right: 0px;} 14 | .cm-s-isotope .CodeMirror-linenumber {color: #808080;} 15 | .cm-s-isotope .CodeMirror-cursor {border-left: 1px solid #c0c0c0 !important;} 16 | 17 | .cm-s-isotope span.cm-comment {color: #3300ff;} 18 | .cm-s-isotope span.cm-atom {color: #cc00ff;} 19 | .cm-s-isotope span.cm-number {color: #cc00ff;} 20 | 21 | .cm-s-isotope span.cm-property, .cm-s-isotope span.cm-attribute {color: #33ff00;} 22 | .cm-s-isotope span.cm-keyword {color: #ff0000;} 23 | .cm-s-isotope span.cm-string {color: #ff0099;} 24 | 25 | .cm-s-isotope span.cm-variable {color: #33ff00;} 26 | .cm-s-isotope span.cm-variable-2 {color: #0066ff;} 27 | .cm-s-isotope span.cm-def {color: #ff9900;} 28 | .cm-s-isotope span.cm-error {background: #ff0000; color: #c0c0c0;} 29 | .cm-s-isotope span.cm-bracket {color: #e0e0e0;} 30 | .cm-s-isotope span.cm-tag {color: #ff0000;} 31 | .cm-s-isotope span.cm-link {color: #cc00ff;} 32 | 33 | .cm-s-isotope .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 34 | .cm-s-isotope .CodeMirror-activeline-background { background: #202020; } 35 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/mbo.css: -------------------------------------------------------------------------------- 1 | /****************************************************************/ 2 | /* Based on mbonaci's Brackets mbo theme */ 3 | /* https://github.com/mbonaci/global/blob/master/Mbo.tmTheme */ 4 | /* Create your own: http://tmtheme-editor.herokuapp.com */ 5 | /****************************************************************/ 6 | 7 | .cm-s-mbo.CodeMirror { background: #2c2c2c; color: #ffffec; } 8 | .cm-s-mbo div.CodeMirror-selected { background: #716C62; } 9 | .cm-s-mbo .CodeMirror-line::selection, .cm-s-mbo .CodeMirror-line > span::selection, .cm-s-mbo .CodeMirror-line > span > span::selection { background: rgba(113, 108, 98, .99); } 10 | .cm-s-mbo .CodeMirror-line::-moz-selection, .cm-s-mbo .CodeMirror-line > span::-moz-selection, .cm-s-mbo .CodeMirror-line > span > span::-moz-selection { background: rgba(113, 108, 98, .99); } 11 | .cm-s-mbo .CodeMirror-gutters { background: #4e4e4e; border-right: 0px; } 12 | .cm-s-mbo .CodeMirror-guttermarker { color: white; } 13 | .cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; } 14 | .cm-s-mbo .CodeMirror-linenumber { color: #dadada; } 15 | .cm-s-mbo .CodeMirror-cursor { border-left: 1px solid #ffffec; } 16 | 17 | .cm-s-mbo span.cm-comment { color: #95958a; } 18 | .cm-s-mbo span.cm-atom { color: #00a8c6; } 19 | .cm-s-mbo span.cm-number { color: #00a8c6; } 20 | 21 | .cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute { color: #9ddfe9; } 22 | .cm-s-mbo span.cm-keyword { color: #ffb928; } 23 | .cm-s-mbo span.cm-string { color: #ffcf6c; } 24 | .cm-s-mbo span.cm-string.cm-property { color: #ffffec; } 25 | 26 | .cm-s-mbo span.cm-variable { color: #ffffec; } 27 | .cm-s-mbo span.cm-variable-2 { color: #00a8c6; } 28 | .cm-s-mbo span.cm-def { color: #ffffec; } 29 | .cm-s-mbo span.cm-bracket { color: #fffffc; font-weight: bold; } 30 | .cm-s-mbo span.cm-tag { color: #9ddfe9; } 31 | .cm-s-mbo span.cm-link { color: #f54b07; } 32 | .cm-s-mbo span.cm-error { border-bottom: #636363; color: #ffffec; } 33 | .cm-s-mbo span.cm-qualifier { color: #ffffec; } 34 | 35 | .cm-s-mbo .CodeMirror-activeline-background { background: #494b41; } 36 | .cm-s-mbo .CodeMirror-matchingbracket { color: #ffb928 !important; } 37 | .cm-s-mbo .CodeMirror-matchingtag { background: rgba(255, 255, 255, .37); } 38 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/monokai.css: -------------------------------------------------------------------------------- 1 | /* Based on Sublime Text's Monokai theme */ 2 | 3 | .cm-s-monokai.CodeMirror { background: #272822; color: #f8f8f2; } 4 | .cm-s-monokai div.CodeMirror-selected { background: #49483E; } 5 | .cm-s-monokai .CodeMirror-line::selection, .cm-s-monokai .CodeMirror-line > span::selection, .cm-s-monokai .CodeMirror-line > span > span::selection { background: rgba(73, 72, 62, .99); } 6 | .cm-s-monokai .CodeMirror-line::-moz-selection, .cm-s-monokai .CodeMirror-line > span::-moz-selection, .cm-s-monokai .CodeMirror-line > span > span::-moz-selection { background: rgba(73, 72, 62, .99); } 7 | .cm-s-monokai .CodeMirror-gutters { background: #272822; border-right: 0px; } 8 | .cm-s-monokai .CodeMirror-guttermarker { color: white; } 9 | .cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; } 10 | .cm-s-monokai .CodeMirror-linenumber { color: #d0d0d0; } 11 | .cm-s-monokai .CodeMirror-cursor { border-left: 1px solid #f8f8f0; } 12 | 13 | .cm-s-monokai span.cm-comment { color: #75715e; } 14 | .cm-s-monokai span.cm-atom { color: #ae81ff; } 15 | .cm-s-monokai span.cm-number { color: #ae81ff; } 16 | 17 | .cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute { color: #a6e22e; } 18 | .cm-s-monokai span.cm-keyword { color: #f92672; } 19 | .cm-s-monokai span.cm-builtin { color: #66d9ef; } 20 | .cm-s-monokai span.cm-string { color: #e6db74; } 21 | 22 | .cm-s-monokai span.cm-variable { color: #f8f8f2; } 23 | .cm-s-monokai span.cm-variable-2 { color: #9effff; } 24 | .cm-s-monokai span.cm-variable-3 { color: #66d9ef; } 25 | .cm-s-monokai span.cm-def { color: #fd971f; } 26 | .cm-s-monokai span.cm-bracket { color: #f8f8f2; } 27 | .cm-s-monokai span.cm-tag { color: #f92672; } 28 | .cm-s-monokai span.cm-header { color: #ae81ff; } 29 | .cm-s-monokai span.cm-link { color: #ae81ff; } 30 | .cm-s-monokai span.cm-error { background: #f92672; color: #f8f8f0; } 31 | 32 | .cm-s-monokai .CodeMirror-activeline-background { background: #373831; } 33 | .cm-s-monokai .CodeMirror-matchingbracket { 34 | text-decoration: underline; 35 | color: white !important; 36 | } 37 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/neat.css: -------------------------------------------------------------------------------- 1 | .cm-s-neat span.cm-comment { color: #a86; } 2 | .cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } 3 | .cm-s-neat span.cm-string { color: #a22; } 4 | .cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } 5 | .cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } 6 | .cm-s-neat span.cm-variable { color: black; } 7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } 8 | .cm-s-neat span.cm-meta { color: #555; } 9 | .cm-s-neat span.cm-link { color: #3a3; } 10 | 11 | .cm-s-neat .CodeMirror-activeline-background { background: #e8f2ff; } 12 | .cm-s-neat .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } 13 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/neo.css: -------------------------------------------------------------------------------- 1 | /* neo theme for codemirror */ 2 | 3 | /* Color scheme */ 4 | 5 | .cm-s-neo.CodeMirror { 6 | background-color:#ffffff; 7 | color:#2e383c; 8 | line-height:1.4375; 9 | } 10 | .cm-s-neo .cm-comment { color:#75787b; } 11 | .cm-s-neo .cm-keyword, .cm-s-neo .cm-property { color:#1d75b3; } 12 | .cm-s-neo .cm-atom,.cm-s-neo .cm-number { color:#75438a; } 13 | .cm-s-neo .cm-node,.cm-s-neo .cm-tag { color:#9c3328; } 14 | .cm-s-neo .cm-string { color:#b35e14; } 15 | .cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier { color:#047d65; } 16 | 17 | 18 | /* Editor styling */ 19 | 20 | .cm-s-neo pre { 21 | padding:0; 22 | } 23 | 24 | .cm-s-neo .CodeMirror-gutters { 25 | border:none; 26 | border-right:10px solid transparent; 27 | background-color:transparent; 28 | } 29 | 30 | .cm-s-neo .CodeMirror-linenumber { 31 | padding:0; 32 | color:#e0e2e5; 33 | } 34 | 35 | .cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; } 36 | .cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; } 37 | 38 | .cm-s-neo .CodeMirror-cursor { 39 | width: auto; 40 | border: 0; 41 | background: rgba(155,157,162,0.37); 42 | z-index: 1; 43 | } 44 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/night.css: -------------------------------------------------------------------------------- 1 | /* Loosely based on the Midnight Textmate theme */ 2 | 3 | .cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; } 4 | .cm-s-night div.CodeMirror-selected { background: #447; } 5 | .cm-s-night .CodeMirror-line::selection, .cm-s-night .CodeMirror-line > span::selection, .cm-s-night .CodeMirror-line > span > span::selection { background: rgba(68, 68, 119, .99); } 6 | .cm-s-night .CodeMirror-line::-moz-selection, .cm-s-night .CodeMirror-line > span::-moz-selection, .cm-s-night .CodeMirror-line > span > span::-moz-selection { background: rgba(68, 68, 119, .99); } 7 | .cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } 8 | .cm-s-night .CodeMirror-guttermarker { color: white; } 9 | .cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; } 10 | .cm-s-night .CodeMirror-linenumber { color: #f8f8f8; } 11 | .cm-s-night .CodeMirror-cursor { border-left: 1px solid white; } 12 | 13 | .cm-s-night span.cm-comment { color: #8900d1; } 14 | .cm-s-night span.cm-atom { color: #845dc4; } 15 | .cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } 16 | .cm-s-night span.cm-keyword { color: #599eff; } 17 | .cm-s-night span.cm-string { color: #37f14a; } 18 | .cm-s-night span.cm-meta { color: #7678e2; } 19 | .cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } 20 | .cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; } 21 | .cm-s-night span.cm-bracket { color: #8da6ce; } 22 | .cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } 23 | .cm-s-night span.cm-link { color: #845dc4; } 24 | .cm-s-night span.cm-error { color: #9d1e15; } 25 | 26 | .cm-s-night .CodeMirror-activeline-background { background: #1C005A; } 27 | .cm-s-night .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; } 28 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/paraiso-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Paraíso (Dark) 4 | Author: Jan T. Sott 5 | 6 | Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) 7 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 8 | 9 | */ 10 | 11 | .cm-s-paraiso-dark.CodeMirror { background: #2f1e2e; color: #b9b6b0; } 12 | .cm-s-paraiso-dark div.CodeMirror-selected { background: #41323f; } 13 | .cm-s-paraiso-dark .CodeMirror-line::selection, .cm-s-paraiso-dark .CodeMirror-line > span::selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::selection { background: rgba(65, 50, 63, .99); } 14 | .cm-s-paraiso-dark .CodeMirror-line::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(65, 50, 63, .99); } 15 | .cm-s-paraiso-dark .CodeMirror-gutters { background: #2f1e2e; border-right: 0px; } 16 | .cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; } 17 | .cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; } 18 | .cm-s-paraiso-dark .CodeMirror-linenumber { color: #776e71; } 19 | .cm-s-paraiso-dark .CodeMirror-cursor { border-left: 1px solid #8d8687; } 20 | 21 | .cm-s-paraiso-dark span.cm-comment { color: #e96ba8; } 22 | .cm-s-paraiso-dark span.cm-atom { color: #815ba4; } 23 | .cm-s-paraiso-dark span.cm-number { color: #815ba4; } 24 | 25 | .cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute { color: #48b685; } 26 | .cm-s-paraiso-dark span.cm-keyword { color: #ef6155; } 27 | .cm-s-paraiso-dark span.cm-string { color: #fec418; } 28 | 29 | .cm-s-paraiso-dark span.cm-variable { color: #48b685; } 30 | .cm-s-paraiso-dark span.cm-variable-2 { color: #06b6ef; } 31 | .cm-s-paraiso-dark span.cm-def { color: #f99b15; } 32 | .cm-s-paraiso-dark span.cm-bracket { color: #b9b6b0; } 33 | .cm-s-paraiso-dark span.cm-tag { color: #ef6155; } 34 | .cm-s-paraiso-dark span.cm-link { color: #815ba4; } 35 | .cm-s-paraiso-dark span.cm-error { background: #ef6155; color: #8d8687; } 36 | 37 | .cm-s-paraiso-dark .CodeMirror-activeline-background { background: #4D344A; } 38 | .cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } 39 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/paraiso-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Paraíso (Light) 4 | Author: Jan T. Sott 5 | 6 | Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) 7 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 8 | 9 | */ 10 | 11 | .cm-s-paraiso-light.CodeMirror { background: #e7e9db; color: #41323f; } 12 | .cm-s-paraiso-light div.CodeMirror-selected { background: #b9b6b0; } 13 | .cm-s-paraiso-light .CodeMirror-line::selection, .cm-s-paraiso-light .CodeMirror-line > span::selection, .cm-s-paraiso-light .CodeMirror-line > span > span::selection { background: #b9b6b0; } 14 | .cm-s-paraiso-light .CodeMirror-line::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span > span::-moz-selection { background: #b9b6b0; } 15 | .cm-s-paraiso-light .CodeMirror-gutters { background: #e7e9db; border-right: 0px; } 16 | .cm-s-paraiso-light .CodeMirror-guttermarker { color: black; } 17 | .cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; } 18 | .cm-s-paraiso-light .CodeMirror-linenumber { color: #8d8687; } 19 | .cm-s-paraiso-light .CodeMirror-cursor { border-left: 1px solid #776e71; } 20 | 21 | .cm-s-paraiso-light span.cm-comment { color: #e96ba8; } 22 | .cm-s-paraiso-light span.cm-atom { color: #815ba4; } 23 | .cm-s-paraiso-light span.cm-number { color: #815ba4; } 24 | 25 | .cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute { color: #48b685; } 26 | .cm-s-paraiso-light span.cm-keyword { color: #ef6155; } 27 | .cm-s-paraiso-light span.cm-string { color: #fec418; } 28 | 29 | .cm-s-paraiso-light span.cm-variable { color: #48b685; } 30 | .cm-s-paraiso-light span.cm-variable-2 { color: #06b6ef; } 31 | .cm-s-paraiso-light span.cm-def { color: #f99b15; } 32 | .cm-s-paraiso-light span.cm-bracket { color: #41323f; } 33 | .cm-s-paraiso-light span.cm-tag { color: #ef6155; } 34 | .cm-s-paraiso-light span.cm-link { color: #815ba4; } 35 | .cm-s-paraiso-light span.cm-error { background: #ef6155; color: #776e71; } 36 | 37 | .cm-s-paraiso-light .CodeMirror-activeline-background { background: #CFD1C4; } 38 | .cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } 39 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/railscasts.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Railscasts 4 | Author: Ryan Bates (http://railscasts.com) 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-railscasts.CodeMirror {background: #2b2b2b; color: #f4f1ed;} 12 | .cm-s-railscasts div.CodeMirror-selected {background: #272935 !important;} 13 | .cm-s-railscasts .CodeMirror-gutters {background: #2b2b2b; border-right: 0px;} 14 | .cm-s-railscasts .CodeMirror-linenumber {color: #5a647e;} 15 | .cm-s-railscasts .CodeMirror-cursor {border-left: 1px solid #d4cfc9 !important;} 16 | 17 | .cm-s-railscasts span.cm-comment {color: #bc9458;} 18 | .cm-s-railscasts span.cm-atom {color: #b6b3eb;} 19 | .cm-s-railscasts span.cm-number {color: #b6b3eb;} 20 | 21 | .cm-s-railscasts span.cm-property, .cm-s-railscasts span.cm-attribute {color: #a5c261;} 22 | .cm-s-railscasts span.cm-keyword {color: #da4939;} 23 | .cm-s-railscasts span.cm-string {color: #ffc66d;} 24 | 25 | .cm-s-railscasts span.cm-variable {color: #a5c261;} 26 | .cm-s-railscasts span.cm-variable-2 {color: #6d9cbe;} 27 | .cm-s-railscasts span.cm-def {color: #cc7833;} 28 | .cm-s-railscasts span.cm-error {background: #da4939; color: #d4cfc9;} 29 | .cm-s-railscasts span.cm-bracket {color: #f4f1ed;} 30 | .cm-s-railscasts span.cm-tag {color: #da4939;} 31 | .cm-s-railscasts span.cm-link {color: #b6b3eb;} 32 | 33 | .cm-s-railscasts .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 34 | .cm-s-railscasts .CodeMirror-activeline-background { background: #303040; } 35 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/rubyblue.css: -------------------------------------------------------------------------------- 1 | .cm-s-rubyblue.CodeMirror { background: #112435; color: white; } 2 | .cm-s-rubyblue div.CodeMirror-selected { background: #38566F; } 3 | .cm-s-rubyblue .CodeMirror-line::selection, .cm-s-rubyblue .CodeMirror-line > span::selection, .cm-s-rubyblue .CodeMirror-line > span > span::selection { background: rgba(56, 86, 111, 0.99); } 4 | .cm-s-rubyblue .CodeMirror-line::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 86, 111, 0.99); } 5 | .cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; } 6 | .cm-s-rubyblue .CodeMirror-guttermarker { color: white; } 7 | .cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; } 8 | .cm-s-rubyblue .CodeMirror-linenumber { color: white; } 9 | .cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white; } 10 | 11 | .cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; } 12 | .cm-s-rubyblue span.cm-atom { color: #F4C20B; } 13 | .cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; } 14 | .cm-s-rubyblue span.cm-keyword { color: #F0F; } 15 | .cm-s-rubyblue span.cm-string { color: #F08047; } 16 | .cm-s-rubyblue span.cm-meta { color: #F0F; } 17 | .cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; } 18 | .cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; } 19 | .cm-s-rubyblue span.cm-bracket { color: #F0F; } 20 | .cm-s-rubyblue span.cm-link { color: #F4C20B; } 21 | .cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; } 22 | .cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; } 23 | .cm-s-rubyblue span.cm-error { color: #AF2018; } 24 | 25 | .cm-s-rubyblue .CodeMirror-activeline-background { background: #173047; } 26 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/seti.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: seti 4 | Author: Michael Kaminsky (http://github.com/mkaminsky11) 5 | 6 | Original seti color scheme by Jesse Weed (https://github.com/jesseweed/seti-syntax) 7 | 8 | */ 9 | 10 | 11 | .cm-s-seti.CodeMirror { 12 | background-color: #151718 !important; 13 | color: #CFD2D1 !important; 14 | border: none; 15 | } 16 | .cm-s-seti .CodeMirror-gutters { 17 | color: #404b53; 18 | background-color: #0E1112; 19 | border: none; 20 | } 21 | .cm-s-seti .CodeMirror-cursor { border-left: solid thin #f8f8f0; } 22 | .cm-s-seti .CodeMirror-linenumber { color: #6D8A88; } 23 | .cm-s-seti.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); } 24 | .cm-s-seti .CodeMirror-line::selection, .cm-s-seti .CodeMirror-line > span::selection, .cm-s-seti .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); } 25 | .cm-s-seti .CodeMirror-line::-moz-selection, .cm-s-seti .CodeMirror-line > span::-moz-selection, .cm-s-seti .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); } 26 | .cm-s-seti span.cm-comment { color: #41535b; } 27 | .cm-s-seti span.cm-string, .cm-s-seti span.cm-string-2 { color: #55b5db; } 28 | .cm-s-seti span.cm-number { color: #cd3f45; } 29 | .cm-s-seti span.cm-variable { color: #55b5db; } 30 | .cm-s-seti span.cm-variable-2 { color: #a074c4; } 31 | .cm-s-seti span.cm-def { color: #55b5db; } 32 | .cm-s-seti span.cm-keyword { color: #ff79c6; } 33 | .cm-s-seti span.cm-operator { color: #9fca56; } 34 | .cm-s-seti span.cm-keyword { color: #e6cd69; } 35 | .cm-s-seti span.cm-atom { color: #cd3f45; } 36 | .cm-s-seti span.cm-meta { color: #55b5db; } 37 | .cm-s-seti span.cm-tag { color: #55b5db; } 38 | .cm-s-seti span.cm-attribute { color: #9fca56; } 39 | .cm-s-seti span.cm-qualifier { color: #9fca56; } 40 | .cm-s-seti span.cm-property { color: #a074c4; } 41 | .cm-s-seti span.cm-variable-3 { color: #9fca56; } 42 | .cm-s-seti span.cm-builtin { color: #9fca56; } 43 | .cm-s-seti .CodeMirror-activeline-background { background: #101213; } 44 | .cm-s-seti .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } 45 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/the-matrix.css: -------------------------------------------------------------------------------- 1 | .cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; } 2 | .cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D; } 3 | .cm-s-the-matrix .CodeMirror-line::selection, .cm-s-the-matrix .CodeMirror-line > span::selection, .cm-s-the-matrix .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); } 4 | .cm-s-the-matrix .CodeMirror-line::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); } 5 | .cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; } 6 | .cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; } 7 | .cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; } 8 | .cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; } 9 | .cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00; } 10 | 11 | .cm-s-the-matrix span.cm-keyword { color: #008803; font-weight: bold; } 12 | .cm-s-the-matrix span.cm-atom { color: #3FF; } 13 | .cm-s-the-matrix span.cm-number { color: #FFB94F; } 14 | .cm-s-the-matrix span.cm-def { color: #99C; } 15 | .cm-s-the-matrix span.cm-variable { color: #F6C; } 16 | .cm-s-the-matrix span.cm-variable-2 { color: #C6F; } 17 | .cm-s-the-matrix span.cm-variable-3 { color: #96F; } 18 | .cm-s-the-matrix span.cm-property { color: #62FFA0; } 19 | .cm-s-the-matrix span.cm-operator { color: #999; } 20 | .cm-s-the-matrix span.cm-comment { color: #CCCCCC; } 21 | .cm-s-the-matrix span.cm-string { color: #39C; } 22 | .cm-s-the-matrix span.cm-meta { color: #C9F; } 23 | .cm-s-the-matrix span.cm-qualifier { color: #FFF700; } 24 | .cm-s-the-matrix span.cm-builtin { color: #30a; } 25 | .cm-s-the-matrix span.cm-bracket { color: #cc7; } 26 | .cm-s-the-matrix span.cm-tag { color: #FFBD40; } 27 | .cm-s-the-matrix span.cm-attribute { color: #FFF700; } 28 | .cm-s-the-matrix span.cm-error { color: #FF0000; } 29 | 30 | .cm-s-the-matrix .CodeMirror-activeline-background { background: #040; } 31 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Tomorrow Night - Bright 4 | Author: Chris Kempson 5 | 6 | Port done by Gerard Braad 7 | 8 | */ 9 | 10 | .cm-s-tomorrow-night-bright.CodeMirror { background: #000000; color: #eaeaea; } 11 | .cm-s-tomorrow-night-bright div.CodeMirror-selected { background: #424242; } 12 | .cm-s-tomorrow-night-bright .CodeMirror-gutters { background: #000000; border-right: 0px; } 13 | .cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; } 14 | .cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; } 15 | .cm-s-tomorrow-night-bright .CodeMirror-linenumber { color: #424242; } 16 | .cm-s-tomorrow-night-bright .CodeMirror-cursor { border-left: 1px solid #6A6A6A; } 17 | 18 | .cm-s-tomorrow-night-bright span.cm-comment { color: #d27b53; } 19 | .cm-s-tomorrow-night-bright span.cm-atom { color: #a16a94; } 20 | .cm-s-tomorrow-night-bright span.cm-number { color: #a16a94; } 21 | 22 | .cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute { color: #99cc99; } 23 | .cm-s-tomorrow-night-bright span.cm-keyword { color: #d54e53; } 24 | .cm-s-tomorrow-night-bright span.cm-string { color: #e7c547; } 25 | 26 | .cm-s-tomorrow-night-bright span.cm-variable { color: #b9ca4a; } 27 | .cm-s-tomorrow-night-bright span.cm-variable-2 { color: #7aa6da; } 28 | .cm-s-tomorrow-night-bright span.cm-def { color: #e78c45; } 29 | .cm-s-tomorrow-night-bright span.cm-bracket { color: #eaeaea; } 30 | .cm-s-tomorrow-night-bright span.cm-tag { color: #d54e53; } 31 | .cm-s-tomorrow-night-bright span.cm-link { color: #a16a94; } 32 | .cm-s-tomorrow-night-bright span.cm-error { background: #d54e53; color: #6A6A6A; } 33 | 34 | .cm-s-tomorrow-night-bright .CodeMirror-activeline-background { background: #2a2a2a; } 35 | .cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } 36 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/twilight.css: -------------------------------------------------------------------------------- 1 | .cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/ 2 | .cm-s-twilight div.CodeMirror-selected { background: #323232; } /**/ 3 | .cm-s-twilight .CodeMirror-line::selection, .cm-s-twilight .CodeMirror-line > span::selection, .cm-s-twilight .CodeMirror-line > span > span::selection { background: rgba(50, 50, 50, 0.99); } 4 | .cm-s-twilight .CodeMirror-line::-moz-selection, .cm-s-twilight .CodeMirror-line > span::-moz-selection, .cm-s-twilight .CodeMirror-line > span > span::-moz-selection { background: rgba(50, 50, 50, 0.99); } 5 | 6 | .cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; } 7 | .cm-s-twilight .CodeMirror-guttermarker { color: white; } 8 | .cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; } 9 | .cm-s-twilight .CodeMirror-linenumber { color: #aaa; } 10 | .cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white; } 11 | 12 | .cm-s-twilight .cm-keyword { color: #f9ee98; } /**/ 13 | .cm-s-twilight .cm-atom { color: #FC0; } 14 | .cm-s-twilight .cm-number { color: #ca7841; } /**/ 15 | .cm-s-twilight .cm-def { color: #8DA6CE; } 16 | .cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/ 17 | .cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/ 18 | .cm-s-twilight .cm-operator { color: #cda869; } /**/ 19 | .cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/ 20 | .cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/ 21 | .cm-s-twilight .cm-string-2 { color:#bd6b18; } /*?*/ 22 | .cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/ 23 | .cm-s-twilight .cm-builtin { color: #cda869; } /*?*/ 24 | .cm-s-twilight .cm-tag { color: #997643; } /**/ 25 | .cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/ 26 | .cm-s-twilight .cm-header { color: #FF6400; } 27 | .cm-s-twilight .cm-hr { color: #AEAEAE; } 28 | .cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/ 29 | .cm-s-twilight .cm-error { border-bottom: 1px solid red; } 30 | 31 | .cm-s-twilight .CodeMirror-activeline-background { background: #27282E; } 32 | .cm-s-twilight .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; } 33 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/vibrant-ink.css: -------------------------------------------------------------------------------- 1 | /* Taken from the popular Visual Studio Vibrant Ink Schema */ 2 | 3 | .cm-s-vibrant-ink.CodeMirror { background: black; color: white; } 4 | .cm-s-vibrant-ink div.CodeMirror-selected { background: #35493c; } 5 | .cm-s-vibrant-ink .CodeMirror-line::selection, .cm-s-vibrant-ink .CodeMirror-line > span::selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::selection { background: rgba(53, 73, 60, 0.99); } 6 | .cm-s-vibrant-ink .CodeMirror-line::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::-moz-selection { background: rgba(53, 73, 60, 0.99); } 7 | 8 | .cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } 9 | .cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; } 10 | .cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; } 11 | .cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; } 12 | .cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white; } 13 | 14 | .cm-s-vibrant-ink .cm-keyword { color: #CC7832; } 15 | .cm-s-vibrant-ink .cm-atom { color: #FC0; } 16 | .cm-s-vibrant-ink .cm-number { color: #FFEE98; } 17 | .cm-s-vibrant-ink .cm-def { color: #8DA6CE; } 18 | .cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D; } 19 | .cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D; } 20 | .cm-s-vibrant-ink .cm-operator { color: #888; } 21 | .cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; } 22 | .cm-s-vibrant-ink .cm-string { color: #A5C25C; } 23 | .cm-s-vibrant-ink .cm-string-2 { color: red; } 24 | .cm-s-vibrant-ink .cm-meta { color: #D8FA3C; } 25 | .cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; } 26 | .cm-s-vibrant-ink .cm-tag { color: #8DA6CE; } 27 | .cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; } 28 | .cm-s-vibrant-ink .cm-header { color: #FF6400; } 29 | .cm-s-vibrant-ink .cm-hr { color: #AEAEAE; } 30 | .cm-s-vibrant-ink .cm-link { color: blue; } 31 | .cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; } 32 | 33 | .cm-s-vibrant-ink .CodeMirror-activeline-background { background: #27282E; } 34 | .cm-s-vibrant-ink .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; } 35 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/yeti.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: yeti 4 | Author: Michael Kaminsky (http://github.com/mkaminsky11) 5 | 6 | Original yeti color scheme by Jesse Weed (https://github.com/jesseweed/yeti-syntax) 7 | 8 | */ 9 | 10 | 11 | .cm-s-yeti.CodeMirror { 12 | background-color: #ECEAE8 !important; 13 | color: #d1c9c0 !important; 14 | border: none; 15 | } 16 | 17 | .cm-s-yeti .CodeMirror-gutters { 18 | color: #adaba6; 19 | background-color: #E5E1DB; 20 | border: none; 21 | } 22 | .cm-s-yeti .CodeMirror-cursor { border-left: solid thin #d1c9c0; } 23 | .cm-s-yeti .CodeMirror-linenumber { color: #adaba6; } 24 | .cm-s-yeti.CodeMirror-focused div.CodeMirror-selected { background: #DCD8D2; } 25 | .cm-s-yeti .CodeMirror-line::selection, .cm-s-yeti .CodeMirror-line > span::selection, .cm-s-yeti .CodeMirror-line > span > span::selection { background: #DCD8D2; } 26 | .cm-s-yeti .CodeMirror-line::-moz-selection, .cm-s-yeti .CodeMirror-line > span::-moz-selection, .cm-s-yeti .CodeMirror-line > span > span::-moz-selection { background: #DCD8D2; } 27 | .cm-s-yeti span.cm-comment { color: #d4c8be; } 28 | .cm-s-yeti span.cm-string, .cm-s-yeti span.cm-string-2 { color: #96c0d8; } 29 | .cm-s-yeti span.cm-number { color: #a074c4; } 30 | .cm-s-yeti span.cm-variable { color: #55b5db; } 31 | .cm-s-yeti span.cm-variable-2 { color: #a074c4; } 32 | .cm-s-yeti span.cm-def { color: #55b5db; } 33 | .cm-s-yeti span.cm-operator { color: #9fb96e; } 34 | .cm-s-yeti span.cm-keyword { color: #9fb96e; } 35 | .cm-s-yeti span.cm-atom { color: #a074c4; } 36 | .cm-s-yeti span.cm-meta { color: #96c0d8; } 37 | .cm-s-yeti span.cm-tag { color: #96c0d8; } 38 | .cm-s-yeti span.cm-attribute { color: #9fb96e; } 39 | .cm-s-yeti span.cm-qualifier { color: #96c0d8; } 40 | .cm-s-yeti span.cm-property { color: #a074c4; } 41 | .cm-s-yeti span.cm-builtin { color: #a074c4; } 42 | .cm-s-yeti span.cm-variable-3 { color: #96c0d8; } 43 | .cm-s-yeti .CodeMirror-activeline-background { background: #E7E4E0; } 44 | .cm-s-yeti .CodeMirror-matchingbracket { text-decoration: underline; } 45 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/plugins/codemirror/theme/zenburn.css: -------------------------------------------------------------------------------- 1 | /** 2 | * " 3 | * Using Zenburn color palette from the Emacs Zenburn Theme 4 | * https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el 5 | * 6 | * Also using parts of https://github.com/xavi/coderay-lighttable-theme 7 | * " 8 | * From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css 9 | */ 10 | 11 | .cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; } 12 | .cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; } 13 | .cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white; } 14 | .cm-s-zenburn { background-color: #3f3f3f; color: #dcdccc; } 15 | .cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; } 16 | .cm-s-zenburn span.cm-comment { color: #7f9f7f; } 17 | .cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; } 18 | .cm-s-zenburn span.cm-atom { color: #bfebbf; } 19 | .cm-s-zenburn span.cm-def { color: #dcdccc; } 20 | .cm-s-zenburn span.cm-variable { color: #dfaf8f; } 21 | .cm-s-zenburn span.cm-variable-2 { color: #dcdccc; } 22 | .cm-s-zenburn span.cm-string { color: #cc9393; } 23 | .cm-s-zenburn span.cm-string-2 { color: #cc9393; } 24 | .cm-s-zenburn span.cm-number { color: #dcdccc; } 25 | .cm-s-zenburn span.cm-tag { color: #93e0e3; } 26 | .cm-s-zenburn span.cm-property { color: #dfaf8f; } 27 | .cm-s-zenburn span.cm-attribute { color: #dfaf8f; } 28 | .cm-s-zenburn span.cm-qualifier { color: #7cb8bb; } 29 | .cm-s-zenburn span.cm-meta { color: #f0dfaf; } 30 | .cm-s-zenburn span.cm-header { color: #f0efd0; } 31 | .cm-s-zenburn span.cm-operator { color: #f0efd0; } 32 | .cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; } 33 | .cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; } 34 | .cm-s-zenburn .CodeMirror-activeline { background: #000000; } 35 | .cm-s-zenburn .CodeMirror-activeline-background { background: #000000; } 36 | .cm-s-zenburn div.CodeMirror-selected { background: #545454; } 37 | .cm-s-zenburn .CodeMirror-focused div.CodeMirror-selected { background: #4f4f4f; } 38 | -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/icons.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/icons_hidpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/icons_hidpi.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/images/arrow.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/images/close.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/images/hidpi/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/images/hidpi/close.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/images/hidpi/lock-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/images/hidpi/lock-open.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/images/hidpi/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/images/hidpi/lock.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/images/hidpi/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/images/hidpi/refresh.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/images/lock-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/images/lock-open.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/images/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/images/lock.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/js/vendors/ckeditor/skins/office/images/refresh.png -------------------------------------------------------------------------------- /src/public/js/vendors/ckeditor/skins/office/skin.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.skin.name="office2013";CKEDITOR.skin.ua_editor="";CKEDITOR.skin.ua_dialog="";CKEDITOR.skin.chameleon=function(){return""}; -------------------------------------------------------------------------------- /src/public/media/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/media/.gitkeep -------------------------------------------------------------------------------- /src/public/themes/Default/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/themes/Default/images/favicon.png -------------------------------------------------------------------------------- /src/public/themes/Default/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MilkZoft/MakingDevelopers/8720cd321c5f771f0b7c25e52d9823bfd6873efe/src/public/themes/Default/images/logo.png -------------------------------------------------------------------------------- /src/server/imports.js: -------------------------------------------------------------------------------- 1 | // Importing APIs 2 | import blogAPI from '../app/blog/blog.api'; 3 | 4 | // Importing Dashboards 5 | import blogDashboard from '../app/blog/blog.dashboard'; 6 | import configurationDashboard from '../app/configuration/configuration.dashboard'; 7 | import contentDashboard from '../app/content/content.dashboard'; 8 | import mediaDashboard from '../app/media/media.dashboard'; 9 | import pagesDashboard from '../app/pages/pages.dashboard'; 10 | 11 | // Importing Models 12 | import blogModel from '../app/blog/blog.model'; 13 | import configurationModel from '../app/configuration/configuration.model'; 14 | import contentModel from '../app/content/content.model'; 15 | import pagesModel from '../app/pages/pages.model'; 16 | 17 | export default (app) => { 18 | // API 19 | app.use(blogAPI); 20 | 21 | // Dashboard 22 | app.use(blogDashboard); 23 | app.use(configurationDashboard); 24 | app.use(contentDashboard); 25 | app.use(mediaDashboard); 26 | app.use(pagesDashboard); 27 | 28 | // Model 29 | app.use(blogModel); 30 | app.use(configurationModel); 31 | app.use(contentModel); 32 | app.use(pagesModel); 33 | }; 34 | -------------------------------------------------------------------------------- /src/server/index.js: -------------------------------------------------------------------------------- 1 | // Adding babel support 2 | require('babel-register'); 3 | 4 | // Running the app 5 | require('./servers'); 6 | -------------------------------------------------------------------------------- /src/server/servers/frontendServer.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import webpack from 'webpack'; 3 | import webpackDevMiddleware from 'webpack-dev-middleware'; 4 | import webpackHotMiddleware from 'webpack-hot-middleware'; 5 | 6 | // Configuration 7 | import webpackConfig from '../../../webpack.config.babel.js'; 8 | 9 | export default (app) => { 10 | // Webpack Configuration 11 | const compiler = webpack(webpackConfig); 12 | 13 | // Starting Webpack dev & hot servers 14 | app.use(webpackDevMiddleware(compiler)); 15 | app.use(webpackHotMiddleware(compiler)); 16 | }; 17 | -------------------------------------------------------------------------------- /src/server/servers/index.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import express from 'express'; 3 | 4 | // Servers 5 | import backendServer from './backendServer'; 6 | import frontendServer from './frontendServer'; 7 | 8 | // Starting express application 9 | const app = express(); 10 | 11 | frontendServer(app); 12 | backendServer(app); 13 | -------------------------------------------------------------------------------- /src/stylus/_alerts.styl: -------------------------------------------------------------------------------- 1 | .alert 2 | $fontSize(13.5px) 3 | display inline-block 4 | border 1px solid transparent 5 | margin-bottom 20px 6 | margin-top 20px 7 | padding 15px 8 | 9 | h4 10 | margin-top 0 11 | color inherit 12 | 13 | .link 14 | font-weight bold 15 | 16 | & > p 17 | & + p 18 | margin-top 5px 19 | 20 | &.success 21 | $alert($successColor, $successBg, $successBc, $successTopBorder, $successLink) 22 | 23 | &.info 24 | $alert($infoColor, $infoBg, $infoBc, $infoTopBorder, $infoLink) 25 | 26 | &.warning 27 | $alert($warningColor, $warningBg, $warningBc, $warningTopBorder, $warningLink) 28 | 29 | &.danger 30 | $alert($dangerColor, $dangerBg, $dangerBc, $dangerTopBorder, $dangerLink) 31 | 32 | .alert 33 | & > p 34 | & > ul 35 | margin-bottom 0 36 | -------------------------------------------------------------------------------- /src/stylus/_elements.styl: -------------------------------------------------------------------------------- 1 | .btn 2 | $cursor(pointer) 3 | $font(Arial, 13px) 4 | $fontBold() 5 | color $white 6 | display inline-block 7 | padding 6px 12px 8 | text-decoration none 9 | 10 | &:active 11 | position relative 12 | top 1px 13 | 14 | &.default 15 | $btn($defaultStartColor, $defaultEndColor, $defaultBorderColor, $defaultShadowColor) 16 | color $darkGray 17 | 18 | &.success 19 | $btn($sucessStartColor, $successEndColor, $successBorderColor, $sucessShadowColor) 20 | 21 | &.primary 22 | $btn($primaryStartColor, $primaryEndColor, $primaryBorderColor, $primaryShadowColor) 23 | 24 | &.danger 25 | $btn($dangerStartColor, $dangerEndColor, $dangerBorderColor, $dangerShadowColor) 26 | 27 | &.warning 28 | $btn($warningStartColor, $warningEndColor, $warningBorderColor, $warningShadowColor) 29 | 30 | &.dark 31 | $btn($darkStartColor, $darkEndColor, $darkBorderColor, $darkShadowColor) 32 | 33 | &.black 34 | color $darkGray 35 | 36 | &.signIn 37 | // Move colors to vars 38 | $border(#9498bb) 39 | background-color #2e293c 40 | border-radius 4px 41 | color $white 42 | display inline 43 | float right 44 | line-height 20px 45 | margin-top 12px 46 | padding 8px 10px 47 | text-align center 48 | width 60% 49 | 50 | &:hover 51 | color #b2b9d6 // Move color to vars 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/stylus/_flags.styl: -------------------------------------------------------------------------------- 1 | .flag 2 | background url('../../assets/flags/flags.png') no-repeat 3 | display inline-block 4 | height 11px 5 | width 16px 6 | 7 | &.br 8 | background-position 0 0 9 | 10 | &.gf 11 | background-position -32px 0 12 | 13 | &.es 14 | background-position 0 -11px 15 | 16 | &.de 17 | background-position -16px 0 18 | 19 | &.en 20 | background-position -16px -11px 21 | -------------------------------------------------------------------------------- /src/stylus/_fonts.styl: -------------------------------------------------------------------------------- 1 | @font-face 2 | font-family 'Comfortaa' 3 | src url('/assets/fonts/Comfortaa/font.woff2') format('woff2'), 4 | url('/assets/fonts/Comfortaa/font.woff') format('woff') 5 | font-weight normal 6 | font-style normal 7 | 8 | @font-face 9 | font-family 'Open Sans' 10 | src url('/assets/fonts/OpenSans/font.woff2') format('woff2'), 11 | url('/assets/fonts/OpenSans/font.woff') format('woff') 12 | font-weight normal 13 | font-style normal 14 | 15 | @font-face 16 | font-family 'Oswald' 17 | src url('/assets/fonts/Oswald/font.woff2') format('woff2'), 18 | url('/assets/fonts/Oswald/font.woff') format('woff') 19 | font-weight normal 20 | font-style normal 21 | 22 | @font-face 23 | font-family 'SourceCodePro' 24 | src url('/assets/fonts/SourceCodePro/font.woff2') format('woff2'), 25 | url('/assets/fonts/SourceCodePro/font.woff') format('woff') 26 | font-weight normal 27 | font-style normal 28 | -------------------------------------------------------------------------------- /src/stylus/_global.styl: -------------------------------------------------------------------------------- 1 | body 2 | $background($white) 3 | color $darkGray 4 | overflow-x hidden 5 | margin 0 6 | 7 | a 8 | text-decoration none 9 | -------------------------------------------------------------------------------- /src/stylus/_pagination.styl: -------------------------------------------------------------------------------- 1 | .pagination 2 | $resetList() 3 | color $darkGrayPagination 4 | margin 0 auto 5 | margin-top 40px 6 | text-align center 7 | width 100% 8 | 9 | @media Tablet 10 | $fontSize(13px) 11 | 12 | @media Mobile 13 | margin-left 0 14 | 15 | li 16 | display inline-block 17 | padding 4px 6px 4px 0 18 | text-align center 19 | 20 | @media Mobile 21 | padding 2px 3px 2px 0 22 | 23 | a 24 | border-radius 5px 25 | color $black 26 | float left 27 | padding 8px 16px 28 | text-decoration none 29 | 30 | @media Mobile 31 | padding 4px 8px 32 | 33 | &:hover 34 | color $black !important 35 | background-color $lightGray 36 | 37 | &.active 38 | background-color $blue 39 | border-radius 5px 40 | color $white 41 | 42 | &:hover 43 | color $white !important 44 | -------------------------------------------------------------------------------- /src/stylus/_utils.styl: -------------------------------------------------------------------------------- 1 | .hidden 2 | display none !important 3 | 4 | .pointer 5 | cursor pointer 6 | -------------------------------------------------------------------------------- /src/stylus/dashboard/_global.styl: -------------------------------------------------------------------------------- 1 | body 2 | $font(Open Sans) 3 | background-color $almostWhite 4 | background-image url('../../images/dashboard/bg.gif') 5 | background-position left 6 | background-repeat repeat-y 7 | margin 0 8 | padding 0 9 | 10 | @media Tablet 11 | background $almostWhite 12 | 13 | input, 14 | textarea 15 | outline none 16 | 17 | .hidden 18 | display none 19 | -------------------------------------------------------------------------------- /src/stylus/dashboard/style.styl: -------------------------------------------------------------------------------- 1 | /* Third parties */ 2 | @import url('../../bower_components/normalize-css/normalize.css') 3 | @import url('../../bower_components/font-awesome/css/font-awesome.min.css') 4 | 5 | /* Fonts */ 6 | @import '../_fonts' 7 | 8 | /* Mixins */ 9 | @import '../_mixins' 10 | 11 | /* Variables, fonts & global styles */ 12 | @import '../_vars' 13 | @import '_global' 14 | @import '../_utils' 15 | @import '../_tables' 16 | @import '../_flags' 17 | @import '../_pagination' 18 | 19 | /* Dashboard styles */ 20 | @import '../_alerts' 21 | @import '../_elements' 22 | @import '_header' 23 | @import '_sidebar' 24 | @import '_content' 25 | @import '_media' 26 | -------------------------------------------------------------------------------- /src/stylus/themes/Default/_global.styl: -------------------------------------------------------------------------------- 1 | /* Third parties */ 2 | @import url('../../../../bower_components/normalize-css/normalize.css') 3 | @import url('../../../../bower_components/font-awesome/css/font-awesome.min.css') 4 | 5 | /* Fonts */ 6 | @import url('https://fonts.googleapis.com/css?family=Domine:700,400') 7 | 8 | /* Fonts */ 9 | @import '../../_fonts' 10 | 11 | /* Mixins */ 12 | @import '../../_mixins' 13 | 14 | /* Variables, fonts & global styles */ 15 | @import '../../_vars' 16 | @import '../../_global' 17 | @import '../../_utils' 18 | @import '../../_elements' 19 | @import '_vars' 20 | -------------------------------------------------------------------------------- /src/stylus/themes/Default/blog.styl: -------------------------------------------------------------------------------- 1 | @import '_global' 2 | 3 | // Header styles 4 | @import './components/Global/Header/Header' 5 | @import './components/Global/Header/Logo' 6 | @import './components/Global/Header/MainNav' 7 | 8 | // Content styles 9 | @import './components/Global/Content/Content' 10 | 11 | // Footer styles 12 | @import './components/Global/Footer/Footer' 13 | 14 | // Blog styles 15 | @import './components/Blog/Post' 16 | 17 | a 18 | color $blueSelected 19 | border-bottom 3px solid transparent 20 | font-weight $fontWeightBold 21 | text-decoration none 22 | transition border .2s,color .2s ease-out 23 | 24 | .Header 25 | $Header() 26 | 27 | .Logo 28 | $Logo() 29 | 30 | .MainNav 31 | $MainNav() 32 | 33 | .Content 34 | $Content() 35 | 36 | .Blog 37 | .Posts 38 | .Post 39 | $Post() 40 | 41 | .Footer 42 | $Footer() 43 | 44 | -------------------------------------------------------------------------------- /src/stylus/themes/Default/components/Blog/Post.styl: -------------------------------------------------------------------------------- 1 | $Post() 2 | padding 50px 0 3 | 4 | h2 5 | $font('Domine') 6 | $fontSize(32px, bold) 7 | color $white 8 | line-height 86px 9 | text-shadow 0 0 30px rgba(0, 0, 0, .6) 10 | 11 | @media Mobile 12 | line-height 45px 13 | 14 | a 15 | $position(relative) 16 | color $headerBlack 17 | padding 10px 0 18 | 19 | @media Desktop 20 | transition border .2s,color .2s ease-out 21 | 22 | &:hover 23 | color $blueHover 24 | 25 | @media Desktop 26 | border-bottom 3px solid $gray 27 | 28 | .information 29 | color $lightGray 30 | 31 | .author 32 | a 33 | img 34 | border-radius 20px 35 | display inline-block 36 | margin 0 6px 0 11px 37 | vertical-align -4px 38 | width 20px 39 | 40 | .content 41 | margin 20px 0 0 42 | overflow hidden 43 | -------------------------------------------------------------------------------- /src/stylus/themes/Default/components/Global/Content/Content.styl: -------------------------------------------------------------------------------- 1 | $Content() 2 | $center() 3 | margin-top 10px 4 | max-width 760px 5 | width 90% 6 | 7 | @media Mobile 8 | border 1px solid red 9 | height 100px 10 | -------------------------------------------------------------------------------- /src/stylus/themes/Default/components/Global/Footer/Footer.styl: -------------------------------------------------------------------------------- 1 | $Footer() 2 | $center() 3 | color $lightGray 4 | font-size .8em 5 | line-height 34px 6 | max-width 760px 7 | padding 25px 0 8 | text-align center 9 | width 90% 10 | 11 | a 12 | color $footerBlue 13 | 14 | .navigation 15 | border-bottom 1px solid $almostLightGray 16 | display none 17 | margin-bottom 10px 18 | overflow hidden 19 | padding-bottom 30px 20 | 21 | @media Mobile 22 | display block 23 | 24 | .graybar 25 | $bg(#eee) 26 | $borderRadius(4px) 27 | color #abaeb6 28 | cursor pointer 29 | font-size 1.2em 30 | font-weight $fontWeightBold 31 | margin 10px 0 32 | overflow hidden 33 | padding 17px 20px 15px 34 | 35 | i 36 | margin-right 10px 37 | 38 | .left 39 | float left 40 | 41 | .right 42 | float right 43 | 44 | .menu 45 | height 0 46 | margin 0 47 | overflow hidden 48 | padding 0 49 | transition all .6s ease-out 50 | 51 | .wrapper 52 | ul 53 | li 54 | float none 55 | margin 25px 0 56 | list-style none 57 | 58 | a 59 | font-size 1.3em 60 | -------------------------------------------------------------------------------- /src/stylus/themes/Default/components/Global/Header/Header.styl: -------------------------------------------------------------------------------- 1 | $Header() 2 | $position(relative) 3 | display block 4 | -------------------------------------------------------------------------------- /src/stylus/themes/Default/components/Global/Header/Logo.styl: -------------------------------------------------------------------------------- 1 | $Logo() 2 | float left 3 | margin-top 10px 4 | 5 | a 6 | $background($white) 7 | color #aaa 8 | display block 9 | padding 9px 12px 6px 10 | transition background .6s ease-out 11 | z-index 200 12 | 13 | &:hover 14 | $background(#fcfcfc) 15 | 16 | img 17 | display inline-block 18 | margin 0 19 | vertical-align middle 20 | width 35px 21 | 22 | .text 23 | $font('Open Sans') 24 | $fontSize(22px) 25 | font-weight bold 26 | vertical-align middle 27 | 28 | .code 29 | color #0073bc 30 | 31 | @media Mobile 32 | display none 33 | -------------------------------------------------------------------------------- /src/stylus/themes/Default/components/Global/Header/MainNav.styl: -------------------------------------------------------------------------------- 1 | $MainNav() 2 | $position(absolute, -10px, 20px) 3 | 4 | .toggle 5 | $position(absolute, 0, 5px) 6 | display inline-block 7 | opacity .6 8 | padding 30px 10px 30px 15px 9 | transition opacity .1s ease-out 10 | 11 | i 12 | color $almostBlack 13 | font-size 1.5em 14 | vertical-align middle 15 | 16 | .menu 17 | display inline-block 18 | list-style none 19 | margin 0 20 | padding 0 21 | 22 | @media Mobile 23 | margin-top 25px 24 | margin-right 45px 25 | 26 | li 27 | $position(relative) 28 | display inline-block 29 | margin 0 30 | padding 0 31 | 32 | &:last-child 33 | @media Mobile 34 | display none 35 | 36 | &:hover 37 | a 38 | color $blackLinkHover 39 | 40 | a 41 | $fontSize(14px) 42 | color $grayLink 43 | display block 44 | padding 35px 10px 45 | 46 | @media Mobile 47 | padding 10px 48 | -------------------------------------------------------------------------------- /src/views/app/blog/dashboard/create.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{{ icon "plus" }}} {{ section }}

3 | 4 | {{#if message }} 5 |

{{{ message }}}

6 | {{/if}} 7 | 8 | {{{ 9 | renderSchema 10 | __ = __ 11 | action = action 12 | basePath = basePath 13 | connectedUser = connectedUser 14 | currentDashboardApp = currentDashboardApp 15 | flashData = flashData 16 | schema = schema 17 | securityToken = securityToken 18 | }}} 19 | 20 | {{{ 21 | renderMedia 22 | __ = __ 23 | basePath = basePath 24 | media = media 25 | }}} 26 |
27 | -------------------------------------------------------------------------------- /src/views/app/blog/dashboard/read.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{ __.Dashboard.modules.blog.list }}

3 | 4 |

5 | 9 | {{{ icon "plus" }}} {{ __.Dashboard.modules.blog.create }} 10 | 11 |

12 | 13 | {{{ 14 | renderSearch 15 | __ = __ 16 | currentDashboardApp = currentDashboardApp 17 | basePath = basePath 18 | searching = searching 19 | }}} 20 | 21 | {{{ 22 | renderTable 23 | tableSchema = tableSchema 24 | }}} 25 | 26 | {{{ 27 | pagination 28 | }}} 29 |
30 | -------------------------------------------------------------------------------- /src/views/app/blog/dashboard/update.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{{ icon "pencil" }}} {{ section }}

4 | 5 | {{#if message }} 6 |

{{{ message }}}

7 | {{/if}} 8 | 9 | {{{ 10 | renderSchema 11 | __ = __ 12 | action = action 13 | connectedUser = connectedUser 14 | flashData = flashData 15 | schema = schema 16 | securityToken = securityToken 17 | }}} 18 |
19 |
20 | -------------------------------------------------------------------------------- /src/views/app/blog/index.hbs: -------------------------------------------------------------------------------- 1 |

{{ __.welcome }} {{ username }}

2 | -------------------------------------------------------------------------------- /src/views/app/configuration/dashboard/read.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{ __.Dashboard.modules.configuration.list }}

3 | 4 | {{{ 5 | renderTable 6 | tableSchema = tableSchema 7 | }}} 8 | 9 | {{{ 10 | pagination 11 | }}} 12 |
13 | -------------------------------------------------------------------------------- /src/views/app/configuration/dashboard/update.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{{ icon "pencil" }}} {{ section }}

4 | 5 | {{#if message }} 6 |

{{{ message }}}

7 | {{/if}} 8 | 9 | {{{ 10 | renderSchema 11 | __ = __ 12 | action = action 13 | connectedUser = connectedUser 14 | flashData = flashData 15 | schema = schema 16 | securityToken = securityToken 17 | }}} 18 |
19 |
20 | -------------------------------------------------------------------------------- /src/views/app/content/dashboard/create.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{{ icon "plus" }}} {{ section }}

3 | 4 | {{#if message }} 5 |

{{{ message }}}

6 | {{/if}} 7 | 8 | {{{ 9 | renderSchema 10 | __ = __ 11 | action = action 12 | basePath = basePath 13 | connectedUser = connectedUser 14 | currentDashboardApp = currentDashboardApp 15 | flashData = flashData 16 | schema = schema 17 | securityToken = securityToken 18 | }}} 19 |
20 | -------------------------------------------------------------------------------- /src/views/app/content/dashboard/read.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{ __.Dashboard.modules.content.list }}

3 | 4 |

5 | 9 | {{{ icon "plus" }}} {{ __.Dashboard.modules.content.create }} 10 | 11 |   12 | 17 | {{{ icon "database" }}} {{ __.Dashboard.modules.content.backup }} 18 | 19 |

20 | 21 | {{{ 22 | renderSearch 23 | __ = __ 24 | currentDashboardApp = currentDashboardApp 25 | basePath = basePath 26 | searching = searching 27 | }}} 28 | 29 | {{{ 30 | renderTable 31 | tableSchema = tableSchema 32 | }}} 33 | 34 | {{{ 35 | pagination 36 | }}} 37 |
38 | -------------------------------------------------------------------------------- /src/views/app/content/dashboard/update.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{{ icon "pencil" }}} {{ section }}

4 | 5 | {{#if message }} 6 |

{{{ message }}}

7 | {{/if}} 8 | 9 | {{{ 10 | renderSchema 11 | __ = __ 12 | action = action 13 | connectedUser = connectedUser 14 | flashData = flashData 15 | schema = schema 16 | securityToken = securityToken 17 | }}} 18 |
19 |
20 | -------------------------------------------------------------------------------- /src/views/app/dashboard/index.hbs: -------------------------------------------------------------------------------- 1 |

Dashboard

-------------------------------------------------------------------------------- /src/views/app/home/index.hbs: -------------------------------------------------------------------------------- 1 |

{{ __.Home.welcome }}

2 |

{{ user }}

3 | 4 | -------------------------------------------------------------------------------- /src/views/app/pages/dashboard/create.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{{ icon "plus" }}} {{ section }}

3 | 4 | {{#if message }} 5 |

{{{ message }}}

6 | {{/if}} 7 | 8 | {{{ 9 | renderSchema 10 | __ = __ 11 | action = action 12 | basePath = basePath 13 | connectedUser = connectedUser 14 | currentDashboardApp = currentDashboardApp 15 | flashData = flashData 16 | schema = schema 17 | securityToken = securityToken 18 | }}} 19 | 20 | {{{ 21 | renderMedia 22 | __ = __ 23 | basePath = basePath 24 | media = media 25 | }}} 26 |
27 | -------------------------------------------------------------------------------- /src/views/app/pages/dashboard/read.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{ __.Dashboard.modules.pages.list }}

3 | 4 |

5 | 9 | {{{ icon "plus" }}} {{ __.Dashboard.modules.pages.create }} 10 | 11 |

12 | 13 | {{{ 14 | renderSearch 15 | __ = __ 16 | currentDashboardApp = currentDashboardApp 17 | basePath = basePath 18 | searching = searching 19 | }}} 20 | 21 | {{{ 22 | renderTable 23 | tableSchema = tableSchema 24 | }}} 25 | 26 | {{{ 27 | pagination 28 | }}} 29 |
30 | -------------------------------------------------------------------------------- /src/views/app/pages/dashboard/update.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{{ icon "pencil" }}} {{ section }}

4 | 5 | {{#if message }} 6 |

{{{ message }}}

7 | {{/if}} 8 | 9 | {{{ 10 | renderSchema 11 | __ = __ 12 | action = action 13 | connectedUser = connectedUser 14 | flashData = flashData 15 | schema = schema 16 | securityToken = securityToken 17 | }}} 18 |
19 |
20 | -------------------------------------------------------------------------------- /src/views/app/users/register.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{#if user}} 4 |

{{{ icon "fa-users" }}} {{ __.users.completeRegister }}

5 | 6 |

7 | {{ user.username }} 8 | 9 | 10 | {{ __.Users.hello }}, 11 | {{#is user.network "twitter"}}@{{/is}}{{ user.username }}! 12 | 13 |

14 | 15 | {{{ label for = "user" text = __.users.username }}} 16 | 17 |

18 | {{{ input 19 | id = "user" 20 | name = "username" 21 | maxlength = "20" 22 | value = user.username 23 | required = true 24 | }}} 25 |

26 | 27 | {{{ label for = "email" text = __.Users.email.label }}} 28 | 29 |

30 | {{{ email placeholder = __.Users.email.placeholder required = true }}} 31 |

32 | 33 |

34 | {{{ checkbox id = "suscribe" name = "subscribed" checked = "true" }}} 35 | 36 | {{{ label 37 | for = "suscribe" 38 | class = "checkboxLabel" 39 | text = __.Users.subscribe.label 40 | }}} 41 |

42 | 43 |

44 | {{{ input 45 | class = "btn btn-danger submit" 46 | type = "submit" 47 | name = "register" 48 | value = __.Users.register.label 49 | }}} 50 |

51 | 52 | {{{ hidden name = "avatar" value = user.avatar }}} 53 | {{{ hidden name = "network" value = user.network }}} 54 | {{{ hidden name = "networkId" value = user.networkId }}} 55 | {{else}} 56 |

{{ __.Users.newUser }}

57 |

Nuevo usuario

58 | {{/if}} 59 | 60 | {{{ token securityToken }}} 61 |
62 |
63 | -------------------------------------------------------------------------------- /src/views/app/users/registered.hbs: -------------------------------------------------------------------------------- 1 |
{{{ icon iconType }}} {{ message }}
-------------------------------------------------------------------------------- /src/views/error.hbs: -------------------------------------------------------------------------------- 1 |

Error: {{ error }}

2 | -------------------------------------------------------------------------------- /src/views/frontend/index.hbs: -------------------------------------------------------------------------------- 1 | {{#compress}} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{#if isMobile}} 11 | 12 | {{/if}} 13 | 14 | {{ dashboard.title }} 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 41 | 42 | 43 | 44 | {{/compress}} 45 | -------------------------------------------------------------------------------- /src/views/layouts/dashboard.hbs: -------------------------------------------------------------------------------- 1 | {{#compress}} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {{#if isMobile}} 12 | 13 | {{/if}} 14 | 15 | {{ dashboard.title }} 16 | 17 | 18 | 19 | 20 | 21 | 22 | {{> dashboard/header }} 23 | {{> dashboard/sidebar }} 24 | 25 |
26 | {{{ body }}} 27 |
28 | 29 | 30 | 36 | 37 | 38 | 39 | 40 | {{/compress}} 41 | -------------------------------------------------------------------------------- /src/views/partials/dashboard/sidebar.hbs: -------------------------------------------------------------------------------- 1 | 33 | -------------------------------------------------------------------------------- /test/fixtures/content/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "Foo": { 3 | "bar": { 4 | "hello": "Hi", 5 | "bye": "Bye" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/content/i18n/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "Foo": { 3 | "bar": { 4 | "hello": "Hola", 5 | "bye": "Adios" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/frontend/components/Global/HeaderTest.js: -------------------------------------------------------------------------------- 1 | import '../../../globalTest'; 2 | 3 | const Header = loadComponent('Global/Header/Header'); 4 | const Wrapper = setupRedux(Header); 5 | 6 | describe('
', () => { 7 | it('should renders header with all components', () => { 8 | const header = Wrapper.find('.Header'); 9 | const wrapper = Wrapper.find('.wrapper'); 10 | const logo = Wrapper.find('.Logo'); 11 | const mainNav = Wrapper.find('.MainNav'); 12 | 13 | assert.isTrue(exists(header), 'Header should exists'); 14 | assert.isTrue(exists(wrapper), 'wrapper should exists'); 15 | assert.isTrue(exists(logo), 'Logo component should exists'); 16 | assert.isTrue(exists(mainNav), 'MainNav component should exists'); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /test/frontend/components/Global/LogoTest.js: -------------------------------------------------------------------------------- 1 | import '../../../globalTest'; 2 | 3 | const Logo = loadComponent('Global/Header/Logo'); 4 | const Wrapper = setup(Logo); 5 | 6 | describe('', () => { 7 | it('should renders header', () => { 8 | const div = Wrapper.find('div'); 9 | // const img = Wrapper.find('img'); 10 | // const actualSrc = img.props().src; 11 | // const expectedSrc = 'themes/Default/images/logo.png'; 12 | 13 | assert.isTrue(exists(div), 'div should exists'); 14 | // assert.isTrue(exists(img), '1 image should exists'); 15 | // assert.isTrue(equals(actualSrc, expectedSrc), 'actualSrc should match expectedSrc'); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /test/globalTest.js: -------------------------------------------------------------------------------- 1 | // NPM Dependencies 2 | import 'jsdom-global/register'; 3 | import React from 'react'; 4 | import { assert } from 'chai'; 5 | import { mount, shallow } from 'enzyme'; 6 | import sinon from 'sinon'; 7 | 8 | // Redux 9 | import { Provider } from 'react-redux'; 10 | import configureStore from '../src/frontend/configureStore'; 11 | 12 | // Utils 13 | import { loadComponent } from '../src/lib/utils/frontend'; 14 | 15 | const initialState = loadFixture('frontend/initialState.json'); 16 | 17 | // Global methods 18 | global.assert = assert; 19 | global.loadComponent = loadComponent; 20 | global.loadFixture = loadFixture; 21 | global.mount = mount; 22 | global.setup = setup; 23 | global.setupRedux = setupRedux; 24 | global.shallow = shallow; 25 | global.sinon = sinon; 26 | global.exists = exists; 27 | global.equals = equals; 28 | 29 | function loadFixture(fixture) { 30 | const content = require(`./fixtures/${fixture}`); 31 | 32 | return content; 33 | } 34 | 35 | function setup(Component, props = {}) { 36 | return shallow(); 37 | } 38 | 39 | function setupRedux(Component, props = {}) { 40 | const store = configureStore({ 41 | initialState: initialState 42 | }); 43 | 44 | return mount(); 45 | } 46 | 47 | function exists(element) { 48 | return element && element.length === 1; 49 | } 50 | 51 | function equals(value1, value2) { 52 | return value1 === value2; 53 | } 54 | -------------------------------------------------------------------------------- /test/lib/cacheTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { Cache } from '../../src/lib/cache'; 3 | 4 | const { exists, get, remove, set } = Cache('Unit Test'); 5 | 6 | describe('@Cache', () => { 7 | describe('#exists', () => { 8 | it('should be a function', () => { 9 | assert.typeOf(exists, 'function', 'exists should be a function'); 10 | }); 11 | }); 12 | 13 | describe('#get', () => { 14 | it('should be a function', () => { 15 | assert.typeOf(get, 'function', 'get should be a function'); 16 | }); 17 | }); 18 | 19 | describe('#remove', () => { 20 | it('should be a function', () => { 21 | assert.typeOf(remove, 'function', 'remove should be a function'); 22 | }); 23 | }); 24 | 25 | describe('#set', () => { 26 | it('should be a function', () => { 27 | assert.typeOf(set, 'function', 'set should be a function'); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /test/lib/contentTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import contentHelper from '../../src/lib/content'; 3 | 4 | const enFixture = loadFixture('content/i18n/en.json'); 5 | const esFixture = loadFixture('content/i18n/es.json'); 6 | 7 | describe('@Content', () => { 8 | let req; 9 | let res; 10 | let next; 11 | 12 | beforeEach(function() { 13 | req = {}; 14 | res = { 15 | content: sinon.spy(), 16 | __: enFixture 17 | }; 18 | next = sinon.spy(); 19 | }); 20 | 21 | it('should be a function', () => { 22 | assert.typeOf(contentHelper, 'function', 'contentHelper should be a function'); 23 | }); 24 | 25 | describe('#content', () => { 26 | it('should be a function on the response object', function() { 27 | contentHelper(req, res, next); 28 | 29 | assert.isDefined(res.content, 'response should have content property'); 30 | assert.typeOf(res.content, 'function', 'content property should be a function'); 31 | }); 32 | 33 | it('should return english content', function() { 34 | contentHelper(req, res, next); 35 | 36 | const actualResult = res.content('Foo.bar.hello'); 37 | const expectedResult = 'Hi'; 38 | 39 | assert.isTrue(actualResult === expectedResult, 'actualResult should say "Hi"'); 40 | }); 41 | 42 | it('should return spanish content', function() { 43 | contentHelper(req, res, next); 44 | 45 | res.__ = esFixture; 46 | 47 | const actualResult = res.content('Foo.bar.hello'); 48 | const expectedResult = 'Hola'; 49 | 50 | assert.isTrue(actualResult === expectedResult, 'actualResult should say "Hola"'); 51 | }); 52 | }); 53 | }); 54 | -------------------------------------------------------------------------------- /test/lib/envTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import env from '../../src/lib/env'; 3 | 4 | describe('@Env', () => { 5 | it('should be a function returning an object', () => { 6 | assert.typeOf(env, 'Function', 'env should export a function'); 7 | assert.typeOf(env(), 'Object', 'env() should return an object'); 8 | }); 9 | 10 | it('should have a name', () => { 11 | assert.typeOf(env().name, 'String', 'env().name should be a string'); 12 | }); 13 | 14 | it('should have name default to \'production\'', () => { 15 | assert.equal(env().name, 'production', 'env().name should be production by default'); 16 | }); 17 | 18 | it('should set the value of name to process.env.NODE_ENV if a value exists', () => { 19 | process.env.NODE_ENV = 'development'; 20 | assert.equal(env().name, 'development', 'env().name should be development'); 21 | 22 | process.env.NODE_ENV = 'production'; 23 | assert.equal(env().name, 'production', 'env().name should be production'); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /test/lib/i18nTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { 3 | availableLanguages, 4 | defaultLanguage, 5 | getCurrentLanguage, 6 | getLanguagePath, 7 | isLanguage, 8 | loadLanguage 9 | } from '../../src/lib/i18n'; 10 | 11 | describe('@i18n', () => { 12 | describe('#availableLanguages', () => { 13 | it('should be a function', () => { 14 | assert.typeOf(availableLanguages, 'function', 'availableLanguages should be a function'); 15 | }); 16 | }); 17 | 18 | describe('#defaultLanguage', () => { 19 | it('should be a function', () => { 20 | assert.typeOf(defaultLanguage, 'function', 'defaultLanguage should be a function'); 21 | }); 22 | }); 23 | 24 | describe('#getCurrentLanguage', () => { 25 | it('should be a function', () => { 26 | assert.typeOf(getCurrentLanguage, 'function', 'getCurrentLanguage should be a function'); 27 | }); 28 | }); 29 | 30 | describe('#getLanguagePath', () => { 31 | it('should be a function', () => { 32 | assert.typeOf(getLanguagePath, 'function', 'getLanguagePath should be a function'); 33 | }); 34 | }); 35 | 36 | describe('#isLanguage', () => { 37 | it('should be a function', () => { 38 | assert.typeOf(isLanguage, 'function', 'isLanguage should be a function'); 39 | }); 40 | }); 41 | 42 | describe('#loadLanguage', () => { 43 | it('should be a function', () => { 44 | assert.typeOf(loadLanguage, 'function', 'loadLanguage should be a function'); 45 | }); 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /test/lib/mediaTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { getMedia } from '../../src/lib/media'; 3 | 4 | describe('@Media', () => { 5 | describe('#getMedia', () => { 6 | it('should be a function', () => { 7 | assert.typeOf(getMedia, 'function', 'getMedia should be a function'); 8 | }); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /test/lib/paginationTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { 3 | getPagination, 4 | getPaginationLimit, 5 | setPaginationMaxLimit, 6 | _getCurrentPage, 7 | _getPageNav, 8 | _getPageNext, 9 | _getPagePrevious, 10 | _pagination 11 | } from '../../src/lib/pagination'; 12 | 13 | describe('@Pagination', () => { 14 | describe('#getPagination', () => { 15 | it('should be a function', () => { 16 | assert.typeOf(getPagination, 'function', 'getPagination should be a function'); 17 | }); 18 | }); 19 | 20 | describe('#getPaginationLimit', () => { 21 | it('should be a function', () => { 22 | assert.typeOf(getPaginationLimit, 'function', 'getPaginationLimit should be a function'); 23 | }); 24 | }); 25 | 26 | describe('#setPaginationMaxLimit', () => { 27 | it('should be a function', () => { 28 | assert.typeOf(setPaginationMaxLimit, 'function', 'setPaginationMaxLimit should be a function'); 29 | }); 30 | }); 31 | 32 | describe('#_getCurrentPage', () => { 33 | it('should be a function', () => { 34 | assert.typeOf(_getCurrentPage, 'function', '_getCurrentPage should be a function'); 35 | }); 36 | }); 37 | 38 | describe('#_getPageNav', () => { 39 | it('should be a function', () => { 40 | assert.typeOf(_getPageNav, 'function', '_getPageNav should be a function'); 41 | }); 42 | }); 43 | 44 | describe('#_getPageNext', () => { 45 | it('should be a function', () => { 46 | assert.typeOf(_getPageNext, 'function', '_getPageNext should be a function'); 47 | }); 48 | }); 49 | 50 | describe('#_getPagePrevious', () => { 51 | it('should be a function', () => { 52 | assert.typeOf(_getPagePrevious, 'function', '_getPagePrevious should be a function'); 53 | }); 54 | }); 55 | 56 | describe('#_pagination', () => { 57 | it('should be a function', () => { 58 | assert.typeOf(_pagination, 'function', '_pagination should be a function'); 59 | }); 60 | }); 61 | }); 62 | -------------------------------------------------------------------------------- /test/lib/postTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { Post } from '../../src/lib/post'; 3 | 4 | const { 5 | action, 6 | debug, 7 | getAllPost, 8 | isGet, 9 | isPost, 10 | post, 11 | refreshSecurityToken, 12 | validate, 13 | validateSecurityToken, 14 | _getPostsFromArray 15 | } = Post(); 16 | 17 | describe('@Post', () => { 18 | describe('#action', () => { 19 | it('should be a function', () => { 20 | assert.typeOf(action, 'function', 'action should be a function'); 21 | }); 22 | }); 23 | 24 | describe('#debug', () => { 25 | it('should be a function', () => { 26 | assert.typeOf(debug, 'function', 'debug should be a function'); 27 | }); 28 | }); 29 | 30 | describe('#getAllPost', () => { 31 | it('should be a function', () => { 32 | assert.typeOf(getAllPost, 'function', 'getAllPost should be a function'); 33 | }); 34 | }); 35 | 36 | describe('#isGet', () => { 37 | it('should be a function', () => { 38 | assert.typeOf(isGet, 'function', 'isGet should be a function'); 39 | }); 40 | }); 41 | 42 | describe('#isPost', () => { 43 | it('should be a function', () => { 44 | assert.typeOf(isPost, 'function', 'isPost should be a function'); 45 | }); 46 | }); 47 | 48 | describe('#post', () => { 49 | it('should be a function', () => { 50 | assert.typeOf(post, 'function', 'post should be a function'); 51 | }); 52 | }); 53 | 54 | describe('#refreshSecurityToken', () => { 55 | it('should be a function', () => { 56 | assert.typeOf(refreshSecurityToken, 'function', 'refreshSecurityToken should be a function'); 57 | }); 58 | }); 59 | 60 | describe('#validate', () => { 61 | it('should be a function', () => { 62 | assert.typeOf(validate, 'function', 'validate should be a function'); 63 | }); 64 | }); 65 | 66 | describe('#validateSecurityToken', () => { 67 | it('should be a function', () => { 68 | assert.typeOf(validateSecurityToken, 'function', 'validateSecurityToken should be a function'); 69 | }); 70 | }); 71 | 72 | describe('#_getPostsFromArray', () => { 73 | it('should be a function', () => { 74 | assert.typeOf(_getPostsFromArray, 'function', '_getPostsFromArray should be a function'); 75 | }); 76 | }); 77 | }); 78 | -------------------------------------------------------------------------------- /test/lib/sessionTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { Session } from '../../src/lib/session'; 3 | 4 | const { 5 | clearSession, 6 | destroySessions, 7 | parseSession, 8 | session 9 | } = Session(); 10 | 11 | describe('@Session', () => { 12 | describe('#clearSession', () => { 13 | it('should be a function', () => { 14 | assert.typeOf(clearSession, 'function', 'clearSession should be a function'); 15 | }); 16 | }); 17 | 18 | describe('#destroySessions', () => { 19 | it('should be a function', () => { 20 | assert.typeOf(destroySessions, 'function', 'destroySessions should be a function'); 21 | }); 22 | }); 23 | 24 | describe('#parseSession', () => { 25 | it('should be a function', () => { 26 | assert.typeOf(parseSession, 'function', 'parseSession should be a function'); 27 | }); 28 | }); 29 | 30 | describe('#session', () => { 31 | it('should be a function', () => { 32 | assert.typeOf(session, 'function', 'session should be a function'); 33 | }); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /test/lib/tableTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { 3 | createTable, 4 | _getTBody, 5 | _getTHead 6 | } from '../../src/lib/table'; 7 | 8 | describe('@Table', () => { 9 | describe('#createTable', () => { 10 | it('should be a function', () => { 11 | assert.typeOf(createTable, 'function', 'createTable should be a function'); 12 | }); 13 | }); 14 | 15 | describe('#_getTBody', () => { 16 | it('should be a function', () => { 17 | assert.typeOf(_getTBody, 'function', '_getTBody should be a function'); 18 | }); 19 | }); 20 | 21 | describe('#_getTHead', () => { 22 | it('should be a function', () => { 23 | assert.typeOf(_getTHead, 'function', '_getTHead should be a function'); 24 | }); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /test/lib/templatesTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { Templates } from '../../src/lib/templates'; 3 | 4 | const { defaultScope, get, set } = Templates(); 5 | 6 | describe('@Templates', () => { 7 | describe('#defaultScope', () => { 8 | it('should be a function', () => { 9 | assert.typeOf(defaultScope, 'function', 'defaultScope should be a function'); 10 | }); 11 | }); 12 | 13 | describe('#get', () => { 14 | it('should be a function', () => { 15 | assert.typeOf(get, 'function', 'get should be a function'); 16 | }); 17 | }); 18 | 19 | describe('#set', () => { 20 | it('should be a function', () => { 21 | assert.typeOf(set, 'function', 'set should be a function'); 22 | }); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /test/lib/twitterTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { 3 | api, 4 | getAuthenticateUrl, 5 | getOAuthAccessToken, 6 | getOAuthRequestToken 7 | } from '../../src/lib/twitter'; 8 | 9 | describe('@Twitter', () => { 10 | describe('#api', () => { 11 | it('should be a function', () => { 12 | assert.typeOf(api, 'function', 'api should be a function'); 13 | }); 14 | }); 15 | 16 | describe('#getAuthenticateUrl', () => { 17 | it('should be a function', () => { 18 | assert.typeOf(getAuthenticateUrl, 'function', 'getAuthenticateUrl should be a function'); 19 | }); 20 | }); 21 | 22 | describe('#getOAuthAccessToken', () => { 23 | it('should be a function', () => { 24 | assert.typeOf(getOAuthAccessToken, 'function', 'getOAuthAccessToken should be a function'); 25 | }); 26 | }); 27 | 28 | describe('#getOAuthRequestToken', () => { 29 | it('should be a function', () => { 30 | assert.typeOf(getOAuthRequestToken, 'function', 'getOAuthRequestToken should be a function'); 31 | }); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /test/lib/userTest.js: -------------------------------------------------------------------------------- 1 | import '../globalTest'; 2 | import { User } from '../../src/lib/user'; 3 | 4 | const { 5 | profileAllowed 6 | } = User(); 7 | 8 | describe('@User', () => { 9 | describe('#profileAllowed', () => { 10 | it('should be a function', () => { 11 | assert.typeOf(profileAllowed, 'function', 'profileAllowed should be a function'); 12 | }); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /test/lib/utils/filesTest.js: -------------------------------------------------------------------------------- 1 | import '../../globalTest'; 2 | import { 3 | getFileExtension, 4 | getFileFormats, 5 | getFileInfo, 6 | getFileSize, 7 | getImageFormats, 8 | glob 9 | } from '../../../src/lib/utils/files'; 10 | 11 | describe('@Files', () => { 12 | describe('#getFileExtension', () => { 13 | it('should be a function', () => { 14 | assert.typeOf(getFileExtension, 'function', 'getFileExtension should be a function'); 15 | }); 16 | }); 17 | 18 | describe('#getFileFormats', () => { 19 | it('should be a function', () => { 20 | assert.typeOf(getFileFormats, 'function', 'getFileFormats should be a function'); 21 | }); 22 | }); 23 | 24 | describe('#getFileInfo', () => { 25 | it('should be a function', () => { 26 | assert.typeOf(getFileInfo, 'function', 'getFileInfo should be a function'); 27 | }); 28 | }); 29 | 30 | describe('#getFileSize', () => { 31 | it('should be a function', () => { 32 | assert.typeOf(getFileSize, 'function', 'getFileSize should be a function'); 33 | }); 34 | }); 35 | 36 | describe('#getImageFormats', () => { 37 | it('should be a function', () => { 38 | assert.typeOf(getImageFormats, 'function', 'getImageFormats should be a function'); 39 | }); 40 | }); 41 | 42 | describe('#glob', () => { 43 | it('should be a function', () => { 44 | assert.typeOf(glob, 'function', 'glob should be a function'); 45 | }); 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /test/lib/utils/objectTest.js: -------------------------------------------------------------------------------- 1 | import '../../globalTest'; 2 | import { 3 | buildContentJson, 4 | pick, 5 | stringify 6 | } from '../../../src/lib/utils/object'; 7 | 8 | describe('@Object', () => { 9 | describe('#buildContentJson', () => { 10 | it('should be a function', () => { 11 | assert.typeOf(buildContentJson, 'function', 'buildContentJson should be a function'); 12 | }); 13 | 14 | it('should build a json from vendo content', () => { 15 | const content = [ 16 | { 17 | name: 'site.language', 18 | value: 'en' 19 | }, 20 | { 21 | name: 'site.title', 22 | value: 'Bar' 23 | }, 24 | { 25 | name: 'site.meta.abstract', 26 | value: 'Foo' 27 | } 28 | ]; 29 | 30 | const expectedResult = { 31 | site: { 32 | language: 'en', 33 | title: 'Bar', 34 | meta: { 35 | abstract: 'Foo' 36 | } 37 | } 38 | }; 39 | 40 | const actualResult = buildContentJson(content); 41 | 42 | assert.deepEqual( 43 | actualResult, 44 | expectedResult, 45 | 'actualResult should match expectedResult' 46 | ); 47 | }); 48 | }); 49 | 50 | describe('#pick', () => { 51 | it('should be a function', () => { 52 | assert.typeOf(pick, 'function', 'pick should be a function'); 53 | }); 54 | }); 55 | 56 | describe('#stringify', () => { 57 | it('should be a function', () => { 58 | assert.typeOf(stringify, 'function', 'stringify should be a function'); 59 | }); 60 | }); 61 | }); 62 | -------------------------------------------------------------------------------- /test/lib/utils/optionsTest.js: -------------------------------------------------------------------------------- 1 | import '../../globalTest'; 2 | import { 3 | getContentInsertOptionsHTML, 4 | getHiddenOptions, 5 | getInputOptions, 6 | getLabelOptions, 7 | getSelectOptions, 8 | getSubmitOptions, 9 | getTextareaOptions 10 | } from '../../../src/lib/utils/options'; 11 | 12 | describe('@Options', () => { 13 | describe('#getContentInsertOptionsHTML', () => { 14 | it('should be a function', () => { 15 | assert.typeOf(getContentInsertOptionsHTML, 'function', 'getContentInsertOptionsHTML should be a function'); 16 | }); 17 | }); 18 | 19 | describe('#getHiddenOptions', () => { 20 | it('should be a function', () => { 21 | assert.typeOf(getHiddenOptions, 'function', 'getHiddenOptions should be a function'); 22 | }); 23 | }); 24 | 25 | describe('#getInputOptions', () => { 26 | it('should be a function', () => { 27 | assert.typeOf(getInputOptions, 'function', 'getInputOptions should be a function'); 28 | }); 29 | }); 30 | 31 | describe('#getLabelOptions', () => { 32 | it('should be a function', () => { 33 | assert.typeOf(getLabelOptions, 'function', 'getLabelOptions should be a function'); 34 | }); 35 | }); 36 | 37 | describe('#getSelectOptions', () => { 38 | it('should be a function', () => { 39 | assert.typeOf(getSelectOptions, 'function', 'getSelectOptions should be a function'); 40 | }); 41 | }); 42 | 43 | describe('#getSubmitOptions', () => { 44 | it('should be a function', () => { 45 | assert.typeOf(getSubmitOptions, 'function', 'getSubmitOptions should be a function'); 46 | }); 47 | }); 48 | 49 | describe('#getTextareaOptions', () => { 50 | it('should be a function', () => { 51 | assert.typeOf(getTextareaOptions, 'function', 'getTextareaOptions should be a function'); 52 | }); 53 | }); 54 | }); 55 | -------------------------------------------------------------------------------- /test/lib/utils/securityTest.js: -------------------------------------------------------------------------------- 1 | import '../../globalTest'; 2 | import { 3 | encrypt, 4 | md5, 5 | randomCode, 6 | sha1 7 | } from '../../../src/lib/utils/security'; 8 | 9 | describe('@Security', () => { 10 | describe('#encrypt', () => { 11 | it('should be a function', () => { 12 | assert.typeOf(encrypt, 'function', 'encrypt should be a function'); 13 | }); 14 | 15 | it('should return a encrypted salted string', () => { 16 | const expectedResult = 'ef790abbe1e8f4ddc8bb8fe1af981dfcea7c3ef1'; 17 | const actualResult = encrypt('foo'); 18 | 19 | assert.isTrue(actualResult === expectedResult, 'should be a hash'); 20 | }); 21 | }); 22 | 23 | describe('#md5', () => { 24 | it('should be a function', () => { 25 | assert.typeOf(md5, 'function', 'md5 should be a function'); 26 | }); 27 | }); 28 | 29 | describe('#randomCode', () => { 30 | it('should be a function', () => { 31 | assert.typeOf(randomCode, 'function', 'randomCode should be a function'); 32 | }); 33 | }); 34 | 35 | describe('#sha1', () => { 36 | it('should be a function', () => { 37 | assert.typeOf(sha1, 'function', 'sha1 should be a function'); 38 | }); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /test/lib/utils/stringTest.js: -------------------------------------------------------------------------------- 1 | import '../../globalTest'; 2 | import { 3 | clean, 4 | escapeString, 5 | removeHTML 6 | } from '../../../src/lib/utils/string'; 7 | 8 | describe('@String', () => { 9 | describe('#clean', () => { 10 | it('should be a function', () => { 11 | assert.typeOf(clean, 'function', 'clean should be a function'); 12 | }); 13 | 14 | it('should clean a string', () => { 15 | const str = '

Foo

'; 16 | const expectedResult = 'Foo'; 17 | 18 | assert.isTrue( 19 | clean(str) === expectedResult, 20 | 'the string should be cleaned' 21 | ); 22 | }); 23 | 24 | it('should return false when the string is undefined', () => { 25 | let str; 26 | 27 | assert.isFalse( 28 | clean(str), 29 | 'should return false' 30 | ); 31 | }); 32 | }); 33 | 34 | describe('#escapeString', () => { 35 | it('should be a function', () => { 36 | assert.typeOf(escapeString, 'function', 'escape should be a function'); 37 | }); 38 | }); 39 | 40 | describe('#removeHTML', () => { 41 | it('should be a function', () => { 42 | assert.typeOf(removeHTML, 'function', 'removeHTML should be a function'); 43 | }); 44 | }); 45 | }); 46 | -------------------------------------------------------------------------------- /test/lib/utils/urlTest.js: -------------------------------------------------------------------------------- 1 | import '../../globalTest'; 2 | import { 3 | getParamsFromUrl 4 | } from '../../../src/lib/utils/url'; 5 | 6 | describe('@Url', () => { 7 | describe('#getParamsFromUrl', () => { 8 | it('should be a function', () => { 9 | assert.typeOf(getParamsFromUrl, 'function', 'getParamsFromUrl should be a function'); 10 | }); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /webpack.config.babel.js: -------------------------------------------------------------------------------- 1 | // Dependencies 2 | import webpack from 'webpack'; 3 | import path from 'path'; 4 | 5 | // Configuration 6 | import { $webpack } from './src/lib/config'; 7 | 8 | // Paths 9 | const PATHS = { 10 | app: path.join(__dirname, $webpack().paths.app), 11 | build: path.join(__dirname, $webpack().paths.build), 12 | src: path.join(__dirname, 'src') 13 | }; 14 | 15 | export default { 16 | debug: true, 17 | devtool: $webpack().devtool, 18 | noInfo: false, 19 | entry: [ 20 | 'webpack-hot-middleware/client?reload=true', 21 | `${PATHS.app}` 22 | ], 23 | resolve: { 24 | extensions: $webpack().extensions 25 | }, 26 | output: { 27 | path: PATHS.build, 28 | filename: 'bundle.js', 29 | publicPath: '/' 30 | }, 31 | devServer: { 32 | contentBase: PATHS.src, 33 | historyApiFallback: true, 34 | hot: true, 35 | inline: true, 36 | progress: true, 37 | stats: 'errors-only' 38 | }, 39 | plugins: [ 40 | new webpack.HotModuleReplacementPlugin(), 41 | new webpack.NoErrorsPlugin() 42 | ], 43 | module: { 44 | loaders: [ 45 | { 46 | test: /\.js?$/, 47 | loaders: ['babel'], 48 | include: PATHS.src 49 | }, 50 | { 51 | test: /\.json$/, 52 | loader: 'json' 53 | }, 54 | ] 55 | } 56 | }; 57 | --------------------------------------------------------------------------------