├── .gitignore ├── bundles ├── dashboard-footer.js └── dashboard-head.js ├── database ├── articles.js ├── db.js ├── index.js └── users.js ├── package.json ├── public ├── bundles │ ├── dashboard-footer.out.js │ └── dashboard-head.out.js ├── css │ └── main.css ├── image │ └── cover.jpg ├── js │ └── main.js ├── less │ ├── add_blog.less │ ├── article.less │ ├── blog.less │ ├── contact.less │ ├── dashboard-menu.less │ ├── dashboard.less │ ├── inputs.less │ ├── layout.less │ ├── main.less │ ├── menu.less │ ├── normalize.less │ ├── personal-info.less │ ├── resume.less │ └── table.less └── tinymce │ ├── LICENSE.TXT │ ├── changelog.txt │ └── js │ └── tinymce │ ├── jquery.tinymce.min.js │ ├── langs │ └── readme.md │ ├── license.txt │ ├── plugins │ ├── advlist │ │ └── plugin.min.js │ ├── anchor │ │ └── plugin.min.js │ ├── autolink │ │ └── plugin.min.js │ ├── autoresize │ │ └── plugin.min.js │ ├── autosave │ │ └── plugin.min.js │ ├── bbcode │ │ └── plugin.min.js │ ├── charmap │ │ └── plugin.min.js │ ├── code │ │ └── plugin.min.js │ ├── codesample │ │ ├── css │ │ │ └── prism.css │ │ └── plugin.min.js │ ├── colorpicker │ │ └── plugin.min.js │ ├── contextmenu │ │ └── plugin.min.js │ ├── directionality │ │ └── plugin.min.js │ ├── emoticons │ │ ├── img │ │ │ ├── smiley-cool.gif │ │ │ ├── smiley-cry.gif │ │ │ ├── smiley-embarassed.gif │ │ │ ├── smiley-foot-in-mouth.gif │ │ │ ├── smiley-frown.gif │ │ │ ├── smiley-innocent.gif │ │ │ ├── smiley-kiss.gif │ │ │ ├── smiley-laughing.gif │ │ │ ├── smiley-money-mouth.gif │ │ │ ├── smiley-sealed.gif │ │ │ ├── smiley-smile.gif │ │ │ ├── smiley-surprised.gif │ │ │ ├── smiley-tongue-out.gif │ │ │ ├── smiley-undecided.gif │ │ │ ├── smiley-wink.gif │ │ │ └── smiley-yell.gif │ │ └── plugin.min.js │ ├── example │ │ ├── dialog.html │ │ └── plugin.min.js │ ├── example_dependency │ │ └── plugin.min.js │ ├── fullpage │ │ └── plugin.min.js │ ├── fullscreen │ │ └── plugin.min.js │ ├── hr │ │ └── plugin.min.js │ ├── image │ │ └── plugin.min.js │ ├── imagetools │ │ └── plugin.min.js │ ├── importcss │ │ └── plugin.min.js │ ├── insertdatetime │ │ └── plugin.min.js │ ├── legacyoutput │ │ └── plugin.min.js │ ├── link │ │ └── plugin.min.js │ ├── lists │ │ └── plugin.min.js │ ├── media │ │ └── plugin.min.js │ ├── nonbreaking │ │ └── plugin.min.js │ ├── noneditable │ │ └── plugin.min.js │ ├── pagebreak │ │ └── plugin.min.js │ ├── paste │ │ └── plugin.min.js │ ├── preview │ │ └── plugin.min.js │ ├── print │ │ └── plugin.min.js │ ├── save │ │ └── plugin.min.js │ ├── searchreplace │ │ └── plugin.min.js │ ├── spellchecker │ │ └── plugin.min.js │ ├── tabfocus │ │ └── plugin.min.js │ ├── table │ │ └── plugin.min.js │ ├── template │ │ └── plugin.min.js │ ├── textcolor │ │ └── plugin.min.js │ ├── textpattern │ │ └── plugin.min.js │ ├── toc │ │ └── plugin.min.js │ ├── visualblocks │ │ ├── css │ │ │ └── visualblocks.css │ │ └── plugin.min.js │ ├── visualchars │ │ └── plugin.min.js │ └── wordcount │ │ └── plugin.min.js │ ├── skins │ └── lightgray │ │ ├── content.inline.min.css │ │ ├── content.min.css │ │ ├── fonts │ │ ├── tinymce-small.eot │ │ ├── tinymce-small.svg │ │ ├── tinymce-small.ttf │ │ ├── tinymce-small.woff │ │ ├── tinymce.eot │ │ ├── tinymce.svg │ │ ├── tinymce.ttf │ │ └── tinymce.woff │ │ ├── img │ │ ├── anchor.gif │ │ ├── loader.gif │ │ ├── object.gif │ │ └── trans.gif │ │ ├── skin.ie7.min.css │ │ └── skin.min.css │ ├── themes │ ├── inlite │ │ └── theme.min.js │ └── modern │ │ └── theme.min.js │ └── tinymce.min.js ├── routers ├── api.js ├── app.js └── index.js ├── server.js ├── settings.json ├── views ├── article.hbs ├── blog.hbs ├── contact.hbs ├── dashboard.hbs ├── index.hbs ├── login.hbs ├── partials │ ├── head.hbs │ └── menu.hbs ├── register.hbs └── resume.hbs └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vscode -------------------------------------------------------------------------------- /bundles/dashboard-footer.js: -------------------------------------------------------------------------------- 1 | require("./../public/js/main.js"); -------------------------------------------------------------------------------- /bundles/dashboard-head.js: -------------------------------------------------------------------------------- 1 | require("./../public/less/main.less"); 2 | require("sweetalert/dist/sweetalert.css") -------------------------------------------------------------------------------- /database/articles.js: -------------------------------------------------------------------------------- 1 | const db = require("./db"); 2 | const slug = require("speakingurl"); 3 | 4 | class _aricles { 5 | constructor(title){ 6 | if(!title) return { 7 | error : "Missing field !", 8 | code : 0 9 | } 10 | this.title = title; 11 | this.articles = function(){ 12 | return db.articles.then(articles=>{ 13 | return articles.find({url : slug(title)}).toArray() 14 | }).then(data=>{ 15 | return data && data.length > 0 ? data[0] : false; 16 | }) 17 | } 18 | } 19 | share(detail, description, keywords){ 20 | return this.articles().then(article=>{ 21 | const date = new Date(); 22 | const url = article ? slug(this.title) + "-" + Date.now() : slug(this.title); 23 | return db.articles.then(articles=>{ 24 | return articles.insert({ 25 | title : this.title, 26 | description : description, 27 | detail : detail, 28 | keywords : keywords, 29 | url : url, 30 | date : date 31 | }) 32 | }).then(status=>{ 33 | if(status.result.ok != 1 || status.result.n != 1) return { 34 | error : "We can not share this article. Try again.", 35 | code : 0 36 | } 37 | return { 38 | result : status.ops[0], 39 | code : 1 40 | } 41 | }) 42 | }) 43 | } 44 | delete(){ 45 | return this.articles().then(article=>{ 46 | if(!article) return { 47 | error : "Article not found !", 48 | code : 0 49 | } 50 | return db.articles.then(articles=>{ 51 | return articles.remove({url : this.title}); 52 | }).then(status=>{ 53 | if(status.result.ok != 1 || status.result.n != 1) return { 54 | error : "We can not share this article. Try again.", 55 | code : 0 56 | } 57 | return { 58 | result : "ok", 59 | code : 1 60 | } 61 | }) 62 | }) 63 | } 64 | find(){ 65 | return this.articles().then(article=>{ 66 | if(!article) return { 67 | error : "Article not found !", 68 | code : 0 69 | } 70 | return article 71 | }) 72 | } 73 | } 74 | 75 | exports.articles = _aricles; -------------------------------------------------------------------------------- /database/db.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const mongodb = require("mongodb"); 3 | 4 | const dbAddr = process.env.BloggerDB || "mongodb://127.0.0.1:27017/BloggerDB"; 5 | if (!dbAddr) throw new Error("BloggerDB environment variable is not set"); 6 | 7 | const db = mongodb.MongoClient.connect(dbAddr); 8 | 9 | exports.articles = db.then(db => db.collection("articles")); 10 | exports.users = db.then(db => db.collection("users")); 11 | -------------------------------------------------------------------------------- /database/index.js: -------------------------------------------------------------------------------- 1 | const db = require("./db"); 2 | const users = require("./users"); 3 | const articles = require("./articles"); 4 | 5 | 6 | exports.users = users.users; 7 | exports.articles = articles.articles; 8 | 9 | exports.db = { articles:db.articles, users:db.users }; 10 | -------------------------------------------------------------------------------- /database/users.js: -------------------------------------------------------------------------------- 1 | const db = require("./db"); 2 | const scrypt = require("scrypt"); 3 | 4 | 5 | const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; 6 | 7 | class _users { 8 | constructor(email, password){ 9 | if(!email || !emailRegex.test(email) || !password) return { 10 | error : "Missing fields !", 11 | code : 0 12 | } 13 | this.email = email; 14 | this.password = password; 15 | this.user = function(){ 16 | return db.users.then(users=>{ 17 | return users.find({email : email}).toArray() 18 | }).then(data=>{ 19 | return data && data.length > 0 ? data[0] : false; 20 | }) 21 | } 22 | } 23 | login(){ 24 | const that = this; 25 | return this.user().then(user=>{ 26 | if(!user) return { 27 | error : "User mot found!", 28 | code : 0 29 | } 30 | if(!user.admin) return { 31 | error : "User doesnt have permisson.", 32 | code : 0 33 | } 34 | if (scrypt.verifyKdfSync(new Buffer(user.password, "base64"), new Buffer(that.password))) { 35 | delete user.password; 36 | return user; 37 | } 38 | return {error : "Wrong password !", code : 0} 39 | }) 40 | } 41 | register(admin) { 42 | const that = this; 43 | return that.user().then(user=>{ 44 | if(user) return {error : "User already registered.", code : 0} 45 | const password = scrypt.kdfSync(that.password, scrypt.paramsSync(1)).toString('base64'); 46 | return db.users.then(users=>{ 47 | return users.insert({ 48 | email : that.email, 49 | password, 50 | admin : admin 51 | }).then(status=>{ 52 | if(status.result.ok != 1 || status.result.n != 1) return { 53 | error : "User can not be register.", 54 | code : 0 55 | } 56 | return status.ops[0] 57 | }) 58 | }) 59 | }) 60 | } 61 | } 62 | 63 | exports.users = _users; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-blogger", 3 | "version": "2.0.0", 4 | "description": "", 5 | "main": "server.js", 6 | "scripts": { 7 | "bundle-dashboard-head": "webpack -w --output-file ./public/bundles/dashboard-head.out.js --config ./webpack.config.js ./bundles/dashboard-head.js", 8 | "bundle-dashboard-footer": "webpack -w --output-file ./public/bundles/dashboard-footer.out.js --config ./webpack.config.js ./bundles/dashboard-footer.js" 9 | }, 10 | "author": "Muhammed Furkan AYDIN", 11 | "license": "ISC", 12 | "dependencies": { 13 | "babel-core": "^6.18.2", 14 | "babel-loader": "^6.2.7", 15 | "babel-plugin-transform-object-assign": "^6.22.0", 16 | "babel-plugin-transform-remove-strict-mode": "0.0.2", 17 | "babel-preset-es2015": "^6.18.0", 18 | "base64-font-loader": "^0.0.4", 19 | "body-parser": "^1.17.1", 20 | "connect-mongo": "^1.3.2", 21 | "cookie-parser": "^1.4.3", 22 | "express": "^4.15.2", 23 | "express-handlebars": "^3.0.0", 24 | "express-session": "^1.15.1", 25 | "graceful-fs": "^4.1.10", 26 | "less": "^2.7.1", 27 | "less-loader": "^2.2.3", 28 | "mongodb": "^2.2.24", 29 | "nodemailer": "^3.1.5", 30 | "postcss-loader": "^1.1.0", 31 | "scrypt": "^6.0.3", 32 | "speakingurl": "^13.0.0", 33 | "style-loader": "^0.13.1", 34 | "sweetalert": "^1.1.3", 35 | "tinymce": "^4.5.5", 36 | "vue": "^2.0.4", 37 | "vue-cli": "^2.8.0", 38 | "vue-loader": "^10.0.2", 39 | "vue-router": "^2.0.1", 40 | "webpack": "^1.13.3" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /public/image/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frkn-aydn/Node-Blogger/f87a7bba3a7c4a9a738d1fee5a4a9b4f29143701/public/image/cover.jpg -------------------------------------------------------------------------------- /public/js/main.js: -------------------------------------------------------------------------------- 1 | const Vue = require("vue/dist/vue.js"); 2 | const swal = require("sweetalert/dist/sweetalert.min.js"); 3 | 4 | new Vue({ 5 | el: "#app", 6 | delimiters: ['<%', '%>'], 7 | data: function () { 8 | return { 9 | menus: [{ 10 | name: "DASHBOARD", 11 | url: "/dashboard" 12 | }, 13 | { 14 | name: "LOGOUT", 15 | url: "/logout" 16 | } 17 | ], 18 | add_blog: false, 19 | blogs: true, 20 | title: "", 21 | description: "", 22 | detail: "", 23 | keywords: "", 24 | articles: [] 25 | } 26 | }, 27 | created: function () { 28 | const that = this; 29 | const ajax = new XMLHttpRequest(); 30 | ajax.open("POST", "/api/getAllArticles", true); 31 | ajax.setRequestHeader('Content-Type', 'application/json; charset=UTF-8'); 32 | ajax.onload = function () { 33 | const res = JSON.parse(ajax.response); 34 | that.articles = res 35 | } 36 | ajax.send() 37 | }, 38 | methods: { 39 | toggle() { 40 | document.querySelector(".menu-button").classList.toggle("active"); 41 | document.querySelector(".menu").classList.toggle("active"); 42 | }, 43 | openAddBlog() { 44 | this.blogs = false; 45 | this.add_blog = true; 46 | this.title = ""; 47 | this.description = ""; 48 | this.keywords = ""; 49 | tinyMCE.activeEditor.setContent('What do you thinking ?'); 50 | }, 51 | goBack() { 52 | this.blogs = true; 53 | this.add_blog = false; 54 | }, 55 | share() { 56 | const that = this; 57 | if (!this.title) return swal("Missing field!", "Please enter title for this post.", "error"); 58 | if (!tinyMCE.get('detail').getContent()) return swal("Missing field !", "Please enter detail for this post.", "error"); 59 | if (!this.description) return swal("Missing field !", "Please enter description for this post.", "error"); 60 | let ajax = new XMLHttpRequest(); 61 | ajax.open("POST", "/api/share", true); 62 | ajax.setRequestHeader('Content-Type', 'application/json; charset=UTF-8'); 63 | ajax.onload = function () { 64 | var res = JSON.parse(ajax.response); 65 | if (res.code == 0) return swal("Error !", res.error || "", "error"); 66 | that.articles.push(res.data); 67 | swal("Success !", "Your blog post successfly saved.", "success") 68 | } 69 | ajax.send(JSON.stringify({ 70 | title: this.title, 71 | detail: tinyMCE.get('detail').getContent(), 72 | description: this.description, 73 | keywords: this.keywords 74 | })) 75 | }, 76 | deleteBlog(url) { 77 | const that = this; 78 | const uri = url; 79 | swal({ 80 | title: "Are you sure?", 81 | text: "You will not be able to recover this blog post!", 82 | type: "warning", 83 | showCancelButton: true, 84 | confirmButtonColor: "#DD6B55", 85 | confirmButtonText: "Yes, delete it!", 86 | closeOnConfirm: false 87 | }, 88 | function () { 89 | const ajax = new XMLHttpRequest(); 90 | ajax.open("POST", "/api/delete", true); 91 | ajax.setRequestHeader('Content-Type', 'application/json; charset=UTF-8'); 92 | ajax.onload = function () { 93 | const res = JSON.parse(ajax.response); 94 | if (res.code == 0) return swal("Error !", res.error || "", "error"); 95 | that.articles = that.articles.filter(function (el) { 96 | return el.url != uri; 97 | }); 98 | swal("Deleted!", "Your blog post has been deleted.", "success"); 99 | } 100 | ajax.send(JSON.stringify({ 101 | url: url 102 | })) 103 | }); 104 | } 105 | } 106 | }) -------------------------------------------------------------------------------- /public/less/add_blog.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | .add_blog { 3 | display: none; 4 | flex-direction: column; 5 | min-width: 100%; 6 | min-height: 100%; 7 | box-sizing: border-box; 8 | position: relative; 9 | flex-wrap: wrap; 10 | padding-top: 40px; 11 | opacity: 0; 12 | transition: all 0.4s; 13 | &.active { 14 | display: flex; 15 | opacity: 1; 16 | } 17 | .goBack { 18 | position: absolute; 19 | width: 40px; 20 | height: 40px; 21 | top: -26px; 22 | left: -7px; 23 | cursor: pointer; 24 | transition: all .5s; 25 | z-index: 999; 26 | svg { 27 | width: 40px; 28 | height: 40px; 29 | } 30 | } 31 | .blog-adder { 32 | display: flex; 33 | flex-direction: column; 34 | input { 35 | margin-bottom: 15px; 36 | } 37 | textarea { 38 | margin-bottom: 15px; 39 | } 40 | #description { 41 | margin-top: 15px; 42 | } 43 | #share { 44 | margin-top: 25px; 45 | align-self: flex-end; 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /public/less/article.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | .article { 3 | display: flex; 4 | flex-direction: column; 5 | min-width: 100%; 6 | min-height: 100%; 7 | padding: 50px; 8 | box-sizing: border-box; 9 | position: relative; 10 | flex-wrap: wrap; 11 | a { 12 | text-decoration: none; 13 | color: rgba(0, 0, 0, .7); 14 | transition: all 0.5s; 15 | &:hover { 16 | color: #202020; 17 | } 18 | } 19 | .header { 20 | display: flex; 21 | flex-direction: row; 22 | align-items: center; 23 | border-bottom: 1px solid rgba(0, 0, 0, .7); 24 | flex-wrap: wrap; 25 | h1 { 26 | font-size: 1.7em; 27 | margin-right: 15px; 28 | } 29 | span { 30 | font-style: italic; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /public/less/blog.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | .blog { 3 | display: flex; 4 | flex-direction: column; 5 | align-items: center; 6 | min-width: 100%; 7 | min-height: 100%; 8 | padding: 50px; 9 | box-sizing: border-box; 10 | position: relative; 11 | flex-wrap: wrap; 12 | .blog-item { 13 | display: flex; 14 | flex-direction: column; 15 | text-decoration: none; 16 | color: rgba(0, 0, 0, .7); 17 | transition: all 0.5s; 18 | &:hover{ 19 | color: #202020; 20 | } 21 | } 22 | .pagination { 23 | display: flex; 24 | flex-direction: row; 25 | padding: 20px; 26 | margin-bottom: 20px; 27 | position: absolute; 28 | bottom: 0; 29 | box-sizing: border-box; 30 | .page { 31 | display: inline-block; 32 | padding: 12px 12px; 33 | margin-right: 4px; 34 | border-radius: 3px; 35 | border: solid 1px #c0c0c0; 36 | background: #e9e9e9; 37 | box-shadow: inset 0px 1px 0px rgba(255, 255, 255, .8), 0px 1px 3px rgba(0, 0, 0, .1); 38 | font-size: .875em; 39 | font-weight: bold; 40 | text-decoration: none; 41 | color: #717171; 42 | text-shadow: 0px 1px 0px rgba(255, 255, 255, 1); 43 | box-sizing: border-box; 44 | &:hover { 45 | background: #fefefe; 46 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FEFEFE), to(#f0f0f0)); 47 | background: -moz-linear-gradient(0% 0% 270deg, #FEFEFE, #f0f0f0); 48 | } 49 | &.active { 50 | border: none; 51 | background: #616161; 52 | box-shadow: inset 0px 0px 8px rgba(0, 0, 0, .5), 0px 1px 0px rgba(255, 255, 255, .8); 53 | color: #f0f0f0; 54 | text-shadow: 0px 0px 3px rgba(0, 0, 0, .5); 55 | } 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /public/less/contact.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | 3 | .contact{ 4 | display: flex; 5 | flex-direction: column; 6 | justify-content: center; 7 | align-items: center; 8 | min-width: 100%; 9 | min-height: 100%; 10 | padding: 50px; 11 | box-sizing: border-box; 12 | position: relative; 13 | flex-wrap: wrap; 14 | input{ 15 | margin-bottom: 15px; 16 | } 17 | .footer{ 18 | display: flex; 19 | flex-direction: row; 20 | justify-content: flex-end; 21 | width: 100%; 22 | margin-top: 25px; 23 | } 24 | } -------------------------------------------------------------------------------- /public/less/dashboard-menu.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | .dashboard-menu { 3 | position: relative; 4 | min-width: 50%; 5 | max-width: 50%; 6 | min-height: 100vh; 7 | max-height: 100vh; 8 | top: 0; 9 | background-color: #fff; 10 | display: flex; 11 | flex-direction: column; 12 | justify-content: center; 13 | align-items: center; 14 | transition: all 0.3s; 15 | &.active { 16 | z-index: 10; 17 | opacity: 1; 18 | } 19 | ul { 20 | display: flex; 21 | align-content: center; 22 | justify-content: center; 23 | flex-direction: column; 24 | margin: 0; 25 | padding: 0; 26 | width: 100%; 27 | height: 100%; 28 | list-style: none; 29 | margin: 4em auto; 30 | text-align: center; 31 | li { 32 | &.active { 33 | a { 34 | color: #202020 !important; 35 | } 36 | } 37 | a { 38 | line-height: 22px; 39 | font-size: 22px; 40 | letter-spacing: 2px; 41 | font-weight: 600; 42 | display: block; 43 | color: #898989; 44 | text-decoration: none; 45 | -webkit-transition: all .3s ease; 46 | -moz-transition: all .3s ease; 47 | transition: all .3s ease; 48 | padding: 10px 0; 49 | &:hover { 50 | color: #202020; 51 | } 52 | } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /public/less/dashboard.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | .dashboard { 3 | display: flex; 4 | flex-direction: column; 5 | min-width: 100%; 6 | min-height: 100%; 7 | padding: 50px; 8 | box-sizing: border-box; 9 | position: relative; 10 | flex-wrap: wrap; 11 | .noContent { 12 | text-align: center; 13 | align-items: center; 14 | justify-content: center; 15 | } 16 | } -------------------------------------------------------------------------------- /public/less/inputs.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | .material-form-field-input { 3 | padding: 0.5em 0; 4 | font-size: 1.2em; 5 | color: inherit; 6 | font-family: inherit; 7 | width: 100%; 8 | background: transparent; 9 | border-width: 0 0 1px 0; 10 | -webkit-transition: 0.4s ease border-color; 11 | transition: 0.4s ease border-color; 12 | } 13 | 14 | .material-form-field-input::-webkit-input-placeholder { 15 | color: #202020; 16 | } 17 | 18 | .material-form-field-input:focus:valid, 19 | .material-form-field-input:focus:invalid { 20 | border-bottom-width: 2px; 21 | } 22 | 23 | .material-form-field-input:focus:valid { 24 | border-color: rgba(0, 0, 0, 0.7); 25 | } 26 | 27 | .material-form-field-input:focus:invalid { 28 | border-color: #f00; 29 | } 30 | 31 | .material-form-field-input:focus::-webkit-input-placeholder, 32 | .material-form-field-input[value]::-webkit-input-placeholder, 33 | .material-form-field-input:valid::-webkit-input-placeholder { 34 | color: rgba(0, 0, 0, 0.7); 35 | } 36 | 37 | .material-form-field-input:focus+.material-form-field-label, 38 | .material-form-field-input[value]+.material-form-field-label, 39 | .material-form-field-input:valid+.material-form-field-label { 40 | -webkit-transform: translateY(-1.1em); 41 | transform: translateY(-1.1em); 42 | } 43 | 44 | .material-form-field-input+.material-form-field-label { 45 | -webkit-transition: 0.4s ease all; 46 | transition: 0.4s ease all; 47 | cursor: pointer; 48 | -webkit-transform: translateY(0); 49 | transform: translateY(0); 50 | font-size: 1.5em; 51 | left: 0; 52 | top: 0.55em; 53 | position: absolute; 54 | color: rgba(0, 0, 0, 0.7); 55 | } 56 | 57 | .material-form-field-input:focus { 58 | outline: none; 59 | } 60 | 61 | .btn { 62 | min-width: 150px; 63 | position: relative; 64 | padding-left: 66px; 65 | border: 1px solid #a6a9ac; 66 | border-radius: 30px; 67 | padding: 10px 34px; 68 | background: #ffffff; 69 | color: #a6a9ac; 70 | transition: all .2s ease-in-out; 71 | display: inline-block; 72 | font-weight: normal; 73 | line-height: 1.25; 74 | text-align: center; 75 | white-space: nowrap; 76 | vertical-align: middle; 77 | cursor: pointer; 78 | user-select: none; 79 | font-size: 1rem; 80 | &:hover { 81 | background: #212121; 82 | border-color: #212121; 83 | color: #ffffff; 84 | text-decoration: none; 85 | } 86 | } -------------------------------------------------------------------------------- /public/less/layout.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | @media only screen and (min-width: 728px) { 3 | .wrapper { 4 | position: relative; 5 | display: flex; 6 | flex-direction: row; 7 | min-width: 100vw; 8 | min-height: 100vh; 9 | max-width: 100vw; 10 | max-height: 100vh; 11 | } 12 | .cover { 13 | min-width: 50vw; 14 | min-height: 100vh; 15 | max-width: 50vw; 16 | max-height: 100vh; 17 | background-repeat: no-repeat; 18 | background-size: cover; 19 | background-position: center top; 20 | box-sizing: border-box; 21 | position: relative; 22 | background-color: #fff; 23 | &.dashboard-area { 24 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); 25 | display: flex; 26 | justify-content: center; 27 | align-items: center; 28 | } 29 | &.register-area{ 30 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); 31 | display: flex; 32 | justify-content: center; 33 | flex-direction: column; 34 | align-items: center; 35 | } 36 | } 37 | .content { 38 | min-width: 50vw; 39 | min-height: 100vh; 40 | max-width: 50vw; 41 | max-height: 100vh; 42 | overflow: auto; 43 | box-sizing: border-box; 44 | position: relative; 45 | &.dashboard-area { 46 | .menu-button { 47 | display: none; 48 | } 49 | .menu { 50 | display: none; 51 | } 52 | } 53 | } 54 | } 55 | 56 | @media only screen and (max-width: 728px) { 57 | .wrapper { 58 | display: flex; 59 | flex-direction: row; 60 | min-width: 100vw; 61 | min-height: 100vh; 62 | max-width: 100vw; 63 | max-height: 100vh; 64 | } 65 | .cover { 66 | display: none; 67 | min-width: 50vw; 68 | min-height: 100vh; 69 | max-width: 50vw; 70 | max-height: 100vh; 71 | background-repeat: no-repeat; 72 | background-size: cover; 73 | background-position: center top; 74 | } 75 | .content { 76 | min-width: 100vw; 77 | min-height: 100vh; 78 | max-width: 100vw; 79 | max-height: 100vh; 80 | overflow: auto; 81 | } 82 | .menu { 83 | min-width: 100% !important; 84 | max-width: 100% !important; 85 | } 86 | } -------------------------------------------------------------------------------- /public/less/main.less: -------------------------------------------------------------------------------- 1 | //out:../css/main.css, compress:true 2 | /*! 3 | * === MAHAMMED FURKAN AYDIN === 4 | */ 5 | 6 | @import (once) "normalize"; 7 | @import (once) "layout"; 8 | @import (once) "personal-info"; 9 | @import (once) "menu"; 10 | @import (once) "resume"; 11 | @import (once) "blog"; 12 | @import (once) "article"; 13 | @import (once) "contact"; 14 | @import (once) "inputs"; 15 | @import (once) "dashboard-menu.less"; 16 | @import (once) "table"; 17 | @import (once) "dashboard"; 18 | @import (once) "add_blog"; -------------------------------------------------------------------------------- /public/less/menu.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | .menu-button { 3 | position: absolute; 4 | width: 40px; 5 | height: 40px; 6 | top: 25px; 7 | right: 25px; 8 | cursor: pointer; 9 | transition: all .5s; 10 | z-index: 999; 11 | .one, 12 | .two, 13 | .three { 14 | user-select: none; 15 | width: 100%; 16 | height: 5px; 17 | background: #898989; 18 | margin: 6px auto; 19 | backface-visibility: hidden; 20 | -moz-transition-duration: .3s; 21 | -o-transition-duration: .3s; 22 | -webkit-transition-duration: .3s; 23 | transition-duration: .3s; 24 | } 25 | &.active { 26 | .one { 27 | -moz-transform: rotate(45deg) translate(7px, 7px); 28 | -ms-transform: rotate(45deg) translate(7px, 7px); 29 | -webkit-transform: rotate(45deg) translate(7px, 7px); 30 | transform: rotate(45deg) translate(7px, 7px); 31 | } 32 | .two { 33 | opacity: 0; 34 | } 35 | .three { 36 | -moz-transform: rotate(-45deg) translate(8px, -10px); 37 | -ms-transform: rotate(-45deg) translate(8px, -10px); 38 | -webkit-transform: rotate(-45deg) translate(8px, -10px); 39 | transform: rotate(-45deg) translate(8px, -10px); 40 | } 41 | } 42 | } 43 | 44 | .menu { 45 | position: fixed; 46 | z-index: -10; 47 | min-width: 50%; 48 | max-width: 50%; 49 | min-height: 100vh; 50 | max-height: 100vh; 51 | top: 0; 52 | background-color: #fff; 53 | display: flex; 54 | flex-direction: column; 55 | justify-content: center; 56 | align-items: center; 57 | transition: all 0.3s; 58 | opacity: 0; 59 | &.active { 60 | z-index: 10; 61 | opacity: 1; 62 | } 63 | ul { 64 | display: flex; 65 | align-content: center; 66 | justify-content: center; 67 | flex-direction: column; 68 | margin: 0; 69 | padding: 0; 70 | width: 100%; 71 | height: 100%; 72 | list-style: none; 73 | margin: 4em auto; 74 | text-align: center; 75 | li { 76 | a { 77 | line-height: 22px; 78 | font-size: 22px; 79 | letter-spacing: 2px; 80 | font-weight: 600; 81 | display: block; 82 | color: #898989; 83 | text-decoration: none; 84 | -webkit-transition: all .3s ease; 85 | -moz-transition: all .3s ease; 86 | transition: all .3s ease; 87 | padding: 10px 0; 88 | &:hover { 89 | color: #202020; 90 | } 91 | } 92 | } 93 | } 94 | .footer { 95 | display: flex; 96 | justify-content: space-between; 97 | flex-direction: row; 98 | margin: 0; 99 | padding: 0; 100 | width: 100%; 101 | height: 35px; 102 | list-style: none; 103 | text-align: center; 104 | box-sizing: border-box; 105 | position: absolute; 106 | bottom: 0; 107 | padding-left: 15px; 108 | padding-right: 15px; 109 | .hire-me { 110 | display: flex; 111 | align-items: center; 112 | a { 113 | letter-spacing: 2px; 114 | font-weight: 600; 115 | color: #898989; 116 | text-decoration: none; 117 | -webkit-transition: all .3s ease; 118 | -moz-transition: all .3s ease; 119 | transition: all .3s ease; 120 | &:hover { 121 | color: #202020; 122 | } 123 | } 124 | } 125 | .social-media { 126 | display: flex; 127 | align-items: center; 128 | flex-direction: row; 129 | a { 130 | color: #898989; 131 | text-decoration: none; 132 | &:hover { 133 | svg { 134 | fill: #202020; 135 | } 136 | } 137 | svg { 138 | width: 23px; 139 | height: 23px; 140 | fill: #898989; 141 | -webkit-transition: all .3s ease; 142 | -moz-transition: all .3s ease; 143 | transition: all .3s ease; 144 | } 145 | } 146 | } 147 | } 148 | } -------------------------------------------------------------------------------- /public/less/normalize.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | 3 | // Fonts 4 | @import url('https://fonts.googleapis.com/css?family=Poppins'); 5 | 6 | /* Document 7 | ========================================================================== */ 8 | 9 | html { 10 | font-family:'Poppins',sans-serif; 11 | line-height: 1.15; /* 2 */ 12 | -ms-text-size-adjust: 100%; /* 3 */ 13 | -webkit-text-size-adjust: 100%; /* 3 */ 14 | } 15 | 16 | /* Sections 17 | ========================================================================== */ 18 | 19 | /** 20 | * Remove the margin in all browsers (opinionated). 21 | */ 22 | 23 | body { 24 | margin: 0; 25 | } 26 | 27 | /** 28 | * Add the correct display in IE 9-. 29 | */ 30 | 31 | article, 32 | aside, 33 | footer, 34 | header, 35 | nav, 36 | section { 37 | display: block; 38 | } 39 | 40 | /** 41 | * Correct the font size and margin on `h1` elements within `section` and 42 | * `article` contexts in Chrome, Firefox, and Safari. 43 | */ 44 | 45 | h1 { 46 | font-size: 2em; 47 | margin: 0.67em 0; 48 | } 49 | 50 | /* Grouping content 51 | ========================================================================== */ 52 | 53 | /** 54 | * Add the correct display in IE 9-. 55 | * 1. Add the correct display in IE. 56 | */ 57 | 58 | figcaption, 59 | figure, 60 | main { /* 1 */ 61 | display: block; 62 | } 63 | 64 | /** 65 | * Add the correct margin in IE 8. 66 | */ 67 | 68 | figure { 69 | margin: 1em 40px; 70 | } 71 | 72 | /** 73 | * 1. Add the correct box sizing in Firefox. 74 | * 2. Show the overflow in Edge and IE. 75 | */ 76 | 77 | hr { 78 | box-sizing: content-box; /* 1 */ 79 | height: 0; /* 1 */ 80 | overflow: visible; /* 2 */ 81 | } 82 | 83 | /** 84 | * 1. Correct the inheritance and scaling of font size in all browsers. 85 | * 2. Correct the odd `em` font sizing in all browsers. 86 | */ 87 | 88 | pre { 89 | font-family: monospace, monospace; /* 1 */ 90 | font-size: 1em; /* 2 */ 91 | } 92 | 93 | /* Text-level semantics 94 | ========================================================================== */ 95 | 96 | /** 97 | * 1. Remove the gray background on active links in IE 10. 98 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 99 | */ 100 | 101 | a { 102 | background-color: transparent; /* 1 */ 103 | -webkit-text-decoration-skip: objects; /* 2 */ 104 | } 105 | 106 | /** 107 | * Remove the outline on focused links when they are also active or hovered 108 | * in all browsers (opinionated). 109 | */ 110 | 111 | a:active, 112 | a:hover { 113 | outline-width: 0; 114 | } 115 | 116 | /** 117 | * 1. Remove the bottom border in Firefox 39-. 118 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 119 | */ 120 | 121 | abbr[title] { 122 | border-bottom: none; /* 1 */ 123 | text-decoration: underline; /* 2 */ 124 | text-decoration: underline dotted; /* 2 */ 125 | } 126 | 127 | /** 128 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 129 | */ 130 | 131 | b, 132 | strong { 133 | font-weight: inherit; 134 | } 135 | 136 | /** 137 | * Add the correct font weight in Chrome, Edge, and Safari. 138 | */ 139 | 140 | b, 141 | strong { 142 | font-weight: bolder; 143 | } 144 | 145 | /** 146 | * 1. Correct the inheritance and scaling of font size in all browsers. 147 | * 2. Correct the odd `em` font sizing in all browsers. 148 | */ 149 | 150 | code, 151 | kbd, 152 | samp { 153 | font-family: monospace, monospace; /* 1 */ 154 | font-size: 1em; /* 2 */ 155 | } 156 | 157 | /** 158 | * Add the correct font style in Android 4.3-. 159 | */ 160 | 161 | dfn { 162 | font-style: italic; 163 | } 164 | 165 | /** 166 | * Add the correct background and color in IE 9-. 167 | */ 168 | 169 | mark { 170 | background-color: #ff0; 171 | color: #000; 172 | } 173 | 174 | /** 175 | * Add the correct font size in all browsers. 176 | */ 177 | 178 | small { 179 | font-size: 80%; 180 | } 181 | 182 | /** 183 | * Prevent `sub` and `sup` elements from affecting the line height in 184 | * all browsers. 185 | */ 186 | 187 | sub, 188 | sup { 189 | font-size: 75%; 190 | line-height: 0; 191 | position: relative; 192 | vertical-align: baseline; 193 | } 194 | 195 | sub { 196 | bottom: -0.25em; 197 | } 198 | 199 | sup { 200 | top: -0.5em; 201 | } 202 | 203 | /* Embedded content 204 | ========================================================================== */ 205 | 206 | /** 207 | * Add the correct display in IE 9-. 208 | */ 209 | 210 | audio, 211 | video { 212 | display: inline-block; 213 | } 214 | 215 | /** 216 | * Add the correct display in iOS 4-7. 217 | */ 218 | 219 | audio:not([controls]) { 220 | display: none; 221 | height: 0; 222 | } 223 | 224 | /** 225 | * Remove the border on images inside links in IE 10-. 226 | */ 227 | 228 | img { 229 | border-style: none; 230 | } 231 | 232 | /** 233 | * Hide the overflow in IE. 234 | */ 235 | 236 | svg:not(:root) { 237 | overflow: hidden; 238 | } 239 | 240 | /* Forms 241 | ========================================================================== */ 242 | 243 | /** 244 | * 1. Change the font styles in all browsers (opinionated). 245 | * 2. Remove the margin in Firefox and Safari. 246 | */ 247 | 248 | button, 249 | input, 250 | optgroup, 251 | select, 252 | textarea { 253 | font-family: sans-serif; /* 1 */ 254 | font-size: 100%; /* 1 */ 255 | line-height: 1.15; /* 1 */ 256 | margin: 0; /* 2 */ 257 | } 258 | 259 | /** 260 | * Show the overflow in IE. 261 | * 1. Show the overflow in Edge. 262 | */ 263 | 264 | button, 265 | input { /* 1 */ 266 | overflow: visible; 267 | } 268 | 269 | /** 270 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 271 | * 1. Remove the inheritance of text transform in Firefox. 272 | */ 273 | 274 | button, 275 | select { /* 1 */ 276 | text-transform: none; 277 | } 278 | 279 | /** 280 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 281 | * controls in Android 4. 282 | * 2. Correct the inability to style clickable types in iOS and Safari. 283 | */ 284 | 285 | button, 286 | html [type="button"], /* 1 */ 287 | [type="reset"], 288 | [type="submit"] { 289 | -webkit-appearance: button; /* 2 */ 290 | } 291 | 292 | /** 293 | * Remove the inner border and padding in Firefox. 294 | */ 295 | 296 | button::-moz-focus-inner, 297 | [type="button"]::-moz-focus-inner, 298 | [type="reset"]::-moz-focus-inner, 299 | [type="submit"]::-moz-focus-inner { 300 | border-style: none; 301 | padding: 0; 302 | } 303 | 304 | /** 305 | * Restore the focus styles unset by the previous rule. 306 | */ 307 | 308 | button:-moz-focusring, 309 | [type="button"]:-moz-focusring, 310 | [type="reset"]:-moz-focusring, 311 | [type="submit"]:-moz-focusring { 312 | outline: 1px dotted ButtonText; 313 | } 314 | 315 | /** 316 | * Change the border, margin, and padding in all browsers (opinionated). 317 | */ 318 | 319 | fieldset { 320 | border: 1px solid #c0c0c0; 321 | margin: 0 2px; 322 | padding: 0.35em 0.625em 0.75em; 323 | } 324 | 325 | /** 326 | * 1. Correct the text wrapping in Edge and IE. 327 | * 2. Correct the color inheritance from `fieldset` elements in IE. 328 | * 3. Remove the padding so developers are not caught out when they zero out 329 | * `fieldset` elements in all browsers. 330 | */ 331 | 332 | legend { 333 | box-sizing: border-box; /* 1 */ 334 | color: inherit; /* 2 */ 335 | display: table; /* 1 */ 336 | max-width: 100%; /* 1 */ 337 | padding: 0; /* 3 */ 338 | white-space: normal; /* 1 */ 339 | } 340 | 341 | /** 342 | * 1. Add the correct display in IE 9-. 343 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 344 | */ 345 | 346 | progress { 347 | display: inline-block; /* 1 */ 348 | vertical-align: baseline; /* 2 */ 349 | } 350 | 351 | /** 352 | * Remove the default vertical scrollbar in IE. 353 | */ 354 | 355 | textarea { 356 | overflow: auto; 357 | } 358 | 359 | /** 360 | * 1. Add the correct box sizing in IE 10-. 361 | * 2. Remove the padding in IE 10-. 362 | */ 363 | 364 | [type="checkbox"], 365 | [type="radio"] { 366 | box-sizing: border-box; /* 1 */ 367 | padding: 0; /* 2 */ 368 | } 369 | 370 | /** 371 | * Correct the cursor style of increment and decrement buttons in Chrome. 372 | */ 373 | 374 | [type="number"]::-webkit-inner-spin-button, 375 | [type="number"]::-webkit-outer-spin-button { 376 | height: auto; 377 | } 378 | 379 | /** 380 | * 1. Correct the odd appearance in Chrome and Safari. 381 | * 2. Correct the outline style in Safari. 382 | */ 383 | 384 | [type="search"] { 385 | -webkit-appearance: textfield; /* 1 */ 386 | outline-offset: -2px; /* 2 */ 387 | } 388 | 389 | /** 390 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 391 | */ 392 | 393 | [type="search"]::-webkit-search-cancel-button, 394 | [type="search"]::-webkit-search-decoration { 395 | -webkit-appearance: none; 396 | } 397 | 398 | /** 399 | * 1. Correct the inability to style clickable types in iOS and Safari. 400 | * 2. Change font properties to `inherit` in Safari. 401 | */ 402 | 403 | ::-webkit-file-upload-button { 404 | -webkit-appearance: button; /* 1 */ 405 | font: inherit; /* 2 */ 406 | } 407 | 408 | /* Interactive 409 | ========================================================================== */ 410 | 411 | /* 412 | * Add the correct display in IE 9-. 413 | * 1. Add the correct display in Edge, IE, and Firefox. 414 | */ 415 | 416 | details, /* 1 */ 417 | menu { 418 | display: block; 419 | } 420 | 421 | /* 422 | * Add the correct display in all browsers. 423 | */ 424 | 425 | summary { 426 | display: list-item; 427 | } 428 | 429 | /* Scripting 430 | ========================================================================== */ 431 | 432 | /** 433 | * Add the correct display in IE 9-. 434 | */ 435 | 436 | canvas { 437 | display: inline-block; 438 | } 439 | 440 | /** 441 | * Add the correct display in IE. 442 | */ 443 | 444 | template { 445 | display: none; 446 | } 447 | 448 | /* Hidden 449 | ========================================================================== */ 450 | 451 | /** 452 | * Add the correct display in IE 10-. 453 | */ 454 | 455 | [hidden] { 456 | display: none; 457 | } -------------------------------------------------------------------------------- /public/less/personal-info.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | 3 | .personal-info{ 4 | display: flex; 5 | flex-direction: column; 6 | justify-content: center; 7 | align-items: center; 8 | min-width: 100%; 9 | min-height: 100%; 10 | padding: 50px; 11 | box-sizing: border-box; 12 | text-align: center; 13 | position: relative; 14 | } -------------------------------------------------------------------------------- /public/less/resume.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | .resume { 3 | display: flex; 4 | flex-direction: column; 5 | min-width: 100%; 6 | min-height: 100%; 7 | padding: 50px; 8 | box-sizing: border-box; 9 | position: relative; 10 | flex-wrap: wrap; 11 | .info { 12 | display: flex; 13 | justify-content: space-between; 14 | align-items: center; 15 | margin-top: 10px; 16 | box-sizing: border-box; 17 | flex-wrap: wrap; 18 | svg { 19 | padding-right: 10px; 20 | } 21 | a { 22 | display: flex; 23 | flex-direction: row; 24 | justify-content: center; 25 | align-items: center; 26 | text-decoration: none; 27 | color: #202020; 28 | } 29 | } 30 | .liner { 31 | margin-top: 15px; 32 | padding-bottom: 5px; 33 | margin-bottom: 5px; 34 | border-bottom: 1px solid #202020; 35 | box-sizing: border-box; 36 | } 37 | .qualification { 38 | display: flex; 39 | flex-direction: row; 40 | box-sizing: border-box; 41 | flex-wrap: wrap; 42 | ul { 43 | flex-grow: 1; 44 | } 45 | } 46 | .experience { 47 | display: flex; 48 | flex-direction: column; 49 | box-sizing: border-box; 50 | 51 | .experience-item { 52 | display: flex; 53 | flex-direction: column; 54 | 55 | .experience-header { 56 | display: flex; 57 | flex-direction: row; 58 | align-items: center; 59 | h1 { 60 | font-size: 1.3em; 61 | margin-right: 15px; 62 | } 63 | span { 64 | font-size: 0.9em; 65 | font-style: italic; 66 | } 67 | } 68 | .experience-body { 69 | display: flex; 70 | flex-direction: column; 71 | flex-wrap: wrap; 72 | .explanation { 73 | flex-grow: 1; 74 | } 75 | .responsibilities { 76 | flex-grow: 1; 77 | } 78 | } 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /public/less/table.less: -------------------------------------------------------------------------------- 1 | //main:./main.less 2 | table { 3 | text-align: left; 4 | line-height: 40px; 5 | border-collapse: separate; 6 | border-spacing: 0; 7 | width: 100%; 8 | margin: 50px auto; 9 | border-radius: .25rem; 10 | } 11 | 12 | thead tr:first-child { 13 | background: #000; 14 | color: #fff; 15 | border: none; 16 | } 17 | 18 | th:first-child, 19 | td:first-child { 20 | padding: 0 15px 0 20px; 21 | } 22 | 23 | .adder { 24 | display: flex; 25 | flex-direction: row; 26 | justify-content: flex-end; 27 | align-items: center; 28 | padding-right: 9px; 29 | svg { 30 | width: 25px; 31 | height: 25px; 32 | fill: #fff; 33 | cursor: pointer; 34 | } 35 | } 36 | 37 | thead tr:last-child th { 38 | border-bottom: 3px solid #ddd; 39 | } 40 | 41 | tbody tr:hover { 42 | background-color: rgba(0, 0, 0, .1); 43 | cursor: default; 44 | } 45 | 46 | tbody tr:last-child td { 47 | border: none; 48 | } 49 | 50 | tbody td { 51 | border-bottom: 1px solid #ddd; 52 | .buttons { 53 | display: flex; 54 | justify-content: flex-end; 55 | align-items: center; 56 | svg { 57 | width: 20px; 58 | fill: #aaa; 59 | cursor: pointer; 60 | &.edit:hover { 61 | fill: #0a79df; 62 | } 63 | &.delete:hover { 64 | fill: #dc2a2a; 65 | } 66 | } 67 | } 68 | } 69 | 70 | td:last-child { 71 | text-align: right; 72 | padding-right: 10px; 73 | } -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/jquery.tinymce.min.js: -------------------------------------------------------------------------------- 1 | !function(e){function t(){function t(e){"remove"===e&&this.each(function(e,t){var n=i(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=tinymce.get(t.id.replace(/_parent$/,""));n&&n.remove()})}function r(e){var n,r=this;if(null!=e)t.call(r),r.each(function(t,n){var r;(r=tinymce.get(n.id))&&r.setContent(e)});else if(r.length>0&&(n=tinymce.get(r[0].id)))return n.getContent()}function i(e){var t=null;return e&&e.id&&a.tinymce&&(t=tinymce.get(e.id)),t}function o(e){return!!(e&&e.length&&a.tinymce&&e.is(":tinymce"))}var s={};e.each(["text","html","val"],function(t,a){var l=s[a]=e.fn[a],u="text"===a;e.fn[a]=function(t){var a=this;if(!o(a))return l.apply(a,arguments);if(t!==n)return r.call(a.filter(":tinymce"),t),l.apply(a.not(":tinymce"),arguments),a;var s="",c=arguments;return(u?a:a.eq(0)).each(function(t,n){var r=i(n);s+=r?u?r.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):r.getContent({save:!0}):l.apply(e(n),c)}),s}}),e.each(["append","prepend"],function(t,r){var a=s[r]=e.fn[r],l="prepend"===r;e.fn[r]=function(e){var t=this;return o(t)?e!==n?("string"==typeof e&&t.filter(":tinymce").each(function(t,n){var r=i(n);r&&r.setContent(l?e+r.getContent():r.getContent()+e)}),a.apply(t.not(":tinymce"),arguments),t):void 0:a.apply(t,arguments)}}),e.each(["remove","replaceWith","replaceAll","empty"],function(n,r){var i=s[r]=e.fn[r];e.fn[r]=function(){return t.call(this,r),i.apply(this,arguments)}}),s.attr=e.fn.attr,e.fn.attr=function(t,a){var l=this,u=arguments;if(!t||"value"!==t||!o(l))return a!==n?s.attr.apply(l,u):s.attr.apply(l,u);if(a!==n)return r.call(l.filter(":tinymce"),a),s.attr.apply(l.not(":tinymce"),u),l;var c=l[0],d=i(c);return d?d.getContent({save:!0}):s.attr.apply(e(c),u)}}var n,r,i,o=[],a=window;e.fn.tinymce=function(n){function s(){var r=[],o=0;i||(t(),i=!0),d.each(function(e,t){var i,a=t.id,s=n.oninit;a||(t.id=a=tinymce.DOM.uniqueId()),tinymce.get(a)||(i=new tinymce.Editor(a,n,tinymce.EditorManager),r.push(i),i.on("init",function(){var e,t=s;d.css("visibility",""),s&&++o==r.length&&("string"==typeof t&&(e=t.indexOf(".")===-1?null:tinymce.resolve(t.replace(/\.\w+$/,"")),t=tinymce.resolve(t)),t.apply(e||tinymce,r))}))}),e.each(r,function(e,t){t.render()})}var l,u,c,d=this,f="";if(!d.length)return d;if(!n)return window.tinymce?tinymce.get(d[0].id):null;if(d.css("visibility","hidden"),a.tinymce||r||!(l=n.script_url))1===r?o.push(s):s();else{r=1,u=l.substring(0,l.lastIndexOf("/")),l.indexOf(".min")!=-1&&(f=".min"),a.tinymce=a.tinyMCEPreInit||{base:u,suffix:f},l.indexOf("gzip")!=-1&&(c=n.language||"en",l=l+(/\?/.test(l)?"&":"?")+"js=true&core=true&suffix="+escape(f)+"&themes="+escape(n.theme||"modern")+"&plugins="+escape(n.plugins||"")+"&languages="+(c||""),a.tinyMCE_GZ||(a.tinyMCE_GZ={start:function(){function t(e){tinymce.ScriptLoader.markDone(tinymce.baseURI.toAbsolute(e))}t("langs/"+c+".js"),t("themes/"+n.theme+"/theme"+f+".js"),t("themes/"+n.theme+"/langs/"+c+".js"),e.each(n.plugins.split(","),function(e,n){n&&(t("plugins/"+n+"/plugin"+f+".js"),t("plugins/"+n+"/langs/"+c+".js"))})},end:function(){}}));var p=document.createElement("script");p.type="text/javascript",p.onload=p.onreadystatechange=function(t){t=t||window.event,2===r||"load"!=t.type&&!/complete|loaded/.test(p.readyState)||(tinymce.dom.Event.domLoaded=1,r=2,n.script_loaded&&n.script_loaded(),s(),e.each(o,function(e,t){t()}))},p.src=l,document.body.appendChild(p)}return d},e.extend(e.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in window&&(t=tinymce.get(e.id),t&&t.editorManager===tinymce))}})}(jQuery); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/langs/readme.md: -------------------------------------------------------------------------------- 1 | This is where language files should be placed. 2 | 3 | Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ 4 | -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/advlist/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("advlist",function(e){function t(t){return e.$.contains(e.getBody(),t)}function n(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)&&t(e)}function r(e,t){var n=[];return t&&tinymce.each(t.split(/[ ,]/),function(e){n.push({text:e.replace(/\-/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),data:"default"==e?"":e})}),n}function i(t,n){e.undoManager.transact(function(){var r,i=e.dom,o=e.selection;if(r=i.getParent(o.getNode(),"ol,ul"),!r||r.nodeName!=t||n===!1){var a={"list-style-type":n?n:""};e.execCommand("UL"==t?"InsertUnorderedList":"InsertOrderedList",!1,a)}r=i.getParent(o.getNode(),"ol,ul"),r&&tinymce.util.Tools.each(i.select("ol,ul",r).concat([r]),function(e){e.nodeName!==t&&n!==!1&&(e=i.rename(e,t)),i.setStyle(e,"listStyleType",n?n:null),e.removeAttribute("data-mce-style")}),e.focus()})}function o(t){var n=e.dom.getStyle(e.dom.getParent(e.selection.getNode(),"ol,ul"),"listStyleType")||"";t.control.items().each(function(e){e.active(e.settings.data===n)})}var a,s,l=function(e,t){var n=e.settings.plugins?e.settings.plugins:"";return tinymce.util.Tools.inArray(n.split(/[ ,]/),t)!==-1};a=r("OL",e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),s=r("UL",e.getParam("advlist_bullet_styles","default,circle,disc,square"));var u=function(t){return function(){var r=this;e.on("NodeChange",function(e){var i=tinymce.util.Tools.grep(e.parents,n);r.active(i.length>0&&i[0].nodeName===t)})}};l(e,"lists")&&(e.addCommand("ApplyUnorderedListStyle",function(e,t){i("UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(e,t){i("OL",t["list-style-type"])}),e.addButton("numlist",{type:a.length>0?"splitbutton":"button",tooltip:"Numbered list",menu:a,onPostRender:u("OL"),onshow:o,onselect:function(e){i("OL",e.control.settings.data)},onclick:function(){i("OL",!1)}}),e.addButton("bullist",{type:s.length>0?"splitbutton":"button",tooltip:"Bullet list",onPostRender:u("UL"),menu:s,onshow:o,onselect:function(e){i("UL",e.control.settings.data)},onclick:function(){i("UL",!1)}}))}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("anchor",function(e){var t=function(e){return!e.attr("href")&&(e.attr("id")||e.attr("name"))&&!e.firstChild},n=function(e){return function(n){for(var r=0;rn&&(t=n)}return t}function i(e,t){1!=e.nodeType||e.hasChildNodes()?s.setStart(e,r(e,t)):s.setStartBefore(e)}function o(e,t){1!=e.nodeType||e.hasChildNodes()?s.setEnd(e,r(e,t)):s.setEndAfter(e)}var s,l,u,c,d,f,p,h,m,g;if("A"!=e.selection.getNode().tagName){if(s=e.selection.getRng(!0).cloneRange(),s.startOffset<5){if(h=s.endContainer.previousSibling,!h){if(!s.endContainer.firstChild||!s.endContainer.firstChild.nextSibling)return;h=s.endContainer.firstChild.nextSibling}if(m=h.length,i(h,m),o(h,m),s.endOffset<5)return;l=s.endOffset,c=h}else{if(c=s.endContainer,3!=c.nodeType&&c.firstChild){for(;3!=c.nodeType&&c.firstChild;)c=c.firstChild;3==c.nodeType&&(i(c,0),o(c,c.nodeValue.length))}l=1==s.endOffset?2:s.endOffset-1-t}u=l;do i(c,l>=2?l-2:0),o(c,l>=1?l-1:0),l-=1,g=s.toString();while(" "!=g&&""!==g&&160!=g.charCodeAt(0)&&l-2>=0&&g!=n);s.toString()==n||160==s.toString().charCodeAt(0)?(i(c,l),o(c,u),l+=1):0===s.startOffset?(i(c,0),o(c,u)):(i(c,l),o(c,u)),f=s.toString(),"."==f.charAt(f.length-1)&&o(c,u-1),f=s.toString(),p=f.match(a),p&&("www."==p[1]?p[1]="http://www.":/@$/.test(p[1])&&!/^mailto:/.test(p[1])&&(p[1]="mailto:"+p[1]),d=e.selection.getBookmark(),e.selection.setRng(s),e.execCommand("createlink",!1,p[1]+p[2]),e.settings.default_link_target&&e.dom.setAttrib(e.selection.getNode(),"target",e.settings.default_link_target),e.selection.moveToBookmark(d),e.nodeChanged())}}var o,a=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;return e.settings.autolink_pattern&&(a=e.settings.autolink_pattern),e.on("keydown",function(t){if(13==t.keyCode)return r(e)}),tinymce.Env.ie?void e.on("focus",function(){if(!o){o=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(e.on("keypress",function(n){if(41==n.keyCode)return t(e)}),void e.on("keyup",function(t){if(32==t.keyCode)return n(e)}))}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/autoresize/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autoresize",function(e){function t(){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}function n(r){var a,s,l,u,c,d,f,p,h,m,g,v,y=tinymce.DOM;if(s=e.getDoc()){if(l=s.body,u=s.documentElement,c=i.autoresize_min_height,!l||r&&"setcontent"===r.type&&r.initial||t())return void(l&&u&&(l.style.overflowY="auto",u.style.overflowY="auto"));f=e.dom.getStyle(l,"margin-top",!0),p=e.dom.getStyle(l,"margin-bottom",!0),h=e.dom.getStyle(l,"padding-top",!0),m=e.dom.getStyle(l,"padding-bottom",!0),g=e.dom.getStyle(l,"border-top-width",!0),v=e.dom.getStyle(l,"border-bottom-width",!0),d=l.offsetHeight+parseInt(f,10)+parseInt(p,10)+parseInt(h,10)+parseInt(m,10)+parseInt(g,10)+parseInt(v,10),(isNaN(d)||d<=0)&&(d=tinymce.Env.ie?l.scrollHeight:tinymce.Env.webkit&&0===l.clientHeight?0:l.offsetHeight),d>i.autoresize_min_height&&(c=d),i.autoresize_max_height&&d>i.autoresize_max_height?(c=i.autoresize_max_height,l.style.overflowY="auto",u.style.overflowY="auto"):(l.style.overflowY="hidden",u.style.overflowY="hidden",l.scrollTop=0),c!==o&&(a=c-o,y.setStyle(e.iframeElement,"height",c+"px"),o=c,tinymce.isWebKit&&a<0&&n(r))}}function r(t,i,o){tinymce.util.Delay.setEditorTimeout(e,function(){n({}),t--?r(t,i,o):o&&o()},i)}var i=e.settings,o=0;e.settings.inline||(i.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),i.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){var t,n;t=e.getParam("autoresize_overflow_padding",1),n=e.getParam("autoresize_bottom_margin",50),t!==!1&&e.dom.setStyles(e.getBody(),{paddingLeft:t,paddingRight:t}),n!==!1&&e.dom.setStyles(e.getBody(),{paddingBottom:n})}),e.on("nodechange setcontent keyup FullscreenStateChanged",n),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){r(20,100,function(){r(5,1e3)})}),e.addCommand("mceAutoResize",n))}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/autosave/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce._beforeUnloadHandler=function(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e},tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(p.getItem(c+"time"),10)||0;return!((new Date).getTime()-e>f.autosave_retention)||(r(!1),!1)}function r(t){p.removeItem(c+"draft"),p.removeItem(c+"time"),t!==!1&&e.fire("RemoveDraft")}function i(){!u()&&e.isDirty()&&(p.setItem(c+"draft",e.getContent({format:"raw",no_events:!0})),p.setItem(c+"time",(new Date).getTime()),e.fire("StoreDraft"))}function o(){n()&&(e.setContent(p.getItem(c+"draft"),{format:"raw"}),e.fire("RestoreDraft"))}function a(){d||(setInterval(function(){e.removed||i()},f.autosave_interval),d=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft RemoveDraft",function(){t.disabled(!n())}),a()}function l(){e.undoManager.beforeChange(),o(),r(),e.undoManager.add()}function u(t){var n=e.settings.forced_root_block;return t=tinymce.trim("undefined"==typeof t?e.getBody().innerHTML:t),""===t||new RegExp("^<"+n+"[^>]*>((\xa0| |[ \t]|]*>)+?|)|
$","i").test(t)}var c,d,f=e.settings,p=tinymce.util.LocalStorage;c=f.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",c=c.replace(/\{path\}/g,document.location.pathname),c=c.replace(/\{query\}/g,document.location.search),c=c.replace(/\{id\}/g,e.id),f.autosave_interval=t(f.autosave_interval,"30s"),f.autosave_retention=t(f.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:l,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:l,onPostRender:s,context:"file"}),e.settings.autosave_restore_when_empty!==!1&&(e.on("init",function(){n()&&u()&&o()}),e.on("saveContent",function(){r()})),window.onbeforeunload=tinymce._beforeUnloadHandler,this.hasDraft=n,this.storeDraft=i,this.restoreDraft=o,this.removeDraft=r,this.isEmpty=u}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/bbcode/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(e){var t=this,n=e.getParam("bbcode_dialect","punbb").toLowerCase();e.on("beforeSetContent",function(e){e.content=t["_"+n+"_bbcode2html"](e.content)}),e.on("postProcess",function(e){e.set&&(e.content=t["_"+n+"_bbcode2html"](e.content)),e.get&&(e.content=t["_"+n+"_html2bbcode"](e.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Ephox Corp",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"),t(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),t(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),t(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),t(/(.*?)<\/font>/gi,"$1"),t(//gi,"[img]$1[/img]"),t(/(.*?)<\/span>/gi,"[code]$1[/code]"),t(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),t(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),t(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),t(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),t(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),t(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),t(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),t(/<\/(strong|b)>/gi,"[/b]"),t(/<(strong|b)>/gi,"[b]"),t(/<\/(em|i)>/gi,"[/i]"),t(/<(em|i)>/gi,"[i]"),t(/<\/u>/gi,"[/u]"),t(/(.*?)<\/span>/gi,"[u]$1[/u]"),t(//gi,"[u]"),t(/]*>/gi,"[quote]"),t(/<\/blockquote>/gi,"[/quote]"),t(/
/gi,"\n"),t(//gi,"\n"),t(/
/gi,"\n"),t(/

/gi,""),t(/<\/p>/gi,"\n"),t(/ |\u00a0/gi," "),t(/"/gi,'"'),t(/</gi,"<"),t(/>/gi,">"),t(/&/gi,"&"),e},_punbb_bbcode2html:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/\n/gi,"
"),t(/\[b\]/gi,""),t(/\[\/b\]/gi,""),t(/\[i\]/gi,""),t(/\[\/i\]/gi,""),t(/\[u\]/gi,""),t(/\[\/u\]/gi,""),t(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),t(/\[url\](.*?)\[\/url\]/gi,'$1'),t(/\[img\](.*?)\[\/img\]/gi,''),t(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),t(/\[code\](.*?)\[\/code\]/gi,'$1 '),t(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),e}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}(); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/charmap/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("charmap",function(e){function t(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]}function n(e){return tinymce.util.Tools.grep(e,function(e){return l(e)&&2==e.length})}function r(e){return l(e)?[].concat(n(e)):"function"==typeof e?e():[]}function i(t){var n=e.settings;return n.charmap&&(t=r(n.charmap)),n.charmap_append?[].concat(t).concat(r(n.charmap_append)):t}function o(){return i(t())}function a(t){e.fire("insertCustomChar",{chr:t}).chr,e.execCommand("mceInsertContent",!1,t)}function s(){function t(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var n,r,i,s;n='';var l=o(),u=Math.min(l.length,25),c=Math.ceil(l.length/u);for(i=0;i",r=0;r
'+p+"
"}else n+="
"}n+="";var h={type:"container",html:n,onclick:function(e){var n=e.target;/^(TD|DIV)$/.test(n.nodeName)&&t(n).firstChild&&(a(n.getAttribute("data-chr")),e.ctrlKey||s.close())},onmouseover:function(e){var n=t(e.target);n&&n.firstChild?(s.find("#preview").text(n.firstChild.firstChild.data),s.find("#previewTitle").text(n.title)):(s.find("#preview").text(" "),s.find("#previewTitle").text(" "))}};s=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[h,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){s.close()}}]})}var l=tinymce.util.Tools.isArray;return e.addCommand("mceShowCharmap",s),e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"}),{getCharMap:o,insertChar:a}}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("code",function(e){function t(){var t=e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){e.focus(),e.undoManager.transact(function(){e.setContent(t.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}});t.find("#code").value(e.getContent({source_view:!0}))}e.addCommand("mceCodeEditor",t),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:t}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:t})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/codesample/css/prism.css: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */ 2 | /** 3 | * prism.js default theme for JavaScript, CSS and HTML 4 | * Based on dabblet (http://dabblet.com) 5 | * @author Lea Verou 6 | */ 7 | 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | color: black; 11 | text-shadow: 0 1px white; 12 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 13 | direction: ltr; 14 | text-align: left; 15 | white-space: pre; 16 | word-spacing: normal; 17 | word-break: normal; 18 | word-wrap: normal; 19 | line-height: 1.5; 20 | 21 | -moz-tab-size: 4; 22 | -o-tab-size: 4; 23 | tab-size: 4; 24 | 25 | -webkit-hyphens: none; 26 | -moz-hyphens: none; 27 | -ms-hyphens: none; 28 | hyphens: none; 29 | } 30 | 31 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, 32 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { 33 | text-shadow: none; 34 | background: #b3d4fc; 35 | } 36 | 37 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection, 38 | code[class*="language-"]::selection, code[class*="language-"] ::selection { 39 | text-shadow: none; 40 | background: #b3d4fc; 41 | } 42 | 43 | @media print { 44 | code[class*="language-"], 45 | pre[class*="language-"] { 46 | text-shadow: none; 47 | } 48 | } 49 | 50 | /* Code blocks */ 51 | pre[class*="language-"] { 52 | padding: 1em; 53 | margin: .5em 0; 54 | overflow: auto; 55 | } 56 | 57 | :not(pre) > code[class*="language-"], 58 | pre[class*="language-"] { 59 | background: #f5f2f0; 60 | } 61 | 62 | /* Inline code */ 63 | :not(pre) > code[class*="language-"] { 64 | padding: .1em; 65 | border-radius: .3em; 66 | } 67 | 68 | .token.comment, 69 | .token.prolog, 70 | .token.doctype, 71 | .token.cdata { 72 | color: slategray; 73 | } 74 | 75 | .token.punctuation { 76 | color: #999; 77 | } 78 | 79 | .namespace { 80 | opacity: .7; 81 | } 82 | 83 | .token.property, 84 | .token.tag, 85 | .token.boolean, 86 | .token.number, 87 | .token.constant, 88 | .token.symbol, 89 | .token.deleted { 90 | color: #905; 91 | } 92 | 93 | .token.selector, 94 | .token.attr-name, 95 | .token.string, 96 | .token.char, 97 | .token.builtin, 98 | .token.inserted { 99 | color: #690; 100 | } 101 | 102 | .token.operator, 103 | .token.entity, 104 | .token.url, 105 | .language-css .token.string, 106 | .style .token.string { 107 | color: #a67f59; 108 | background: hsla(0, 0%, 100%, .5); 109 | } 110 | 111 | .token.atrule, 112 | .token.attr-value, 113 | .token.keyword { 114 | color: #07a; 115 | } 116 | 117 | .token.function { 118 | color: #DD4A68; 119 | } 120 | 121 | .token.regex, 122 | .token.important, 123 | .token.variable { 124 | color: #e90; 125 | } 126 | 127 | .token.important, 128 | .token.bold { 129 | font-weight: bold; 130 | } 131 | .token.italic { 132 | font-style: italic; 133 | } 134 | 135 | .token.entity { 136 | cursor: help; 137 | } 138 | 139 | -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("colorpicker",function(e){function t(t,n){function r(e){var t=new tinymce.util.Color(e),n=t.toRgb();o.fromJSON({r:n.r,g:n.g,b:n.b,hex:t.toHex().substr(1)}),i(t.toHex())}function i(e){o.find("#preview")[0].getEl().style.background=e}var o=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:n,onchange:function(){var e=this.rgb();o&&(o.find("#r").value(e.r),o.find("#g").value(e.g),o.find("#b").value(e.b),o.find("#hex").value(this.value().substr(1)),i(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,t,n=o.find("colorpicker")[0];return e=this.name(),t=this.value(),"hex"==e?(t="#"+t,r(t),void n.value(t)):(t={r:o.find("#r").value(),g:o.find("#g").value(),b:o.find("#b").value()},n.value(t),void r(t))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){t("#"+this.toJSON().hex)}});r(n)}e.settings.color_picker_callback||(e.settings.color_picker_callback=t)}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/contextmenu/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("contextmenu",function(e){var t,n,r=e.settings.contextmenu_never_use_native,i=function(e){return e.ctrlKey&&!r},o=function(){return tinymce.Env.mac&&tinymce.Env.webkit},a=function(){return n===!0};return e.on("mousedown",function(t){o()&&2===t.button&&!i(t)&&e.selection.isCollapsed()&&e.once("contextmenu",function(t){e.selection.placeCaretAt(t.clientX,t.clientY)})}),e.on("contextmenu",function(r){var o;if(!i(r)){if(r.preventDefault(),o=e.settings.contextmenu||"link openlink image inserttable | cell row column deletetable",t)t.show();else{var a=[];tinymce.each(o.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"==t&&(n={text:t}),n&&(n.shortcut="",a.push(n))});for(var s=0;s'}),e+=""}),e+=""}var r=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];e.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:n,onclick:function(t){var n=e.dom.getParent(t.target,"a");n&&(e.insertContent(''+n.getAttribute('),this.hide())}},tooltip:"Emoticons"})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/example/dialog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Custom dialog

5 | Input some text: 6 | 7 | 8 | -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/example/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("example",function(e,t){e.addButton("example",{text:"My button",icon:!1,onclick:function(){e.windowManager.open({title:"Example plugin",body:[{type:"textbox",name:"title",label:"Title"}],onsubmit:function(t){e.insertContent("Title: "+t.data.title)}})}}),e.addMenuItem("example",{text:"Example plugin",context:"tools",onclick:function(){e.windowManager.open({title:"TinyMCE site",url:t+"/dialog.html",width:600,height:400,buttons:[{text:"Insert",onclick:function(){var t=e.windowManager.getWindows()[0];e.insertContent(t.getContentWindow().document.getElementById("content").value),t.close()}},{text:"Close",onclick:"close"}]})}})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/example_dependency/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("example_dependency",function(){},["example"]); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/fullpage/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("fullpage",function(e){function t(){var t=n();e.windowManager.open({title:"Document properties",data:t,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(e){r(tinymce.extend(t,e.data))}})}function n(){function t(e,t){var n=e.attr(t);return n||""}var n,r,o=i(),a={};return a.fontface=e.getParam("fullpage_default_fontface",""),a.fontsize=e.getParam("fullpage_default_fontsize",""),n=o.firstChild,7==n.type&&(a.xml_pi=!0,r=/encoding="([^"]+)"/.exec(n.value),r&&(a.docencoding=r[1])),n=o.getAll("#doctype")[0],n&&(a.doctype=""),n=o.getAll("title")[0],n&&n.firstChild&&(a.title=n.firstChild.value),c(o.getAll("meta"),function(e){var t,n=e.attr("name"),r=e.attr("http-equiv");n?a[n.toLowerCase()]=e.attr("content"):"Content-Type"==r&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")),t&&(a.docencoding=t[1]))}),n=o.getAll("html")[0],n&&(a.langcode=t(n,"lang")||t(n,"xml:lang")),a.stylesheets=[],tinymce.each(o.getAll("link"),function(e){"stylesheet"==e.attr("rel")&&a.stylesheets.push(e.attr("href"))}),n=o.getAll("body")[0],n&&(a.langdir=t(n,"dir"),a.style=t(n,"style"),a.visited_color=t(n,"vlink"),a.link_color=t(n,"link"),a.active_color=t(n,"alink")),a}function r(t){function n(e,t,n){e.attr(t,n?n:void 0)}function r(e){a.firstChild?a.insert(e,a.firstChild):a.append(e)}var o,a,s,u,f,p=e.dom;o=i(),a=o.getAll("head")[0],a||(u=o.getAll("html")[0],a=new d("head",1),u.firstChild?u.insert(a,u.firstChild,!0):u.append(a)),u=o.firstChild,t.xml_pi?(f='version="1.0"',t.docencoding&&(f+=' encoding="'+t.docencoding+'"'),7!=u.type&&(u=new d("xml",7),o.insert(u,o.firstChild,!0)),u.value=f):u&&7==u.type&&u.remove(),u=o.getAll("#doctype")[0],t.doctype?(u||(u=new d("#doctype",10),t.xml_pi?o.insert(u,o.firstChild):r(u)),u.value=t.doctype.substring(9,t.doctype.length-1)):u&&u.remove(),u=null,c(o.getAll("meta"),function(e){"Content-Type"==e.attr("http-equiv")&&(u=e)}),t.docencoding?(u||(u=new d("meta",1),u.attr("http-equiv","Content-Type"),u.shortEnded=!0,r(u)),u.attr("content","text/html; charset="+t.docencoding)):u&&u.remove(),u=o.getAll("title")[0],t.title?(u?u.empty():(u=new d("title",1),r(u)),u.append(new d("#text",3)).value=t.title):u&&u.remove(),c("keywords,description,author,copyright,robots".split(","),function(e){var n,i,a=o.getAll("meta"),s=t[e];for(n=0;n"))}function i(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(l)}function o(t){function n(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})}var r,o,s,d,f=t.content,p="",h=e.dom;if(!t.selection&&!("raw"==t.format&&l||t.source_view&&e.getParam("fullpage_hide_in_source_view"))){0!==f.length||t.source_view||(f=tinymce.trim(l)+"\n"+tinymce.trim(f)+"\n"+tinymce.trim(u)),f=f.replace(/<(\/?)BODY/gi,"<$1body"),r=f.indexOf("",r),l=n(f.substring(0,r+1)),o=f.indexOf("\n"),s=i(),c(s.getAll("style"),function(e){e.firstChild&&(p+=e.firstChild.value)}),d=s.getAll("body")[0],d&&h.setAttribs(e.getBody(),{style:d.attr("style")||"",dir:d.attr("dir")||"",vLink:d.attr("vlink")||"",link:d.attr("link")||"",aLink:d.attr("alink")||""}),h.remove("fullpage_styles");var m=e.getDoc().getElementsByTagName("head")[0];p&&(h.add(m,"style",{id:"fullpage_styles"},p),d=h.get("fullpage_styles"),d.styleSheet&&(d.styleSheet.cssText=p));var g={};tinymce.each(m.getElementsByTagName("link"),function(e){"stylesheet"==e.rel&&e.getAttribute("data-mce-fullpage")&&(g[e.href]=e)}),tinymce.each(s.getAll("link"),function(e){var t=e.attr("href");return!t||(g[t]||"stylesheet"!=e.attr("rel")||h.add(m,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),void delete g[t])}),tinymce.each(g,function(e){e.parentNode.removeChild(e)})}}function a(){var t,n="",r="";return e.getParam("fullpage_default_xml_pi")&&(n+='\n'),n+=e.getParam("fullpage_default_doctype",""),n+="\n\n\n",(t=e.getParam("fullpage_default_title"))&&(n+=""+t+"\n"),(t=e.getParam("fullpage_default_encoding"))&&(n+='\n'),(t=e.getParam("fullpage_default_font_family"))&&(r+="font-family: "+t+";"),(t=e.getParam("fullpage_default_font_size"))&&(r+="font-size: "+t+";"),(t=e.getParam("fullpage_default_text_color"))&&(r+="color: "+t+";"),n+="\n\n"}function s(t){t.selection||t.source_view&&e.getParam("fullpage_hide_in_source_view")||(t.content=tinymce.trim(l)+"\n"+tinymce.trim(t.content)+"\n"+tinymce.trim(u))}var l,u,c=tinymce.each,d=tinymce.html.Node;e.addCommand("mceFullPageProperties",t),e.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),e.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),e.on("BeforeSetContent",o),e.on("GetContent",s)}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/fullscreen/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,r=document,i=r.body;return i.offsetWidth&&(e=i.offsetWidth,t=i.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){var e=tinymce.DOM.getViewPort();return{x:e.x,y:e.y}}function r(e){scrollTo(e.x,e.y)}function i(){function i(){f.setStyle(m,"height",t().h-(h.clientHeight-m.clientHeight))}var p,h,m,g,v=document.body,y=document.documentElement;d=!d,h=e.getContainer(),p=h.style,m=e.getContentAreaContainer().firstChild,g=m.style,d?(c=n(),o=g.width,a=g.height,g.width=g.height="100%",l=p.width,u=p.height,p.width=p.height="",f.addClass(v,"mce-fullscreen"),f.addClass(y,"mce-fullscreen"),f.addClass(h,"mce-fullscreen"),f.bind(window,"resize",i),i(),s=i):(g.width=o,g.height=a,l&&(p.width=l),u&&(p.height=u),f.removeClass(v,"mce-fullscreen"),f.removeClass(y,"mce-fullscreen"),f.removeClass(h,"mce-fullscreen"),f.unbind(window,"resize",s),r(c)),e.fire("FullscreenStateChanged",{state:d})}var o,a,s,l,u,c,d=!1,f=tinymce.DOM;if(!e.settings.inline)return e.on("init",function(){e.addShortcut("Ctrl+Shift+F","",i)}),e.on("remove",function(){s&&f.unbind(window,"resize",s)}),e.addCommand("mceFullScreen",i),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,onClick:function(){i(),e.focus()},onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Shift+F",onClick:i,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return d}}}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("hr",function(e){e.addCommand("InsertHorizontalRule",function(){e.execCommand("mceInsertContent",!1,"
")}),e.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),e.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/image/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("image",function(e){function t(e,t){function n(e,n){r.parentNode&&r.parentNode.removeChild(r),t({width:e,height:n})}var r=document.createElement("img");r.onload=function(){n(Math.max(r.width,r.clientWidth),Math.max(r.height,r.clientHeight))},r.onerror=function(){n()};var i=r.style;i.visibility="hidden",i.position="fixed",i.bottom=i.left=0,i.width=i.height="auto",document.body.appendChild(r),r.src=e}function n(e,t,n){function r(e,n){return n=n||[],tinymce.each(e,function(e){var i={text:e.text||e.title};e.menu?i.menu=r(e.menu):(i.value=e.value,t(i)),n.push(i)}),n}return r(e,n||[])}function r(t){return function(){var n=e.settings.image_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof n?n(t):t(n)}}function i(r){function i(){var e,t,n,r;e=f.find("#width")[0],t=f.find("#height")[0],e&&t&&(n=e.value(),r=t.value(),f.find("#constrain")[0].checked()&&m&&g&&n&&r&&(m!=n?(r=Math.round(n/m*r),isNaN(r)||t.value(r)):(n=Math.round(r/g*n),isNaN(n)||e.value(n))),m=n,g=r)}function o(){function t(t){function n(){t.onload=t.onerror=null,e.selection&&(e.selection.select(t),e.nodeChanged())}t.onload=function(){b.width||b.height||!x||C.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),n()},t.onerror=n}var n,r;c(),i(),b=tinymce.extend(b,f.toJSON()),b.alt||(b.alt=""),b.title||(b.title=""),""===b.width&&(b.width=null),""===b.height&&(b.height=null),b.style||(b.style=null),b={src:b.src,alt:b.alt,title:b.title,width:b.width,height:b.height,style:b.style,caption:b.caption,"class":b["class"]},e.undoManager.transact(function(){function i(t){return e.schema.getTextBlockElements()[t.nodeName]}if(!b.src)return void(p&&(C.remove(p),e.focus(),e.nodeChanged()));if(""===b.title&&(b.title=null),p?C.setAttribs(p,b):(b.id="__mcenew",e.focus(),e.selection.setContent(C.createHTML("img",b)),p=C.get("__mcenew"),C.setAttrib(p,"id",null)),e.editorUpload.uploadImagesAuto(),b.caption===!1&&C.is(p.parentNode,"figure.image")&&(n=p.parentNode,C.insertAfter(p,n),C.remove(n)),b.caption!==!0)t(p);else if(!C.is(p.parentNode,"figure.image")){r=p,p=p.cloneNode(!0),n=C.create("figure",{"class":"image"}),n.appendChild(p),n.appendChild(C.create("figcaption",{contentEditable:!0},"Caption")),n.contentEditable=!1;var o=C.getParent(r,i);o?C.split(o,r,n):C.replace(n,r),e.selection.select(n)}})}function a(e){return e&&(e=e.replace(/px$/,"")),e}function s(n){var r,i,o,a=n.meta||{};v&&v.value(e.convertURL(this.value(),"src")),tinymce.each(a,function(e,t){f.find("#"+t).value(e)}),a.width||a.height||(r=e.convertURL(this.value(),"src"),i=e.settings.image_prepend_url,o=new RegExp("^(?:[a-z]+:)?//","i"),i&&!o.test(r)&&r.substring(0,i.length)!==i&&(r=i+r),this.value(r),t(e.documentBaseURI.toAbsolute(this.value()),function(e){e.width&&e.height&&x&&(m=e.width,g=e.height,f.find("#width").value(m),f.find("#height").value(g))}))}function l(e){e.meta=f.toJSON()}function u(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e}function c(){function t(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e}if(e.settings.image_advtab){var n=f.toJSON(),r=C.parseStyle(n.style);r=u(r),n.vspace&&(r["margin-top"]=r["margin-bottom"]=t(n.vspace)),n.hspace&&(r["margin-left"]=r["margin-right"]=t(n.hspace)),n.border&&(r["border-width"]=t(n.border)),f.find("#style").value(C.serializeStyle(C.parseStyle(C.serializeStyle(r))))}}function d(){if(e.settings.image_advtab){var t=f.toJSON(),n=C.parseStyle(t.style);f.find("#vspace").value(""),f.find("#hspace").value(""),n=u(n),(n["margin-top"]&&n["margin-bottom"]||n["margin-right"]&&n["margin-left"])&&(n["margin-top"]===n["margin-bottom"]?f.find("#vspace").value(a(n["margin-top"])):f.find("#vspace").value(""),n["margin-right"]===n["margin-left"]?f.find("#hspace").value(a(n["margin-right"])):f.find("#hspace").value("")),n["border-width"]&&f.find("#border").value(a(n["border-width"])),f.find("#style").value(C.serializeStyle(C.parseStyle(C.serializeStyle(n))))}}var f,p,h,m,g,v,y,b={},C=e.dom,x=e.settings.image_dimensions!==!1;p=e.selection.getNode(),h=C.getParent(p,"figure.image"),h&&(p=C.select("img",h)[0]),p&&("IMG"!=p.nodeName||p.getAttribute("data-mce-object")||p.getAttribute("data-mce-placeholder"))&&(p=null),p&&(m=C.getAttrib(p,"width"),g=C.getAttrib(p,"height"),b={src:C.getAttrib(p,"src"),alt:C.getAttrib(p,"alt"),title:C.getAttrib(p,"title"),"class":C.getAttrib(p,"class"),width:m,height:g,caption:!!h}),r&&(v={type:"listbox",label:"Image list",values:n(r,function(t){t.value=e.convertURL(t.value||t.url,"src")},[{text:"None",value:""}]),value:b.src&&e.convertURL(b.src,"src"),onselect:function(e){var t=f.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),f.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){v=this}}),e.settings.image_class_list&&(y={name:"class",type:"listbox",label:"Class",values:n(e.settings.image_class_list,function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:"img",classes:[t.value]})})})});var w=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:s,onbeforecall:l},v];e.settings.image_description!==!1&&w.push({name:"alt",type:"textbox",label:"Image description"}),e.settings.image_title&&w.push({name:"title",type:"textbox",label:"Image Title"}),x&&w.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:i,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:i,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),w.push(y),e.settings.image_caption&&tinymce.Env.ceFalse&&w.push({name:"caption",type:"checkbox",label:"Caption"}),e.settings.image_advtab?(p&&(p.style.marginLeft&&p.style.marginRight&&p.style.marginLeft===p.style.marginRight&&(b.hspace=a(p.style.marginLeft)),p.style.marginTop&&p.style.marginBottom&&p.style.marginTop===p.style.marginBottom&&(b.vspace=a(p.style.marginTop)),p.style.borderWidth&&(b.border=a(p.style.borderWidth)),b.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(p,"style")))),f=e.windowManager.open({title:"Insert/edit image",data:b,bodyType:"tabpanel",body:[{title:"General",type:"form",items:w},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:d},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:c},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:o})):f=e.windowManager.open({title:"Insert/edit image",data:b,body:w,onSubmit:o})}e.on("preInit",function(){function t(e){var t=e.attr("class");return t&&/\bimage\b/.test(t)}function n(e){return function(n){function r(t){t.attr("contenteditable",e?"true":null)}for(var i,o=n.length;o--;)i=n[o],t(i)&&(i.attr("contenteditable",e?"false":null),tinymce.each(i.getAll("figcaption"),r))}}e.parser.addNodeFilter("figure",n(!0)),e.serializer.addNodeFilter("figure",n(!1))}),e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:r(i),stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),e.addMenuItem("image",{icon:"image",text:"Image",onclick:r(i),context:"insert",prependToContext:!0}),e.addCommand("mceImage",r(i))}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/importcss/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("importcss",function(e){function t(e){var t=tinymce.Env.cacheSuffix;return"string"==typeof e&&(e=e.replace("?"+t,"").replace("&"+t,"")),e}function n(t){var n=e.settings,r=n.skin!==!1&&(n.skin||"lightgray");if(r){var i=n.skin_url;return i=i?e.documentBaseURI.toAbsolute(i):tinymce.baseURL+"/skins/"+r,t===i+"/content"+(e.inline?".inline":"")+".min.css"}return!1}function r(e){return"string"==typeof e?function(t){return t.indexOf(e)!==-1}:e instanceof RegExp?function(t){return e.test(t)}:e}function i(r,i){function o(e,r){var s,l=e.href;if(l=t(l),l&&i(l,r)&&!n(l)){p(e.imports,function(e){o(e,!0)});try{s=e.cssRules||e.rules}catch(e){}p(s,function(e){e.styleSheet?o(e.styleSheet,!0):e.selectorText&&p(e.selectorText.split(","),function(e){a.push(tinymce.trim(e))})})}}var a=[],s={};p(e.contentCSS,function(e){s[e]=!0}),i||(i=function(e,t){return t||s[e]});try{p(r.styleSheets,function(e){o(e)})}finally{}return a}function o(t){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(r){var i=r[1],o=r[2].substr(1).split(".").join(" "),a=tinymce.makeMap("a,img");return r[1]?(n={title:t},e.schema.getTextBlockElements()[i]?n.block=i:e.schema.getBlockElements()[i]||a[i.toLowerCase()]?n.selector=i:n.inline=i):r[2]&&(n={inline:"span",title:t.substr(1),classes:o}),e.settings.importcss_merge_classes!==!1?n.classes=o:n.attributes={"class":o},n}}function a(e,t){return tinymce.util.Tools.grep(e,function(e){return!e.filter||e.filter(t)})}function s(e){return tinymce.util.Tools.map(e,function(e){return tinymce.util.Tools.extend({},e,{original:e,selectors:{},filter:r(e.filter),item:{text:e.title,menu:[]}})})}function l(e,t){return null===t||e.settings.importcss_exclusive!==!1}function u(t,n,r){return!(l(e,n)?t in r:t in n.selectors)}function c(t,n,r){l(e,n)?r[t]=!0:n.selectors[t]=!0}function d(t,n,r){var i,a=e.settings;return i=r&&r.selector_converter?r.selector_converter:a.importcss_selector_converter?a.importcss_selector_converter:o,i.call(t,n,r)}var f=this,p=tinymce.each;e.on("renderFormatsMenu",function(t){var n=e.settings,o={},l=r(n.importcss_selector_filter),h=t.control,m=s(n.importcss_groups),g=function(t,n){if(u(t,n,o)){c(t,n,o);var r=d(f,t,n);if(r){var i=r.name||tinymce.DOM.uniqueId();return e.formatter.register(i,r),tinymce.extend({},h.settings.itemDefaults,{text:r.title,format:i})}}return null};e.settings.importcss_append||h.items().remove(),p(i(t.doc||e.getDoc(),r(n.importcss_file_filter)),function(e){if(e.indexOf(".mce-")===-1&&(!l||l(e))){var t=a(m,e);if(t.length>0)tinymce.util.Tools.each(t,function(t){var n=g(e,t);n&&t.item.menu.push(n)});else{var n=g(e,null);n&&h.add(n)}}}),p(m,function(e){e.item.menu.length>0&&h.add(e.item)}),t.control.renderNew()}),f.convertSelectorToFormat=o}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/insertdatetime/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("insertdatetime",function(e){function t(t,n){function r(e,t){if(e=""+e,e.length'+r+"";var o=e.dom.getParent(e.selection.getStart(),"time");if(o)return void e.dom.setOuterHTML(o,r)}e.insertContent(r)}var r,i,o="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),l="January February March April May June July August September October November December".split(" "),u=[];e.addCommand("mceInsertDate",function(){n(e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){n(e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S")))}),e.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){n(r||i)},menu:u}),tinymce.each(e.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){i||(i=e),u.push({text:t(e),onclick:function(){r=e,n(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:u,context:"insert"})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/legacyoutput/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(e){e.PluginManager.add("legacyoutput",function(t,n,r){t.settings.inline_styles=!1,t.on("init",function(){var n="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",r=e.explode(t.settings.font_size_style_values),i=t.schema;t.formatter.register({alignleft:{selector:n,attributes:{align:"left"}},aligncenter:{selector:n,attributes:{align:"center"}},alignright:{selector:n,attributes:{align:"right"}},alignjustify:{selector:n,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(t){return e.inArray(r,t.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),e.each("b,i,u,strike".split(","),function(e){i.addValidElements(e+"[*]")}),i.getElementRule("font")||i.addValidElements("font[face|size|color|style]"),e.each(n.split(","),function(e){var t=i.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})}),t.addButton("fontsizeselect",function(){var e=[],n="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",r=t.settings.fontsize_formats||n;return t.$.each(r.split(" "),function(t,n){var r=n,i=n,o=n.split("=");o.length>1&&(r=o[0],i=o[1]),e.push({text:r,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:e,fixedWidth:!0,onPostRender:function(){var e=this;t.on("NodeChange",function(){var n;n=t.dom.getParent(t.selection.getNode(),"font"),n?e.value(n.size):e.value("")})},onclick:function(e){e.control.settings.value&&t.execCommand("FontSize",!1,e.control.settings.value)}}}),t.addButton("fontselect",function(){function e(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}var n="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=e(t.settings.font_formats||n);return r.each(o,function(e,t){i.push({text:{raw:t[0]},value:t[1],textStyle:t[1].indexOf("dings")==-1?"font-family:"+t[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:function(){var e=this;t.on("NodeChange",function(){var n;n=t.dom.getParent(t.selection.getNode(),"font"),n?e.value(n.face):e.value("")})},onselect:function(e){e.control.settings.value&&t.execCommand("FontName",!1,e.control.settings.value)}}})})}(tinymce); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/link/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("link",function(e){function t(e){return e&&"A"===e.nodeName&&e.href}function n(e){return tinymce.util.Tools.grep(e,t).length>0}function r(t){return e.dom.getParent(t,"a[href]")}function i(){return r(e.selection.getStart())}function o(e){var t=e.getAttribute("data-mce-href");return t?t:e.getAttribute("href")}function a(){var t=e.plugins.contextmenu;return!!t&&t.isContextMenuVisible()}function s(n){var r,i,o;return!!(e.settings.link_context_toolbar&&!a()&&t(n)&&(r=e.selection,i=r.getRng(),o=i.startContainer,3==o.nodeType&&r.isCollapsed()&&i.startOffset>0&&i.startOffset10){var t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),l(t,n)}else{var r=window.open("","_blank");if(r){r.opener=null;var i=r.document;i.open(),i.write(''),i.close()}}}function c(t){if(t){var n=o(t);if(/^#/.test(n)){var r=e.$(n);r.length&&e.selection.scrollIntoView(r[0],!0)}else u(t.href)}}function d(){c(i())}function f(){var t=this,r=function(e){n(e.parents)?t.show():t.hide()};n(e.dom.getParents(e.selection.getStart()))||t.hide(),e.on("nodechange",r),t.on("remove",function(){e.off("nodechange",r)})}function p(t){return function(){var n=e.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof n?n(t):t(n)}}function h(e,t,n){function r(e,n){return n=n||[],tinymce.each(e,function(e){var i={text:e.text||e.title};e.menu?i.menu=r(e.menu):(i.value=e.value,t&&t(i)),n.push(i)}),n}return r(e,n||[])}function m(t){function n(e){var t=d.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),d.find("#href").value(e.control.value())}function r(t){var r=[];if(tinymce.each(e.dom.select("a:not([href])"),function(e){var n=e.name||e.id;n&&r.push({text:n,value:"#"+n,selected:t.indexOf("#"+n)!=-1})}),r.length)return r.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:r,onselect:n}}function i(){!c&&0===w.text.length&&f&&this.parent().parent().find("#text")[0].value(this.value())}function o(t){var n=t.meta||{};m&&m.value(e.convertURL(this.value(),"href")),tinymce.each(t.meta,function(e,t){var n=d.find("#"+t);"text"===t?0===c.length&&(n.value(e),w.text=e):n.value(e)}),n.attach&&(g={href:this.value(),attach:n.attach}),n.text||i.call(this)}function a(e){var t=E.getContent();if(/]+>[^<]+<\/a>$/.test(t)||t.indexOf("href=")==-1))return!1;if(e){var n,r=e.childNodes;if(0===r.length)return!1;for(n=r.length-1;n>=0;n--)if(3!=r[n].nodeType)return!1}return!0}function s(e){e.meta=d.toJSON()}var l,u,c,d,f,p,m,v,y,b,C,x,w={},E=e.selection,N=e.dom;l=E.getNode(),u=N.getParent(l,"a[href]"),f=a(),w.text=c=u?u.innerText||u.textContent:E.getContent({format:"text"}),w.href=u?N.getAttrib(u,"href"):"",u?w.target=N.getAttrib(u,"target"):e.settings.default_link_target&&(w.target=e.settings.default_link_target),(x=N.getAttrib(u,"rel"))&&(w.rel=x),(x=N.getAttrib(u,"class"))&&(w["class"]=x),(x=N.getAttrib(u,"title"))&&(w.title=x),f&&(p={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){w.text=this.value()}}),t&&(m={type:"listbox",label:"Link list",values:h(t,function(t){t.value=e.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:n,value:e.convertURL(w.href,"href"),onPostRender:function(){m=this}}),e.settings.target_list!==!1&&(e.settings.target_list||(e.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),y={name:"target",type:"listbox",label:"Target",values:h(e.settings.target_list)}),e.settings.rel_list&&(v={name:"rel",type:"listbox",label:"Rel",values:h(e.settings.rel_list)}),e.settings.link_class_list&&(b={name:"class",type:"listbox",label:"Class",values:h(e.settings.link_class_list,function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:"a",classes:[t.value]})})})}),e.settings.link_title!==!1&&(C={name:"title",type:"textbox",label:"Title",value:w.title}),d=e.windowManager.open({title:"Insert link",data:w,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:o,onkeyup:i,onbeforecall:s},p,C,r(w.href),m,v,y,b],onSubmit:function(t){function n(t,n){var r=e.selection.getRng();tinymce.util.Delay.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(r),n(t)})})}function r(e,t){function n(e){return e=r(e),e?[e,i].join(" "):i}function r(e){var t=new RegExp("("+i.replace(" ","|")+")","g");return e&&(e=tinymce.trim(e.replace(t,""))),e?e:null}var i="noopener noreferrer";return t?n(e):r(e)}function i(){var t={href:a,target:w.target?w.target:null,rel:w.rel?w.rel:null,"class":w["class"]?w["class"]:null,title:w.title?w.title:null};e.settings.allow_unsafe_link_target||(t.rel=r(t.rel,"_blank"==t.target)),a===g.href&&(g.attach(),g={}),u?(e.focus(),f&&w.text!=c&&("innerText"in u?u.innerText=w.text:u.textContent=w.text),N.setAttribs(u,t),E.select(u),e.undoManager.add()):f?e.insertContent(N.createHTML("a",t,N.encode(w.text))):e.execCommand("mceInsertLink",!1,t)}function o(){e.undoManager.transact(i)}var a;return w=tinymce.extend(w,t.data),(a=w.href)?a.indexOf("@")>0&&a.indexOf("//")==-1&&a.indexOf("mailto:")==-1?void n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(a="mailto:"+a),o()}):e.settings.link_assume_external_targets&&!/^\w+:/i.test(a)||!e.settings.link_assume_external_targets&&/^\s*www[\.|\d\.]/i.test(a)?void n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(a="http://"+a),o()}):void o():void e.execCommand("unlink")}})}var g={},v=function(e){return e.altKey===!0&&e.shiftKey===!1&&e.ctrlKey===!1&&e.metaKey===!1};e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:p(m),stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),e.addContextToolbar&&(e.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:d}),e.addContextToolbar(s,"openlink | link unlink")),e.addShortcut("Meta+K","",p(m)),e.addCommand("mceLink",p(m)),e.on("click",function(e){var t=r(e.target);t&&tinymce.util.VK.metaKeyPressed(e)&&(e.preventDefault(),c(t))}),e.on("keydown",function(e){var t=i();t&&13===e.keyCode&&v(e)&&(e.preventDefault(),c(t))}),this.showDialog=m,e.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:d,onPostRender:f,prependToContext:!0}),e.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:p(m),stateSelector:"a[href]",context:"insert",prependToContext:!0})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("nonbreaking",function(e){var t=e.getParam("nonbreaking_force_tab");if(e.addCommand("mceNonBreaking",function(){e.insertContent(e.plugins.visualchars&&e.plugins.visualchars.state?' ':" "),e.dom.setAttrib(e.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),e.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),e.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),t){var n=+t>1?+t:3;e.on("keydown",function(t){if(9==t.keyCode){if(t.shiftKey)return;t.preventDefault();for(var r=0;r0?a.charAt(r-1):"";if('"'===i)return t;if(">"===i){var o=a.lastIndexOf("<",r);if(o!==-1){var l=a.substring(o,r);if(l.indexOf('contenteditable="false"')!==-1)return t}}return''+e.dom.encode("string"==typeof n[1]?n[1]:n[0])+""}var r=o.length,a=t.content,s=tinymce.trim(i);if("raw"!=t.format){for(;r--;)a=a.replace(o[r],n);t.content=a}}var r,i,o,a="contenteditable";r=" "+tinymce.trim(e.getParam("noneditable_editable_class","mceEditable"))+" ",i=" "+tinymce.trim(e.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";var s=t(r),l=t(i);o=e.getParam("noneditable_regexp"),o&&!o.length&&(o=[o]),e.on("PreInit",function(){o&&e.on("BeforeSetContent",n),e.parser.addAttributeFilter("class",function(e){for(var t,n=e.length;n--;)t=e[n],s(t)?t.attr(a,"true"):l(t)&&t.attr(a,"false")}),e.serializer.addAttributeFilter(a,function(e){for(var t,n=e.length;n--;)t=e[n],(s(t)||l(t))&&(o&&t.attr("data-mce-content")?(t.name="#text",t.type=3,t.raw=!0,t.value=t.attr("data-mce-content")):t.attr(a,null))})})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/pagebreak/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("pagebreak",function(e){var t="mce-pagebreak",n=e.getParam("pagebreak_separator",""),r=new RegExp(n.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),i='';e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("

"+i+"

"):e.insertContent(i)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(n){"IMG"==n.target.nodeName&&e.dom.hasClass(n.target,t)&&(n.name="pagebreak")}),e.on("click",function(n){n=n.target,"IMG"===n.nodeName&&e.dom.hasClass(n,t)&&e.selection.select(n)}),e.on("BeforeSetContent",function(e){e.content=e.content.replace(r,i)}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(t){for(var r,i,o=t.length;o--;)if(r=t[o],i=r.attr("class"),i&&i.indexOf("mce-pagebreak")!==-1){var a=r.parent;if(e.schema.getBlockElements()[a.name]&&e.settings.pagebreak_split_block){a.type=3,a.value=n,a.raw=!0,r.remove();continue}r.type=3,r.value=n,r.raw=!0}})})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("preview",function(e){var t=e.settings,n=!tinymce.Env.ie;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var r,i="";i+='',tinymce.each(e.contentCSS,function(t){i+=''});var o=t.body_id||"tinymce";o.indexOf("=")!=-1&&(o=e.getParam("body_id","","hash"),o=o[e.id]||o);var a=t.body_class||"";a.indexOf("=")!=-1&&(a=e.getParam("body_class","","hash"),a=a[e.id]||"");var s=' ',l=e.settings.directionality?' dir="'+e.settings.directionality+'"':"";if(r=""+i+'"+e.getContent()+s+"",n)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(r);else{var u=this.getEl("body").firstChild.contentWindow.document;u.open(),u.write(r),u.close()}}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/print/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("print",function(e){e.addCommand("mcePrint",function(){e.getWin().print()}),e.addButton("print",{title:"Print",cmd:"mcePrint"}),e.addShortcut("Meta+P","","mcePrint"),e.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Meta+P",context:"file"})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/save/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("save",function(e){function t(){var t;if(t=tinymce.DOM.getParent(e.id,"form"),!e.getParam("save_enablewhendirty",!0)||e.isDirty())return tinymce.triggerSave(),e.getParam("save_onsavecallback")?(e.execCallback("save_onsavecallback",e),void e.nodeChanged()):void(t?(e.setDirty(!1),t.onsubmit&&!t.onsubmit()||("function"==typeof t.submit?t.submit():n(e.translate("Error: Form submit field collision."))),e.nodeChanged()):n(e.translate("Error: No form element found.")))}function n(t){e.notificationManager.open({text:t,type:"error"})}function r(){var t=tinymce.trim(e.startContent);return e.getParam("save_oncancelcallback")?void e.execCallback("save_oncancelcallback",e):(e.setContent(t),e.undoManager.clear(),void e.nodeChanged())}function i(){var t=this;e.on("nodeChange dirty",function(){t.disabled(e.getParam("save_enablewhendirty",!0)&&!e.isDirty())})}e.addCommand("mceSave",t),e.addCommand("mceCancel",r),e.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:i}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:i}),e.addShortcut("Meta+S","","mceSave")}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/searchreplace/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){function e(e){return e&&1==e.nodeType&&"false"===e.contentEditable}function t(t,n,r,i,o){function a(e,t){if(t=t||0,!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var n=e.index;if(t>0){var r=e[t];if(!r)throw"Invalid capture group";n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}function s(t){var n;if(3===t.nodeType)return t.data;if(h[t.nodeName]&&!p[t.nodeName])return"";if(n="",e(t))return"\n";if((p[t.nodeName]||m[t.nodeName])&&(n+="\n"),t=t.firstChild)do n+=s(t);while(t=t.nextSibling);return n}function l(t,n,r){var i,o,a,s,l=[],u=0,c=t,d=n.shift(),f=0;e:for(;;){if((p[c.nodeName]||m[c.nodeName]||e(c))&&u++,3===c.nodeType&&(!o&&c.length+u>=d[1]?(o=c,s=d[1]-u):i&&l.push(c),!i&&c.length+u>d[0]&&(i=c,a=d[0]-u),u+=c.length),i&&o){if(c=r({startNode:i,startNodeIndex:a,endNode:o,endNodeIndex:s,innerNodes:l,match:d[2],matchIndex:f}),u-=o.length-s,i=null,o=null,l=[],d=n.shift(),f++,!d)break}else if(h[c.nodeName]&&!p[c.nodeName]||!c.firstChild){if(c.nextSibling){c=c.nextSibling;continue}}else if(!e(c)){c=c.firstChild;continue}for(;;){if(c.nextSibling){c=c.nextSibling;break}if(c.parentNode===t)break e;c=c.parentNode}}}function u(e){var t;if("function"!=typeof e){var n=e.nodeType?e:f.createElement(e);t=function(e,t){var r=n.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(f.createTextNode(e)),r}}else t=e;return function(e){var n,r,i,o=e.startNode,a=e.endNode,s=e.matchIndex;if(o===a){var l=o;i=l.parentNode,e.startNodeIndex>0&&(n=f.createTextNode(l.data.substring(0,e.startNodeIndex)),i.insertBefore(n,l));var u=t(e.match[0],s);return i.insertBefore(u,l),e.endNodeIndex0}var c=this,d=-1;c.init=function(e){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:n,separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Meta+F",onclick:n}),e.addCommand("SearchReplace",n),e.shortcuts.add("Meta+F","",n)},c.find=function(e,t,n){e=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),e=n?"\\b"+e+"\\b":e;var r=i(new RegExp(e,t?"g":"gi"));return r&&(d=-1,d=s(!0)),r},c.next=function(){var e=s(!0);e!==-1&&(d=e)},c.prev=function(){var e=s(!1);e!==-1&&(d=e)},c.replace=function(t,n,i){var s,f,p,h,m,g,v=d;for(n=n!==!1,p=e.getBody(),f=tinymce.grep(tinymce.toArray(p.getElementsByTagName("span")),u),s=0;sd&&f[s].setAttribute("data-mce-index",m-1)}return e.undoManager.add(),d=v,n?(g=a(v+1).length>0,c.next()):(g=a(v-1).length>0,c.prev()),!i&&g},c.done=function(t){var n,i,a,s;for(i=tinymce.toArray(e.getBody().getElementsByTagName("span")),n=0;n=l.end?(o=d,s=l.end-c):i&&u.push(d),!i&&d.length+c>l.start&&(i=d,a=l.start-c),c+=d.length),i&&o){if(d=r({startNode:i,startNodeIndex:a,endNode:o,endNodeIndex:s,innerNodes:u,match:l.text,matchIndex:f}),c-=o.length-s,i=null,o=null,u=[],l=n.shift(),f++,!l)break}else if(N[d.nodeName]&&!E[d.nodeName]||!d.firstChild){if(d.nextSibling){d=d.nextSibling;continue}}else if(!e(d)){d=d.firstChild;continue}for(;;){if(d.nextSibling){d=d.nextSibling;break}if(d.parentNode===t)break e;d=d.parentNode}}}function a(e){function t(t,n){var r=S[n];r.stencil||(r.stencil=e(r));var i=r.stencil.cloneNode(!1);return i.setAttribute("data-mce-index",n),t&&i.appendChild(k.doc.createTextNode(t)),i}return function(e){var n,r,i,o=e.startNode,a=e.endNode,s=e.matchIndex,l=k.doc;if(o===a){var u=o;i=u.parentNode,e.startNodeIndex>0&&(n=l.createTextNode(u.data.substring(0,e.startNodeIndex)),i.insertBefore(n,u));var c=t(e.match,s);return i.insertBefore(c,u),e.endNodeIndex0&&r.insertNode(n.dom.doc.createTextNode(t)),r}function C(){return S.splice(0,S.length),h(),this}var x,w,E,N,_,S=[],k=n.dom;return E=n.schema.getBlockElements(),N=n.schema.getWhiteSpaceElements(),_=n.schema.getShortEndedElements(),w=i(t),{text:w,matches:S,each:d,filter:c,reset:C,matchFromElement:m,elementFromMatch:g,find:p,add:v,wrap:f,unwrap:h,replace:b,rangeFromMatch:y,indexOf:u}}}),r("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/XHR","tinymce/util/URI","tinymce/util/JSON"],function(e,t,n,r,i,o,a,s){t.add("spellchecker",function(l,u){function c(){return B.textMatcher||(B.textMatcher=new e(l.getBody(),l)),B.textMatcher}function d(e,t){var r=[];return n.each(t,function(e){r.push({selectable:!0,text:e.name,data:e.value})}),r}function f(e){for(var t in e)return!1;return!0}function p(e,t){var o=[],a=k[e];n.each(a,function(e){o.push({text:e,onclick:function(){l.insertContent(l.dom.encode(e)),l.dom.remove(t),y()}})}),o.push({text:"-"}),A&&o.push({text:"Add to Dictionary",onclick:function(){b(e,t)}}),o.push.apply(o,[{text:"Ignore",onclick:function(){C(e,t)}},{text:"Ignore all",onclick:function(){C(e,t,!0)}}]),R=new r({items:o,context:"contextmenu",onautohide:function(e){e.target.className.indexOf("spellchecker")!=-1&&e.preventDefault()},onhide:function(){R.remove(),R=null}}),R.renderTo(document.body);var s=i.DOM.getPos(l.getContentAreaContainer()),u=l.dom.getPos(t[0]),c=l.dom.getRoot();"BODY"==c.nodeName?(u.x-=c.ownerDocument.documentElement.scrollLeft||c.scrollLeft,u.y-=c.ownerDocument.documentElement.scrollTop||c.scrollTop):(u.x-=c.scrollLeft,u.y-=c.scrollTop),s.x+=u.x,s.y+=u.y,R.moveTo(s.x,s.y+t[0].offsetHeight)}function h(){return l.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function m(e,t,r,i){var c={method:e,lang:D.spellchecker_language},d="";c["addToDictionary"==e?"word":"text"]=t,n.each(c,function(e,t){d&&(d+="&"),d+=t+"="+encodeURIComponent(e)}),o.send({url:new a(u).toAbsolute(D.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:d,success:function(e){if(e=s.parse(e))e.error?i(e.error):r(e);else{var t=l.translate("Server response wasn't proper JSON.");i(t)}},error:function(){var e=l.translate("The spelling service was not found: (")+D.spellchecker_rpc_url+l.translate(")");i(e)}})}function g(e,t,n,r){var i=D.spellchecker_callback||m;i.call(B,e,t,n,r)}function v(){function e(e){l.notificationManager.open({text:e,type:"error"}),l.setProgressState(!1),x()}x()||(l.setProgressState(!0),g("spellcheck",c().text,_,e),l.focus())}function y(){l.dom.select("span.mce-spellchecker-word").length||x()}function b(e,t){l.setProgressState(!0),g("addToDictionary",e,function(){l.setProgressState(!1),l.dom.remove(t,!0),y()},function(e){l.notificationManager.open({text:e,type:"error"}),l.setProgressState(!1)})}function C(e,t,r){l.selection.collapse(),r?n.each(l.dom.select("span.mce-spellchecker-word"),function(t){t.getAttribute("data-mce-word")==e&&l.dom.remove(t,!0)}):l.dom.remove(t,!0),y()}function x(){if(c().reset(),B.textMatcher=null,T)return T=!1,l.fire("SpellcheckEnd"),!0}function w(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function E(e){var t,r=[];if(t=n.toArray(l.getBody().getElementsByTagName("span")),t.length)for(var i=0;i0){var r=l.dom.createRng();r.setStartBefore(n[0]),r.setEndAfter(n[n.length-1]),l.selection.setRng(r),p(t.getAttribute("data-mce-word"),n)}}}),l.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:v,selectable:!0,onPostRender:function(){var e=this;e.active(T),l.on("SpellcheckStart SpellcheckEnd",function(){e.active(T)})}});var M={tooltip:"Spellcheck",onclick:v,onPostRender:function(){var e=this;l.on("SpellcheckStart SpellcheckEnd",function(){e.active(T)})}};S.length>1&&(M.type="splitbutton",M.menu=S,M.onshow=N,M.onselect=function(e){D.spellchecker_language=e.control.settings.data}),l.addButton("spellchecker",M),l.addCommand("mceSpellCheck",v),l.on("remove",function(){R&&(R.remove(),R=null)}),l.on("change",y),this.getTextMatcher=c,this.getWordCharPattern=h,this.markErrors=_,this.getLanguage=function(){return D.spellchecker_language},D.spellchecker_language=D.spellchecker_language||D.language||"en"})}),o(["tinymce/spellcheckerplugin/DomTextMatcher"])}(window); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("tabfocus",function(e){function t(e){9!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()}function n(t){function n(n){function o(e){return"BODY"===e.nodeName||"hidden"!=e.type&&"none"!=e.style.display&&"hidden"!=e.style.visibility&&o(e.parentNode)}function l(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&tinymce.get(t.id)&&e.tabIndex!=-1&&o(e)}if(s=r.select(":input:enabled,*[tabindex]:not(iframe)"),i(s,function(t,n){if(t.id==e.id)return a=n,!1}),n>0){for(u=a+1;u=0;u--)if(l(s[u]))return s[u];return null}var a,s,l,u;if(!(9!==t.keyCode||t.ctrlKey||t.altKey||t.metaKey||t.isDefaultPrevented())&&(l=o(e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))),1==l.length&&(l[1]=l[0],l[0]=":prev"),s=t.shiftKey?":prev"==l[0]?n(-1):r.get(l[0]):":next"==l[1]?n(1):r.get(l[1]))){var c=tinymce.get(s.id||s.name);s.id&&c?c.focus():tinymce.util.Delay.setTimeout(function(){tinymce.Env.webkit||window.focus(),s.focus()},10),t.preventDefault()}}var r=tinymce.DOM,i=tinymce.each,o=tinymce.explode;e.on("init",function(){e.inline&&tinymce.DOM.setAttrib(e.getBody(),"tabIndex",null),e.on("keyup",t),tinymce.Env.gecko?e.on("keypress keydown",n):e.on("keydown",n)})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/template/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("template",function(e){function t(t){return function(){var n=e.settings.templates;return"function"==typeof n?void n(t):void("string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n))}}function n(t){function n(t){function n(t){if(t.indexOf("")==-1){var n="";tinymce.each(e.contentCSS,function(t){n+=''});var i=e.settings.body_class||"";i.indexOf("=")!=-1&&(i=e.getParam("body_class","","hash"),i=i[e.id]||""),t=""+n+''+t+""}t=o(t,"template_preview_replace_values");var a=r.find("iframe")[0].getEl().contentWindow.document;a.open(),a.write(t),a.close()}var a=t.control.value();a.url?tinymce.util.XHR.send({url:a.url,success:function(e){i=e,n(i)}}):(i=a.content,n(i)),r.find("#description")[0].text(t.control.value().description)}var r,i,s=[];if(!t||0===t.length){var l=e.translate("No templates defined.");return void e.notificationManager.open({text:l,type:"info"})}tinymce.each(t,function(e){s.push({selected:!s.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),r=e.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:s,onselect:n}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){a(!1,i)},minWidth:Math.min(tinymce.DOM.getViewPort().w,e.getParam("template_popup_width",600)),minHeight:Math.min(tinymce.DOM.getViewPort().h,e.getParam("template_popup_height",500))}),r.find("listbox")[0].fire("select")}function r(t,n){function r(e,t){if(e=""+e,e.length0&&(l=c.create("div",null),l.appendChild(u[0].cloneNode(!0))),s(c.select("*",l),function(t){a(t,e.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(t.innerHTML=r(e.getParam("template_cdate_format",e.getLang("template.cdate_format")))),a(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=r(e.getParam("template_mdate_format",e.getLang("template.mdate_format")))),a(t,e.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(t.innerHTML=d)}),i(l),e.execCommand("mceInsertContent",!1,l.innerHTML),e.addVisual()}var s=tinymce.each;e.addCommand("mceInsertTemplate",a),e.addButton("template",{title:"Insert template",onclick:t(n)}),e.addMenuItem("template",{text:"Template",onclick:t(n),context:"insert"}),e.on("PreProcess",function(t){var n=e.dom;s(n.select("div",t.node),function(t){n.hasClass(t,"mceTmpl")&&(s(n.select("*",t),function(t){n.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=r(e.getParam("template_mdate_format",e.getLang("template.mdate_format"))))}),i(t))})})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/textcolor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("textcolor",function(e){function t(t){var n;return e.dom.getParents(e.selection.getStart(),function(e){var r;(r=e.style["forecolor"==t?"color":"background-color"])&&(n=r)}),n}function n(t){var n,r,i=[];for(r=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],r=e.settings.textcolor_map||r,r=e.settings[t+"_map"]||r,n=0;n
'+(n?"×":"")+"
"}var r,i,o,a,s,c,d,f,p=this,h=p._id,m=0;for(f=p.settings.origin,r=n(f),r.push({text:tinymce.translate("No color"),color:"transparent"}),o='',a=r.length-1,c=0;c",s=0;sa?o+="":(i=r[d],o+=t(i.color,i.text));o+=""}if(e.settings.color_picker_callback){for(o+='",o+="",s=0;st.start.length?-1:e.start.length',i="";return r+e.dom.encode(n)+i}function u(e){var t=c(e);return'
'+t+"
"}function c(e){var t,n,r,i,o="",u=a(e),c=s(u)-1;if(!u.length)return"";for(o+=l(e.headerTag,tinymce.translate("Table of Contents")),t=0;t";else for(n=c;n
  • ";if(o+=''+r.title+"",i!==r.level&&i)for(n=r.level;n>i;n--)o+="
  • ";else o+="
  • ",i||(o+="");c=r.level}return o}var d,f=e.$,p={depth:3,headerTag:"h2",className:"mce-toc"},h=function(e){var t=0;return function(){var n=(new Date).getTime().toString(32);return e+n+(t++).toString(32)}},m=h("mcetoc_");e.on("PreInit",function(){var n=e.settings,r=parseInt(n.toc_depth,10)||0;d={depth:r>=1&&r<=9?r:p.depth,headerTag:t(n.toc_header)?n.toc_header:p.headerTag,className:n.toc_class?e.dom.encode(n.toc_class):p.className}}),e.on("PreProcess",function(e){var t=f("."+d.className,e.node);t.length&&(t.removeAttr("contentEditable"),t.find("[contenteditable]").removeAttr("contentEditable"))}),e.on("SetContent",function(){var e=f("."+d.className);e.length&&(e.attr("contentEditable",!1),e.children(":first-child").attr("contentEditable",!0))});var g=function(t){return!t.length||e.dom.getParents(t[0],".mce-offscreen-selection").length>0};e.addCommand("mceInsertToc",function(){var t=f("."+d.className);g(t)?e.insertContent(u(d)):e.execCommand("mceUpdateToc")}),e.addCommand("mceUpdateToc",function(){var t=f("."+d.className);t.length&&e.undoManager.transact(function(){t.html(c(d))})}),e.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:r}),e.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),e.addContextToolbar(n,"tocupdate"),e.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:r})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/visualblocks/css/visualblocks.css: -------------------------------------------------------------------------------- 1 | .mce-visualblocks p { 2 | padding-top: 10px; 3 | border: 1px dashed #BBB; 4 | margin-left: 3px; 5 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); 6 | } 7 | 8 | .mce-visualblocks h1 { 9 | padding-top: 10px; 10 | border: 1px dashed #BBB; 11 | margin-left: 3px; 12 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); 13 | } 14 | 15 | .mce-visualblocks h2 { 16 | padding-top: 10px; 17 | border: 1px dashed #BBB; 18 | margin-left: 3px; 19 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); 20 | } 21 | 22 | .mce-visualblocks h3 { 23 | padding-top: 10px; 24 | border: 1px dashed #BBB; 25 | margin-left: 3px; 26 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); 27 | } 28 | 29 | .mce-visualblocks h4 { 30 | padding-top: 10px; 31 | border: 1px dashed #BBB; 32 | margin-left: 3px; 33 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); 34 | } 35 | 36 | .mce-visualblocks h5 { 37 | padding-top: 10px; 38 | border: 1px dashed #BBB; 39 | margin-left: 3px; 40 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); 41 | } 42 | 43 | .mce-visualblocks h6 { 44 | padding-top: 10px; 45 | border: 1px dashed #BBB; 46 | margin-left: 3px; 47 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); 48 | } 49 | 50 | .mce-visualblocks div:not([data-mce-bogus]) { 51 | padding-top: 10px; 52 | border: 1px dashed #BBB; 53 | margin-left: 3px; 54 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); 55 | } 56 | 57 | .mce-visualblocks section { 58 | padding-top: 10px; 59 | border: 1px dashed #BBB; 60 | margin: 0 0 1em 3px; 61 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); 62 | } 63 | 64 | .mce-visualblocks article { 65 | padding-top: 10px; 66 | border: 1px dashed #BBB; 67 | margin: 0 0 1em 3px; 68 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); 69 | } 70 | 71 | .mce-visualblocks blockquote { 72 | padding-top: 10px; 73 | border: 1px dashed #BBB; 74 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); 75 | } 76 | 77 | .mce-visualblocks address { 78 | padding-top: 10px; 79 | border: 1px dashed #BBB; 80 | margin: 0 0 1em 3px; 81 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); 82 | } 83 | 84 | .mce-visualblocks pre { 85 | padding-top: 10px; 86 | border: 1px dashed #BBB; 87 | margin-left: 3px; 88 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); 89 | } 90 | 91 | .mce-visualblocks figure { 92 | padding-top: 10px; 93 | border: 1px dashed #BBB; 94 | margin: 0 0 1em 3px; 95 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); 96 | } 97 | 98 | .mce-visualblocks hgroup { 99 | padding-top: 10px; 100 | border: 1px dashed #BBB; 101 | margin: 0 0 1em 3px; 102 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); 103 | } 104 | 105 | .mce-visualblocks aside { 106 | padding-top: 10px; 107 | border: 1px dashed #BBB; 108 | margin: 0 0 1em 3px; 109 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); 110 | } 111 | 112 | .mce-visualblocks figcaption { 113 | border: 1px dashed #BBB; 114 | } 115 | 116 | .mce-visualblocks ul { 117 | padding-top: 10px; 118 | border: 1px dashed #BBB; 119 | margin: 0 0 1em 3px; 120 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==) 121 | } 122 | 123 | .mce-visualblocks ol { 124 | padding-top: 10px; 125 | border: 1px dashed #BBB; 126 | margin: 0 0 1em 3px; 127 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); 128 | } 129 | 130 | .mce-visualblocks dl { 131 | padding-top: 10px; 132 | border: 1px dashed #BBB; 133 | margin: 0 0 1em 3px; 134 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); 135 | } 136 | -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/visualblocks/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("visualblocks",function(e,t){function n(){var t=this;t.active(o),e.on("VisualBlocks",function(){t.active(e.dom.hasClass(e.getBody(),"mce-visualblocks"))})}var r,i,o;window.NodeList&&(e.addCommand("mceVisualBlocks",function(){var n,a=e.dom;r||(r=a.uniqueId(),n=a.create("link",{id:r,rel:"stylesheet",href:t+"/css/visualblocks.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(n)),e.on("PreviewFormats AfterPreviewFormats",function(t){o&&a.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"==t.type)}),a.toggleClass(e.getBody(),"mce-visualblocks"),o=e.dom.hasClass(e.getBody(),"mce-visualblocks"),i&&i.active(a.hasClass(e.getBody(),"mce-visualblocks")),e.fire("VisualBlocks")}),e.addButton("visualblocks",{title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n,selectable:!0,context:"view",prependToContext:!0}),e.on("init",function(){e.settings.visualblocks_default_state&&e.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")}))}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/visualchars/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("visualchars",function(e){function t(t){function n(e){return''+e+""}function o(){var e,t="";for(e in p)t+=e;return new RegExp("["+t+"]","g")}function a(){var e,t="";for(e in p)t&&(t+=","),t+="span.mce-"+p[e];return t}var s,l,u,c,d,f,p,h,m=e.getBody(),g=e.selection;if(p={"\xa0":"nbsp","\xad":"shy"},r=!r,i.state=r,e.fire("VisualChars",{state:r}),h=o(),t&&(f=g.getBookmark()),r)for(l=[],tinymce.walk(m,function(e){3==e.nodeType&&e.nodeValue&&h.test(e.nodeValue)&&l.push(e)},"childNodes"),u=0;u=0;u--)e.dom.remove(l[u],1);g.moveToBookmark(f)}function n(){var t=this;e.on("VisualChars",function(e){t.active(e.state)})}var r,i=this;e.addCommand("mceVisualChars",t),e.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:n}),e.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:n,selectable:!0,context:"view",prependToContext:!0})}); -------------------------------------------------------------------------------- /public/tinymce/js/tinymce/plugins/wordcount/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var e={},t=function(t){for(var n=e[t],i=n.deps,o=n.defn,a=i.length,s=new Array(a),l=0;le.length-1&&0!==n)&&((o!==t.ALETTER||a!==t.ALETTER)&&(i=e[n+2],(o!==t.ALETTER||a!==t.MIDLETTER&&a!==t.MIDNUMLET&&a!==t.AT||i!==t.ALETTER)&&(r=e[n-1],(o!==t.MIDLETTER&&o!==t.MIDNUMLET&&a!==t.AT||a!==t.ALETTER||r!==t.ALETTER)&&((o!==t.NUMERIC&&o!==t.ALETTER||a!==t.NUMERIC&&a!==t.ALETTER)&&((o!==t.MIDNUM&&o!==t.MIDNUMLET||a!==t.NUMERIC||r!==t.NUMERIC)&&((o!==t.NUMERIC||a!==t.MIDNUM&&a!==t.MIDNUMLET||i!==t.NUMERIC)&&(o!==t.EXTEND&&o!==t.FORMAT&&r!==t.EXTEND&&r!==t.FORMAT&&a!==t.EXTEND&&a!==t.FORMAT&&((o!==t.CR||a!==t.LF)&&(o===t.NEWLINE||o===t.CR||o===t.LF||(a===t.NEWLINE||a===t.CR||a===t.LF||(o!==t.KATAKANA||a!==t.KATAKANA)&&((a!==t.EXTENDNUMLET||o!==t.ALETTER&&o!==t.NUMERIC&&o!==t.KATAKANA&&o!==t.EXTENDNUMLET)&&((o!==t.EXTENDNUMLET||a!==t.ALETTER&&a!==t.NUMERIC&&a!==t.KATAKANA)&&o!==t.AT))))))))))))};return{isWordBoundary:n}}),a("3",["4","5","6"],function(e,t,n){var r=e.EMPTY_STRING,i=e.WHITESPACE,o=e.PUNCTUATION,a=function(e){return"http"===e||"https"===e},s=function(e,t){var n;for(n=t;n { 9 | if (!req.body) return res.json({ 10 | error: "Missing fields !", 11 | code: 0 12 | }) 13 | if (!req.body.email || !req.body.password) return res.json({ 14 | error: "Missing fields !", 15 | code: 0 16 | }) 17 | const users = new database.users(req.body.email, req.body.password); 18 | if (users.error) return res.json(users) 19 | users.login().then(user => { 20 | if (user.error) return res.json(user); 21 | req.session.user = user; 22 | res.json({ 23 | result: "ok", 24 | code: 1 25 | }) 26 | }) 27 | }) 28 | .post("/register", (req, res) => { 29 | if (!req.body) return res.json({ 30 | error: "Missing fields !", 31 | code: 0 32 | }) 33 | if (!req.body.email || !req.body.password) return res.json({ 34 | error: "Missing fields !", 35 | code: 0 36 | }) 37 | const users = new database.users(req.body.email, req.body.password); 38 | if (users.error) return res.json(users) 39 | users.register(false).then(result => { 40 | if (result.error) return res.json(result); 41 | res.json({ 42 | result: "ok", 43 | code: 1 44 | }) 45 | }) 46 | }) 47 | .post("/share", (req, res) => { 48 | if(!req.session.user) return res.json({ 49 | error : "Please login first !", 50 | code : 0 51 | }) 52 | if(!req.session.user.admin) return res.json({ 53 | error : "You dont have permisson !", 54 | code : 0 55 | }) 56 | if (!req.body) return res.json({ 57 | error: "Missing fields!", 58 | code: 0 59 | }) 60 | if (!req.body.title || !req.body.description || !req.body.detail) return res.json({ 61 | error: "Missing fields!", 62 | code: 0 63 | }) 64 | const articles = new database.articles(req.body.title); 65 | if (articles.error) return res.json({ 66 | error: articles.error, 67 | code: 0 68 | }) 69 | articles.share(req.body.detail, req.body.description, req.body.keywords).then(article => { 70 | if (article.error) return res.json({ 71 | error: article.error, 72 | code: 0 73 | }) 74 | res.json({ 75 | data: article.result, 76 | code : 1 77 | }) 78 | }) 79 | }) 80 | .post("/delete", (req, res)=>{ 81 | if(!req.session.user) return res.json({ 82 | error : "Please login first !", 83 | code : 0 84 | }) 85 | if(!req.session.user.admin) return res.json({ 86 | error : "You dont have permisson !", 87 | code : 0 88 | }) 89 | if (!req.body) return res.json({ 90 | error: "Unsupperted request!", 91 | code: 0 92 | }) 93 | if (!req.body.url) return res.json({ 94 | error: "Missing fields!", 95 | code: 0 96 | }) 97 | const articles = new database.articles(req.body.url); 98 | if (articles.error) return res.json({ 99 | error: articles.error, 100 | code: 0 101 | }) 102 | articles.delete().then(result=>{ 103 | if(result.error) return res.json({ 104 | error : result.error, 105 | code : 0 106 | }) 107 | res.json({ 108 | result : "ok", 109 | code : 1 110 | }) 111 | }) 112 | }) 113 | .post("/contact", (req, res) => { 114 | if (!req.body) return res.json({ 115 | error: "Missing fields!", 116 | code: 0 117 | }) 118 | if (!req.body.name || !req.body.email || !req.body.message) return res.json({ 119 | error: "Missing fields!", 120 | code: 0 121 | }) 122 | let transporter = nodemailer.createTransport({ 123 | service: 'yandex', 124 | auth: { 125 | user: process.env.settingsMail || 'info@turkdeveloper.com', 126 | pass: process.env.settingsMailPassword || '12345678' 127 | } 128 | }); 129 | let mailOptions = { 130 | from: '"turkdeveloper.com" ', 131 | to: 'furkanaydin@turkdeveloper.com', 132 | subject: 'Contact request from ' + req.body.name, 133 | text: req.body.message + " - email address : " + req.body.email, 134 | html: '' + req.body.message + " - email address : " + req.body.email + '' 135 | }; 136 | transporter.sendMail(mailOptions, (error, info) => { 137 | if (error) return res.json({ 138 | error: "Somethings wrong. Please try again.", 139 | code: 0 140 | }) 141 | res.json({ 142 | result: "ok", 143 | code: 1 144 | }) 145 | }); 146 | }) 147 | .post("/getAllArticles", (req, res)=>{ 148 | if(!req.session.user) return res.json({ 149 | error : "Please login first !", 150 | code : 0 151 | }) 152 | if(!req.session.user.admin) return res.json({ 153 | error : "You dont have permisson !", 154 | code : 0 155 | }) 156 | database.db.articles.then(articles => { 157 | articles.find({}).toArray().then(article => { 158 | res.json(article) 159 | }) 160 | }) 161 | }) -------------------------------------------------------------------------------- /routers/app.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const settings = require("./../settings.json"); 3 | const database = require("./../database/index"); 4 | 5 | exports.app = express.Router(); 6 | 7 | exports.app 8 | .get('/', (req, res) => { 9 | res.render("index", { 10 | settings: settings, 11 | admin: req.session.user ? req.session.user.admin : false 12 | }) 13 | }) 14 | .get("/resume", (req, res) => { 15 | res.render("resume", { 16 | settings: settings, 17 | page_info: { 18 | title: "Resume", 19 | description: "My personal resume.", 20 | keywords: "resume, developer resume, front-end developer" 21 | }, 22 | admin: req.session.user ? req.session.user.admin : false 23 | }) 24 | }) 25 | .get("/blogs", (req, res) => { 26 | database.db.articles.then(articles => { 27 | articles.find({}).sort( { date: -1 } ).toArray().then(article => { 28 | res.render("blog", { 29 | settings: settings, 30 | page_info: { 31 | title: "My Blogs", 32 | description: "", 33 | keywords: "blog, developer blog, blogger, node blogger" 34 | }, 35 | admin: req.session.user ? req.session.user.admin : false, 36 | articles: article || [] 37 | }) 38 | }) 39 | }) 40 | }) 41 | .get("/contact", (req, res) => { 42 | res.render("contact", { 43 | settings: settings, 44 | page_info: { 45 | title: "Contact with me", 46 | description: "You can connect with me with this page.", 47 | keywords: "Muhammed Furkan Aydın, contact, hire me" 48 | }, 49 | admin: req.session.user ? req.session.user.admin : false 50 | }) 51 | }) 52 | .get("/article/:blog", (req, res) => { 53 | if (!req.params) return res.redirect("/"); 54 | if (!req.params.blog) return res.redirect("/blogs"); 55 | const articles = new database.articles(req.params.blog); 56 | articles.find().then(article => { 57 | if (article.error) res.redirect("/blogs"); 58 | res.render("article", { 59 | settings: settings, 60 | admin: req.session.user ? req.session.user.admin : false, 61 | article: article, 62 | page_info: { 63 | title: article.title, 64 | description: article.description, 65 | keywords: article.keywords 66 | }, 67 | sharedDate: article.date.getDate() + "." + (article.date.getMonth() + 1) + "." + article.date.getFullYear() 68 | }) 69 | }) 70 | }) 71 | .get("/dashboard", (req, res) => { 72 | if (!req.session.user) return res.redirect("/"); 73 | if (!req.session.user.admin) return res.redirect("/"); 74 | res.render("dashboard", { 75 | settings: settings, 76 | admin: req.session.user ? req.session.user.admin : false 77 | }) 78 | }) 79 | .get("/login", (req, res) => { 80 | res.render("login", { 81 | settings: settings, 82 | admin: req.session.user ? req.session.user.admin : false 83 | }) 84 | }) 85 | .get("/logout", (req, res) => { 86 | req.session.destroy(function (err) { 87 | if (err) return console.log(err) 88 | res.redirect('/'); 89 | }) 90 | }) -------------------------------------------------------------------------------- /routers/index.js: -------------------------------------------------------------------------------- 1 | const app = require("./app"); 2 | const api = require("./api"); 3 | 4 | exports.app = app.app; 5 | exports.api = api.api; -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const session = require('express-session') 3 | const exphbs = require('express-handlebars'); 4 | const routers = require("./routers/index"); 5 | const cookieParser = require('cookie-parser'); 6 | const MongoStore = require("connect-mongo")(session); 7 | const bodyParser = require('body-parser') 8 | const port = process.env.PORT || 3000; 9 | const database = require("./database/index"); 10 | let install = false; 11 | const app = express(); 12 | 13 | database.db.users.then(users => { 14 | users.findOne({ 15 | admin: true 16 | }).then(user => { 17 | if (!user) install = true; 18 | }) 19 | }) 20 | 21 | app 22 | .use(session({ 23 | resave: false, 24 | saveUninitialized: false, 25 | secret: 'pijamalı hasta yağız şoföre çabucak güvendi', 26 | store: new MongoStore({ 27 | url: process.env.BloggerDB || "mongodb://127.0.0.1:27017/BloggerDB" 28 | }), 29 | cookie: { 30 | maxAge: 180 * 60 * 1000 31 | } 32 | })) 33 | .use(bodyParser.json()) 34 | .use(express.static("./public")) 35 | .use(cookieParser()) 36 | .engine('.hbs', exphbs({ 37 | extname: '.hbs' 38 | })) 39 | .set('view engine', '.hbs') 40 | .post("/install", (req, res, next) => { 41 | if (install) { 42 | if (!req.body) return res.json({ 43 | error: "Missing fields !", 44 | code: 0 45 | }) 46 | if (!req.body.email || !req.body.password) return res.json({ 47 | error: "Missing fields !", 48 | code: 0 49 | }) 50 | const users = new database.users(req.body.email, req.body.password); 51 | if (users.error) return res.json(users) 52 | users.register(true).then(result => { 53 | if (result.error) return res.json(result); 54 | install = false; 55 | req.session.user = result; 56 | res.json({ 57 | result: "ok", 58 | code: 1 59 | }) 60 | }) 61 | } else { 62 | next(); 63 | } 64 | }) 65 | .use((req, res, next) => { 66 | if (install) { 67 | res.render("register") 68 | } else { 69 | next(); 70 | } 71 | }) 72 | .use("/", routers.app) 73 | .use("/api", routers.api) 74 | .use((req, res, next) => { 75 | res.json({ 76 | error: "Page not found!", 77 | code: 404 78 | }) // [TODO] 404 page design 79 | }) 80 | .listen(port, _ => { 81 | console.log(`Web sitemize ${port} portunda calismaktadir.`); 82 | }); -------------------------------------------------------------------------------- /settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "title" : "Muhammed Furkan AYDIN", 3 | "description" : "Front-end developer from Earth", 4 | "keywords" : "muhammed furkan aydın, developer, turkishdeveloper, turkdeveloper", 5 | "cover_image" : "/image/cover.jpg" 6 | } -------------------------------------------------------------------------------- /views/article.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{> head}} 6 | 7 | 8 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    {{article.title}}

    15 | {{sharedDate}} 16 |
    17 |
    18 | {{{article.detail}}} 19 |
    20 |
    21 | 22 |
    23 | {{> menu}} 24 |
    25 |
    26 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /views/blog.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{> head}} 6 | 7 | 8 | 9 |
    10 |
    11 |
    12 |
    13 | {{#if articles.length}} 14 | {{#each articles}} 15 | 16 |

    {{this.title}}

    17 | {{this.description}} 18 |
    19 | {{/each}} 20 | {{else}} 21 |

    There is no blog post yet.

    22 | Please come back later. 23 | {{/if}} 24 | 25 | 36 |
    37 | {{> menu}} 38 |
    39 |
    40 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /views/contact.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{> head}} 6 | 7 | 8 | 9 |
    10 |
    11 |
    12 |
    13 |

    {contact} me.

    14 | 15 | 16 | 17 | 20 |
    21 | {{> menu}} 22 |
    23 |
    24 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /views/dashboard.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Dashboard 9 | 10 | 11 | 12 | 13 | 14 |
    15 |
    16 |
    17 | 24 |
    25 |
    26 |
    27 |
    28 | 32 | 62 |
    63 |
    64 | 65 | 66 | 67 |
    68 |
    69 | 70 | 71 | 72 | 73 |
    Share
    74 |
    75 |
    76 |
    77 | 82 | 91 |
    92 |
    93 | 94 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /views/index.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{> head}} 6 | 7 | 8 | 9 |
    10 |
    11 |
    12 |
    13 |

    {{settings.title}}

    14 | {{settings.description}} 15 |
    16 | {{> menu}} 17 |
    18 |
    19 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /views/login.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{> head}} 6 | 7 | 8 | 9 |
    10 |
    11 |
    12 |
    13 | 14 | 15 | 18 |
    19 | {{> menu}} 20 |
    21 |
    22 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /views/partials/head.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{#if page_info}}{{page_info.title}}{{else}}{{settings.title}}{{/if}} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 21 | -------------------------------------------------------------------------------- /views/partials/menu.hbs: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /views/register.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{> head}} 6 | 7 | 8 | 9 |
    10 |
    11 |

    You dont have admin user.

    12 | Please enter your email address and password. 13 |
    14 |
    15 |
    16 | 17 | 18 | 21 |
    22 |
    23 |
    24 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /views/resume.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{> head}} 6 | 7 | 8 | 9 |
    10 |
    11 |
    12 |
    13 |

    I'm Muhammed Furkan AYDIN,

    14 | First of all, leaving college was the best thing that happened to me. I want to thank those who took me out of the university.

    I am a high school graduate front-end developer in Turkey since 2013. I got my experience from working on many start-up projects. I define myself as an innovative technologist and visionary front-end developer with a passion for creating successful web sites.
    15 |
    16 | Contact Info 17 |
    18 | 32 |
    33 | What i know ? 34 |
    35 |
    36 |
      37 |
    • HTML 5
    • 38 |
    • CSS 3
    • 39 |
    • JAVASCRIPT
    • 40 |
    • VUEJS
    • 41 |
    • REACTJS
    • 42 |
    • MITHRILJS
    • 43 |
    • BOOTSTRAP
    • 44 |
    • JQUERY
    • 45 |
    • LESS
    • 46 |
    • WEBPACK
    • 47 |
    • BABLEJS
    • 48 |
    • REDUX
    • 49 |
    50 |
      51 |
    • NODEJS
    • 52 |
    • EXPRESSJS
    • 53 |
    • MONGODB
    • 54 |
    • SCRYPT
    • 55 |
    • OOP
    • 56 |
    • SOCKET.IO
    • 57 |
    • HANDLEBARS
    • 58 |
    • Google API
    • 59 |
    • Linkedin API
    • 60 |
    • Twitter API
    • 61 |
    • ECMASCRIPT 6
    • 62 |
    • OAUTH 1 - 2
    • 63 |
    64 |
    65 |
    66 | My recent works 67 |
    68 |
    69 |
    70 |
    71 |

    Socialgin

    72 | Front-End Developer 73 |
    74 |
    75 |
    76 | Socialgin started as a startup project. The aim of socialgin was to make a smarter social media management app that is smarter 77 | than what we have now.Most apps won’t support real time queries, emotion analyze and most 78 | of them do not have satisfying graphs. I am developing socialgin using HTML 5, CSS 3, ReactJS 79 | and Redux JS. I hope I will create a revolutionary social media management app. 80 |
    81 |
    82 |
      83 |
    • Writing Ecmascript 6 for front-end development using ReactJS and ReduxJS freamworks.
    • 84 |
    • Using websockets and managing relations.
    • 85 |
    • Writing LESS for developing user interface.
    • 86 |
    • Making bundle file using webpack.
    • 87 |
    88 |
    89 |
    90 |
    91 |
    92 |
    93 |

    Community Inviter

    94 | Full Stack Developer 95 |
    96 |
    97 |
    98 | Automated way of increasing users slack community members. Users can get join request and ask them some questions with this 99 | project. 100 |
    101 |
    102 |
      103 |
    • Creating user interface with css3 and vanillajs
    • 104 |
    • Making back-end with nodejs and mongodb.
    • 105 |
    • Making plugin apps for users.
    • 106 |
    • I create my slack sdk and i used in this project.
    • 107 |
    108 |
    109 |
    110 |
    111 |
    112 |
    113 |

    Help To Share

    114 | Front-End Developer 115 |
    116 |
    117 |
    118 | A startup project I made in high school. In this project, users manage all facebook groups thay have. We got 10.000+ active 119 | user but Facebook didnt like this and API removed from Facebook. 120 |
    121 |
    122 |
      123 |
    • Wring front-end development using Bootstrap and jQuery
    • 124 |
    • Connection to facebook and getting data.
    • 125 |
    • Sharing all facebook groups in piece by piece and every single sharing has rondom time, 126 | rondom content because of facebook securety.
    • 127 |
    128 |
    129 |
    130 |
    131 |

    Everything i know, i learned myself. I bought many courses. Sometimes i spent my days on Stackoverflow 132 | for basic problem, sometimes i read code libraries in github. I will continue to do this until I'm 133 | the best in the world.

    134 |
    135 |
    136 | {{> menu}} 137 |
    138 |
    139 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require("webpack"); 2 | module.exports = { 3 | module: { 4 | loaders: [{ 5 | test: /\.less$/, 6 | loader: "style!css!less!" 7 | }, 8 | { 9 | test: /\.css$/, 10 | loader: "style!css!" 11 | }, 12 | { 13 | test: /\.(woff|woff2|ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, 14 | loader: 'base64-font-loader' 15 | }, 16 | { 17 | test: /\.js/, 18 | loader: "babel", 19 | query: { 20 | presets: ['es2015', { 21 | compact: true 22 | }] 23 | } 24 | } 25 | ], 26 | plugins: [ 27 | new webpack.optimize.OccurrenceOrderPlugin(), 28 | new webpack.optimize.UglifyJsPlugin(), 29 | new webpack.optimize.DedupePlugin(), 30 | new webpack.DefinePlugin({ 31 | 'process.env': { 32 | NODE_ENV: '"development"' 33 | } 34 | }) 35 | ] 36 | } 37 | } --------------------------------------------------------------------------------