got rid of src files for styles and front end scripting, added base css and script assets
parent
f3dfd3411a
commit
00f9229eb2
@ -0,0 +1,539 @@
|
||||
/**
|
||||
-------------------------------
|
||||
-- Typography
|
||||
-------------------------------
|
||||
**/
|
||||
/**
|
||||
-------------------------------
|
||||
-- Colors
|
||||
-------------------------------
|
||||
**/
|
||||
/**
|
||||
-------------------------------
|
||||
-- Mixins
|
||||
-------------------------------
|
||||
**/
|
||||
/**
|
||||
-------------------------------
|
||||
-- Normalize
|
||||
-------------------------------
|
||||
**/
|
||||
html {
|
||||
line-height: 1.15;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
article,
|
||||
aside,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
line-height: 1em;
|
||||
}
|
||||
figcaption,
|
||||
figure,
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
pre {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
a {
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
a:active,
|
||||
a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
abbr[title] {
|
||||
border-bottom: none;
|
||||
text-decoration: underline;
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
font-weight: bolder;
|
||||
}
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
sub,
|
||||
sup {
|
||||
font-size: 60%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
sup {
|
||||
top: -0.55em;
|
||||
background: #bdcbdb;
|
||||
color: #151d26;
|
||||
border-radius: 2px;
|
||||
padding: 0 2px 0 2px;
|
||||
margin: 0 2px 0 0;
|
||||
}
|
||||
audio,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif;
|
||||
font-size: 100%;
|
||||
line-height: 1.15;
|
||||
margin: 0;
|
||||
}
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
button,
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner,
|
||||
button::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring,
|
||||
button:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
legend {
|
||||
box-sizing: border-box;
|
||||
color: inherit;
|
||||
display: table;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
white-space: normal;
|
||||
}
|
||||
progress {
|
||||
display: inline-block;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
font: inherit;
|
||||
}
|
||||
details,
|
||||
menu {
|
||||
display: block;
|
||||
}
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
canvas {
|
||||
display: inline-block;
|
||||
}
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
/**
|
||||
-------------------------------
|
||||
-- Main Structure
|
||||
-------------------------------
|
||||
**/
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
font: 400 1.2em/1.4em Helvetica, Arial, sans-serif;
|
||||
}
|
||||
body {
|
||||
background: #ebe5d4;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
perspective: 1px;
|
||||
transform-style: preserve-3d;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
a {
|
||||
color: #151d26;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #7ed07e;
|
||||
-moz-transition: all 0.2s linear;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
-o-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
}
|
||||
a:hover {
|
||||
border-bottom: 1px solid #fc6399;
|
||||
}
|
||||
svg.icons {
|
||||
width: 25px;
|
||||
fill: #ebe5d4;
|
||||
}
|
||||
header {
|
||||
background: #151d26;
|
||||
height: 90%;
|
||||
width: 100%;
|
||||
border-top: #ebe5d4 3px solid;
|
||||
}
|
||||
header nav {
|
||||
width: 97%;
|
||||
margin: 10px auto;
|
||||
color: #151d26;
|
||||
}
|
||||
header nav .left,
|
||||
header nav .right {
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
header nav .left a.logo-link {
|
||||
border-bottom: none;
|
||||
margin: 0 0 20px 0;
|
||||
display: block;
|
||||
}
|
||||
header nav .left a.logo-link #logo {
|
||||
width: 50px;
|
||||
border-bottom: none;
|
||||
}
|
||||
header nav .right {
|
||||
text-align: right;
|
||||
}
|
||||
header nav .right a.menu-link {
|
||||
background: #fc6399;
|
||||
margin-bottom: 4px;
|
||||
padding: 3px;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
font-size: 0.8em;
|
||||
border-bottom: none;
|
||||
}
|
||||
header nav .right a.menu-link:hover {
|
||||
background: #feb1cc;
|
||||
}
|
||||
.container {
|
||||
z-index: 2;
|
||||
background: #ebe5d4;
|
||||
line-height: 30px;
|
||||
font-weight: lighter;
|
||||
width: 100%;
|
||||
color: #32302f;
|
||||
}
|
||||
.container article {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
max-width: 840px;
|
||||
background: #ebe5d4;
|
||||
vertical-align: top;
|
||||
color: #32302f;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.container article .index,
|
||||
.container article .page {
|
||||
padding: 0 0 15px 0;
|
||||
}
|
||||
.container article .index img,
|
||||
.container article .page img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.container article .index h1,
|
||||
.container article .page h1 {
|
||||
color: #151d26;
|
||||
}
|
||||
.container article .index p,
|
||||
.container article .page p {
|
||||
font: 300 1.25em/1.6em Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.container article .index .meta,
|
||||
.container article .page .meta {
|
||||
font: 500 0.8em/1.3em Helvetica, Arial, sans-serif;
|
||||
padding: 5px 0 0 0;
|
||||
border-top: 1px solid #151d26;
|
||||
background: #ede8d8;
|
||||
}
|
||||
.container article .index .meta a,
|
||||
.container article .page .meta a {
|
||||
font-size: 0.8em;
|
||||
font-weight: 400;
|
||||
}
|
||||
.container article .index .archive-item,
|
||||
.container article .page .archive-item {
|
||||
padding: 15px 0 20px 0;
|
||||
}
|
||||
.container article .index .archive-item span.year,
|
||||
.container article .page .archive-item span.year {
|
||||
font-size: 1.5em;
|
||||
font-weight: 500;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
color: #151d26;
|
||||
}
|
||||
.container article .index .archive-item .archive-month,
|
||||
.container article .page .archive-item .archive-month {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 30%;
|
||||
padding: 5px;
|
||||
}
|
||||
.container article .index .archive-item .archive-month span.month,
|
||||
.container article .page .archive-item .archive-month span.month {
|
||||
color: #fc6399;
|
||||
font-size: 1.5em;
|
||||
font-weight: 300;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
}
|
||||
.container section {
|
||||
padding: 0 0 20px 0;
|
||||
background: #151d26;
|
||||
}
|
||||
.container section a {
|
||||
color: #ebe5d4;
|
||||
}
|
||||
.container section .index-lists,
|
||||
.container section .page-title {
|
||||
max-width: 840px;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
padding: 20px 0 0 0;
|
||||
}
|
||||
.container section .index-lists span,
|
||||
.container section .page-title span {
|
||||
font: 600 2em/1.5 Helvetica, Arial, sans-serif;
|
||||
color: #ebe5d4;
|
||||
}
|
||||
.container section .index-lists .recent,
|
||||
.container section .page-title .recent,
|
||||
.container section .index-lists .featured,
|
||||
.container section .page-title .featured {
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
vertical-align: top;
|
||||
}
|
||||
.container section .index-lists label,
|
||||
.container section .page-title label {
|
||||
background: #32302f;
|
||||
color: #ebe5d4;
|
||||
font-size: 1.5em;
|
||||
line-height: 1.3;
|
||||
}
|
||||
footer {
|
||||
background: #e4dcc5;
|
||||
padding: 10px;
|
||||
color: #151d26;
|
||||
font-size: 0.8em;
|
||||
font-weight: 600;
|
||||
height: 100px;
|
||||
}
|
||||
footer .inner {
|
||||
margin: 20px auto;
|
||||
width: 80%;
|
||||
max-width: 840px;
|
||||
}
|
||||
footer .inner a {
|
||||
color: #fc6399;
|
||||
}
|
||||
@media only screen and (max-width: 640px) {
|
||||
header nav {
|
||||
width: 98%;
|
||||
}
|
||||
header span {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
.container article .index .archive-item .archive-month,
|
||||
.container article .page .archive-item .archive-month {
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 480px) {
|
||||
header nav {
|
||||
width: 96%;
|
||||
}
|
||||
.container article .index,
|
||||
.container article .page {
|
||||
margin: 0;
|
||||
}
|
||||
.container article .index p,
|
||||
.container article .page p {
|
||||
font: 300 1em/1.6em Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.container section .index-lists .recent,
|
||||
.container section .index-lists .featured {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 375px) {
|
||||
header nav {
|
||||
width: 95%;
|
||||
}
|
||||
.container article .index,
|
||||
.container article .page {
|
||||
margin: 0;
|
||||
}
|
||||
.container article .index p,
|
||||
.container article .page p {
|
||||
font: 300 0.9em/1.7em Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.container article .index .archive-item .archive-month,
|
||||
.container article .page .archive-item .archive-month {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
/**
|
||||
-------------------------------
|
||||
-- Forms
|
||||
-------------------------------
|
||||
**/
|
||||
form {
|
||||
display: inline-block;
|
||||
}
|
||||
input[type=email],
|
||||
input[type=password],
|
||||
input[type=text] {
|
||||
border: 0;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
margin: 10px 5px 0 0;
|
||||
font: 15px 'RobotoMono';
|
||||
display: inline-block;
|
||||
}
|
||||
textarea {
|
||||
border: 0;
|
||||
border-radius: 3px;
|
||||
color: $type02;
|
||||
font: 15px 'RobotoMono';
|
||||
}
|
||||
button,
|
||||
input[type=submit] {
|
||||
background: #fc6399;
|
||||
color: #ebe5d4;
|
||||
font: 14px Helvetica, Arial, sans-serif;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
padding: 5px 5px 0 5px;
|
||||
-moz-transition: all 0.3s linear;
|
||||
-webkit-transition: all 0.3s linear;
|
||||
-o-transition: all 0.3s linear;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
button:hover,
|
||||
input[type=submit]:hover {
|
||||
background: #fc7ca9;
|
||||
}
|
||||
select {
|
||||
font: 14px 'RobotoMono';
|
||||
border: 1px solid #fc6399;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
color: #151d26;
|
||||
}
|
||||
::-webkit-input-placeholder {
|
||||
font: 14px 'RobotoMono';
|
||||
color: #837e7c;
|
||||
}
|
||||
:-moz-placeholder {
|
||||
/* Firefox 18- */
|
||||
font: 14px 'RobotoMono';
|
||||
color: #837e7c;
|
||||
}
|
||||
::-moz-placeholder {
|
||||
/* Firefox 19+ */
|
||||
font: 14px 'RobotoMono';
|
||||
color: #837e7c;
|
||||
}
|
||||
:-ms-input-placeholder {
|
||||
font: 14px 'RobotoMono';
|
||||
color: #837e7c;
|
||||
}
|
||||
/*# sourceMappingURL=base.css.map */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,376 @@
|
||||
// modules are defined as an array
|
||||
// [ module function, map of requires ]
|
||||
//
|
||||
// map of requires is short require name -> numeric require
|
||||
//
|
||||
// anything defined in a previous bundle is accessed via the
|
||||
// orig method which is the require for previous bundles
|
||||
parcelRequire = (function (modules, cache, entry, globalName) {
|
||||
// Save the require from previous bundle to this closure if any
|
||||
var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
|
||||
var nodeRequire = typeof require === 'function' && require;
|
||||
|
||||
function newRequire(name, jumped) {
|
||||
if (!cache[name]) {
|
||||
if (!modules[name]) {
|
||||
// if we cannot find the module within our internal map or
|
||||
// cache jump to the current global require ie. the last bundle
|
||||
// that was added to the page.
|
||||
var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
|
||||
if (!jumped && currentRequire) {
|
||||
return currentRequire(name, true);
|
||||
}
|
||||
|
||||
// If there are other bundles on this page the require from the
|
||||
// previous one is saved to 'previousRequire'. Repeat this as
|
||||
// many times as there are bundles until the module is found or
|
||||
// we exhaust the require chain.
|
||||
if (previousRequire) {
|
||||
return previousRequire(name, true);
|
||||
}
|
||||
|
||||
// Try the node require function if it exists.
|
||||
if (nodeRequire && typeof name === 'string') {
|
||||
return nodeRequire(name);
|
||||
}
|
||||
|
||||
var err = new Error('Cannot find module \'' + name + '\'');
|
||||
err.code = 'MODULE_NOT_FOUND';
|
||||
throw err;
|
||||
}
|
||||
|
||||
localRequire.resolve = resolve;
|
||||
localRequire.cache = {};
|
||||
|
||||
var module = cache[name] = new newRequire.Module(name);
|
||||
|
||||
modules[name][0].call(module.exports, localRequire, module, module.exports, this);
|
||||
}
|
||||
|
||||
return cache[name].exports;
|
||||
|
||||
function localRequire(x){
|
||||
return newRequire(localRequire.resolve(x));
|
||||
}
|
||||
|
||||
function resolve(x){
|
||||
return modules[name][1][x] || x;
|
||||
}
|
||||
}
|
||||
|
||||
function Module(moduleName) {
|
||||
this.id = moduleName;
|
||||
this.bundle = newRequire;
|
||||
this.exports = {};
|
||||
}
|
||||
|
||||
newRequire.isParcelRequire = true;
|
||||
newRequire.Module = Module;
|
||||
newRequire.modules = modules;
|
||||
newRequire.cache = cache;
|
||||
newRequire.parent = previousRequire;
|
||||
newRequire.register = function (id, exports) {
|
||||
modules[id] = [function (require, module) {
|
||||
module.exports = exports;
|
||||
}, {}];
|
||||
};
|
||||
|
||||
var error;
|
||||
for (var i = 0; i < entry.length; i++) {
|
||||
try {
|
||||
newRequire(entry[i]);
|
||||
} catch (e) {
|
||||
// Save first error but execute all entries
|
||||
if (!error) {
|
||||
error = e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (entry.length) {
|
||||
// Expose entry point to Node, AMD or browser globals
|
||||
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
|
||||
var mainExports = newRequire(entry[entry.length - 1]);
|
||||
|
||||
// CommonJS
|
||||
if (typeof exports === "object" && typeof module !== "undefined") {
|
||||
module.exports = mainExports;
|
||||
|
||||
// RequireJS
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
define(function () {
|
||||
return mainExports;
|
||||
});
|
||||
|
||||
// <script>
|
||||
} else if (globalName) {
|
||||
this[globalName] = mainExports;
|
||||
}
|
||||
}
|
||||
|
||||
// Override the current require with this new one
|
||||
parcelRequire = newRequire;
|
||||
|
||||
if (error) {
|
||||
// throw error from earlier, _after updating parcelRequire_
|
||||
throw error;
|
||||
}
|
||||
|
||||
return newRequire;
|
||||
})({"Base.mjs":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
var Base = /*#__PURE__*/function () {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
function Base() {
|
||||
_classCallCheck(this, Base);
|
||||
|
||||
this.start();
|
||||
}
|
||||
|
||||
_createClass(Base, [{
|
||||
key: "start",
|
||||
value: function start() {
|
||||
console.log('Connected like F.E.');
|
||||
} //--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
|
||||
}]);
|
||||
|
||||
return Base;
|
||||
}();
|
||||
|
||||
exports.default = Base;
|
||||
},{}],"Start.mjs":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
var _Base = _interopRequireDefault(require("./Base.mjs"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var base = new _Base.default();
|
||||
}, false);
|
||||
},{"./Base.mjs":"Base.mjs"}],"../../../../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
|
||||
var global = arguments[3];
|
||||
var OVERLAY_ID = '__parcel__error__overlay__';
|
||||
var OldModule = module.bundle.Module;
|
||||
|
||||
function Module(moduleName) {
|
||||
OldModule.call(this, moduleName);
|
||||
this.hot = {
|
||||
data: module.bundle.hotData,
|
||||
_acceptCallbacks: [],
|
||||
_disposeCallbacks: [],
|
||||
accept: function (fn) {
|
||||
this._acceptCallbacks.push(fn || function () {});
|
||||
},
|
||||
dispose: function (fn) {
|
||||
this._disposeCallbacks.push(fn);
|
||||
}
|
||||
};
|
||||
module.bundle.hotData = null;
|
||||
}
|
||||
|
||||
module.bundle.Module = Module;
|
||||
var checkedAssets, assetsToAccept;
|
||||
var parent = module.bundle.parent;
|
||||
|
||||
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
||||
var hostname = "" || location.hostname;
|
||||
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
||||
var ws = new WebSocket(protocol + '://' + hostname + ':' + "53025" + '/');
|
||||
|
||||
ws.onmessage = function (event) {
|
||||
checkedAssets = {};
|
||||
assetsToAccept = [];
|
||||
var data = JSON.parse(event.data);
|
||||
|
||||
if (data.type === 'update') {
|
||||
var handled = false;
|
||||
data.assets.forEach(function (asset) {
|
||||
if (!asset.isNew) {
|
||||
var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
|
||||
|
||||
if (didAccept) {
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
}); // Enable HMR for CSS by default.
|
||||
|
||||
handled = handled || data.assets.every(function (asset) {
|
||||
return asset.type === 'css' && asset.generated.js;
|
||||
});
|
||||
|
||||
if (handled) {
|
||||
console.clear();
|
||||
data.assets.forEach(function (asset) {
|
||||
hmrApply(global.parcelRequire, asset);
|
||||
});
|
||||
assetsToAccept.forEach(function (v) {
|
||||
hmrAcceptRun(v[0], v[1]);
|
||||
});
|
||||
} else if (location.reload) {
|
||||
// `location` global exists in a web worker context but lacks `.reload()` function.
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
if (data.type === 'reload') {
|
||||
ws.close();
|
||||
|
||||
ws.onclose = function () {
|
||||
location.reload();
|
||||
};
|
||||
}
|
||||
|
||||
if (data.type === 'error-resolved') {
|
||||
console.log('[parcel] ✨ Error resolved');
|
||||
removeErrorOverlay();
|
||||
}
|
||||
|
||||
if (data.type === 'error') {
|
||||
console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
|
||||
removeErrorOverlay();
|
||||
var overlay = createErrorOverlay(data);
|
||||
document.body.appendChild(overlay);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function removeErrorOverlay() {
|
||||
var overlay = document.getElementById(OVERLAY_ID);
|
||||
|
||||
if (overlay) {
|
||||
overlay.remove();
|
||||
}
|
||||
}
|
||||
|
||||
function createErrorOverlay(data) {
|
||||
var overlay = document.createElement('div');
|
||||
overlay.id = OVERLAY_ID; // html encode message and stack trace
|
||||
|
||||
var message = document.createElement('div');
|
||||
var stackTrace = document.createElement('pre');
|
||||
message.innerText = data.error.message;
|
||||
stackTrace.innerText = data.error.stack;
|
||||
overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
|
||||
return overlay;
|
||||
}
|
||||
|
||||
function getParents(bundle, id) {
|
||||
var modules = bundle.modules;
|
||||
|
||||
if (!modules) {
|
||||
return [];
|
||||
}
|
||||
|
||||
var parents = [];
|
||||
var k, d, dep;
|
||||
|
||||
for (k in modules) {
|
||||
for (d in modules[k][1]) {
|
||||
dep = modules[k][1][d];
|
||||
|
||||
if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
|
||||
parents.push(k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bundle.parent) {
|
||||
parents = parents.concat(getParents(bundle.parent, id));
|
||||
}
|
||||
|
||||
return parents;
|
||||
}
|
||||
|
||||
function hmrApply(bundle, asset) {
|
||||
var modules = bundle.modules;
|
||||
|
||||
if (!modules) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (modules[asset.id] || !bundle.parent) {
|
||||
var fn = new Function('require', 'module', 'exports', asset.generated.js);
|
||||
asset.isNew = !modules[asset.id];
|
||||
modules[asset.id] = [fn, asset.deps];
|
||||
} else if (bundle.parent) {
|
||||
hmrApply(bundle.parent, asset);
|
||||
}
|
||||
}
|
||||
|
||||
function hmrAcceptCheck(bundle, id) {
|
||||
var modules = bundle.modules;
|
||||
|
||||
if (!modules) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!modules[id] && bundle.parent) {
|
||||
return hmrAcceptCheck(bundle.parent, id);
|
||||
}
|
||||
|
||||
if (checkedAssets[id]) {
|
||||
return;
|
||||
}
|
||||
|
||||
checkedAssets[id] = true;
|
||||
var cached = bundle.cache[id];
|
||||
assetsToAccept.push([bundle, id]);
|
||||
|
||||
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return getParents(global.parcelRequire, id).some(function (id) {
|
||||
return hmrAcceptCheck(global.parcelRequire, id);
|
||||
});
|
||||
}
|
||||
|
||||
function hmrAcceptRun(bundle, id) {
|
||||
var cached = bundle.cache[id];
|
||||
bundle.hotData = {};
|
||||
|
||||
if (cached) {
|
||||
cached.hot.data = bundle.hotData;
|
||||
}
|
||||
|
||||
if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
|
||||
cached.hot._disposeCallbacks.forEach(function (cb) {
|
||||
cb(bundle.hotData);
|
||||
});
|
||||
}
|
||||
|
||||
delete bundle.cache[id];
|
||||
bundle(id);
|
||||
cached = bundle.cache[id];
|
||||
|
||||
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
|
||||
cached.hot._acceptCallbacks.forEach(function (cb) {
|
||||
cb();
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},{}]},{},["../../../../node_modules/parcel/src/builtins/hmr-runtime.js","Start.mjs"], null)
|
||||
//# sourceMappingURL=/start.min.js.map
|
@ -1,135 +0,0 @@
|
||||
import FipamoApi from "../libraries/FipamoAPI";
|
||||
import FipamoAdminAPI from "../libraries/FipamoAdminAPI";
|
||||
import DataUitls from "./utils/DataUtils";
|
||||
import * as DataEvent from "./events/DataEvent";
|
||||
import DashManager from "./controllers/DashManager";
|
||||
import Notfications from "./ui/Notifications";
|
||||
const data = new DataUitls();
|
||||
const notify = new Notfications();
|
||||
|
||||
export default class Base {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {
|
||||
this.start();
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
start() {
|
||||
if (
|
||||
document.getElementById("dash-form") ||
|
||||
document.getElementById("dash-init")
|
||||
) {
|
||||
var options = document.getElementsByClassName("init-option");
|
||||
for (let index = 0; index < options.length; index++) {
|
||||
options[index].addEventListener("click", (e) => this.handleOptions(e));
|
||||
}
|
||||
if (document.getElementById("dash-form")) {
|
||||
document
|
||||
.getElementById("login-btn")
|
||||
.addEventListener("click", (e) => this.handleLogin(e));
|
||||
} else {
|
||||
document
|
||||
.getElementById("init-blog")
|
||||
.addEventListener("click", (e) => this.handleSetup(e));
|
||||
document
|
||||
.getElementById("blog-restore")
|
||||
.addEventListener("click", (e) => this.handleRestore(e));
|
||||
}
|
||||
} else {
|
||||
new DashManager();
|
||||
}
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
handleLogin(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
let authForm = data.formDataToJSON(document.getElementById("login"));
|
||||
notify.alert("Looking, hold up", null);
|
||||
let api = new FipamoApi();
|
||||
api
|
||||
.login(authForm)
|
||||
.then((response) => {
|
||||
if (response.type === DataEvent.REQUEST_LAME) {
|
||||
notify.alert(response.message, false);
|
||||
} else {
|
||||
notify.alert(response.message, true);
|
||||
e.target.innerHTML = response.message;
|
||||
setTimeout(() => {
|
||||
window.location = "/dashboard";
|
||||
}, 500);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
notify.alert(err, false);
|
||||
});
|
||||
}
|
||||
|
||||
handleSetup(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
let setUpForm = data.formDataToJSON(document.getElementById("init-form"));
|
||||
let api = new FipamoApi();
|
||||
api
|
||||
.init(setUpForm)
|
||||
.then((response) => {
|
||||
if (response.type === DataEvent.API_INIT_LAME) {
|
||||
notify.alert(response.message, false);
|
||||
} else {
|
||||
notify.alert(response.message, true);
|
||||
setTimeout(() => {
|
||||
window.location = "/dashboard";
|
||||
}, 700);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
notify.alert(err, false);
|
||||
});
|
||||
}
|
||||
|
||||
handleRestore(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
let api = new FipamoApi();
|
||||
var form = document.getElementById("init-restore");
|
||||
api
|
||||
.handleInitRestore(form)
|
||||
.then((response) => {
|
||||
if (response.type === DataEvent.REQUEST_LAME) {
|
||||
notify.alert(response.message, false);
|
||||
} else {
|
||||
notify.alert(response.message, true);
|
||||
setTimeout(() => {
|
||||
window.location = "/dashboard";
|
||||
}, 700);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
notify.alert(err, false);
|
||||
});
|
||||
}
|
||||
handleOptions(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
let init = document.getElementById("dash-init");
|
||||
let restore = document.getElementById("dash-restore");
|
||||
if (e.target.id === "init-switch-restore") {
|
||||
init.style.display = "none";
|
||||
init.style.visibility = "hidden";
|
||||
|
||||
restore.style.display = "block";
|
||||
restore.style.visibility = "visible";
|
||||
} else {
|
||||
init.style.display = "block";
|
||||
init.style.visibility = "visible";
|
||||
|
||||
restore.style.display = "none";
|
||||
restore.style.visibility = "hidden";
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
import Base from "./Base";
|
||||
|
||||
document.addEventListener(
|
||||
"DOMContentLoaded",
|
||||
function () {
|
||||
new Base();
|
||||
},
|
||||
false
|
||||
);
|
@ -1,30 +0,0 @@
|
||||
import FipamoAdminAPI from "../../libraries/FipamoAdminAPI";
|
||||
import Notficaton from "../ui/Notifications";
|
||||
const notify = new Notficaton();
|
||||
export default class Mailer {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {
|
||||
this.admin = new FipamoAdminAPI();
|
||||
}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
sendMail() {
|
||||
let mailData = {
|
||||
content: "This is a test email",
|
||||
};
|
||||
this.admin
|
||||
.sendMail(mailData)
|
||||
.then((result) => {
|
||||
notify.alert(result.message, true);
|
||||
})
|
||||
.catch((err) => {
|
||||
notify.alert(err.message, false);
|
||||
});
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
export default class NavActions {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
syncMenu() {
|
||||
let navData = [];
|
||||
let items = document.getElementById("nav-pages").children;
|
||||
for (let index = 0; index < items.length; index++) {
|
||||
navData.push({
|
||||
title: items[index].getElementsByTagName("label")[0].innerHTML,
|
||||
id: items[index].id,
|
||||
slug: items[index].getAttribute("data-slug"),
|
||||
uuid: items[index].getAttribute("data-uuid"),
|
||||
path: items[index].getAttribute("data-path"),
|
||||
});
|
||||
}
|
||||
|
||||
let data = { menu: navData, remove: null };
|
||||
return new Promise(function (resolve) {
|
||||
resolve(data);
|
||||
});
|
||||
}
|
||||
|
||||
removeItem(id) {
|
||||
document
|
||||
.getElementById("nav-pages")
|
||||
.removeChild(document.getElementById(id));
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
import StringUtils from '../utils/StringUtils';
|
||||
export default class PostActions {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
collectInfo(image) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let pageInfo = new FormData();
|
||||
let txt = document.createElement('textarea');
|
||||
txt.innerHTML = document.getElementById('edit-post-text').innerHTML;
|
||||
let html = txt.value;
|
||||
//html = html.replace(/<\/?span[^>]*>/g, ''); //removes highightjs styling
|
||||
html = html.replace(/<\/?br[^>]*>/g, '\n'); //convert back to encoded line break for storage
|
||||
pageInfo.append(
|
||||
'id',
|
||||
document.getElementById('post-edit-index').getAttribute('data-index')
|
||||
);
|
||||
pageInfo.append(
|
||||
'uuid',
|
||||
document.getElementById('post-edit-index').getAttribute('data-uuid')
|
||||
);
|
||||
pageInfo.append(
|
||||
'layout',
|
||||
document.getElementById('post-edit-index').getAttribute('data-layout')
|
||||
);
|
||||
pageInfo.append(
|
||||
'current_title',
|
||||
document.getElementById('post-edit-index').getAttribute('data-slug')
|
||||
);
|
||||
pageInfo.append('content', html);
|
||||
pageInfo.append('title', document.getElementById('post_title').value);
|
||||
pageInfo.append(
|
||||
'created',
|
||||
document.getElementById('post-date').getAttribute('data-raw')
|
||||
);
|
||||
pageInfo.append(
|
||||
'slug',
|
||||
new StringUtils().cleanString(document.getElementById('post_title').value)
|
||||
);
|
||||
pageInfo.append('tags', document.getElementById('post_tags').value);
|
||||
pageInfo.append(
|
||||
'menu',
|
||||
document.getElementById('option-menu-pin').getAttribute('data-active')
|
||||
);
|
||||
pageInfo.append(
|
||||
'featured',
|
||||
document.getElementById('option-feature').getAttribute('data-active')
|
||||
);
|
||||
pageInfo.append(
|
||||
'published',
|
||||
document.getElementById('option-published').getAttribute('data-active')
|
||||
);
|
||||
if (image != null || image != undefined) {
|
||||
if (image.type.match('image.*')) {
|
||||
pageInfo.append('feature_image', image, image.name);
|
||||
} else {
|
||||
reject('Not an image file');
|
||||
}
|
||||
} else {
|
||||
//check to see if image exists
|
||||
var imageURL = document.getElementById('featured-image').src;
|
||||
imageURL != null || imageURL != undefined
|
||||
? pageInfo.append('feature_image', imageURL)
|
||||
: pageInfo.append('feature_image', null);
|
||||
}
|
||||
|
||||
resolve(pageInfo);
|
||||
});
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
export default class SettingsActions {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
getInfo() {
|
||||
let handle = document.getElementById('settings-handle').value;
|
||||
let email = document.getElementById('settings-email').value;
|
||||
let url = document.getElementById('settings-url').value;
|
||||
let title = document.getElementById('settings-title').value;
|
||||
let desc = document.getElementById('settings-desc').value;
|
||||
//let privacy = document.getElementById('privacy-toggle').getAttribute('data-private');
|
||||
let render = document.getElementById('render-toggle').getAttribute('data-render');
|
||||
let background = document.getElementById('background').src;
|
||||
let selected = '';
|
||||
let selects = document.querySelectorAll('.theme-select');
|
||||
let smtpDomain = document.getElementById('smtp-domain').value;
|
||||
let smtpEmail = document.getElementById('smtp-email').value;
|
||||
let smtpPass = document.getElementById('smtp-pass').value;
|
||||
let mgDomain = document.getElementById('mg-domain').value;
|
||||
let mgKey = document.getElementById('mg-key').value;
|
||||
let mailActive = '';
|
||||
let mailOptions = document.querySelectorAll('.mail-option');
|
||||
var i, count;
|
||||
for (i = 0, count = selects.length; i < count; i++) {
|
||||
if (selects[i].getAttribute('data-enabled') == 'true') selected = selects[i].id;
|
||||
}
|
||||
|
||||
for (i = 0, count = mailOptions.length; i < count; i++) {
|
||||
if (mailOptions[i].getAttribute('data-enabled') == 'true')
|
||||
mailActive = mailOptions[i].id;
|
||||
}
|
||||
let settingsData = {
|
||||
global: {
|
||||
base_url: url,
|
||||
title: title,
|
||||
descriptions: desc,
|
||||
background: background,
|
||||
private: false,
|
||||
renderOnSave: render,
|
||||
theme: selected
|
||||
},
|
||||
member: { handle: handle, email: email },
|
||||
email: {
|
||||
active: mailActive,
|
||||
smtp: {
|
||||
domain: smtpDomain,
|
||||
email: smtpEmail,
|
||||
password: smtpPass
|
||||
},
|
||||
mailgun: {
|
||||
domain: mgDomain,
|
||||
key: mgKey
|
||||
}
|
||||
}
|
||||
};
|
||||
return new Promise(function (resolve) {
|
||||
resolve(settingsData);
|
||||
});
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
import PostIndex from "./PostIndex";
|
||||
import SettingsIndex from "./SettingsIndex";
|
||||
import NaviIndex from "./NavIndex";
|
||||
|
||||
export default class DashManager {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {
|
||||
this.currentDisplay = "";
|
||||
this.urlPieces = document.URL.split("/");
|
||||
this.chooseDisplay(this.urlPieces[4], this.urlPieces[5]);
|
||||
}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
start() {}
|
||||
|
||||
chooseDisplay(section, page) {
|
||||
this.currentDisplay = "";
|
||||
switch (section) {
|
||||
case "page":
|
||||
this.currentDisplay = new PostIndex(page);
|
||||
break;
|
||||
case "settings":
|
||||
this.currentDisplay = new SettingsIndex();
|
||||
break;
|
||||
case "navigation":
|
||||
this.currentDisplay = new NaviIndex();
|
||||
break;
|
||||
|
||||
default:
|
||||
//just chill
|
||||
break;
|
||||
}
|
||||
this.start();
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
import FipamoAdminAPI from "../../libraries/FipamoAdminAPI";
|
||||
import NavActions from "../actions/NavActions";
|
||||
import * as DataEvent from "../events/DataEvent";
|
||||
import Notifications from "../ui/Notifications";
|
||||
import Sortable from "sortablejs";
|
||||
const notify = new Notifications();
|
||||
|
||||
export default class NavIndex {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {
|
||||
this.admin = new FipamoAdminAPI();
|
||||
this.start();
|
||||
}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
start() {
|
||||
let self = this;
|
||||
Sortable.create(document.getElementById("nav-pages"), {
|
||||
onUpdate: () => {
|
||||
new NavActions().syncMenu().then((data) => {
|
||||
notify.alert("Updating Menu", null);
|
||||
self.admin.syncNav(data).then((r) => {
|
||||
if (r.type == DataEvent.MENU_UPDATED) {
|
||||
notify.alert(r.message, true);
|
||||
} else {
|
||||
notify.alert(r.message, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
var nav = document.querySelectorAll(".nav-btn");
|
||||
for (var i = 0, length = nav.length; i < length; i++) {
|
||||
nav[i].addEventListener("click", (e) => this.handleNavButton(e), false);
|
||||
}
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
handleNavButton(e) {
|
||||
let id = "";
|
||||
let self = this;
|
||||
switch (e.target.id) {
|
||||
case "remove-item":
|
||||
id = e.target.getAttribute("data-id");
|
||||
new NavActions().removeItem(id);
|
||||
new NavActions().syncMenu().then((data) => {
|
||||
data.remove = e.target.getAttribute("data-uuid");
|
||||
notify.alert("Editing Menu", null);
|
||||
self.admin.syncNav(data).then((r) => {
|
||||
if (r.type == DataEvent.MENU_UPDATED) {
|
||||
notify.alert(r.message, true);
|
||||
} else {
|
||||
notify.alert(r.message, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "edit-item":
|
||||
window.location =
|
||||
"/dashboard/page/edit/" + e.target.getAttribute("data-id");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,257 +0,0 @@
|
||||
//TOOLS
|
||||
import FipamoAdminAPI, {
|
||||
TASK_PAGE_CREATE,
|
||||
TASK_PAGE_EDIT,
|
||||
TASK_PAGE_DELETE,
|
||||
} from "../../libraries/FipamoAdminAPI";
|
||||
import * as DataEvent from "../events/DataEvent";
|
||||
import PageActions from "../actions/PageActions";
|
||||
import * as EditorEvent from "../events/EditorEvent";
|
||||
//import TinyDatePicker from 'tiny-date-picker';
|
||||
import TextEditor from "../ui/TextEditor";
|
||||
import Notfications from "../ui/Notifications";
|
||||
const notify = new Notfications();
|
||||
export default class PostEditor {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {
|
||||
let self = this;
|
||||
this.admin = new FipamoAdminAPI();
|
||||
this.urlPieces = document.URL.split("/");
|
||||
this.post = [];
|
||||
this.postID = null;
|
||||
this.postUUID = null;
|
||||
this.postLayout = null;
|
||||
if (document.getElementById("post-edit-index").getAttribute("data-index")) {
|
||||
this.postID = document
|
||||
.getElementById("post-edit-index")
|
||||
.getAttribute("data-index");
|
||||
this.postUUID = document
|
||||
.getElementById("post-edit-index")
|
||||
.getAttribute("data-uuid");
|
||||
this.postLayout = document
|
||||
.getElementById("post-edit-index")
|
||||
.getAttribute("data-layout");
|
||||
}
|
||||
if (document.getElementById("edit-post-text")) {
|
||||
this.editor = new TextEditor(
|
||||
document.getElementById("edit-post-text"),
|
||||
document.getElementById("header").offsetHeight +
|
||||
document.getElementById("post-header").offsetHeight +
|
||||
document.getElementById("post-feature").offsetHeight
|
||||
);
|
||||
this.editor.addListener(
|
||||
EditorEvent.EDITOR_DELETE,
|
||||
() => this.handleEditorOptions(EditorEvent.EDITOR_DELETE),
|
||||
false
|
||||
);
|
||||
this.editor.addListener(
|
||||
EditorEvent.EDITOR_UPLOAD_POST_IMAGE,
|
||||
() => this.handleEditorOptions(EditorEvent.EDITOR_UPLOAD_POST_IMAGE),
|
||||
false
|
||||
);
|
||||
this.editor.addListener(
|
||||
EditorEvent.EDITOR_UPDATE,
|
||||
() => this.handleEditorOptions(EditorEvent.EDITOR_UPDATE),
|
||||
false
|
||||
);
|
||||
this.editor.addListener(
|
||||
EditorEvent.EDITOR_SAVE,
|
||||
() => this.handleEditorOptions(EditorEvent.EDITOR_SAVE),
|
||||
false
|
||||
);
|
||||
document.getElementById("post-image-upload").addEventListener(
|
||||
"change",
|
||||
(e) => {
|
||||
self.handleImageUpload(e.target.id, e.target.files);
|
||||
},
|
||||
false
|
||||
);
|
||||
/*
|
||||
TinyDatePicker(document.getElementById('post-date'), {
|
||||
mode: 'dp-below',
|
||||
format() {
|
||||
//return self.dateUtils.getDate('origin', date);
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
this.start();
|
||||
}
|
||||
}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
start() {
|
||||
if (document.getElementById("featured-image-drop")) {
|
||||
document
|
||||
.getElementById("featured-image-drop")
|
||||
.addEventListener("dragover", this.handleImageActions, false);
|
||||
document
|
||||
.getElementById("featured-image-drop")
|
||||
.addEventListener("drop", this.handleImageActions, false);
|
||||
document
|
||||
.getElementById("featured-image-upload")
|
||||
.addEventListener("change", (e) => this.handleImageActions(e), false);
|
||||
if (document.getElementById("new-feature-upload")) {
|
||||
document
|
||||
.getElementById("new-feature-upload")
|
||||
.addEventListener("click", () => {
|
||||
document.getElementById("featured-image-upload").click();
|
||||
});
|
||||
}
|
||||
var optionButtons = document.querySelectorAll(".post-option-btn");
|
||||
for (var i = 0, length = optionButtons.length; i < length; i++) {
|
||||
optionButtons[i].addEventListener(
|
||||
"click",
|
||||
(e) => this.handlePostOptions(e),
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
handlePostOptions(e) {
|
||||
let currentOption;
|
||||
switch (e.target.id) {
|
||||
case "option-page-icon":
|
||||
case "option-menu-pin":
|
||||
currentOption = document.getElementById("option-menu-pin");
|
||||
break;
|
||||
case "option-feature-icon":
|
||||
case "option-feature":
|
||||
currentOption = document.getElementById("option-feature");
|
||||
break;
|
||||
case "option-published-icon":
|
||||
case "option-published":
|
||||
currentOption = document.getElementById("option-published");
|
||||
break;
|
||||
}
|
||||
let active = currentOption.getAttribute("data-active");
|
||||
active == "false"
|
||||
? currentOption.setAttribute("data-active", "true")
|
||||
: currentOption.setAttribute("data-active", "false");
|
||||
}
|
||||
handleEditorOptions(e) {
|
||||
let self = this;
|
||||
switch (e) {
|
||||
case EditorEvent.EDITOR_SAVE:
|
||||
case EditorEvent.EDITOR_UPDATE:
|
||||
var task = "";
|
||||
e === EditorEvent.EDITOR_SAVE
|
||||
? (task = TASK_PAGE_CREATE)
|
||||
: (task = TASK_PAGE_EDIT);
|
||||
new PageActions()
|
||||
.collectInfo(
|
||||
document.getElementById("featured-image-upload").files[0]
|
||||
)
|
||||
.then((page) => {
|
||||
notify.alert("Writing down changes", null);
|
||||
self.admin
|
||||
.pageActions(task, page)
|
||||
.then((r) => {
|
||||
if (
|
||||
r.type === DataEvent.PAGE_ERROR ||
|
||||
r.type === DataEvent.API_REQUEST_LAME
|
||||
) {
|
||||
notify.alert(r.message, false);
|
||||
} else {
|
||||
if (r.type === DataEvent.PAGE_UPDATED) {
|
||||
notify.alert(r.message, true);
|
||||
} else {
|
||||
notify.alert(r.message, true);
|
||||
window.location = "/dashboard/page/edit/" + r.id;
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
notify.alert(err, false);
|
||||
});
|
||||
});
|
||||
break;
|
||||
case EditorEvent.EDITOR_DELETE:
|
||||
if (this.postLayout === "index") {
|
||||
notify.alert("Index cannot be deleted", false);
|
||||
return;
|
||||
}
|
||||
if (confirm("AYE! You know you're deleting this post, right?")) {
|
||||
let id = { id: this.postUUID };
|
||||
this.admin
|
||||
.pageActions(TASK_PAGE_DELETE, id)
|
||||
.then(() => {
|
||||
window.location = "/dashboard/pages";
|
||||
})
|
||||
.catch((err) => {
|
||||
notify.alert(err, false);
|
||||
});
|
||||
} else {
|
||||
// Do nothing!
|
||||
}
|
||||
break;
|
||||
case EditorEvent.EDITOR_UPLOAD_POST_IMAGE:
|
||||
document.getElementById("post-image-upload").click();
|
||||
break;
|
||||
}
|
||||
}
|
||||
handleImageActions(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
switch (e.type) {
|
||||
case "dragover":
|
||||
e.dataTransfer.dropEffect = "copy"; // Explicitly show this is a copy.
|
||||
break;
|
||||
case "change":
|
||||
case "drop":
|
||||
e.type == "drop"
|
||||
? (PostEditor.uploadFiles = e.dataTransfer.files)
|
||||
: (PostEditor.uploadFiles = e.target.files);
|
||||
for (var i = 0, f; (f = PostEditor.uploadFiles[i]); i++) {
|
||||
// Only process image files.
|
||||
if (!f.type.match("image.*")) {
|
||||
continue;
|
||||
}
|
||||
var reader = new FileReader();
|
||||
// Closure to capture the file information.
|
||||
reader.onload = (function (theFile) {
|
||||
return function (f) {
|
||||
// Render thumbnail.
|
||||
var image = document.createElement("img");
|
||||
image.src = f.target.result;
|
||||
image.title = escape(theFile.name);
|
||||
var span = document.createElement("div");
|
||||
span.innerHTML = [
|
||||
'<img src="',
|
||||
f.target.result,
|
||||
'" title="',
|
||||
escape(theFile.name),
|
||||
'"/>',
|
||||
].join("");
|
||||
document.getElementById("featured-image-drop").innerHTML = "";
|
||||
document.getElementById("featured-image-drop").appendChild(image);
|
||||
};
|
||||
})(f);
|
||||
// Read in the image file as a data URL.
|
||||
reader.readAsDataURL(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
handleImageUpload(type, files) {
|
||||
let self = this;
|
||||
notify.alert("Uploading Image", null);
|
||||
this.admin
|
||||
.imageUpload(type, files)
|
||||
.then((r) => {
|
||||
if (r.type == DataEvent.POST_IMAGE_ADDED)
|
||||
self.editor.notify(EditorEvent.EDITOR_UPLOAD_POST_IMAGE, r.url);
|
||||
notify.alert("Image Added to Entry", true);
|
||||
})
|
||||
.catch(() => {
|
||||
notify.alert("Uh oh. Image not added", false);
|
||||
//console.log('ERROR', err);
|
||||
});
|
||||
}
|
||||
}
|
||||
PostEditor.uploadFiles = [];
|
@ -1,30 +0,0 @@
|
||||
import PageEditor from "./PageEditor";
|
||||
export default class PostIndex {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor(page) {
|
||||
this.currentPage = null;
|
||||
this.choosePage(page);
|
||||
this.start();
|
||||
}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
start() {}
|
||||
choosePage(page) {
|
||||
this.currentPage = "";
|
||||
switch (page) {
|
||||
case "edit":
|
||||
case "add":
|
||||
this.currentPage = new PageEditor();
|
||||
break;
|
||||
default:
|
||||
//just chill
|
||||
break;
|
||||
}
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
@ -1,223 +0,0 @@
|
||||
import SettingsActions from "../actions/SettingsActions";
|
||||
import FipamoAdminAPI from "../../libraries/FipamoAdminAPI";
|
||||
import * as DataEvent from "../../../src/com/events/DataEvent";
|
||||
import Mailer from "../actions/Mailer";
|
||||
import Notifications from "../ui/Notifications";
|
||||
const notify = new Notifications();
|
||||
export default class SettingsIndex {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {
|
||||
this.start();
|
||||
this.admin = new FipamoAdminAPI();
|
||||
}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
start() {
|
||||
let self = this;
|
||||
//handle save button
|
||||
document.getElementById("save-toggle").addEventListener("click", () =>
|
||||
new SettingsActions()
|
||||
.getInfo()
|
||||
.then((data) => {
|
||||
notify.alert("Saving Settings", null);
|
||||
self.admin.syncSettings(data).then((r) => {
|
||||
if (r.type == DataEvent.SETTINGS_UPDATED) {
|
||||
notify.alert(r.message, true);
|
||||
} else {
|
||||
notify.alert(r.message, true);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
//console.log(err);
|
||||
})
|
||||
);
|
||||
//handle set up image uploads
|
||||
document.getElementById("avatar").addEventListener("click", () => {
|
||||
document.getElementById("avatar-upload").click();
|
||||
});
|
||||
document.getElementById("background").addEventListener("click", () => {
|
||||
document.getElementById("background-upload").click();
|
||||
});
|
||||
document.getElementById("restore-backup").addEventListener("click", () => {
|
||||
document.getElementById("backup-upload").click();
|
||||
});
|
||||
document.getElementById("avatar-upload").addEventListener(
|
||||
"change",
|
||||
(e) => {
|
||||
self.handleImageUpload(e.target.id, e.target.files);
|
||||
},
|
||||
false
|
||||
);
|
||||
document.getElementById("background-upload").addEventListener(
|
||||
"change",
|
||||
(e) => {
|
||||
self.handleImageUpload(e.target.id, e.target.files);
|
||||
},
|
||||
false
|
||||
);
|
||||
document.getElementById("backup-upload").addEventListener(
|
||||
"change",
|
||||
(e) => {
|
||||
self.handleBackup(e);
|
||||
},
|
||||
false
|
||||
);
|
||||
//handle privacy toggle
|
||||
//document
|
||||
//.getElementById('privacy-toggle')
|
||||
//.addEventListener('click', e => this.togglePrivacy(e));
|
||||
document
|
||||
.getElementById("render-toggle")
|
||||
.addEventListener("click", (e) => this.toggleRender(e));
|
||||
document
|
||||
.getElementById("send-mail")
|
||||
.addEventListener("click", (e) => this.handleMailer(e));
|
||||
document
|
||||
.getElementById("publish-pages")
|
||||
.addEventListener("click", (e) => this.handlePublished(e));
|
||||
//handle theme toggle
|
||||
let themeBtns = document.querySelectorAll(".theme-select");
|
||||
for (var i = 0, length = themeBtns.length; i < length; i++) {
|
||||
themeBtns[i].addEventListener("click", (e) => this.handleThemes(e));
|
||||
}
|
||||
//handle mail options
|
||||
let mailBtn = document.querySelectorAll(".mail-option");
|
||||
for (i = 0, length = mailBtn.length; i < length; i++) {
|
||||
mailBtn[i].addEventListener("click", (e) => this.handleMailOptions(e));
|
||||
}
|
||||
//handle backup
|
||||
document
|
||||
.getElementById("create-backup")
|
||||
.addEventListener("click", (e) => this.handleBackup(e));
|
||||
|
||||
document
|
||||
.getElementById("reindex-pages")
|
||||
.addEventListener("click", (e) => this.handleReindex(e));
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
togglePrivacy(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if (e.target.getAttribute("data-private") == "false") {
|
||||
e.target.setAttribute("data-private", "true");
|
||||
e.target.innerHTML = "SITE IS PUBLIC";
|
||||
} else {
|
||||
e.target.setAttribute("data-private", "false");
|
||||
e.target.innerHTML = "SITE IS PRIVATE";
|
||||
}
|
||||
}
|
||||
toggleRender(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if (e.target.getAttribute("data-render") == "false") {
|
||||
e.target.setAttribute("data-render", "true");
|
||||
//e.target.innerHTML = 'RENDER PAGES ON SAVE';
|
||||
} else {
|
||||
e.target.setAttribute("data-render", "false");
|
||||
//e.target.innerHTML = "DON'T RENDER PAGES ON SAVE";
|
||||
}
|
||||
}
|
||||
handleMailer() {
|
||||
let mailer = new Mailer();
|
||||
mailer.sendMail();
|
||||
}
|
||||
handleThemes(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
let themes = document.querySelectorAll(".theme-select");
|
||||
for (var i = 0, length = themes.length; i < length; i++) {
|
||||
e.target.id == themes[i].id
|
||||
? themes[i].setAttribute("data-enabled", "true")
|
||||
: themes[i].setAttribute("data-enabled", "false");
|
||||
}
|
||||
}
|
||||
handleMailOptions(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
let smtp = document.getElementById("mail-smtp");
|
||||
let mailgun = document.getElementById("mail-mg");
|
||||
let mail = document.querySelectorAll(".mail-option");
|
||||
for (var i = 0, length = mail.length; i < length; i++) {
|
||||
if (e.target.id == mail[i].id) {
|
||||
mail[i].setAttribute("data-enabled", "true");
|
||||
if (e.target.id == "option-smtp") {
|
||||
smtp.setAttribute("data-enabled", "true");
|
||||
mailgun.setAttribute("data-enabled", "false");
|
||||
} else if (e.target.id == "option-none") {
|
||||
smtp.setAttribute("data-enabled", "false");
|
||||
mailgun.setAttribute("data-enabled", "false");
|
||||
} else {
|
||||
smtp.setAttribute("data-enabled", "false");
|
||||
mailgun.setAttribute("data-enabled", "true");
|
||||
}
|
||||
} else {
|
||||
mail[i].setAttribute("data-enabled", "false");
|
||||
}
|
||||
}
|
||||
}
|
||||
handleImageUpload(type, files) {
|
||||
notify.alert("Uploading Image... ", null);
|
||||
this.admin
|
||||
.imageUpload(type, files)
|
||||
.then((r) => {
|
||||
if (r.type == DataEvent.AVATAR_UPLOADED) {
|
||||
notify.alert(r.message, true);
|
||||
document.getElementById("avatar").src = r.url;
|
||||
} else {
|
||||
notify.alert(r.message, true);
|
||||
document.getElementById("background").src = r.url;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
//console.log(err)
|
||||
});
|
||||
}
|
||||
handlePublished(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
let task = { task: "publish all pages" };
|
||||
notify.alert("Publishing site...", null);
|
||||
this.admin
|
||||
.publishSite(task)
|
||||
.then((r) => {
|
||||
notify.alert(r.message, true);
|
||||
})
|
||||
.catch((err) => {
|
||||
notify.alert(err, false);
|
||||
});
|
||||
}
|
||||
handleBackup(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
notify.alert("Creating backup", null);
|
||||
this.admin
|
||||
.handleBackup(e.target.id, e.target.files)
|
||||
.then((r) => {
|
||||
notify.alert(r.message, true);
|
||||
})
|
||||
.catch((err) => {
|
||||
notify.alert(err, false);
|
||||
});
|
||||
}
|
||||
|
||||
handleReindex(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
let task = { task: "cleanup pages indexes" };
|
||||
notify.alert("Cleaning up page indexes", null);
|
||||
this.admin
|
||||
.handleReindex(task)
|
||||
.then((r) => {
|
||||
notify.alert(r.message, true);
|
||||
})
|
||||
.catch((err) => {
|
||||
notify.alert(err, false);
|
||||
});
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
export const MEMBER_STATUS = 'memberStatus';
|
||||
export const LOGIN_STATUS = 'loginStatus';
|
||||
export const SUPPORTER_FOUND = 'SUPPORTER FOUND';
|
||||
export const SUPPORTER_LISTED = 'SUPPORTER LISTED';
|
||||
export const SUPPORTER_NOT_FOUND = 'SUPPORTER NOT FOUND';
|
||||
export const MEMBER_ADDED = 'MEMBER ADDED';
|
||||
export const MEMBER_NOT_ADDED = 'MEMBER NOT ADDED';
|
||||
export const MEMBER_LOGIN_GOOD = 'MEMBER LOGIN GOOD';
|
||||
export const MEMBER_LOGIN_LAME = 'MEMBER LOGIN LAME';
|
||||
export const MEMBER_EXISTS = 'USER ALREADY EXISTS';
|
||||
export const MEMBER_LOGIN_MISSING = 'Missing credentials';
|
||||
|
||||
class AuthEvent {
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
||||
export default new AuthEvent();
|
@ -1,49 +0,0 @@
|
||||
export const AUTH_STATUS = 'getAuthStatus';
|
||||
export const REQUEST_GOOD = 'requestGood';
|
||||
export const REQUEST_LAME = 'requestLame';
|
||||
export const API_REQUEST_GOOD = 'apiUseAuthorized';
|
||||
export const API_REQUEST_LAME = 'apiUseNotAuthorized';
|
||||
export const IMG_REQUEST_GOOD = 'imgRequestGood';
|
||||
export const IMG_REQUEST_LAME = 'imgRequestLame';
|
||||
export const SETTINGS_LOADED = 'settingsLoaded';
|
||||
export const POST_IMAGE_ADDED = 'postImageAdded';
|
||||
export const FEATURE_IMAGE_ADDED = 'featureImageAdded';
|
||||
export const PAGE_ERROR = 'postError';
|
||||
export const PAGE_ADDED = 'postAdded';
|
||||
export const PAGE_UPDATED = 'postUpdated';
|
||||
export const PAGE_DELETED = 'postImageAdded';
|
||||
export const PAGES_RENDERED = 'pagesRendered';
|
||||
export const PAGES_NOT_RENDERED = 'pagesNotRendered';
|
||||
export const TAG_PAGES_RENDERED = 'tagPagesRendered';
|
||||
export const TAG_PAGES_NOT_RENDERED = 'tagPagesNotRendered';
|
||||
export const SETTINGS_UPDATED = 'settingsUpdated';
|
||||
export const SETTINGS_NOT_UPDATED = 'settingsNotUpdated';
|
||||
export const MENU_ADD_ITEM = 'menuAddItem';
|
||||
export const MENU_DELETE_ITEM = 'menuDeleteItem';
|
||||
export const MENU_UPDATED = 'menuUpdated';
|
||||
export const AVATAR_UPLOADED = 'avatarUploaded';
|
||||
export const SITE_BACKGROUND_UPLOADED = 'siteBackgroundUploaded';
|
||||
export const UPLOAD_PROGRESS = 'uploadProgress';
|
||||
export const API_PAGE_WRITE = 'writingItDown';
|
||||
export const API_PAGE_CREATE = 'writingNewEntry';
|
||||
export const API_PAGE_DELETE = 'erasingPage';
|
||||
export const API_SETTINGS_WRITE = 'savingSettings';
|
||||
export const API_BACKUP_CREATE = 'createBackup';
|
||||
export const API_BACKUP_DOWNLOAD = 'downloadBackup';
|
||||
export const API_BACKUP_RESTORE = 'downloadBackup';
|
||||
export const API_IMAGES_UPLOAD = 'uploadProfileImages';
|
||||
export const API_RENDER_PAGES = 'renderPages';
|
||||
export const API_REINDEX_PAGES = 'reindexPages';
|
||||
export const API_INIT = 'blogInit';
|
||||
export const API_INIT_GOOD = 'blogInitGood';
|
||||
export const API_INIT_LAME = 'blogInitLame';
|
||||
export const SEND_MAIL = 'sendMail';
|
||||
class DataEvent {
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
||||
export default new DataEvent();
|
@ -1,14 +0,0 @@
|
||||
export const EDITOR_DELETE = 'editorDelete';
|
||||
export const EDITOR_UPLOAD_POST_IMAGE = 'editorUploadImage';
|
||||
export const EDITOR_SAVE = 'editorSave';
|
||||
export const EDITOR_UPDATE = 'editorUpdate';
|
||||
|
||||
class EditorEvent {
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
||||
export default new EditorEvent();
|
@ -1,52 +0,0 @@
|
||||
class EventEmitter {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {
|
||||
this.listeners = new Map();
|
||||
}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
addListener(label, callback) {
|
||||
this.listeners.has(label) || this.listeners.set(label, []);
|
||||
this.listeners.get(label).push(callback);
|
||||
}
|
||||
|
||||
removeListener(label, callback) {
|
||||
var isFunction = function(obj) {
|
||||
return typeof obj == 'function' || false;
|
||||
};
|
||||
|
||||
var listeners = this.listeners.get(label),
|
||||
index;
|
||||
|
||||
if (listeners && listeners.length) {
|
||||
index = listeners.reduce((i, listener, index) => {
|
||||
return isFunction(listener) && listener === callback ? (i = index) : i;
|
||||
}, -1);
|
||||
|
||||
if (index > -1) {
|
||||
listeners.splice(index, 1);
|
||||
this.listeners.set(label, listeners);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
emitEvent(label, ...args) {
|
||||
var listeners = this.listeners.get(label);
|
||||
if (listeners && listeners.length) {
|
||||
listeners.forEach(listener => {
|
||||
listener(...args);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
||||
export default EventEmitter;
|
@ -1,87 +0,0 @@
|
||||
import anime from 'animejs/lib/anime.es.js';
|
||||
const notifcation = document.getElementById('notifications');
|
||||
const notify = document.getElementById('notifyMessage');
|
||||
const messageText = document.getElementById('message-text');
|
||||
const iconGood = document.getElementById('notify-good');
|
||||
const iconLame = document.getElementById('notify-lame');
|
||||
const iconWorking = document.getElementById('notify-working');
|
||||
|
||||
export default class Notfications {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
|
||||
alert(text, status) {
|
||||
iconWorking.style.display = 'none';
|
||||
iconGood.style.display = 'none';
|
||||
iconLame.style.display = 'none';
|
||||
|
||||
var color = '';
|
||||
if (status !== null) {
|
||||
if (status) {
|
||||
color = '#32cd32';
|
||||
iconWorking.style.display = 'none';
|
||||
iconGood.style.display = 'block';
|
||||
} else {
|
||||
color = '#F64747';
|
||||
iconWorking.style.display = 'none';
|
||||
iconLame.style.display = 'block';
|
||||
}
|
||||
} else {
|
||||
color = '#200317';
|
||||
iconWorking.style.display = 'block';
|
||||
}
|
||||
messageText.innerHTML = text;
|
||||
|
||||
anime({
|
||||
targets: notifcation,
|
||||
marginTop: '0',
|
||||
easing: 'easeInOutQuint',
|
||||
duration: 10,
|
||||
complete: () => {
|
||||
anime({
|
||||
targets: notify,
|
||||
rotateX: '0',
|
||||
easing: 'easeInOutQuint',
|
||||
duration: 700
|
||||
});
|
||||
anime({
|
||||
targets: messageText,
|
||||
backgroundColor: color,
|
||||
easing: 'easeInOutQuint',
|
||||
duration: 700,
|
||||
complete: () => {
|
||||
setTimeout(() => {
|
||||
if (status !== null) {
|
||||
anime({
|
||||
targets: notify,
|
||||
rotateX: '-120',
|
||||
easing: 'easeInOutQuint',
|
||||
duration: 700,
|
||||
complete: () => {
|
||||
anime({
|
||||
targets: notifcation,
|
||||
marginTop: '-55',
|
||||
easing: 'easeInOutQuint',
|
||||
delay: 700,
|
||||
duration: 50
|
||||
});
|
||||
//notifcation.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
@ -1,158 +0,0 @@
|
||||
import * as DataEvent from '../events/DataEvent';
|
||||
import { position } from 'caret-pos';
|
||||
import EventEmitter from '../events/EventEmitter';
|
||||
import * as EditorEvent from '../events/EditorEvent';
|
||||
class TextEditor extends EventEmitter {
|
||||
/**
|
||||
* Text Editor UI Component
|
||||
* @constructor
|
||||
* @param {object} textEditor - Text area that will edit text
|
||||
* @param {number} scrollLimit - YPos where editor position will become fixed
|
||||
*/
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor(textEditor, scrollLimit) {
|
||||
super();
|
||||
//hljs.initHighlightingOnLoad();
|
||||
this.textEditor = textEditor;
|
||||
this.fixLimit = scrollLimit;
|
||||
this.caretPos = null;
|
||||
this.url = '';
|
||||
this.setInputs();
|
||||
window.addEventListener('scroll', () => {
|
||||
//var fixLimit = this.fixLimit;
|
||||
/**
|
||||
* edit scroller needs work
|
||||
if (window.pageYOffset >= fixLimit) {
|
||||
document.getElementById('edit-control').style.position = 'fixed';
|
||||
} else {
|
||||
document.getElementById('edit-control').style.position = 'relative';
|
||||
}
|
||||
*/
|
||||
});
|
||||
this.refresh();
|
||||
}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
setInputs() {
|
||||
let self = this;
|
||||
var editorButtons = document.querySelectorAll('.editor-button');
|
||||
for (var i = 0, length = editorButtons.length; i < length; i++) {
|
||||
editorButtons[i].addEventListener('click', e => this.handleEditorOption(e), false);
|
||||
}
|
||||
|
||||
this.textEditor.addEventListener('input', e => {
|
||||
let htmlTagRe = /<[a-z][\s\S]*>/g;
|
||||
let text = this.textEditor.innerText;
|
||||
if (e.inputType == 'insertParagraph') return; //cursor setting gets weird on return, so just back out
|
||||
|
||||
if (text.search(htmlTagRe) > -1) {
|
||||
let caret = position(this.textEditor).pos;
|
||||
self.refresh();
|
||||
position(this.textEditor, caret);
|
||||
}
|
||||
});
|
||||
}
|
||||
refresh() {
|
||||
//var spiffed = hljs.highlight('markdown', this.textEditor.innerText).value;
|
||||
var spiffed = this.textEditor.innerText;
|
||||
spiffed = spiffed.replace(new RegExp('\r?\n', 'g'), '<br>');
|
||||
var temp = document.createElement('div');
|
||||
temp.innerText = spiffed;
|
||||
this.textEditor.innerHTML = temp.innerText;
|
||||
this.textEditor.style.maxWidth = '900px';
|
||||
}
|
||||
notify(type, data) {
|
||||
switch (type) {
|
||||
case DataEvent.POST_UPDATED:
|
||||
document.getElementById('submit-update').classList.add('icon-hide');
|
||||
document.getElementById('submit-good').classList.remove('icon-hide');
|
||||
document.getElementById('edit-update').classList.remove('submit-start');
|
||||
document.getElementById('edit-update').classList.add('submit-cool');
|
||||
setTimeout(() => {
|
||||
document.getElementById('submit-update').classList.remove('icon-hide');
|
||||
document.getElementById('submit-good').classList.add('icon-hide');
|
||||
document.getElementById('edit-update').classList.add('submit-start');
|
||||
document.getElementById('edit-update').classList.remove('submit-cool');
|
||||
}, 2000);
|
||||
break;
|
||||
case DataEvent.POST_ADDED:
|
||||
// do nothing
|
||||
break;
|
||||
case EditorEvent.EDITOR_UPLOAD_POST_IMAGE:
|
||||
position(this.textEditor, this.caretPos);
|
||||
var sel, range;
|
||||
//var pulled;
|
||||
sel = window.getSelection(); //console.log(sel)
|
||||
//console.log(note.message)
|
||||
if (sel.rangeCount) {
|
||||
range = sel.getRangeAt(0);
|
||||
//pulled = sel.getRangeAt(0).toString();
|
||||
range.deleteContents();
|
||||
range.insertNode(
|
||||
document.createTextNode('![image alt text](' + data + " 'image title')")
|
||||
);
|
||||
}
|
||||
this.refresh();
|
||||
break;
|
||||
}
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
handleEditorOption(e) {
|
||||
e.preventDefault();
|
||||
var sel, range, pulled;
|
||||
sel = window.getSelection(); //console.log(sel)
|
||||
if (sel.rangeCount) {
|
||||
range = sel.getRangeAt(0);
|
||||
pulled = sel.getRangeAt(0).toString();
|
||||
range.deleteContents();
|
||||
switch (e.target.id) {
|
||||
case 'edit-bold':
|
||||
range.insertNode(document.createTextNode('**' + pulled + '**'));
|
||||
break;
|
||||
case 'edit-italic':
|
||||
range.insertNode(document.createTextNode('*' + pulled + '*'));
|
||||
break;
|
||||
case 'edit-strikethrough':
|
||||
range.insertNode(document.createTextNode('<del>' + pulled + '</del>'));
|
||||
break;
|
||||
case 'edit-header1':
|
||||
range.insertNode(document.createTextNode('# ' + pulled));
|
||||
break;
|
||||
case 'edit-header2':
|
||||
range.insertNode(document.createTextNode('## ' + pulled));
|
||||
break;
|
||||
case 'edit-header3':
|
||||
range.insertNode(document.createTextNode('### ' + pulled));
|
||||
break;
|
||||
case 'edit-image':
|
||||
this.caretPos = position(this.textEditor).pos;
|
||||
this.emitEvent(EditorEvent.EDITOR_UPLOAD_POST_IMAGE);
|
||||
break;
|
||||
case 'submit-save':
|
||||
case 'edit-save':
|
||||
this.emitEvent(EditorEvent.EDITOR_SAVE);
|
||||
break;
|
||||
case 'submit-update':
|
||||
case 'edit-update':
|
||||
this.emitEvent(EditorEvent.EDITOR_UPDATE);
|
||||
break;
|
||||
case 'edit-link':
|
||||
range.insertNode(document.createTextNode('[' + pulled + '](PASTE URL HERE)'));
|
||||
break;
|
||||
case 'edit-delete':
|
||||
this.emitEvent(EditorEvent.EDITOR_DELETE);
|
||||
break;
|
||||
default:
|
||||
//range.insertNode(document.createTextNode("[" + self.url + "](PASTE URL HERE)"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
export default TextEditor;
|
@ -1,92 +0,0 @@
|
||||
export default class DataUtils {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
|
||||
imgLoad(url) {
|
||||
'use strict';
|
||||
// Create new promise with the Promise() constructor;
|
||||
// This has as its argument a function with two parameters, resolve and reject
|
||||
return new Promise(function(resolve, reject) {
|
||||
// Standard XHR to load an image
|
||||
var request = new XMLHttpRequest();
|
||||
request.open('GET', url);
|
||||
request.responseType = 'blob';
|
||||
// When the request loads, check whether it was successful
|
||||
request.onload = function() {
|
||||
if (request.status === 200) {
|
||||
// If successful, resolve the promise by passing back the request response
|
||||
resolve(request.response);
|
||||
} else {
|
||||
// If it fails, reject the promise with a error message
|
||||
reject(
|
||||
new Error(
|
||||
"Image didn't load successfully; error code:" + request.statusText
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
request.onerror = function() {
|
||||
// Also deal with the case when the entire request fails to begin with
|
||||
// This is probably a network error, so reject the promise with an appropriate message
|
||||
reject(new Error('There was a network error.'));
|
||||
};
|
||||
// Send the request
|
||||
request.send();
|
||||
});
|
||||
}
|
||||
loadImage(src) {
|
||||
'use strict';
|
||||
let self = this;
|
||||
return new Promise(function(resolve, reject) {
|
||||
// Get a reference to the body element, and create a new image object
|
||||
var myImage = new Image();
|
||||
myImage.crossOrigin = ''; // or "anonymous"
|
||||
// Call the function with the URL we want to load, but then chain the
|
||||
// promise then() method on to the end of it. This contains two callbacks
|
||||
self.imgLoad(src).then(
|
||||
function(response) {
|
||||
// The first runs when the promise resolves, with the request.reponse specified within the resolve() method.
|
||||
var imageURL = window.URL.createObjectURL(response);
|
||||
resolve(imageURL);
|
||||
//$('background-content').setStyle('background-image', 'url('+imageURL+')') //myImage.src = imageURL;
|
||||
//console.log(imageURL);
|
||||
//body.appendChild(myImage);
|
||||
// The second runs when the promise is rejected, and logs the Error specified with the reject() method.
|
||||
},
|
||||
function(Error) {
|
||||
reject(Error);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a function to convert the serialize and convert the form data to JSON
|
||||
* @param : $('#form_example');
|
||||
* @return a JSON Stringify
|
||||
*/
|
||||
formDataToJSON(form) {
|
||||
let object = {};
|
||||
let formData = new FormData(form);
|
||||
formData.forEach((value, key) => {
|
||||
if (!object.hasOwnProperty(key)) {
|
||||
object[key] = value;
|
||||
return;
|
||||
}
|
||||
if (!Array.isArray(object[key])) {
|
||||
object[key] = [object[key]];
|
||||
}
|
||||
object[key].push(value);
|
||||
});
|
||||
//let json = JSON.stringify(object);
|
||||
return object;
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
class StringUtils {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
cleanString(string) {
|
||||
var clean = string
|
||||
.replace(/(^\-+|[^a-zA-Z0-9\/_| -]+|\-+$)/g, '')
|
||||
.toLowerCase()
|
||||
.replace(/[\/_| -]+/g, '-');
|
||||
return clean;
|
||||
}
|
||||
|
||||
decodeHTML(string, quote_style) {
|
||||
var optTemp = 0,
|
||||
i = 0,
|
||||
noquotes = false;
|
||||
if (typeof quote_style === 'undefined') {
|
||||
quote_style = 2;
|
||||
}
|
||||
string = string
|
||||
.toString()
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
var OPTS = {
|
||||
ENT_NOQUOTES: 0,
|
||||
ENT_HTML_QUOTE_SINGLE: 1,
|
||||
ENT_HTML_QUOTE_DOUBLE: 2,
|
||||
ENT_COMPAT: 2,
|
||||
ENT_QUOTES: 3,
|
||||
ENT_IGNORE: 4
|
||||
};
|
||||
if (quote_style === 0) {
|
||||
noquotes = true;
|
||||
}
|
||||
if (typeof quote_style !== 'number') {
|
||||
// Allow for a single string or an array of string flags
|
||||
quote_style = [].concat(quote_style);
|
||||
for (i = 0; i < quote_style.length; i++) {
|
||||
// Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4
|
||||
if (OPTS[quote_style[i]] === 0) {
|
||||
noquotes = true;
|
||||
} else if (OPTS[quote_style[i]]) {
|
||||
optTemp = optTemp | OPTS[quote_style[i]];
|
||||
}
|
||||
}
|
||||
quote_style = optTemp;
|
||||
}
|
||||
if (quote_style & OPTS.ENT_HTML_QUOTE_SINGLE) {
|
||||
string = string.replace(/�*39;/g, "'"); // PHP doesn't currently escape if more than one 0, but it should
|
||||
// string = string.replace(/'|�*27;/g, "'"); // This would also be useful here, but not a part of PHP
|
||||
}
|
||||
if (!noquotes) {
|
||||
string = string.replace(/"/g, '"');
|
||||
}
|
||||
// Put this in last place to avoid escape being double-decoded
|
||||
string = string.replace(/&/g, '&');
|
||||
return string;
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
||||
export default StringUtils;
|
@ -1,158 +0,0 @@
|
||||
export const REQUEST_TYPE_POST = "POST";
|
||||
export const REQUEST_TYPE_GET = "GET";
|
||||
export const REQUEST_TYPE_PUT = "PUT";
|
||||
export const REQUEST_TYPE_DELETE = "DELETE";
|
||||
export const CONTENT_TYPE_JSON = "json";
|
||||
export const CONTENT_TYPE_FORM = "x-www-form-urlencoded";
|
||||
export const API_STATUS = "/api/v1/status";
|
||||
export const API_INIT = "/api/v1/init";
|
||||
export const API_RESTORE = "/api/v1/restore";
|
||||
export const API_LOGIN = "/api/v1/login";
|
||||
export const API_GET_PAGES = "/api/v1/page/published";
|
||||
export const API_GET_PAGE = "/api/v1/page/single";
|
||||
import * as DataEvent from "../com/events/DataEvent";
|
||||
export default class FipamoAPI {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {}
|
||||
//--------------------------
|
||||
// public
|
||||
//--------------------------
|
||||
login(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(
|
||||
API_LOGIN,
|
||||
DataEvent.AUTH_STATUS,
|
||||
REQUEST_TYPE_POST,
|
||||
CONTENT_TYPE_JSON,
|
||||
data
|
||||
)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
init(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(
|
||||
API_INIT,
|
||||
DataEvent.API_INIT,
|
||||
REQUEST_TYPE_POST,
|
||||
CONTENT_TYPE_JSON,
|
||||
data
|
||||
)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
handleInitRestore(form) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var url, event, method, type, data;
|
||||
|
||||
url = API_RESTORE;
|
||||
event = DataEvent.API_BACKUP_RESTORE;
|
||||
method = REQUEST_TYPE_POST;
|
||||
type = CONTENT_TYPE_FORM;
|
||||
data = new FormData(form);
|
||||
this._request(url, event, method, type, data)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
getPages(num) {
|
||||
let pageNum = num;
|
||||
if (pageNum === null || pageNum === "" || !pageNum) pageNum = 1;
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(
|
||||
API_GET_PAGES + "/" + pageNum,
|
||||
DataEvent.API_GET_PAGES,
|
||||
REQUEST_TYPE_GET
|
||||
)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getPage(id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(
|
||||
API_GET_PAGE + "/" + id,
|
||||
DataEvent.API_GET_PAGES,
|
||||
REQUEST_TYPE_GET
|
||||
)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
//--------------------------
|
||||
// private
|
||||
//--------------------------
|
||||
_request(
|
||||
requestURL,
|
||||
eventType,
|
||||
requestType = REQUEST_TYPE_GET,
|
||||
contentType = CONTENT_TYPE_JSON,
|
||||
requestData = null
|
||||
) {
|
||||
var self = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var request = new XMLHttpRequest();
|
||||
request.upload.onprogress = self.handleLoadProgress;
|
||||
request.open(requestType, requestURL, true);
|
||||
request.onload = () => {
|
||||
if (request.status == 200) {
|
||||
let response = JSON.parse(request["response"]);
|
||||
resolve(response);
|
||||
} else {
|
||||
let error = JSON.parse(request["response"]);
|
||||
reject(error);
|
||||
}
|
||||
};
|
||||
if (requestType == REQUEST_TYPE_PUT || requestType == REQUEST_TYPE_POST) {
|
||||
switch (contentType) {
|
||||
case CONTENT_TYPE_JSON:
|
||||
request.setRequestHeader(
|
||||
"Content-type",
|
||||
"application/" + contentType
|
||||
);
|
||||
request.send(JSON.stringify(requestData));
|
||||
break;
|
||||
case CONTENT_TYPE_FORM:
|
||||
request.send(requestData);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
request.send();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
handleLoadProgress(e) {
|
||||
this.percentComplete = Math.ceil((e.loaded / e.total) * 100);
|
||||
//pass element to display request progress
|
||||
}
|
||||
}
|
@ -1,310 +0,0 @@
|
||||
export const REQUEST_TYPE_POST = "POST";
|
||||
export const REQUEST_TYPE_GET = "GET";
|
||||
export const REQUEST_TYPE_PUT = "PUT";
|
||||
export const REQUEST_TYPE_DELETE = "DELETE";
|
||||
export const TASK_PAGE_CREATE = "createNewPage";
|
||||
export const TASK_PAGE_EDIT = "editPage";
|
||||
export const TASK_PAGE_DELETE = "deletePage";
|
||||
export const CONTENT_TYPE_JSON = "json";
|
||||
export const CONTENT_TYPE_FORM = "x-www-form-urlencoded";
|
||||
export const API_STATUS = "/api/v1/status";
|
||||
export const API_GET_NAV = "/api/settings/nav";
|
||||
export const API_NEW_PAGE = "/api/v1/page/create";
|
||||
export const API_EDIT_PAGE = "/api/v1/page/write";
|
||||
export const API_DELETE_PAGE = "/api/v1/page/delete";
|
||||
export const API_IMAGE_UPLOAD = "/api/v1/page/add-entry-image";
|
||||
export const API_SETTINGS_SYNC = "/api/v1/settings/sync";
|
||||
export const API_UPLOAD_AVATAR = "/api/v1/settings/add-avatar";
|
||||
export const API_UPLOAD_BACKGROUND = "/api/v1/settings/add-feature-background";
|
||||
export const API_PUBLISH_PAGES = "/api/v1/settings/publish";
|
||||
export const API_NAV_SYNC = "/api/v1/settings/nav-sync";
|
||||
export const API_REINDEX_PAGES = "/api/v1/settings/reindex";
|
||||
export const API_CREATE_BACKUP = "/api/v1/backup";
|
||||
export const API_DOWNLOAD_BACKUP = "/api/v1/backup/download";
|
||||
export const API_RESTORE_BACKUP = "/api/v1/backup/restore";
|
||||
export const API_SEND_MAIL = "/api/v1/mailer";
|
||||
import * as DataEvent from "../com/events/DataEvent";
|
||||
export default class APIUtils {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {
|
||||
this.percentComplete = 0;
|
||||
this.token = null;
|
||||
//checks backend to see if user is logged in
|
||||
//and requests encrypted token for api calls
|
||||
this._request(API_STATUS).then((response) => {
|
||||
if (response.type === DataEvent.API_REQUEST_GOOD) {
|
||||
this.token = response.token;
|
||||
} else {
|
||||
//don't set token
|
||||
}
|
||||
});
|
||||
}
|
||||
//--------------------------
|
||||
// public
|
||||
//--------------------------
|
||||
syncSettings(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(
|
||||
API_SETTINGS_SYNC,
|
||||
DataEvent.API_SETTINGS_WRITE,
|
||||
REQUEST_TYPE_POST,
|
||||
CONTENT_TYPE_JSON,
|
||||
data
|
||||
)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
imageUpload(type, files) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let url = "";
|
||||
switch (type) {
|
||||
case "avatar-upload":
|
||||
url = API_UPLOAD_AVATAR;
|
||||
break;
|
||||
case "background-upload":
|
||||
url = API_UPLOAD_BACKGROUND;
|
||||
break;
|
||||
default:
|
||||
url = API_IMAGE_UPLOAD;
|
||||
break;
|
||||
}
|
||||
var imageData = new FormData();
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var file = files[i];
|
||||
// Check the file type.
|
||||
if (!file.type.match("image.*")) {
|
||||
continue;
|
||||
}
|
||||
if (type === "avatar-upload") {
|
||||
imageData.append("avatar_upload", file, file.name);
|
||||
} else if (type === "background-upload") {
|
||||
imageData.append("background_upload", file, file.name);
|
||||
} else {
|
||||
imageData.append("post_image", file, file.name);
|
||||
}
|
||||
}
|
||||
this._request(
|
||||
url,
|
||||
DataEvent.API_IMAGES_UPLOAD,
|
||||
REQUEST_TYPE_POST,
|
||||
CONTENT_TYPE_FORM,
|
||||
imageData
|
||||
)
|
||||
.then((r) => {
|
||||
resolve(r);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
publishSite(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(
|
||||
API_PUBLISH_PAGES,
|
||||
DataEvent.API_RENDER_PAGES,
|
||||
REQUEST_TYPE_POST,
|
||||
CONTENT_TYPE_JSON,
|
||||
data
|
||||
)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
pageActions(task, data) {
|
||||
let url, event, content;
|
||||
switch (task) {
|
||||
case TASK_PAGE_CREATE:
|
||||
url = API_NEW_PAGE;
|
||||
event = DataEvent.API_PAGE_WRITE;
|
||||
content = CONTENT_TYPE_FORM;
|
||||
break;
|
||||
case TASK_PAGE_EDIT:
|
||||
url = API_EDIT_PAGE;
|
||||
event = DataEvent.API_PAGE_WRITE;
|
||||
content = CONTENT_TYPE_FORM;
|
||||
break;
|
||||
|
||||
case TASK_PAGE_DELETE:
|
||||
url = API_DELETE_PAGE;
|
||||
event = DataEvent.API_PAGE_DELETE;
|
||||
content = CONTENT_TYPE_JSON;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(url, event, REQUEST_TYPE_POST, content, data)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
syncNav(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(
|
||||
API_NAV_SYNC,
|
||||
DataEvent.API_SETTINGS_WRITE,
|
||||
REQUEST_TYPE_POST,
|
||||
CONTENT_TYPE_JSON,
|
||||
data
|
||||
)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
sendMail(message) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(
|
||||
API_SEND_MAIL,
|
||||
DataEvent.SEND_MAIL,
|
||||
REQUEST_TYPE_POST,
|
||||
CONTENT_TYPE_JSON,
|
||||
message
|
||||
)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
handleBackup(id, files) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var url, event, method, type, data;
|
||||
|
||||
if (id === "create-backup") {
|
||||
url = API_CREATE_BACKUP;
|
||||
event = DataEvent.API_BACKUP_CREATE;
|
||||
method = REQUEST_TYPE_POST;
|
||||
type = CONTENT_TYPE_JSON;
|
||||
data = { task: "create_backup" };
|
||||
} else {
|
||||
url = API_RESTORE_BACKUP;
|
||||
event = DataEvent.API_BACKUP_RESTORE;
|
||||
method = REQUEST_TYPE_POST;
|
||||
type = CONTENT_TYPE_FORM;
|
||||
data = new FormData();
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var file = files[i];
|
||||
// Check the file type.
|
||||
if (!file.type.match("application.zip")) {
|
||||
continue;
|
||||
}
|
||||
data.append("backup_upload", file, file.name);
|
||||
}
|
||||
}
|
||||
this._request(url, event, method, type, data)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
handleReindex(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this._request(
|
||||
API_REINDEX_PAGES,
|
||||
DataEvent.API_REINDEX_PAGES,
|
||||
REQUEST_TYPE_POST,
|
||||
CONTENT_TYPE_JSON,
|
||||
data
|
||||
)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
//--------------------------
|
||||
// private
|
||||
//--------------------------
|
||||
_request(
|
||||
requestURL,
|
||||
eventType,
|
||||
requestType = REQUEST_TYPE_GET,
|
||||
contentType = CONTENT_TYPE_JSON,
|
||||
requestData = null
|
||||
) {
|
||||
var self = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var request = new XMLHttpRequest();
|
||||
request.upload.onprogress = self.handleLoadProgress;
|
||||
request.open(requestType, requestURL, true);
|
||||
request.onload = () => {
|
||||
if (request.status == 200) {
|
||||
//console.log("RESPONSE", request);
|
||||
let response = JSON.parse(request["response"]);
|
||||
resolve(response);
|
||||
} else {
|
||||
let error = JSON.parse(request["response"]);
|
||||
reject(error);
|
||||
}
|
||||
};
|
||||
if (requestType == REQUEST_TYPE_PUT || requestType == REQUEST_TYPE_POST) {
|
||||
if (
|
||||
eventType === DataEvent.API_PAGE_WRITE ||
|
||||
eventType === DataEvent.API_IMAGES_UPLOAD ||
|
||||
eventType === DataEvent.API_SETTINGS_WRITE ||
|
||||
eventType === DataEvent.API_PAGE_DELETE ||
|
||||
eventType === DataEvent.API_RENDER_PAGES ||
|
||||
eventType === DataEvent.API_BACKUP_CREATE ||
|
||||
eventType === DataEvent.API_BACKUP_RESTORE ||
|
||||
eventType === DataEvent.API_REINDEX_PAGES
|
||||
)
|
||||
request.setRequestHeader("fipamo-access-token", self.token);
|
||||
|
||||
switch (contentType) {
|
||||
case CONTENT_TYPE_JSON:
|
||||
request.setRequestHeader(
|
||||
"Content-type",
|
||||
"application/" + contentType
|
||||
);
|
||||
request.send(JSON.stringify(requestData));
|
||||
break;
|
||||
case CONTENT_TYPE_FORM:
|
||||
request.send(requestData);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
request.send();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
handleLoadProgress(e) {
|
||||
this.percentComplete = Math.ceil((e.loaded / e.total) * 100);
|
||||
//pass element to display request progress
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
{
|
||||
"name": "fipamo-dash",
|
||||
"version": "1.2.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"animejs": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/animejs/-/animejs-3.2.1.tgz",
|
||||
"integrity": "sha512-sWno3ugFryK5nhiDm/2BKeFCpZv7vzerWUcUPyAZLDhMek3+S/p418ldZJbJXo5ZUOpfm2kP2XRO4NJcULMy9A=="
|
||||
},
|
||||
"bulma": {
|
||||
"version": "0.9.2",
|
||||
"resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.2.tgz",
|
||||
"integrity": "sha512-e14EF+3VSZ488yL/lJH0tR8mFWiEQVCMi/BQUMi2TGMBOk+zrDg4wryuwm/+dRSHJw0gMawp2tsW7X1JYUCE3A=="
|
||||
},
|
||||
"caret-pos": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/caret-pos/-/caret-pos-2.0.0.tgz",
|
||||
"integrity": "sha512-cOIiBS1SjzXg+LXSiQAzGg89dHDKq/y4c30+tB5hkVN7GbtXh1BNypOmjti4LwAWQrvP4y+bNG7RJFxLGoL3bA=="
|
||||
},
|
||||
"sortablejs": {
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.13.0.tgz",
|
||||
"integrity": "sha512-RBJirPY0spWCrU5yCmWM1eFs/XgX2J5c6b275/YyxFRgnzPhKl/TDeU2hNR8Dt7ITq66NRPM4UlOt+e5O4CFHg=="
|
||||
}
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "fipamo-dash",
|
||||
"version": "1.2.4",
|
||||
"description": "Front end script for the most chill blog framework ever.",
|
||||
"scripts": {},
|
||||
"author": "Are0h",
|
||||
"license": "UNLICENSED",
|
||||
"repository": "https://code.playvicio.us/Are0h/Fipamo",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"animejs": "^3.2.1",
|
||||
"bulma": "^0.9.2",
|
||||
"caret-pos": "^2.0.0",
|
||||
"sortablejs": "^1.13.0"
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
@use "sass:color"
|
||||
|
||||
//Bulma
|
||||
@import '../node_modules/bulma/sass/utilities/_all'
|
||||
@import '../node_modules/bulma/sass/grid/columns'
|
||||
|
||||
//Colors
|
||||
@import 'main/_colors'
|
||||
|
||||
//Mixins
|
||||
@import 'main/_mixins'
|
||||
|
||||
//Normalize
|
||||
@import 'main/_normalize'
|
||||
|
||||
//Typography
|
||||
@import 'main/_typography'
|
||||
|
||||
//Main Structure
|
||||
@import 'main/_structure'
|
||||
|
||||
//Index
|
||||
@import 'main/_index'
|
||||
|
||||
//Settings
|
||||
@import 'main/_settings'
|
||||
|
||||
//Error
|
||||
@import 'main/_error'
|
||||
|
||||
//Navigation
|
||||
@import 'main/_navigation'
|
||||
|
||||
//Forms
|
||||
@import 'main/_forms'
|
||||
|
||||
//Posts
|
||||
@import 'main/_posts'
|
||||
|
||||
//Editor
|
||||
@import 'main/_calendar'
|
||||
@import 'main/_editor'
|
||||
@import 'main/_editor-highlight'
|
@ -1,242 +0,0 @@
|
||||
// TINY DATE
|
||||
.dp-modal
|
||||
position: fixed
|
||||
top: 0
|
||||
left: 0
|
||||
right: 0
|
||||
bottom: 0
|
||||
// background rgba(255, 255, 255, 0.75)
|
||||
@include background-opacity(color.adjust($primary, $lightness: -70%), 0.75)
|
||||
z-index: 2000
|
||||
|
||||
.dp
|
||||
position: relative
|
||||
background: $primary
|
||||
box-shadow: 2px 2px 16px rgba(0, 0, 0, 0.25)
|
||||
line-height: 1.4
|
||||
border-radius: 4px
|
||||
max-height: 400px
|
||||
z-index: 5000
|
||||
padding-top: 6px
|
||||
overflow: hidden
|
||||
-webkit-tap-highlight-color: transparent
|
||||
|
||||
.dp:before
|
||||
content: ' '
|
||||
height: 6px
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
right: 0
|
||||
background: $highlight
|
||||
// background linear-gradient(-90deg, #3B99FC 0%, #8AEFC8 100%)
|
||||
|
||||
.dp-permanent .dp
|
||||
padding-top: 0
|
||||
border: 1px solid #EEE
|
||||
box-shadow: none
|
||||
|
||||
.dp-permanent .dp:before
|
||||
display: none
|
||||
|
||||
.dp-cal
|
||||
min-height: 300px
|
||||
|
||||
.dp-below
|
||||
position: absolute
|
||||
font-size: 0.8em
|
||||
width: 400px
|
||||
max-width: 90vw
|
||||
|
||||
.dp-permanent
|
||||
position: relative
|
||||
font-size: 0.8em
|
||||
width: 400px
|
||||
max-width: 100vw
|
||||
|
||||
.dp-permanent .dp
|
||||
z-index: 0
|
||||
|
||||
.dp-modal .dp
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
max-width: 600px
|
||||
width: calc(100% - 4em)
|
||||
transform: translate(-50%, -50%)
|
||||
animation: slide-up 0.3s forwards
|
||||
|
||||
.dp-months
|
||||
padding: 24px
|
||||
|
||||
.dp-years
|
||||
box-sizing: border-box
|
||||
max-height: 400px
|
||||
padding: 8px 0
|
||||
/* HACK for Chrome on Android */
|
||||
overflow: auto !important
|
||||
|
||||
.dp-cal-month, .dp-cal-year, .dp-day, .dp-month, .dp-year
|
||||
box-sizing: border-box
|
||||
text-align: center
|
||||
text-decoration: none
|
||||
position: relative
|
||||
color: $white
|
||||
border-radius: 2px
|
||||
border: 0
|
||||
background: transparent
|
||||
|
||||
.dp-cal-header
|
||||
position: relative
|
||||
text-align: center
|
||||
padding-bottom: 16px
|
||||
background: color.adjust($primary, $lightness: -10%)
|
||||
|
||||
.dp-next, .dp-prev
|
||||
position: absolute
|
||||
width: 30px
|
||||
height: 30px
|
||||
overflow: hidden
|
||||
top: 14px
|
||||
color: color.adjust($primary, $lightness: -50%)
|
||||
border-radius: 2px
|
||||
border: 0
|
||||
background: transparent
|
||||
|
||||
.dp-next:focus, .dp-prev:focus, .dp-next:hover, .dp-prev:hover
|
||||
outline: none
|
||||
color: inherit
|
||||
|
||||
.dp-prev
|
||||
left: 24px
|
||||
|
||||
.dp-next
|
||||
right: 24px
|
||||
|
||||
.dp-prev:before, .dp-next:before
|
||||
content: ''
|
||||
border: 2px solid
|
||||
width: 10px
|
||||
height: 10px
|
||||
display: inline-block
|
||||
transform: rotate(-45deg)
|
||||
transition: border-color 0.2s
|
||||
margin: 9px 0 40px 4px
|
||||
|
||||
.dp-prev:before
|
||||
border-right: 0
|
||||
border-bottom: 0
|
||||
|
||||
.dp-next:before
|
||||
border-left: 0
|
||||
border-top: 0
|
||||
margin-left: 0
|
||||
margin-right: 4px
|
||||
|
||||
.dp-cal-month, .dp-cal-year
|
||||
display: inline-block
|
||||
font-size: 1.4em
|
||||
padding: 16px 8px 8px
|
||||
outline: none
|
||||
|
||||
.dp-cal-footer
|
||||
text-align: center
|
||||
background: color.adjust($primary, $lightness: -10%)
|
||||
|
||||
.dp-day-today:after
|
||||
content: ''
|
||||
height: 0
|
||||
width: 0
|
||||
border: 7px solid $highlight
|
||||
border-bottom-color: transparent
|
||||
border-left-color: transparent
|
||||
position: absolute
|
||||
top: 0
|
||||
right: 0
|
||||
|
||||
.dp-close, .dp-clear, .dp-today
|
||||
box-sizing: border-box
|
||||
display: inline-block
|
||||
width: 33%
|
||||
padding: 8px
|
||||
text-decoration: none
|
||||
color: color.adjust($primary, $lightness: -50%)
|
||||
border: 0
|
||||
background: transparent
|
||||
|
||||
.dp-permanent .dp-close, .dp-permanent .dp-clear
|
||||
display: none
|
||||
|
||||
.dp-close:active, .dp-clear:active, .dp-today:active, .dp-next:active, .dp-prev:active, .dp-cal-month:active, .dp-cal-year:active
|
||||
background: $highlight
|
||||
color: $white
|
||||
|
||||
@media screen and (min-device-width: 1200px)
|
||||
.dp-close:hover, .dp-close:focus, .dp-clear:hover, .dp-clear:focus, .dp-today:hover, .dp-today:focus, .dp-next:hover, .dp-next:focus, .dp-prev:hover, .dp-prev:focus, .dp-cal-month:focus, .dp-cal-month:hover, .dp-cal-year:hover, .dp-cal-year:focus
|
||||
background: $highlight
|
||||
color: $white
|
||||
|
||||
.dp-col-header, .dp-day
|
||||
width: 14.28571429%
|
||||
display: inline-block
|
||||
padding: 8px
|
||||
text-align: center
|
||||
|
||||
.dp-col-header
|
||||
color: #AAA
|
||||
text-transform: uppercase
|
||||
font-weight: 300
|
||||
font-size: 0.8em
|
||||
padding: 8px 0
|
||||
|
||||
.dp-month
|
||||
width: 33%
|
||||
display: inline-block
|
||||
padding: 8px
|
||||
|
||||
.dp-year
|
||||
display: block
|
||||
padding: 8px 40px
|
||||
width: 100%
|
||||
|
||||
.dp-edge-day
|
||||
color: #AAA
|
||||
|
||||
.dp-day:hover, .dp-month:hover, .dp-year:hover, .dp-current:focus, .dp-current, .dp-day:focus, .dp-month:focus, .dp-year:focus
|
||||
outline: none
|
||||
background: color.adjust($primary, $lightness: -40%)
|
||||
color: $white
|
||||
|
||||
.dp-selected:hover, .dp-selected:focus, .dp-selected
|
||||
background: $highlight
|
||||
color: color.adjust($primary, $lightness: -60%)
|
||||
|
||||
.dp-day-disabled
|
||||
background: transparent
|
||||
color: #DDD
|
||||
|
||||
.dp-day-disabled:focus, .dp-day-disabled:hover
|
||||
background: #DDD
|
||||
|
||||
.dp-focuser
|
||||
position: absolute
|
||||
z-index: 0
|
||||
top: 50%
|
||||
left: 50%
|
||||
|
||||
// Responsive
|
||||
@media (max-width: 480px), (max-height: 480px)
|
||||
.dp-modal .dp
|
||||
font-size: 0.9em
|
||||
width: auto
|
||||
width: 100%
|
||||
|
||||
.dp-day-of-week, .dp-day
|
||||
padding: 8px
|
||||
|
||||
@keyframes slide-up
|
||||
0%
|
||||
transform: translate(-50%, 100%)
|
||||
|
||||
100%
|
||||
transform: translate(-50%, -50%)
|
@ -1,17 +0,0 @@
|
||||
$primary: #374857
|
||||
//$primary = #200317; deep sexy purple
|
||||
$secondary: #b2cce5
|
||||
$tertiary: #f5ab35
|
||||
$highlight: #fc6399
|
||||
$white: #f2f1ef
|
||||
$grey: #abb7b7
|
||||
$black: #32302f
|
||||
|
||||
//editor colors
|
||||
$eventCool: #32cd32
|
||||
$eventLame: #F64747
|
||||
|
||||
$editorPrimary: #fde3a7
|
||||
$editorSecondary: #ffa07a
|
||||
$editorTertiary: #89c4f4
|
||||
$editorString: #f6dd74
|
@ -1,46 +0,0 @@
|
||||
|
||||
.hljs
|
||||
display: block
|
||||
overflow-x: auto
|
||||
padding: 0.5em
|
||||
background: color.adjust($primary, $lightness: -6%)
|
||||
|
||||
.hljs, .hljs-subst
|
||||
color: #ebdbb2
|
||||
|
||||
.hljs-deletion, .hljs-formula, .hljs-keyword .hljs-selector-tag
|
||||
color: $editorPrimary
|
||||
font-style: italic
|
||||
|
||||
.hljs-link
|
||||
color: $highlight
|
||||
|
||||
.hljs-built_in, .hljs-emphasis, .hljs-name, .hljs-quote, .hljs-strong, .hljs-title, .hljs-variable
|
||||
color: $editorSecondary
|
||||
|
||||
.hljs-attr, .hljs-params, .hljs-template-tag, .hljs-type
|
||||
color: $editorTertiary
|
||||
|
||||
.hljs-builtin-name, .hljs-doctag, .hljs-literal, .hljs-number
|
||||
color: #8f3f71
|
||||
|
||||
.hljs-code, .hljs-meta, .hljs-regexp, .hljs-selector-id, .hljs-template-variable
|
||||
color: $tertiary
|
||||
|
||||
.hljs-addition, .hljs-meta-string, .hljs-section, .hljs-selector-attr, .hljs-selector-class, .hljs-string, .hljs-symbol
|
||||
color: $editorString
|
||||
|
||||
.hljs-attribute, .hljs-bullet, .hljs-class, .hljs-function, .hljs-function .hljs-keyword, .hljs-meta-keyword, .hljs-selector-pseudo, .hljs-tag
|
||||
color: color.adjust($primary, $lightness: 50%)
|
||||
|
||||
.hljs-comment
|
||||
color: #928374
|
||||
|
||||
.hljs-link_label, .hljs-literal, .hljs-number
|
||||
color: #d3869b
|
||||
|
||||
.hljs-comment, .hljs-emphasis
|
||||
font-style: italic
|
||||
|
||||
.hljs-section, .hljs-strong, .hljs-tag
|
||||
font-weight: normal
|
@ -1,95 +0,0 @@
|
||||
#edit-control
|
||||
// margin 10px
|
||||
top: 1px
|
||||
border-radius: 3px
|
||||
// background-opacity($primary - 10%, 0.50)
|
||||
width: 100%
|
||||
max-width: 880px
|
||||
margin-top: 30px
|
||||
z-index: 2000
|
||||
|
||||
button:nth-child(1)
|
||||
border-radius: 3px 0 0 3px
|
||||
button:nth-child(10)
|
||||
border-radius: 0 3px 3px 0
|
||||
|
||||
button
|
||||
background: $secondary
|
||||
width: 10%
|
||||
height: 39px
|
||||
@include object-transitions(0.3s)
|
||||
margin: 0
|
||||
border-radius: 0
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
text-align: center
|
||||
button:hover
|
||||
background: color.adjust($secondary, $lightness: -20%)
|
||||
|
||||
#option-update
|
||||
padding: 5px 5px 1px 5px
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
text-align: center
|
||||
|
||||
.icon-hide
|
||||
display: none
|
||||
visibility: hidden
|
||||
|
||||
.submit-start
|
||||
background: $white
|
||||
|
||||
svg
|
||||
fill: $eventCool
|
||||
|
||||
.submit-cool
|
||||
background: $eventCool
|
||||
|
||||
svg
|
||||
fill: $white
|
||||
|
||||
.submit-delete
|
||||
background: $eventLame !important
|
||||
|
||||
svg
|
||||
fill: $white !important
|
||||
|
||||
|
||||
|
||||
#option-date
|
||||
height: 30px
|
||||
padding-top: 6px
|
||||
|
||||
svg
|
||||
margin: -13px 5px 0 0
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
fill: $white
|
||||
|
||||
.content-editor-btn-icon
|
||||
padding: 5px 5px 1px 5px
|
||||
// border-radius 20px
|
||||
color: $primary
|
||||
|
||||
svg
|
||||
fill: $primary
|
||||
|
||||
.content-editor-btn-text
|
||||
padding: 5px
|
||||
// border-radius 20px
|
||||
color: $primary
|
||||
|
||||
#option-bold
|
||||
font-weight: bold
|
||||
text-decoration: none
|
||||
|
||||
#option-italic
|
||||
font-weight: bold
|
||||
text-decoration: none
|
||||
font-style: italic
|
||||
|
||||
#option-strikethrough
|
||||
font-weight: bold
|
||||
text-decoration: line-through
|
||||
font-style: italic
|
||||
|
@ -1,22 +0,0 @@
|
||||
#error-index
|
||||
width: 100%
|
||||
max-width: 900px
|
||||
margin: 0 auto
|
||||
padding: 10px
|
||||
height: 100%
|
||||
z-index: 10
|
||||
position: relative
|
||||
label#title
|
||||
font-size: 100px
|
||||
color: $highlight
|
||||
font-weight: 500
|
||||
|
||||
label#message
|
||||
font-size: 50px
|
||||
color: $tertiary
|
||||
font-weight: 500
|
||||
|
||||
label#error
|
||||
font-size: 25px
|
||||
color: $eventLame
|
||||
font-weight: 500
|
@ -1,59 +0,0 @@
|
||||
form
|
||||
display: inline-block
|
||||
|
||||
input[type=email], input[type=password], input[type=text]
|
||||
border: 0
|
||||
border-radius: 5px
|
||||
padding: 5px
|
||||
margin: 10px 5px 0 0
|
||||
font: 15px $monoType
|
||||
display: inline-block
|
||||
background: color.adjust($primary, $lightness: -20%)
|
||||
color: $white
|
||||
|
||||
textarea
|
||||
border: 0
|
||||
border-radius: 3px
|
||||
color: $white
|
||||
font: 15px $monoType
|
||||
ackground: color.adjust($primary, $lightness: -20%)
|
||||
|
||||
button, input[type=submit]
|
||||
background: $highlight
|
||||
color: color.adjust($primary, $lightness: -20%)
|
||||
font: 14px $baseType
|
||||
border-radius: 5px
|
||||
position: relative
|
||||
cursor: pointer
|
||||
border: 0
|
||||
padding: 5px 5px 0 5px
|
||||
@include object_transitions(.3s)
|
||||
font: 15px $monoType
|
||||
|
||||
select
|
||||
font: 14px $monoType
|
||||
border: 1px solid $secondary
|
||||
-webkit-appearance: none
|
||||
-moz-appearance: none
|
||||
appearance: none
|
||||
color: $primary
|
||||
|
||||
::-webkit-input-placeholder
|
||||
font: 14px $monoType
|
||||
color: color.adjust($primary, $lightness: 50%)
|
||||
|
||||
:-moz-placeholder
|
||||
/* Firefox 18- */
|
||||
font: 14px $monoType
|
||||
color: color.adjust($primary, $lightness: 50%)
|
||||
|
||||
::-moz-placeholder
|
||||
/* Firefox 19+ */
|
||||
font: 14px $monoType
|
||||
color: color.adjust($primary, $lightness: 50%)
|
||||
|
||||
:-ms-input-placeholder
|
||||
font: 14px $monoType
|
||||
color: color.adjust($primary, $lightness: 50%)
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
#dash-index-content
|
||||
width: 100%
|
||||
height: 100%
|
||||
margin: 0 auto
|
||||
|
||||
#dash-index
|
||||
width: 100%
|
||||
height: 100%
|
||||
z-index: 10
|
||||
position: relative
|
||||
|
||||
#dash-index-wrapper
|
||||
width: 100%
|
||||
height: 100%
|
||||
margin: 0 auto
|
||||
|
||||
.dash-init, .dash-restore
|
||||
width: 100%
|
||||
max-width: 900px
|
||||
margin: 0 auto
|
||||
color: $secondary
|
||||
label
|
||||
color: $primary
|
||||
|
||||
form
|
||||
background: $white
|
||||
padding: 15px
|
||||
h1
|
||||
color: $primary
|
||||
p
|
||||
color: color.adjust($primary, $lightness: -60%)
|
||||
border-top: 1px solid $primary
|
||||
border-bottom: 1px solid $primary
|
||||
padding: 10px 0 10px 0
|
||||
input.large[type=email], input[type=password], input[type=text]
|
||||
margin-bottom: 15px
|
||||
margin-top: 5px
|
||||
button
|
||||
height: 30px
|
||||
width: 120px
|
||||
margin: 0 auto
|
||||
display: block
|
||||
.dash-restore
|
||||
display: none
|
||||
visibility: hidden
|
||||
|
||||
#dash-login
|
||||
width: 100%
|
||||
max-width: 900px
|
||||
margin: 0 auto
|
||||
|
||||
#dash-form
|
||||
width: 300px
|
||||
padding: 0.75em
|
||||
background: $primary
|
||||
border-radius: 3px
|
||||
|
||||
input
|
||||
width: 290px
|
||||
margin: 0 0 10px 0
|
||||
height: 30px
|
||||
|
||||
button
|
||||
width: 300px
|
||||
|
||||
#dash-menu
|
||||
padding: 10px
|
||||
width: 90%
|
||||
max-width: 900px
|
||||
margin: 50px auto
|
||||
|
||||
a
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
background: color.adjust($primary, $lightness: -60%)
|
||||
width: 30%
|
||||
padding: 5px
|
||||
border-radius: 3px
|
||||
color: $white
|
||||
margin: 0 10px 10px 0
|
||||
|
||||
&:hover
|
||||
background: color.adjust($primary, $lightness: -60%)
|
||||
|
||||
svg
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
fill: $white
|
||||
|
||||
label
|
||||
display: inline-block
|
||||
margin-top: 5px
|
||||
width: 85%
|
||||
text-align: center
|
||||
cursor: pointer
|
||||
|
||||
#dash-recent
|
||||
width: 100%
|
||||
max-width: 900px
|
||||
height: 100%
|
||||
padding: 5px 0 0 0
|
||||
margin: 0 auto
|
||||
|
||||
#recent-list
|
||||
padding: 0.75em
|
||||
position: relative
|
||||
|
||||
.recent-header
|
||||
height: 50px
|
||||
|
||||
h3
|
||||
vertical-align: top
|
||||
display: inline-block
|
||||
width: 49%
|
||||
|
||||
.index-menu
|
||||
width: 50%
|
||||
text-align: right
|
||||
vertical-align: top
|
||||
display: inline-block
|
||||
margin: 24px 0 24px 0
|
||||
right: 10px
|
||||
color: $white
|
||||
|
||||
a
|
||||
text-decoration-color: $highlight
|
||||
|
||||
a.post-link
|
||||
font-size: 1.5em
|
||||
font-weight: 300
|
||||
display: inline-block
|
||||
border-radius: 3px
|
||||
vertical-align: top
|
||||
text-decoration: none
|
||||
position: relative
|
||||
|
||||
label
|
||||
font-size: 1.4em
|
||||
font-weight: 700
|
||||
color: $white
|
||||
padding: 5px
|
||||
vertical-align: top
|
||||
display: inline-block
|
||||
word-wrap: break-word
|
||||
width: 100%
|
||||
text-align: center
|
||||
@include text-drop-shadow($black, 1, 2px, 2px, 0)
|
||||
|
||||
span
|
||||
vertical-align: top
|
||||
margin: 0 auto
|
||||
width: 300px
|
||||
display: block
|
||||
font-family: $monoType
|
||||
font-size: 0.5em
|
||||
padding: 7px
|
||||
color: $white
|
||||
text-align: center
|
||||
//background $primary - 60%
|
||||
border-radius: 0 0 3px 3px
|
||||
|
||||
div
|
||||
width: 100%
|
||||
position: absolute
|
||||
bottom: 0
|
||||
border-radius: 0 0 3px 3px
|
||||
//background-opacity($black, .35)
|
||||
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%)
|
||||
|
||||
#options
|
||||
display: block
|
||||
vertical-align: top
|
||||
width: 300px
|
||||
position: relative
|
||||
text-align: center
|
||||
margin: 0 auto
|
||||
background: none
|
||||
.item-options
|
||||
border-radius: 3px
|
||||
margin: 5px
|
||||
display: inline-block
|
||||
.item-options[data-active='false']
|
||||
width: 65px
|
||||
background: color.adjust($primary, $lightness: -60%)
|
||||
color: $white
|
||||
|
||||
.item-options[data-active='true']
|
||||
width: 70px
|
||||
background: color.adjust($tertiary, $lightness: 20%)
|
||||
color: color.adjust($primary, $lightness: -60%)
|
||||
|
||||
a:nth-child(3)
|
||||
width: 100%
|
||||
margin-bottom: 20px
|
||||
height: 500px
|
||||
|
||||
a:nth-child(4)
|
||||
width: 48.7%
|
||||
height: 275px
|
||||
margin: 0 15px 15px 0
|
||||
|
||||
a:nth-child(5)
|
||||
width: 48.7%
|
||||
height: 550px
|
||||
|
||||
a:nth-child(6)
|
||||
width: 48.7%
|
||||
height: 550px
|
||||
margin :-260px 15px 0 0
|
||||
|
||||
a:nth-child(7)
|
||||
width: 49%
|
||||
height: 275px
|
||||
margin: 15px 0 0 0
|
||||
|
||||
//Reponsive
|
||||
@media only screen and (max-width: 768px)
|
||||
#dash-index-content
|
||||
#dash-index
|
||||
#dash-index-wrapper
|
||||
#dash-recent
|
||||
#recent-list
|
||||
a:nth-child(4), a:nth-child(6)
|
||||
width: 48.9%
|
||||
|
||||
@media only screen and (max-width: 640px)
|
||||
#dash-index-content
|
||||
#dash-index
|
||||
#dash-index-wrapper
|
||||
#dash-recent
|
||||
#recent-list
|
||||
a:nth-child(4), a:nth-child(6)
|
||||
width: 48.5%
|
||||
|
||||
@media only screen and (max-width: 480px)
|
||||
#dash-index-content
|
||||
#dash-index
|
||||
#dash-index-wrapper
|
||||
#dash-recent
|
||||
#recent-list
|
||||
.recent-header
|
||||
h3
|
||||
width: 40%
|
||||
|
||||
.index-menu
|
||||
width: 60%
|
||||
|
||||
a:nth-child(3), a:nth-child(4), a:nth-child(5), a:nth-child(6), a:nth-child(7)
|
||||
width: 100%
|
||||
margin: 15px 0 0 0
|
||||
height: 400px
|
@ -1,16 +0,0 @@
|
||||
@mixin text-drop-shadow($rgb_value, $opacity, $offsetX, $offsetY, $blur)
|
||||
text-shadow: $offsetX $offsetY $blur rgba($rgb_value, $opacity)
|
||||
|
||||
@mixin object-transitions($rate)
|
||||
-moz-transition: all $rate linear
|
||||
-webkit-transition: all $rate linear
|
||||
-o-transition: all $rate linear
|
||||
transition: all $rate linear
|
||||
|
||||
|
||||
@mixin background-opacity($rgb_value, $opacity)
|
||||
background: rgba($rgb_value, $opacity)
|
||||
|
||||
@mixin custom-header($weight, $size, $line_height, $color)
|
||||
font: $weight $size/$line_height $bodyTypeSans
|
||||
color: $color
|
@ -1,62 +0,0 @@
|
||||
#nav-index
|
||||
width: 100%
|
||||
max-width: 900px
|
||||
margin: 0 auto
|
||||
|
||||
#nav-index-wrapper
|
||||
padding: 0.75rem
|
||||
|
||||
#nav-pages
|
||||
.nav-item
|
||||
display: block
|
||||
width: 98%
|
||||
background: $primary
|
||||
border-radius: 3px
|
||||
color: $white
|
||||
height: 30px
|
||||
padding: 10px
|
||||
margin: 0 0 10px 0
|
||||
font-size: 1.5em
|
||||
cursor: move
|
||||
|
||||
label
|
||||
display: inline-block
|
||||
vertical-align: middle
|
||||
padding: 0
|
||||
margin: -15px 0 0 10px
|
||||
cursor: move
|
||||
|
||||
#nav-btns
|
||||
float: right
|
||||
|
||||
button
|
||||
font-size: 0.8em
|
||||
margin: 0 0 0 10px
|
||||
|
||||
@media only screen and (max-width: 375px)
|
||||
#nav-index
|
||||
#nav-index-wrapper
|
||||
#nav-pages
|
||||
.nav-item
|
||||
width: 94.5%
|
||||
font-size: 1em
|
||||
|
||||
label
|
||||
width: 47%
|
||||
vertical-align: top
|
||||
margin-top: 0px
|
||||
line-height: 1em
|
||||
|
||||
@media only screen and (max-width: 320px)
|
||||
#nav-index
|
||||
#nav-index-wrapper
|
||||
#nav-pages
|
||||
.nav-item
|
||||
width: 94.5%
|
||||
font-size: 1em
|
||||
|
||||
label
|
||||
width: 37%
|
||||
vertical-align: top
|
||||
margin-top: 0px
|
||||
line-height: 1em
|
@ -1,197 +0,0 @@
|
||||
html
|
||||
line-height: 1.15
|
||||
-ms-text-size-adjust: 100%
|
||||
-webkit-text-size-adjust: 100%
|
||||
|
||||
body
|
||||
margin: 0
|
||||
|
||||
article,
|
||||
aside,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section
|
||||
display: block
|
||||
|
||||
h1
|
||||
font-size: 2em
|
||||
margin: 0.67em 0
|
||||
line-height: 1em
|
||||
|
||||
figcaption,
|
||||
figure,
|
||||
main
|
||||
display: block
|
||||
|
||||
figure
|
||||
margin: 1em 40px
|
||||
|
||||
hr
|
||||
box-sizing: content-box
|
||||
height: 0
|
||||
overflow: visible
|
||||
|
||||
pre
|
||||
font-family: monospace, monospace
|
||||
font-size: 1em
|
||||
a
|
||||
background-color: transparent
|
||||
-webkit-text-decoration-skip: objects
|
||||
|
||||
a:active,
|
||||
a:hover
|
||||
outline-width: 0
|
||||
|
||||
abbr[title]
|
||||
border-bottom: none
|
||||
text-decoration: underline
|
||||
text-decoration: underline dotted
|
||||
|
||||
b,
|
||||
strong
|
||||
font-weight: inherit
|
||||
font-weight: bolder
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp
|
||||
font-family: monospace, monospace
|
||||
font-size: 1em
|
||||
|
||||
dfn
|
||||
font-style: italic
|
||||
|
||||
mark
|
||||
background-color: #ff0
|
||||
color: #000
|
||||
|
||||
small
|
||||
font-size: 80%
|
||||
|
||||
sub,
|
||||
sup
|
||||
font-size: 60%
|
||||
line-height: 0
|
||||
position: relative
|
||||
vertical-align: baseline
|
||||
|
||||
sub
|
||||
bottom: -0.25em
|
||||
|
||||
sup
|
||||
top: -0.55em
|
||||
background: $primary
|
||||
color: $primary
|
||||
border-radius: 2px
|
||||
padding: 0 2px 0 2px
|
||||
margin: 0 2px 0 0
|
||||
|
||||
audio,
|
||||
video
|
||||
display: inline-block
|
||||
|
||||
audio
|
||||
&:not([controls])
|
||||
display: none
|
||||
height: 0
|
||||
|
||||
img
|
||||
border-style: none
|
||||
|
||||
svg
|
||||
&:not(:root)
|
||||
overflow: hidden
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea
|
||||
font-family: sans-serif
|
||||
font-size: 100%
|
||||
line-height: 1.15
|
||||
margin: 0
|
||||
|
||||
button,
|
||||
input
|
||||
overflow: visible
|
||||
|
||||
button,
|
||||
select
|
||||
text-transform: none
|
||||
|
||||
button, html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"]
|
||||
-webkit-appearance: button
|
||||
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner,
|
||||
button::-moz-focus-inner
|
||||
border-style: none
|
||||
padding: 0
|
||||
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring,
|
||||
button:-moz-focusring
|
||||
outline: 1px dotted ButtonText
|
||||
|
||||
fieldset
|
||||
border: 1px solid #c0c0c0
|
||||
margin: 0 2px
|
||||
padding: 0.35em 0.625em 0.75em
|
||||
|
||||
legend
|
||||
box-sizing: border-box
|
||||
color: inherit
|
||||
display: table
|
||||
max-width: 100%
|
||||
padding: 0
|
||||
white-space: normal
|
||||
|
||||
progress
|
||||
display: inline-block
|
||||
vertical-align: baseline
|
||||
|
||||
textarea
|
||||
overflow: auto
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"]
|
||||
box-sizing: border-box
|
||||
padding: 0
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button
|
||||
height: auto
|
||||
|
||||
[type="search"]
|
||||
-webkit-appearance: textfield
|
||||
outline-offset: -2px
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration
|
||||
-webkit-appearance: none
|
||||
|
||||
::-webkit-file-upload-button
|
||||
-webkit-appearance: button
|
||||
font: inherit
|
||||
|
||||
details,
|
||||
menu
|
||||
display: block
|
||||
|
||||
summary
|
||||
display: list-item
|
||||
|
||||
canvas
|
||||
display: inline-block
|
||||
|
||||
template
|
||||
display: none
|
||||
|
||||
[hidden]
|
||||
display: none
|
@ -1,384 +0,0 @@
|
||||
#post-index
|
||||
width: 100%
|
||||
max-width: 900px
|
||||
margin: 0 auto
|
||||
|
||||
#post-index-wrapper
|
||||
padding: 0.75rem
|
||||
overflow: hidden
|
||||
|
||||
#post-index-menu
|
||||
color: $white
|
||||
|
||||
a
|
||||
text-decoration-color: $highlight
|
||||
|
||||
a.add-new-post
|
||||
display: inline-block
|
||||
background: $highlight
|
||||
border-radius: 3px
|
||||
padding: 3px
|
||||
color: $white
|
||||
text-align: center
|
||||
margin-bottom: 10px
|
||||
float: right
|
||||
|
||||
.current-filter
|
||||
color: $highlight
|
||||
text-decoration-color: $secondary
|
||||
|
||||
#posts-list
|
||||
margin: 20px 0 0 0
|
||||
|
||||
a.page-link
|
||||
background: $white
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
width: 100%
|
||||
text-decoration: none
|
||||
margin: 0 0 20px 0
|
||||
border-radius: 3px
|
||||
overflow: hidden
|
||||
color: color.adjust($primary, $lightness: -60%)
|
||||
|
||||
label
|
||||
font-size: 2em
|
||||
font-weight: 500
|
||||
padding: 10px
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
width: 100%
|
||||
|
||||
span
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
font-size: 0.8em
|
||||
font-family: $monoType
|
||||
width: 50%
|
||||
padding: 0 0 0 10px
|
||||
|
||||
div.page-bg
|
||||
width: 100%
|
||||
height: 350px
|
||||
background-color: $highlight
|
||||
position: relative
|
||||
#meta
|
||||
width: 100%
|
||||
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%)
|
||||
border-radius: 3px
|
||||
margin: auto
|
||||
bottom: 0
|
||||
position: absolute
|
||||
padding: 0 0 20px 0
|
||||
span
|
||||
color: $white
|
||||
text-align: center
|
||||
margin: 0 auto
|
||||
display: block
|
||||
|
||||
label
|
||||
font-size: 1.4em
|
||||
font-weight: 700
|
||||
color: $white
|
||||
padding: 5px
|
||||
vertical-align: top
|
||||
display: inline-block
|
||||
word-wrap: break-word
|
||||
width: 100%
|
||||
text-align: center
|
||||
@include text-drop-shadow($black, 1, 2px, 2px, 0)
|
||||
#options
|
||||
margin: 0 auto
|
||||
width: 275px
|
||||
.meta-options
|
||||
border-radius: 3px
|
||||
margin: 5px
|
||||
display: inline-block
|
||||
text-align: center
|
||||
padding: 2px
|
||||
.meta-options[data-active='false']
|
||||
width: 70px
|
||||
background: color.adjust($primary, $lightness: -60%)
|
||||
color: $white
|
||||
|
||||
.meta-options[data-active='true']
|
||||
width: 75px
|
||||
background: color.adjust($tertiary, $lightness: 60%)
|
||||
color: color.adjust($primary, $lightness: -60%)
|
||||
|
||||
p
|
||||
padding: 5px 10px 5px 10px
|
||||
font-size: 1.2em
|
||||
font-weight: 400
|
||||
.paginate
|
||||
width: 260px
|
||||
display: block
|
||||
margin: 0 auto
|
||||
a
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
span.count
|
||||
text-align: center
|
||||
padding: 5px
|
||||
margin-top: -2px
|
||||
display: inline-block
|
||||
width: 190px
|
||||
font-size: 1.5em
|
||||
color: $tertiary
|
||||
|
||||
|
||||
#post-edit-index
|
||||
width: 100%
|
||||
overflow: hidden
|
||||
|
||||
#post-edit-index-wrapper
|
||||
width: 100%
|
||||
|
||||
#post-header
|
||||
// width 100%
|
||||
|
||||
background: $highlight
|
||||
#post-header-wrapper
|
||||
max-width: 900px
|
||||
margin: 0 auto
|
||||
padding: 0.75rem
|
||||
label
|
||||
color: $white
|
||||
font-size: 0.8em
|
||||
font-family: $monoType
|
||||
font-weight: 600
|
||||
span
|
||||
color: color.adjust($primary, $lightness: -60%)
|
||||
font-size: 1.5em
|
||||
|
||||
#post-title
|
||||
#post_title
|
||||
background: color.adjust($highlight, $lightness: 10%)
|
||||
font-family: $baseType
|
||||
width: 97.6%
|
||||
height: 80px
|
||||
font-size: 2em
|
||||
color: color.adjust($primary, $lightness: -60%)
|
||||
padding: 5px
|
||||
margin: 0 0 5px 0
|
||||
|
||||
|
||||
#calendar-icon
|
||||
background: color.adjust($primary, $lightness: -15%)
|
||||
border-radius: 3px 0 0 3px
|
||||
display: inline-block
|
||||
padding: 5.2px
|
||||
color: $secondary
|
||||
|
||||
#post-meta
|
||||
#post_tags
|
||||
background: color.adjust($highlight, $lightness: 10%)
|
||||
font-family: $baseType
|
||||
width: 97.6%
|
||||
height: 80px
|
||||
color: color.adjust($primary, $lightness: -60%)
|
||||
padding: 5px
|
||||
margin: 0 0 5px 0
|
||||
|
||||
#post-options
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
width: 100%
|
||||
padding: 0
|
||||
|
||||
button:nth-child(1)
|
||||
border-radius: 3px 0 0 3px
|
||||
|
||||
button:nth-child(3)
|
||||
border-radius: 0 3px 3px 0
|
||||
|
||||
button
|
||||
width: 33.3%
|
||||
height: 39px
|
||||
@include object-transitions(0.3s)
|
||||
margin: 0
|
||||
border-radius: 0
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
text-align: center
|
||||
|
||||
button[data-active='false']
|
||||
background: color.adjust($primary, $lightness: -60%)
|
||||
svg
|
||||
fill: $white
|
||||
|
||||
button[data-active='true']
|
||||
background: color.adjust($tertiary, $lightness: 5%)
|
||||
svg
|
||||
fill: color.adjust($primary, $lightness: -60%)
|
||||
|
||||
#featured-image-upload, #post-image-upload
|
||||
display: none
|
||||
|
||||
#post-feature
|
||||
width: 100%
|
||||
|
||||
#featured-image-drop
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
width: 100%
|
||||
min-height: 200px
|
||||
background: color.adjust($primary, $lightness: -50%)
|
||||
color: $primary
|
||||
vertical-align: middle
|
||||
font-family: $monoType
|
||||
|
||||
label
|
||||
cursor: pointer
|
||||
|
||||
img
|
||||
width: 100%
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
#featured-new-image-btn
|
||||
position: absolute
|
||||
margin: 20px
|
||||
|
||||
#new-feature-upload
|
||||
padding-top: 4px
|
||||
background: $white
|
||||
|
||||
svg
|
||||
fill: $highlight
|
||||
|
||||
#edit-post
|
||||
width: 100%
|
||||
max-width: 880px
|
||||
margin: 0 auto
|
||||
|
||||
#edit-post-wrapper
|
||||
//width 98.7%
|
||||
max-width: 900px
|
||||
border-radius: 5px
|
||||
//background $primary - 10%
|
||||
margin: 40px 0 40px 0
|
||||
overflow: hidden
|
||||
|
||||
pre
|
||||
margin: 0
|
||||
code
|
||||
font-family: $monoType
|
||||
padding: 5px
|
||||
border-radius: 5px
|
||||
line-height: 1.6em
|
||||
font-size: 1.25em
|
||||
color: $editorPrimary
|
||||
word-wrap: normal
|
||||
white-space: pre-wrap
|
||||
line-break: normal
|
||||
-webkit-line-break: normal
|
||||
-o-line-break: normal
|
||||
-moz-line-break: normal
|
||||
display: inline-block
|
||||
width: 100%
|
||||
max-width: 900px
|
||||
min-height: 200px
|
||||
|
||||
//Responsive
|
||||
@media only screen and (max-width: 800px)
|
||||
#post-edit-index
|
||||
#post-edit-index-wrapper
|
||||
#post-header
|
||||
#post-title
|
||||
#post-date
|
||||
width: 37.6%
|
||||
|
||||
@media only screen and (max-width: 768px)
|
||||
#post-edit-index
|
||||
#post-edit-index-wrapper
|
||||
#post-header
|
||||
#post-title
|
||||
#post-date
|
||||
width: 43.1%
|
||||
|
||||
#post-meta
|
||||
#edit-control
|
||||
max-width: 100%
|
||||
|
||||
button
|
||||
width: 9.91%
|
||||
|
||||
@media only screen and (max-width: 640px)
|
||||
#post-edit-index
|
||||
#post-edit-index-wrapper
|
||||
#post-header
|
||||
#post-title
|
||||
#post-date
|
||||
width: 42%
|
||||
|
||||
@media only screen and (max-width: 480px)
|
||||
#post-index
|
||||
#post-index-wrapper
|
||||
#post-index-menu
|
||||
a
|
||||
font-size: 0.95em
|
||||
|
||||
label
|
||||
display: none
|
||||
visibility: hidden
|
||||
|
||||
#post-edit-index
|
||||
#post-edit-index-wrapper
|
||||
#post-header
|
||||
#post-title
|
||||
#post-options
|
||||
margin: 5px 0 0 0
|
||||
width: 100%
|
||||
padding: 0
|
||||
|
||||
#post-date
|
||||
width: 89.2%
|
||||
|
||||
#post-meta
|
||||
#edit-control
|
||||
button
|
||||
width: 9.91%
|
||||
|
||||
@media only screen and (max-width: 320px)
|
||||
#post-index
|
||||
#post-index-wrapper
|
||||
#post-index-menu
|
||||
a
|
||||
font-size: 0.95em
|
||||
|
||||
label
|
||||
display: none
|
||||
visibility: hidden
|
||||
|
||||
#post-edit-index
|
||||
#post-edit-index-wrapper
|
||||
#post-header
|
||||
#post-title
|
||||
#post_title
|
||||
width: 96.4%
|
||||
|
||||
#post-options
|
||||
margin: 5px 0 0 0
|
||||
width: 100%
|
||||
padding: 0
|
||||
|
||||
#post-date
|
||||
width: 83.1%
|
||||
|
||||
#post-meta
|
||||
#post_tags
|
||||
width: 96.4%
|
||||
|
||||
#edit-control
|
||||
.content-editor-btn-icon
|
||||
svg.icons
|
||||
width: 20px
|
||||
|
||||
.post-sumbit-btn
|
||||
svg.icons
|
||||
width: 20px
|
||||
|
||||
button
|
||||
width: 10%
|
@ -1,176 +0,0 @@
|
||||
#settings-actions
|
||||
position: fixed
|
||||
width: 40%
|
||||
margin-top: -85px
|
||||
left: 50%
|
||||
margin-left: -20%
|
||||
#buttons
|
||||
width: 155px
|
||||
margin: 0 auto
|
||||
button
|
||||
//width 30%
|
||||
margin: 5px
|
||||
svg
|
||||
fill: $white
|
||||
button[data-render='false']
|
||||
background: color.adjust($primary, $lightness: -60%)
|
||||
svg
|
||||
fill: $white
|
||||
|
||||
button[data-render='true']
|
||||
background: color.adjust($tertiary, $lightness: 60%)
|
||||
svg
|
||||
fill: color.adjust($primary, $lightness: -60%)
|
||||
|
||||
|
||||
#site-background
|
||||
margin: 0 0 10px 0
|
||||
|
||||
img
|
||||
width: 100%
|
||||
// border 5px solid $white
|
||||
border-radius: 0
|
||||
overflow: hidden
|
||||
cursor: pointer
|
||||
|
||||
label
|
||||
position: absolute
|
||||
color: $white
|
||||
margin: 5px
|
||||
background: color.adjust($primary, $lightness: -60%)
|
||||
padding: 5px
|
||||
border-radius: 3px
|
||||
|
||||
input
|
||||
visibility: hidden
|
||||
display: none
|
||||
|
||||
#settings-index
|
||||
width: 94%
|
||||
max-width: 900px
|
||||
margin: 0 auto
|
||||
|
||||
#settings-index-wrapper
|
||||
padding: 0.75rem
|
||||
|
||||
button
|
||||
margin-top: 5px
|
||||
width: 100%
|
||||
height: 45px
|
||||
|
||||
#member-settings, #site-settings, #option-settings, #member-utils
|
||||
background: $primary
|
||||
padding: 5px
|
||||
border-radius: 5px 0 5px 0
|
||||
|
||||
label
|
||||
font-family: $monoType
|
||||
color: $white
|
||||
span
|
||||
color: $secondary
|
||||
|
||||
input
|
||||
width: 95%
|
||||
margin: 0 5px 10px 0
|
||||
height: 30px
|
||||
padding: 10px
|
||||
input#backup-upload
|
||||
visibility: hidden
|
||||
display: none
|
||||
.backup-meta
|
||||
background: color.adjust($primary, $lightness: -20%)
|
||||
color: $white
|
||||
padding: 8px
|
||||
border-radius: 3px
|
||||
margin: 5px 0 0 0
|
||||
|
||||
width: 100%
|
||||
margin: 20px auto
|
||||
|
||||
#member-avatar-drop
|
||||
display: inline-block
|
||||
margin: 0 0 10px 0
|
||||
|
||||
img
|
||||
width: 100%
|
||||
// border 5px solid $white
|
||||
border-radius: 5px
|
||||
overflow: hidden
|
||||
cursor: pointer
|
||||
display: block
|
||||
margin-bottom: 2px
|
||||
|
||||
input
|
||||
visibility: hidden
|
||||
display: none
|
||||
#privacy-toggle
|
||||
width: 50%
|
||||
#render-toggle
|
||||
width: 50%
|
||||
|
||||
#member-info
|
||||
vertical-align: top
|
||||
display: inline-block
|
||||
width: 100%
|
||||
|
||||
input
|
||||
width: 95%
|
||||
margin: 0 5px 10px 0
|
||||
|
||||
textarea
|
||||
background: color.adjust($primary, $lightness: -20%)
|
||||
width: 95%
|
||||
height: 155px
|
||||
color: $secondary
|
||||
padding: 10px
|
||||
|
||||
#option-settings
|
||||
#theme-settings
|
||||
a
|
||||
width: 95%
|
||||
margin: 0 5px 5px 0
|
||||
height: 25px
|
||||
padding: 10px
|
||||
display: inline-block
|
||||
|
||||
a[data-enabled='false']
|
||||
background: color.adjust($primary, $lightness: -60%)
|
||||
color: $secondary
|
||||
border-radius: 3px
|
||||
|
||||
a[data-enabled='true']
|
||||
background: $secondary
|
||||
color: $primary
|
||||
border-radius: 3px
|
||||
|
||||
svg
|
||||
fill: $primary
|
||||
display: inline-block
|
||||
float: right
|
||||
|
||||
#mail-settings
|
||||
min-height: 240px
|
||||
|
||||
a.mail-option
|
||||
float: right
|
||||
font-family: $monoType
|
||||
font-size: 0.9em
|
||||
border-radius: 3px
|
||||
text-decoration: none
|
||||
margin: 0 0 0 5px
|
||||
// padding: 1px
|
||||
|
||||
a.mail-option[data-enabled='true']
|
||||
color: $highlight
|
||||
|
||||
a.mail-option[data-enabled='false']
|
||||
color: $white
|
||||
|
||||
input
|
||||
// width 94%
|
||||
margin: 0 5px 5px 0
|
||||
vertical-align: top
|
||||
|
||||
div[data-enabled='false']
|
||||
display: none
|
||||
visibility: hidden
|
@ -1,177 +0,0 @@
|
||||
html, body
|
||||
background-color: color.adjust($primary, $lightness: -20%)
|
||||
font: 400 1em $baseType
|
||||
height: 100%
|
||||
|
||||
a
|
||||
font: 300 1em $baseType
|
||||
color: $secondary
|
||||
text-decoration: underline
|
||||
@include object-transitions(0.1s)
|
||||
|
||||
&:hover
|
||||
color: color.adjust($secondary, $lightness: 10%)
|
||||
|
||||
svg.icons
|
||||
width: 25px
|
||||
fill: $secondary
|
||||
|
||||
#notifications
|
||||
perspective: 1000px
|
||||
position: fixed
|
||||
z-index: 2000
|
||||
height: 55px
|
||||
width: 100%
|
||||
display: block
|
||||
align-items: center
|
||||
justify-content: center
|
||||
padding: 0
|
||||
margin-top: -55px
|
||||
#notifyMessage
|
||||
margin: 0 auto
|
||||
//ks-easing( "out-back" );
|
||||
transition: all 0.6s cubic-bezier(.83,.05,.28,1.0)
|
||||
//padding-top -125px
|
||||
height: 50px
|
||||
width: 500px
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
opacity: 1
|
||||
transform-style: preserve-3d
|
||||
transform: rotateX(-120deg)
|
||||
transform-origin: 50% 0
|
||||
#notify-good, #notify-lame, #notify-working
|
||||
display: block
|
||||
#notify-working-box
|
||||
-webkit-animation: spin 2s linear infinite
|
||||
-moz-animation: spin 2s linear infinite
|
||||
animation: spin 2s linear infinite
|
||||
@-moz-keyframes spin
|
||||
100%
|
||||
-moz-transform: rotate(360deg)
|
||||
@-webkit-keyframes spin
|
||||
100%
|
||||
-webkit-transform: rotate(360deg)
|
||||
@keyframes spin
|
||||
100%
|
||||
-webkit-transform: rotate(360deg)
|
||||
transform: rotate(360deg)
|
||||
|
||||
.notify-icon
|
||||
background: $black
|
||||
padding: 8px 5px 5px 5px
|
||||
border-radius: 5px 0 0 5px
|
||||
height: 30px
|
||||
width: 30px
|
||||
text-align: center
|
||||
border: 2px solid $white
|
||||
p
|
||||
color: $white
|
||||
background: color.adjust($primary, $lightness: -60%)
|
||||
width: 400px
|
||||
height: 28px
|
||||
padding: 15px 0 0 5px
|
||||
border-radius: 0 5px 5px 0
|
||||
border: 2px solid $white
|
||||
text-align: center
|
||||
|
||||
.icons
|
||||
fill: $white
|
||||
|
||||
.notify-close
|
||||
transform-style: preserve-3d
|
||||
transform: rotateX(-120deg)
|
||||
|
||||
.notify-open
|
||||
transform-style: preserve-3d
|
||||
transform: rotateX(0deg)
|
||||
.blog-container
|
||||
width: 100%
|
||||
|
||||
.main-container
|
||||
margin: 0 auto
|
||||
z-index: 10
|
||||
position: relative
|
||||
|
||||
section
|
||||
header
|
||||
width: 100%
|
||||
max-width: 900px
|
||||
margin: 0 auto
|
||||
|
||||
#wrapper
|
||||
padding: 0.75rem
|
||||
|
||||
#left, #right
|
||||
width: 49.7%
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
min-height: 60px
|
||||
|
||||
#the-logo
|
||||
width: 40px
|
||||
|
||||
#right
|
||||
text-align: right
|
||||
color: $white
|
||||
|
||||
a
|
||||
text-decoration-color: $highlight
|
||||
font-weight: 400
|
||||
|
||||
label#the-title
|
||||
font-size: 1.2em
|
||||
font-weight: 400
|
||||
color: $tertiary
|
||||
text-decoration: none
|
||||
display: block
|
||||
line-height: 0.8
|
||||
// word-break: break-all;
|
||||
|
||||
#dash-menu
|
||||
text-align: right
|
||||
|
||||
/* Mozilla based browsers */
|
||||
::-moz-selection
|
||||
background-color: $highlight
|
||||
color: $white
|
||||
|
||||
/* Works in Safari */
|
||||
::selection
|
||||
background-color: $highlight
|
||||
color: $white
|
||||
|
||||
/* Works in Opera */
|
||||
::-o-selection
|
||||
background-color: $highlight
|
||||
color: $white
|
||||
|
||||
::-ms-selection
|
||||
background-color: $highlight
|
||||
color: $white
|
||||
|
||||
/* Works in Internet Explorer */
|
||||
::-webkit-selection
|
||||
background-color: $highlight
|
||||
color: $white
|
||||
|
||||
//Responsive
|
||||
@media only screen and (max-width: 800px)
|
||||
.main-container
|
||||
section
|
||||
header
|
||||
#wrapper
|
||||
#left, #right
|
||||
display: inline-block
|
||||
|
||||
@media only screen and (max-width: 480px)
|
||||
.main-container
|
||||
section
|
||||
header
|
||||
#wrapper
|
||||
#left
|
||||
width: 30%
|
||||
|
||||
#right
|
||||
width: 70%
|
@ -1,18 +0,0 @@
|
||||
$baseType: Helvetica, Arial, sans-serif
|
||||
$monoType: "Lucida Console", Monaco, monospace
|
||||
|
||||
h1, h2, h3
|
||||
color: $white
|
||||
|
||||
h1
|
||||
font-size: 2em
|
||||
font-weight: 400
|
||||
|
||||
h2
|
||||
font-size: 1.75em
|
||||
font-weight: 400
|
||||
|
||||
h3
|
||||
font-size: 1.5em
|
||||
font-weight: 300
|
||||
|
Loading…
Reference in New Issue