Beta 2.6.1 update

beta b2.6.1
Ro 2 years ago
commit 62e2dea287
Signed by: are0h
GPG Key ID: 29B551CDBD4D3B50

1
.gitignore vendored

@ -55,3 +55,4 @@ config.codekit3
src/com/* src/com/*
src/styles/* src/styles/*
src/com/ui/TextEditor.js

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

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

@ -108,9 +108,13 @@ class Contents
]; ];
$sanitizer = $builder->build($detergent); $sanitizer = $builder->build($detergent);
$scrubbed = $sanitizer->sanitize($result->getContent()); $scrubbed = $sanitizer->sanitize($result->getContent());
if (isset($meta['feature'])) {
$featureList = explode(',', $meta['feature']); $featureList = explode(',', $meta['feature']);
} else {
$featureList = "";
}
$docs = ''; $docs = '';
if (isset($meta['files'])) { if (isset($meta['files'])) {
$fileList = explode(',', $meta['files']); $fileList = explode(',', $meta['files']);
@ -122,6 +126,7 @@ class Contents
$media = []; $media = [];
$files = []; $files = [];
if ($featureList != '') {
foreach ($featureList as $file) { foreach ($featureList as $file) {
$item = trim($file); $item = trim($file);
$ext = pathinfo($item, PATHINFO_EXTENSION); $ext = pathinfo($item, PATHINFO_EXTENSION);
@ -129,7 +134,9 @@ class Contents
array_push($media, ['file' => $item, 'type' => trim($ext)]); array_push($media, ['file' => $item, 'type' => trim($ext)]);
} }
} }
}
if ($fileList != "") {
foreach ($fileList as $file) { foreach ($fileList as $file) {
$item = trim($file); $item = trim($file);
$ext = pathinfo($item, PATHINFO_EXTENSION); $ext = pathinfo($item, PATHINFO_EXTENSION);
@ -137,6 +144,7 @@ class Contents
array_push($files, ['file' => $item, 'type' => trim($ext)]); array_push($files, ['file' => $item, 'type' => trim($ext)]);
} }
} }
}
//sort attributes into page object //sort attributes into page object
$page = [ $page = [

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

@ -23,6 +23,7 @@ class Sorting
$pages = (new Book('../content/pages'))->getContents(); $pages = (new Book('../content/pages'))->getContents();
foreach ($pages as $page) { foreach ($pages as $page) {
$temp = []; $temp = [];
if (isset($page['tags'])) {
$temp = explode(',', $page['tags']); $temp = explode(',', $page['tags']);
foreach ($temp as $tag) { foreach ($temp as $tag) {
$label = trim($tag); $label = trim($tag);
@ -35,6 +36,7 @@ class Sorting
} }
} }
} }
}
return self::$p_tags; return self::$p_tags;
} }
@ -43,6 +45,7 @@ class Sorting
{ {
$tagged = []; $tagged = [];
foreach ($pages as $page) { foreach ($pages as $page) {
if (isset($page['tags'])) {
if (strpos($page['tags'], $tag) !== false) { if (strpos($page['tags'], $tag) !== false) {
array_push($tagged, [ array_push($tagged, [
'title' => $page['title'], 'title' => $page['title'],
@ -52,6 +55,7 @@ class Sorting
]); ]);
} }
} }
}
return $tagged; return $tagged;
} }
@ -124,9 +128,9 @@ class Sorting
'image' => $settings['global']['base_url'] . $settings['global']['background'], 'image' => $settings['global']['base_url'] . $settings['global']['background'],
'baseURL' => $settings['global']['base_url'], 'baseURL' => $settings['global']['base_url'],
]; ];
$taglist = explode(',', $page['tags']);
$tags = []; $tags = [];
if (isset($page['tags'])) {
$taglist = explode(',', $page['tags']);
foreach ($taglist as $tag) { foreach ($taglist as $tag) {
$label = trim($tag); $label = trim($tag);
array_push($tags, [ array_push($tags, [
@ -134,6 +138,7 @@ class Sorting
'slug' => StringTools::safeString($label), 'slug' => StringTools::safeString($label),
]); ]);
} }
}
$meta = [ $meta = [
'who' => $page['author'], 'who' => $page['author'],

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

@ -51,7 +51,7 @@
</a> </a>
{% else %} {% else %}
<a class="page-link" href="/dashboard/page/edit/{{ page.uuid }}"> <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"> <div id="meta">
{{ include("dash/partials/recent-meta.twig") }} {{ include("dash/partials/recent-meta.twig") }}
</div> </div>

@ -1,38 +1,38 @@
<div role="text-editor-control"> <div role="text-editor-control">
<button id="edit-bold" class="content-editor-btn-text editor-button" title="bold"> <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>
<button id="edit-italic" class="content-editor-btn-text editor-button" title="italic"> <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>
<button id="edit-strikethrough" class="content-editor-btn-text editor-button" title="strikethrough"> <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>
<button id="edit-link" class="content-editor-btn-icon editor-button" title="insert link"> <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>
<button id="edit-header1" class="content-editor-btn-text editor-button" title="header 1"> <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>
<button id="edit-header2" class="content-editor-btn-text editor-button" title="header 2"> <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>
<button id="edit-header3" class="content-editor-btn-text editor-button" title="header 3"> <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>
<button id="edit-image" class="content-editor-btn-icon editor-button" title="insert image"> <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> </button>
{% if mode == "edit" %} {% 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"> <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>
<button id="edit-delete" class="content-editor-btn-icon editor-button submit-delete" for="post-delete" title='delete post'> <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> </button>
{% else %} {% else %}
<button id="edit-save" class="post-sumbit-btn submit-start editor-button" data-action='blog-add' type='submit'> <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> </button>
{% endif %} {% endif %}
</div> </div>

@ -18,7 +18,7 @@
</a> </a>
{% else %} {% 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") }} {{ include("dash/partials/recent-meta.twig") }}
</a> </a>
{% endif %} {% endif %}

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

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

@ -1,6 +1,6 @@
{ {
"name": "fipamo-dash", "name": "fipamo-dash",
"version": "2.6.0-beta", "version": "2.6.1-beta",
"private": true, "private": true,
"apidoc": { "apidoc": {
"name": "Fipamo API", "name": "Fipamo API",

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

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

@ -304,6 +304,13 @@ main > section[role="text-editor"] > div[role="text-editor-control"] {
grid-template-columns: repeat(10, 1fr); 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"] { main > section[role="text-editor"] > div[role="edit-post-wrapper"] {
width: 100%; width: 100%;
max-width: 900px; max-width: 900px;

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

@ -2358,6 +2358,15 @@ class $e6c02983873e6cdf$var$TextEditor extends (0, $68b475f2a0292491$export$2e2b
//-------------------------- //--------------------------
constructor(textEditor, scrollLimit){ constructor(textEditor, scrollLimit){
super(); 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)=>{ document.getElementById("edit").addEventListener("input", (e)=>{
let result_element = document.querySelector("#highlight-content"); let result_element = document.querySelector("#highlight-content");
this.textEditor = textEditor; this.textEditor = textEditor;
@ -2379,11 +2388,6 @@ class $e6c02983873e6cdf$var$TextEditor extends (0, $68b475f2a0292491$export$2e2b
document.getElementById("edit").dispatchEvent(new Event("input")); document.getElementById("edit").dispatchEvent(new Event("input"));
this.setInputs(); this.setInputs();
//freeze editor formatting so it doesn't scroll off screen //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";
});
} }
//-------------------------- //--------------------------
// methods // methods

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save