fix for uploaded image url save in pages, dash type tweak

This commit is contained in:
Ro 2020-09-05 10:02:00 -07:00
parent 810905326f
commit 0dd9d104fa
2 changed files with 24 additions and 18 deletions

View file

@ -134,12 +134,18 @@ router.post('/write/:task?', feature_upload, (req, res) => {
: (task = DataEvent.API_PAGE_WRITE);
if (req.files.length > 0) {
var path = req.files[0].path;
//console.log('NEW FEATURE URL', path);
feature = '/' + path.substring(7, path.length);
} else {
var url = body.feature_image;
url != null || url != undefined || url != ''
? (feature = url.substring(21, url.length))
: (feature = '');
//switch this to the new feature path edit
if (url != null || url != undefined || url != '') {
let chunks = url.split('/');
let strip = chunks[0] + '/' + chunks[1] + chunks[2];
feature = url.substr(strip.length + 1, url.length);
} else {
feature = '';
}
}
body.feature = feature;
body.deleted = false;

View file

@ -1890,7 +1890,7 @@ svg.icons {
margin: 0 auto;
width: 300px;
display: block;
font-family: 'Andale Mono';
font-family: monospace, courier;
font-size: 0.5em;
padding: 7px;
color: #f2f1ef;
@ -2063,7 +2063,7 @@ svg.icons {
#settings-index #settings-index-wrapper #site-settings label,
#settings-index #settings-index-wrapper #option-settings label,
#settings-index #settings-index-wrapper #member-utils label {
font-family: 'Andale Mono';
font-family: monospace, courier;
color: #f2f1ef;
}
#settings-index #settings-index-wrapper #member-settings span,
@ -2187,7 +2187,7 @@ svg.icons {
}
#settings-index #settings-index-wrapper #option-settings #mail-settings a.mail-option {
float: right;
font-family: 'Andale Mono';
font-family: monospace, courier;
font-size: 0.9em;
border-radius: 3px;
text-decoration: none;
@ -2313,7 +2313,7 @@ input[type=text] {
border: 0;
border-radius: 3px;
padding: 5px;
font: 1em 'Andale Mono';
font: 1em monospace, courier;
display: inline-block;
background-color: #161d23;
color: #b2cce5;
@ -2322,13 +2322,13 @@ textarea {
border: 0;
border-radius: 3px;
color: $type02;
font: 1em 'Andale Mono';
font: 1em monospace, courier;
}
button,
input[type=submit] {
background: #fc6399;
color: #161d23;
font: 1em 'Andale Mono';
font: 1em monospace, courier;
border-radius: 3px;
position: relative;
cursor: pointer;
@ -2339,7 +2339,7 @@ input.large {
padding: 10px;
}
select {
font: 1em 'Andale Mono';
font: 1em monospace, courier;
border: 1px solid #b2cce5;
-webkit-appearance: none;
-moz-appearance: none;
@ -2347,21 +2347,21 @@ select {
color: #374857;
}
::-webkit-input-placeholder {
font: 1em 'Andale Mono';
font: 1em monospace, courier;
color: #b2cce5;
}
:-moz-placeholder {
/* Firefox 18- */
font: 1em 'Andale Mono';
font: 1em monospace, courier;
color: #b2cce5;
}
::-moz-placeholder {
/* Firefox 19+ */
font: 1em 'Andale Mono';
font: 1em monospace, courier;
color: #b2cce5;
}
:-ms-input-placeholder {
font: 1em 'Andale Mono';
font: 1em monospace, courier;
color: #b2cce5;
}
/**
@ -2424,7 +2424,7 @@ select {
display: inline-block;
vertical-align: top;
font-size: 0.8em;
font-family: 'Andale Mono';
font-family: monospace, courier;
width: 50%;
padding: 0 0 0 10px;
}
@ -2523,7 +2523,7 @@ select {
#post-edit-index #post-edit-index-wrapper #post-header #post-header-wrapper label {
color: #f2f1ef;
font-size: 0.8em;
font-family: 'Andale Mono';
font-family: monospace, courier;
font-weight: 600;
}
#post-edit-index #post-edit-index-wrapper #post-header #post-header-wrapper span {
@ -2609,7 +2609,7 @@ select {
background: #1c242c;
color: #374857;
vertical-align: middle;
font-family: 'Andale Mono';
font-family: monospace, courier;
}
#post-edit-index #post-edit-index-wrapper #post-feature #featured-image-drop label {
cursor: pointer;
@ -2645,7 +2645,7 @@ select {
margin: 0;
}
#post-edit-index #post-edit-index-wrapper #edit-post #edit-post-wrapper pre code {
font-family: 'Andale Mono';
font-family: monospace, courier;
padding: 5px;
border-radius: 5px;
line-height: 1.6em;