Beta 2.6.1 update

This commit is contained in:
Ro 2023-05-14 18:08:31 -07:00
commit 62e2dea287
No known key found for this signature in database
GPG key ID: 29B551CDBD4D3B50
20 changed files with 351 additions and 290 deletions

1
.gitignore vendored
View file

@ -55,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

@ -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

@ -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,6 +1,6 @@
{
"name": "fipamo-dash",
"version": "2.6.0-beta",
"version": "2.6.1-beta",
"private": true,
"apidoc": {
"name": "Fipamo API",

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

@ -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

File diff suppressed because one or more lines are too long