Compare commits

...

9 commits
b2.6.0 ... beta

Author SHA1 Message Date
Ro
62e2dea287
Beta 2.6.1 update 2023-05-14 18:08:31 -07:00
Ro
f824b53f2a
Update versioning to 2.6.1
All the issues in milestone 2.6.1 have been completed, so now it's time for an update
2023-05-14 18:00:53 -07:00
Ro
8461d88dd6
Settings CSS Cleanup
The Settings UI needed some responsive polish, so that's been given a
bit more love.
2023-05-14 17:37:39 -07:00
Ro
a9c88f1430
Edits for #86 and #92
Fixed the issue where the text edit controller would scroll right off
the screen. Now it stick when it's the bottom of the header.

Also changed the background color of page links on the Start and Book
pages to indicate there is no image. It's just cleaner
2023-04-28 16:17:15 -07:00
Ro
fa4b252d9c
Fix for #94
Header images were missing from the archive and tags pages, so this is a
patch to make sure those are working again.
2023-04-28 14:08:49 -07:00
Ro
181225329a
CSS and icon fixes
Fixes for issues #93, #88, #87
2023-04-13 14:31:43 -07:00
Ro
4876c1336e
Updated Composer packages; empty field fix
Composer dependencies were pretty old, so they needed to be upgraded to
the latest.

There was also a minor bug that was triggered when a new page was saved
with empty tags and no images or documents, so that's been patched as
well.
2023-04-09 17:16:24 -07:00
Ro
8ce253418d
Adding site creation hot fix
Adding the fixes for site install process errors to the branch.
2023-04-06 18:03:53 -07:00
Ro
f1850ce7f7
Site Creation Hot Fix
There was an error in the request to set up a fresh site on the front
end and handling the respective object on the backend that was causing
the process to error out.

Also added the source map for the dash script because it's eventually
going to be fully transparent anyway.
2023-04-06 17:59:31 -07:00
22 changed files with 367 additions and 301 deletions

5
.gitignore vendored
View file

@ -22,6 +22,10 @@ public/assets/scripts/*
=======
!public/assets/scripts/dash.js
<<<<<<< HEAD
>>>>>>> develop
=======
!public/assets/scripts/dash.js.map
>>>>>>> develop
!public/assets/images
public/assets/images/*
@ -51,3 +55,4 @@ config.codekit3
src/com/*
src/styles/*
src/com/ui/TextEditor.js

View file

@ -38,6 +38,7 @@ class SettingsAPI
} else {
$render = new Render();
if (isset($themeConfig['render'])) {
//rendering for one page sites
if (!$themeConfig['render'] || $themeConfig['render'] === 'false') {
$render->renderIndex();
$result = [

View file

@ -120,9 +120,14 @@ class DashControl
} else {
$views = (new Themes())->getCustomViews();
}
$imageList = explode(',', $page['feature']);
$fileList = explode(',', $page['files']);
$imageList = [];
$fileList = [];
if (isset($page['feature'])) {
$imageList = explode(',', $page['feature']);
}
if (isset($page['files'])) {
$fileList = explode(',', $page['files']);
}
$images = [];
$files = [];

View file

@ -108,10 +108,14 @@ class Contents
];
$sanitizer = $builder->build($detergent);
$scrubbed = $sanitizer->sanitize($result->getContent());
if (isset($meta['feature'])) {
$featureList = explode(',', $meta['feature']);
} else {
$featureList = "";
}
$scrubbed = $sanitizer->sanitize($result->getContent());
$featureList = explode(',', $meta['feature']);
$docs = '';
$docs = '';
if (isset($meta['files'])) {
$fileList = explode(',', $meta['files']);
$docs = $meta['files'];
@ -122,19 +126,23 @@ class Contents
$media = [];
$files = [];
foreach ($featureList as $file) {
$item = trim($file);
$ext = pathinfo($item, PATHINFO_EXTENSION);
if ($item != null || $item != '') {
array_push($media, ['file' => $item, 'type' => trim($ext)]);
if ($featureList != '') {
foreach ($featureList as $file) {
$item = trim($file);
$ext = pathinfo($item, PATHINFO_EXTENSION);
if ($item != null || $item != '') {
array_push($media, ['file' => $item, 'type' => trim($ext)]);
}
}
}
foreach ($fileList as $file) {
$item = trim($file);
$ext = pathinfo($item, PATHINFO_EXTENSION);
if ($item != null || $item != '') {
array_push($files, ['file' => $item, 'type' => trim($ext)]);
if ($fileList != "") {
foreach ($fileList as $file) {
$item = trim($file);
$ext = pathinfo($item, PATHINFO_EXTENSION);
if ($item != null || $item != '') {
array_push($files, ['file' => $item, 'type' => trim($ext)]);
}
}
}

View file

@ -136,6 +136,7 @@ class Render
'archives' => $archive,
'info' => $this->pageInfo,
'menu' => $this->menu,
'media' => [['file' => $this->pageInfo['image'], 'type' => trim(pathinfo($this->pageInfo['image'], PATHINFO_EXTENSION))]],
];
$html = $this->twig->render($template, $pageOptions);
@ -154,6 +155,7 @@ class Render
'tag_list' => $item['pages'],
'info' => $this->pageInfo,
'menu' => $this->menu,
'media' => [['file' => $this->pageInfo['image'], 'type' => trim(pathinfo($this->pageInfo['image'], PATHINFO_EXTENSION))]],
];
$html = $this->twig->render($template, $pageOptions);

View file

@ -57,8 +57,8 @@ class SetUp
'id' => 1,
'uuid' => StringTools::createUUID(),
'title' => 'FIRST!',
'feature' => '/assets/images/global/default-bg.jpg',
'files' => '',
'imageList' => '/assets/images/global/default-bg.jpg',
'fileList' => '',
'path' => 'content/pages/start',
'layout' => 'index',
'tags' => 'start, welcome',

View file

@ -23,15 +23,17 @@ class Sorting
$pages = (new Book('../content/pages'))->getContents();
foreach ($pages as $page) {
$temp = [];
$temp = explode(',', $page['tags']);
foreach ($temp as $tag) {
$label = trim($tag);
if (!find(self::$p_tags, ['tag_name' => $label])) {
array_push(self::$p_tags, [
'tag_name' => $label,
'slug' => StringTools::safeString($label),
'pages' => self::tagPages($label, $pages),
]);
if (isset($page['tags'])) {
$temp = explode(',', $page['tags']);
foreach ($temp as $tag) {
$label = trim($tag);
if (!find(self::$p_tags, ['tag_name' => $label])) {
array_push(self::$p_tags, [
'tag_name' => $label,
'slug' => StringTools::safeString($label),
'pages' => self::tagPages($label, $pages),
]);
}
}
}
}
@ -43,13 +45,15 @@ class Sorting
{
$tagged = [];
foreach ($pages as $page) {
if (strpos($page['tags'], $tag) !== false) {
array_push($tagged, [
'title' => $page['title'],
'slug' => $page['slug'],
'path' => $page['path'],
'feature' => $page['feature'],
]);
if (isset($page['tags'])) {
if (strpos($page['tags'], $tag) !== false) {
array_push($tagged, [
'title' => $page['title'],
'slug' => $page['slug'],
'path' => $page['path'],
'feature' => $page['feature'],
]);
}
}
}
@ -124,15 +128,16 @@ class Sorting
'image' => $settings['global']['base_url'] . $settings['global']['background'],
'baseURL' => $settings['global']['base_url'],
];
$taglist = explode(',', $page['tags']);
$tags = [];
foreach ($taglist as $tag) {
$label = trim($tag);
array_push($tags, [
'label' => $label . ' ',
'slug' => StringTools::safeString($label),
]);
$tags = [];
if (isset($page['tags'])) {
$taglist = explode(',', $page['tags']);
foreach ($taglist as $tag) {
$label = trim($tag);
array_push($tags, [
'label' => $label . ' ',
'slug' => StringTools::safeString($label),
]);
}
}
$meta = [

View file

@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="theme-color" content="#FFFFFF"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
{% block title %}
{{ title }}

View file

@ -51,7 +51,7 @@
</a>
{% else %}
<a class="page-link" href="/dashboard/page/edit/{{ page.uuid }}">
<div class="page-bg" style="background: url({{ page.media[0].file }}) no-repeat center center / cover">
<div class="page-bg" style="background: url({{ page.media[0].file }}) no-repeat center center / cover #fc6399">
<div id="meta">
{{ include("dash/partials/recent-meta.twig") }}
</div>

View file

@ -3,7 +3,7 @@
<img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/>
</a>
</div>
<form id="init-form" method="POST">
<form id="init-form" method="POST" onsubmit="return false;">
<input type="text" name="new_member_handle" id="new_member_handle" placeholder="handle"/>
<input type="text" name="new_member_email" id="new_member_email" placeholder="email"/>
<input type="text" name="new_member_pass" id="new_member_pass" placeholder="password"/>

View file

@ -1,38 +1,38 @@
<div role="text-editor-control">
<button id="edit-bold" class="content-editor-btn-text editor-button" title="bold">
<i class="ti ti-bold"></i>
<i id="edit-bold" class="ti ti-bold"></i>
</button>
<button id="edit-italic" class="content-editor-btn-text editor-button" title="italic">
<i class="ti ti-italic"></i>
<i id="edit-italic" class="ti ti-italic"></i>
</button>
<button id="edit-strikethrough" class="content-editor-btn-text editor-button" title="strikethrough">
<i class="ti ti-strikethrough"></i>
<i id="edit-strikethrough" class="ti ti-strikethrough"></i>
</button>
<button id="edit-link" class="content-editor-btn-icon editor-button" title="insert link">
<i class="ti ti-link"></i>
<i id="edit-link" class="ti ti-link"></i>
</button>
<button id="edit-header1" class="content-editor-btn-text editor-button" title="header 1">
<i class="ti ti-h-1"></i>
<i id="edit-header1" class="ti ti-h-1"></i>
</button>
<button id="edit-header2" class="content-editor-btn-text editor-button" title="header 2">
<i class="ti ti-h-2"></i>
<i id="edit-header2" class="ti ti-h-2"></i>
</button>
<button id="edit-header3" class="content-editor-btn-text editor-button" title="header 3">
<i class="ti ti-h-3"></i>
<i id="edit-header3" class="ti ti-h-3"></i>
</button>
<button id="edit-image" class="content-editor-btn-icon editor-button" title="insert image">
<i class="ti ti-photo"></i>
<i id="edit-image" class="ti ti-photo"></i>
</button>
{% if mode == "edit" %}
<button id="edit-update" class="post-sumbit-btn submit-start editor-button" data-action='blog-update' data-id="{{ page['uuid'] }} type='submit' title=" bold">
<i class="ti ti-device-floppy"></i>
<i id="edit-update" class="ti ti-device-floppy"></i>
</button>
<button id="edit-delete" class="content-editor-btn-icon editor-button submit-delete" for="post-delete" title='delete post'>
<i class="ti ti-x"></i>
<i id="edit-delete" class="ti ti-x"></i>
</button>
{% else %}
<button id="edit-save" class="post-sumbit-btn submit-start editor-button" data-action='blog-add' type='submit'>
<i class="ti ti-file-plus"></i>
<i id="edit-save" class="ti ti-file-plus"></i>
</button>
{% endif %}
</div>

View file

@ -18,7 +18,7 @@
</a>
{% else %}
<a href="/dashboard/page/edit/{{ page.uuid }}" id="{{ page.uuid }}" class="post-link recent-link" style="background: url({{ page.media[0].file }}) no-repeat center center / cover">
<a href="/dashboard/page/edit/{{ page.uuid }}" id="{{ page.uuid }}" class="post-link recent-link" style="background: url({{ page.media[0].file }}) no-repeat center center / cover #fc6399">
{{ include("dash/partials/recent-meta.twig") }}
</a>
{% endif %}

View file

@ -109,7 +109,6 @@
<i class="ti ti-mailbox"></i>
<span>TEST MAIL</span>
</button>
<br/><br/>
</div>
<div>
<label>API KEY</label>

View file

@ -1,7 +1,7 @@
{
"name": "are0h/fipamo",
"descriptions": "The most chill no database blog framework ever.",
"version": "2.5.1-beta",
"version": "2.6.1-beta",
"homepage": "https://fipamo.blog",
"authors": [
{
@ -10,9 +10,9 @@
}
],
"support": {
"source": "https://code.playvicio.us/Are0h/Fipamo",
"wiki": "https://code.playvicio.us/Are0h/Fipamo/wiki/_pages",
"issues": "https://code.playvicio.us/Are0h/Fipamo/issues"
"source": "https://koodu.ubiqueros.com/are0h/Fipamo",
"wiki": "https://koodu.ubiqueros.com/are0h/Fipamo/wiki/?action=_pages",
"issues": "https://koodu.ubiqueros.com/are0h/Fipamo/issues"
},
"require": {
"slim/slim": "4.*",
@ -28,5 +28,10 @@
"symfony/yaml": "^5.4",
"olegatro/html-sanitizer-relative": "^1.0",
"nesbot/carbon": "^2.62"
}
},
"scripts": {
"start": [
"@php -S localhost:8000 -t public/"
]
}
}

410
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,13 @@
{
"name": "fipamo-dash",
"version": "2.6.0-beta",
"version": "2.6.1-beta",
"private": true,
"apidoc": {
"name": "Fipamo API",
"version": "1.0.0",
"description": "The most chill API for the most chill blog framework"
},
"source": "src/com/start.js",
"source": "src/com/Start.js",
"main": "public/assets/scripts/dash.js",
"targets": {
"main": {

View file

@ -80,20 +80,13 @@ section[role="book-index-pages"] hr {
section[role="book-index-pages"] button[data-active="true"] {
background: var(--primary);
}
section[role="book-index-pages"] button[data-active="true"] svg {
fill: var(--tertiary);
color: var(--tertiary);
}
section[role="book-index-pages"] button[data-active="false"] {
background: var(--secondary);
}
section[role="book-index-pages"] button[data-active="false"] svg {
fill: var(--primary);
}
section[role="book-index-pages"] > div[role="paginate"] {
width: fit-content;
margin: 0 auto;

View file

@ -31,6 +31,11 @@ sup {
border-radius: 3px;
}
::selection {
background: var(--highlight);
color: var(--white);
}
#notifications {
display: none;
visibility: hidden;
@ -93,6 +98,7 @@ header > nav > div > div[role="mobile-menu"] {
z-index: 1000;
left: 0;
transition: all 0.2s linear;
background: var(--white);
}
header > nav > div[role="nav-right"] button {

View file

@ -304,6 +304,13 @@ main > section[role="text-editor"] > div[role="text-editor-control"] {
grid-template-columns: repeat(10, 1fr);
}
.control-freeze {
position: fixed;
z-index: 300;
width: 97%;
top: 65px;
}
main > section[role="text-editor"] > div[role="edit-post-wrapper"] {
width: 100%;
max-width: 900px;

View file

@ -26,10 +26,6 @@ section[role="member-settings"] {
margin: 10px auto;
}
section[role="member-settings"] {
width: 100%;
}
section[role="member-settings"] > div:nth-child(1) {
grid-column: 1/2;
grid-row: 1/3;
@ -85,13 +81,13 @@ section[role="member-settings"] div input[type="file"] {
}
section[role="member-settings"] div input[type="text"] {
width: 100%;
width: 98.4%;
height: 40px;
margin-bottom: 10px;
}
section[role="member-settings"] div textarea {
width: 99%;
width: 98.4%;
height: 63%;
}
@ -163,9 +159,9 @@ section[role="member-settings"] > div[role="mail"] div[data-enabled="false"] {
}
section[role="member-settings"] > div[role="mail"] input {
width: 96%;
height: 30px;
padding: 5px;
width: 98.4%;
height: 40px;
padding-left: 5px;
margin-bottom: 10px;
}
@ -177,19 +173,29 @@ section[role="data-settings"] {
main > article[role="settings"] {
width: 97%;
}
main > article[role="settings"] > section[role="member-settings"] {
width: 97.5%;
}
}
@media only screen and (max-width: 650px) {
section[role="member-settings"] div input[type="text"] {
width: 99.3%;
height: 40px;
margin-bottom: 10px;
}
section[role="member-settings"] {
grid-template-columns: 1fr 1fr;
}
section[role="member-settings"] > div[role="mail"] input {
width: 97.7%;
height: 40px;
padding-left: 5px;
margin-bottom: 10px;
}
section[role="member-settings"] div textarea {
height: 80px;
width: 99.3%;
}
section[role="member-settings"] > div:nth-child(1) {
@ -231,8 +237,12 @@ section[role="data-settings"] {
}
@media only screen and (max-width: 530px) {
section[role="member-settings"] > div[role="mail"] input {
width: 98.5%;
}
section[role="member-settings"] {
grid-template-columns: 1fr;
grid-template-columns: 100%;
}
section[role="member-settings"] div textarea {
@ -246,6 +256,8 @@ section[role="data-settings"] {
section[role="member-settings"] > div:nth-child(2) {
grid-row: 3/5;
grid-column: 1;
height: 200px;
}
section[role="member-settings"] > div:nth-child(3) {
@ -258,6 +270,6 @@ section[role="data-settings"] {
section[role="member-settings"] > div:nth-child(6),
section[role="member-settings"] > div:nth-child(7),
section[role="member-settings"] > div:nth-child(8) {
grid-column: 1/3;
grid-column: 1;
}
}

View file

@ -405,7 +405,7 @@ const $7e781a188206b2b3$export$d46ee33f41c7e43d = "apiUseNotAuthorized";
* @property {string} new_member_title - title for new user
*/ create(data) {
return new Promise((resolve, reject)=>{
this._request($7e781a188206b2b3$export$6010ab8005eea11c, $7e781a188206b2b3$export$2fb4d35b5b0eebb2, $7e781a188206b2b3$export$1470a914435ca933, $7e781a188206b2b3$export$e133232680a85c80, data).then((result)=>{
this._request($7e781a188206b2b3$export$6010ab8005eea11c, null, $7e781a188206b2b3$export$2fb4d35b5b0eebb2, $7e781a188206b2b3$export$1470a914435ca933, $7e781a188206b2b3$export$e133232680a85c80, data).then((result)=>{
resolve(result);
}).catch((err)=>{
reject(err);
@ -426,7 +426,7 @@ const $7e781a188206b2b3$export$d46ee33f41c7e43d = "apiUseNotAuthorized";
method = $7e781a188206b2b3$export$1470a914435ca933;
type = $7e781a188206b2b3$export$d1a86f208bdcebe5;
data = new FormData(form);
this._request(url, event, method, type, data).then((result)=>{
this._request(url, null, event, method, type, data).then((result)=>{
resolve(result);
}).catch((err)=>{
reject(err);
@ -2358,6 +2358,15 @@ class $e6c02983873e6cdf$var$TextEditor extends (0, $68b475f2a0292491$export$2e2b
//--------------------------
constructor(textEditor, scrollLimit){
super();
document.querySelector('[role="text-editor-control"]').addEventListener("scroll", (e)=>{
console.log("HERE");
});
document.body.addEventListener("scroll", (e)=>{
var fixLimit = scrollLimit;
console.log("POSITION", document.body.scrollTop + " : " + fixLimit);
if (document.body.scrollTop + 5 >= fixLimit) document.querySelector('[role="text-editor-control"]').classList.add("control-freeze");
else document.querySelector('[role="text-editor-control"]').classList.remove("control-freeze");
});
document.getElementById("edit").addEventListener("input", (e)=>{
let result_element = document.querySelector("#highlight-content");
this.textEditor = textEditor;
@ -2378,12 +2387,7 @@ class $e6c02983873e6cdf$var$TextEditor extends (0, $68b475f2a0292491$export$2e2b
});
document.getElementById("edit").dispatchEvent(new Event("input"));
this.setInputs();
//freeze editor formatting so it doesn't scroll off screen
window.addEventListener("scroll", ()=>{
var fixLimit = scrollLimit;
if (window.pageYOffset + 5 >= fixLimit) document.getElementById("edit-control").style.position = "fixed";
else document.getElementById("edit-control").style.position = "relative";
});
//freeze editor formatting so it doesn't scroll off screen
}
//--------------------------
// methods
@ -7318,17 +7322,17 @@ class $5ec7c34d3cbf8bc6$export$2e2bcd8739ae039 {
mm.create(setUpForm).then((response)=>{
if (response.type === $995f55a4eccd256d$export$74a5c30fa9753d80) {
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, false);
e.target.innerHTML = response.message;
} else {
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, true);
e.target.innerHTML = response.message;
setTimeout(()=>{
window.location = "/dashboard";
}, 700);
}
}).catch((err)=>{
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(err, false);
//notify.alert(err, false);
});
}
handleRestore(e) {
@ -7342,17 +7346,17 @@ class $5ec7c34d3cbf8bc6$export$2e2bcd8739ae039 {
mm.restore(form).then((response)=>{
if (response.type === $995f55a4eccd256d$export$f99ec790401d28da) {
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, false);
e.target.innerHTML = response.message;
} else {
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, true);
e.target.innerHTML = response.message;
setTimeout(()=>{
window.location = "/dashboard";
}, 1500);
}
}).catch((err)=>{
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(err, false);
e.target.innerHTML = err;
});
}
handleReset(e) {

File diff suppressed because one or more lines are too long