forked from projects/fipamo
hotfix for editor img uploads, formatting tweaks
This commit is contained in:
commit
c546aa7b63
11 changed files with 9039 additions and 356 deletions
|
@ -4,6 +4,7 @@ namespace brain\api\v1;
|
||||||
|
|
||||||
use brain\data\Member;
|
use brain\data\Member;
|
||||||
use brain\data\Settings;
|
use brain\data\Settings;
|
||||||
|
use brain\utility\FileUploader;
|
||||||
|
|
||||||
class ImagesAPI
|
class ImagesAPI
|
||||||
{
|
{
|
||||||
|
|
|
@ -158,9 +158,9 @@ class DashControl
|
||||||
$page = $book->findPageById($uuid);
|
$page = $book->findPageById($uuid);
|
||||||
$pageOptions = Sorting::page($page);
|
$pageOptions = Sorting::page($page);
|
||||||
$preview =
|
$preview =
|
||||||
$settings['global']['theme'].
|
$settings['global']['theme'] .
|
||||||
'/'.
|
'/' .
|
||||||
$page['layout'].
|
$page['layout'] .
|
||||||
'.twig';
|
'.twig';
|
||||||
$html = $display->render($preview, $pageOptions);
|
$html = $display->render($preview, $pageOptions);
|
||||||
$response->getBody()->write($html);
|
$response->getBody()->write($html);
|
||||||
|
|
|
@ -5,7 +5,6 @@ namespace brain\init;
|
||||||
use brain\utility\HandleCors;
|
use brain\utility\HandleCors;
|
||||||
use Slim\Factory\AppFactory;
|
use Slim\Factory\AppFactory;
|
||||||
use Slim\Views\Twig;
|
use Slim\Views\Twig;
|
||||||
// Fipamo Core Classes
|
|
||||||
use Slim\Views\TwigMiddleware;
|
use Slim\Views\TwigMiddleware;
|
||||||
|
|
||||||
class App
|
class App
|
||||||
|
|
|
@ -129,22 +129,22 @@ class Sorting
|
||||||
}
|
}
|
||||||
|
|
||||||
$meta = [
|
$meta = [
|
||||||
'who' => $page['author'],
|
'who' => $page['author'],
|
||||||
'when' => $page['created'],
|
'when' => $page['created'],
|
||||||
'tags' => $tags,
|
'tags' => $tags,
|
||||||
];
|
];
|
||||||
|
|
||||||
// render markdown content and clean it
|
// render markdown content and clean it
|
||||||
$parser = new Parser();
|
$parser = new Parser();
|
||||||
$rendered = $parser->parse($page['content']);
|
$rendered = $parser->parse($page['content']);
|
||||||
$sanitizer = \HtmlSanitizer\Sanitizer::create([
|
$sanitizer = \HtmlSanitizer\Sanitizer::create([
|
||||||
'extensions' => ['basic', 'image', 'list', 'code'],
|
'extensions' => ['basic', 'image', 'list', 'code'],
|
||||||
'tags' => [
|
'tags' => [
|
||||||
'img' => [
|
'img' => [
|
||||||
'allowed_attributes' => ['src', 'alt', 'title', 'class'],
|
'allowed_attributes' => ['src', 'alt', 'title', 'class'],
|
||||||
'allowed_hosts' => null,
|
'allowed_hosts' => null,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$preclean = $sanitizer->sanitize($rendered->getContent());
|
$preclean = $sanitizer->sanitize($rendered->getContent());
|
||||||
|
|
|
@ -1,65 +1,66 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>
|
<meta name="theme-color" content="#FFFFFF"/>
|
||||||
{% block title %}
|
<title>
|
||||||
{{ title }}
|
{% block title %}
|
||||||
{% endblock %}
|
{{ title }}
|
||||||
</title>
|
{% endblock %}
|
||||||
{% block stylesheets %}{% endblock %}
|
</title>
|
||||||
</head>
|
{% block stylesheets %}{% endblock %}
|
||||||
<body>
|
</head>
|
||||||
<div id="notifications" class="notifications">
|
<body>
|
||||||
<div id="notifyMessage" class="notifyMessage">
|
<div id="notifications" class="notifications">
|
||||||
<div id="notify-good" class="notify-icon">
|
<div id="notifyMessage" class="notifyMessage">
|
||||||
<svg viewbox="0 0 20 20" class="icons"><use xlink:href="/assets/images/global/sprite.svg#entypo-emoji-flirt"/></svg>
|
<div id="notify-good" class="notify-icon">
|
||||||
</div>
|
<svg viewbox="0 0 20 20" class="icons"><use xlink:href="/assets/images/global/sprite.svg#entypo-emoji-flirt"/></svg>
|
||||||
<div id="notify-lame" class="notify-icon">
|
</div>
|
||||||
<svg viewbox="0 0 20 20" class="icons"><use xlink:href="/assets/images/global/sprite.svg#entypo-emoji-sad"/></svg>
|
<div id="notify-lame" class="notify-icon">
|
||||||
</div>
|
<svg viewbox="0 0 20 20" class="icons"><use xlink:href="/assets/images/global/sprite.svg#entypo-emoji-sad"/></svg>
|
||||||
<div id="notify-working" class="notify-icon">
|
</div>
|
||||||
<svg id="notify-working-icon" viewbox="0 0 20 20" class="icons"><use xlink:href="/assets/images/global/sprite.svg#entypo-cog"/></svg>
|
<div id="notify-working" class="notify-icon">
|
||||||
</div>
|
<svg id="notify-working-icon" viewbox="0 0 20 20" class="icons"><use xlink:href="/assets/images/global/sprite.svg#entypo-cog"/></svg>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="notify-text">
|
<div id="notify-text">
|
||||||
<div id="notify-progress"></div>
|
<div id="notify-progress"></div>
|
||||||
<p id="message-text">MESSAGE TEXT</p>
|
<p id="message-text">MESSAGE TEXT</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="main-content" class="main-container">
|
<div id="main-content" class="main-container">
|
||||||
<section id="dash-index-content">
|
<section id="dash-index-content">
|
||||||
{% if status %}
|
{% if status %}
|
||||||
<header id="header">
|
<header id="header">
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
{% apply spaceless %}
|
{% apply spaceless %}
|
||||||
<div id="left">
|
<div id="left">
|
||||||
<a href="/dashboard"><img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/></a>
|
<a href="/dashboard"><img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="right">
|
<div id="right">
|
||||||
{% if status %}
|
{% if status %}
|
||||||
{% apply spaceless %}
|
{% apply spaceless %}
|
||||||
{{ include("dash/partials/navigation.twig") }}
|
{{ include("dash/partials/navigation.twig") }}
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% apply spaceless %}
|
{% apply spaceless %}
|
||||||
{% block mainContent %}{% endblock %}
|
{% block mainContent %}{% endblock %}
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer></footer>
|
<footer></footer>
|
||||||
{% block javascripts %}{% endblock %}
|
{% block javascripts %}{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -4,178 +4,178 @@
|
||||||
if not, just make them empty
|
if not, just make them empty
|
||||||
#}
|
#}
|
||||||
{% if mode == 'edit' %}
|
{% if mode == 'edit' %}
|
||||||
{% set id = page['id'] %}
|
{% set id = page['id'] %}
|
||||||
{% set uuid = page['uuid'] %}
|
{% set uuid = page['uuid'] %}
|
||||||
{% set slug = page['slug'] %}
|
{% set slug = page['slug'] %}
|
||||||
{% set layout = page['layout'] %}
|
{% set layout = page['layout'] %}
|
||||||
{% set feature = page['feature'] %}
|
{% set feature = page['feature'] %}
|
||||||
{% set _title = page['title'] %}
|
{% set _title = page['title'] %}
|
||||||
{% set tags = page['tags'] %}
|
{% set tags = page['tags'] %}
|
||||||
{% set content = page['content'] %}
|
{% set content = page['content'] %}
|
||||||
{% set date = page['created'] %}
|
{% set date = page['created'] %}
|
||||||
{% set updated = page['updated'] %}
|
{% set updated = page['updated'] %}
|
||||||
{% set media = page['media'] %}
|
{% set media = page['media'] %}
|
||||||
{% set files = page['docs'] %}
|
{% set files = page['docs'] %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set id = '' %}
|
{% set id = '' %}
|
||||||
{% set uuid = '' %}
|
{% set uuid = '' %}
|
||||||
{% set slug = '' %}
|
{% set slug = '' %}
|
||||||
{% set layout = 'page' %}
|
{% set layout = 'page' %}
|
||||||
{% set feature = '' %}
|
{% set feature = '' %}
|
||||||
{% set title = '' %}
|
{% set title = '' %}
|
||||||
{% set tags = '' %}
|
{% set tags = '' %}
|
||||||
{% set content = '' %}
|
{% set content = '' %}
|
||||||
{% set date = '' %}
|
{% set date = '' %}
|
||||||
{% set updated = '' %}
|
{% set updated = '' %}
|
||||||
{% set media = '' %}
|
{% set media = '' %}
|
||||||
{% set files = '' %}
|
{% set files = '' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{{ title }}
|
{{ title }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
<link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=vbhj">
|
<link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=vbhj">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block mainContent %}
|
{% block mainContent %}
|
||||||
<div id="post-edit-index" data-index="{{ id }}" data-uuid="{{ uuid }}" data-slug="{{ slug }}" data-layout="{{ layout }}">
|
<div id="post-edit-index" data-index="{{ id }}" data-uuid="{{ uuid }}" data-slug="{{ slug }}" data-layout="{{ layout }}">
|
||||||
<div id="post-edit-index-wrapper">
|
<div id="post-edit-index-wrapper">
|
||||||
<div id="post-feature">
|
<div id="post-feature">
|
||||||
{% if page['feature'] == null %}
|
{% if page['feature'] == null %}
|
||||||
<div id="page-file-manager">
|
<div id="page-file-manager">
|
||||||
<div id="page-file-wrapper">
|
<div id="page-file-wrapper">
|
||||||
<div id="page-file-drop">
|
<div id="page-file-drop">
|
||||||
<label for="page-files-upload">DRAG AND DROP FILES OR CLICK TO SELECT</label>
|
<label for="page-files-upload">DRAG AND DROP FILES OR CLICK TO SELECT</label>
|
||||||
</div>
|
</div>
|
||||||
IMAGES AND VIDEO
|
IMAGES AND VIDEO
|
||||||
<div id="page-images-list"></div>
|
<div id="page-images-list"></div>
|
||||||
FILES
|
FILES
|
||||||
<div id="page-files-list"></div>
|
<div id="page-files-list"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="page-file-manager">
|
<div id="page-file-manager">
|
||||||
<div id="page-file-wrapper">
|
<div id="page-file-wrapper">
|
||||||
<div id="page-file-drop">
|
<div id="page-file-drop">
|
||||||
<label for="page-files-upload">DRAG AND DROP FILES OR CLICK TO SELECT</label>
|
<label for="page-files-upload">DRAG AND DROP FILES OR CLICK TO SELECT</label>
|
||||||
</div>
|
</div>
|
||||||
IMAGES AND VIDEO
|
IMAGES AND VIDEO
|
||||||
<div id="page-images-list">
|
<div id="page-images-list">
|
||||||
{% if media|length > 1 %}
|
{% if media|length > 1 %}
|
||||||
{% for item in media %}
|
{% for item in media %}
|
||||||
{% if item.type == "mp4"%}
|
{% if item.type == "mp4"%}
|
||||||
<div id="{{loop.index0}}" class="video-item" data-source="{{ item.file }}"></div>
|
<div id="{{loop.index0}}" class="video-item" data-source="{{ item.file }}"></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="{{loop.index0}}" class="img-item" style="background: url({{ item.file }}) no-repeat center center / cover"></div>
|
<div id="{{loop.index0}}" class="img-item" style="background: url({{ item.file }}) no-repeat center center / cover"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if media[0] != '' %}
|
{% if media[0] != '' %}
|
||||||
{% if media[0].type == "mp4"%}
|
{% if media[0].type == "mp4"%}
|
||||||
<div id="0" class="video-item" data-source="{{ media[0].file }}"></div>
|
<div id="0" class="video-item" data-source="{{ media[0].file }}"></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="0" class="img-item" style="background: url({{ media[0].file }}) no-repeat center center / cover"></div>
|
<div id="0" class="img-item" style="background: url({{ media[0].file }}) no-repeat center center / cover"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
FILES
|
FILES
|
||||||
<div id="page-files-list">
|
<div id="page-files-list">
|
||||||
{% if files|length > 1 %}
|
{% if files|length > 1 %}
|
||||||
{% for item in files %}
|
{% for item in files %}
|
||||||
{% if item.type == "mp3"%}
|
{% if item.type == "mp3"%}
|
||||||
<div id="{{loop.index0}}" class="audio-item" data-source="{{ item.file }}"></div>
|
<div id="{{loop.index0}}" class="audio-item" data-source="{{ item.file }}"></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="{{loop.index0}}" class="file-item" data-source="{{ item.file }}"></div>
|
<div id="{{loop.index0}}" class="file-item" data-source="{{ item.file }}"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if files[0] != '' %}
|
{% if files[0] != '' %}
|
||||||
{% if files[0].type == "mp3"%}
|
{% if files[0].type == "mp3"%}
|
||||||
<div id="0" class="audio-item" data-source="{{ files[0].file }}"></div>
|
<div id="0" class="audio-item" data-source="{{ files[0].file }}"></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="0" class="file-item" data-source="{{ files[0].file }}"></div>
|
<div id="0" class="file-item" data-source="{{ files[0].file }}"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="post-header">
|
<div id="post-header">
|
||||||
<div id="post-header-wrapper" class="columns">
|
<div id="post-header-wrapper" class="columns">
|
||||||
<div id="post-title" class="column">
|
<div id="post-title" class="column">
|
||||||
<label>TITLE</label>
|
<label>TITLE</label>
|
||||||
<textarea id="post_title" type="text" name="post_title" class="post-edit" placeholder="TITLE">
|
<textarea id="post_title" type="text" name="post_title" class="post-edit" placeholder="TITLE">
|
||||||
{{- _title -}}
|
{{- _title -}}
|
||||||
</textarea>
|
</textarea>
|
||||||
|
|
||||||
<div id="layouts">
|
<div id="layouts">
|
||||||
<label>LAYOUTS</label>
|
<label>LAYOUTS</label>
|
||||||
<select id="page-templates">
|
<select id="page-templates">
|
||||||
{% for view in views %}
|
{% for view in views %}
|
||||||
{% if view == page['layout'] %}
|
{% if view == page['layout'] %}
|
||||||
<option value={{ view }} selected>{{ view }}</option>
|
<option value={{ view }} selected>{{ view }}</option>
|
||||||
{% else %}
|
{% else %}
|
||||||
<option value={{ view }}>{{ view }}</option>
|
<option value={{ view }}>{{ view }}</option>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<label>CREATED</label>
|
<label>CREATED</label>
|
||||||
<span id="post-date" type="text">
|
<span id="post-date" type="text">
|
||||||
{{ date }}
|
{{ date }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="post-meta" class="column">
|
<div id="post-meta" class="column">
|
||||||
<label>TAGS</label>
|
<label>TAGS</label>
|
||||||
<textarea id="post_tags" type="text" name="post_tags" class="form-control" placeholder="tags [comma seperated]">
|
<textarea id="post_tags" type="text" name="post_tags" class="form-control" placeholder="tags [comma seperated]">
|
||||||
{{- tags -}}
|
{{- tags -}}
|
||||||
</textarea>
|
</textarea>
|
||||||
<label>OPTIONS</label>
|
<label>OPTIONS</label>
|
||||||
{% apply spaceless %}
|
{% apply spaceless %}
|
||||||
{{ include("dash/partials/options.twig") }}
|
{{ include("dash/partials/options.twig") }}
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
<label>UPDATED</label>
|
<label>UPDATED</label>
|
||||||
<span id="post-date" type="text">
|
<span id="post-date" type="text">
|
||||||
{{ updated }}
|
{{ updated }}
|
||||||
</span>
|
</span>
|
||||||
<input id="page-files-upload" type="file" name="page-files-upload" multiple/>
|
<input id="page-files-upload" type="file" name="page-files-upload" multiple/>
|
||||||
<input id="post-image-upload" type="file" name="post-image-upload"/>
|
<input id="post-image-upload" type="file" name="post-image-upload"/>
|
||||||
<input id="form_token" name="token" type="hidden" value="{{ token }}">
|
<input id="form_token" name="token" type="hidden" value="{{ token }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="edit-post">
|
<div id="edit-post">
|
||||||
{% apply spaceless %}
|
{% apply spaceless %}
|
||||||
{{ include("dash/partials/editor.twig") }}
|
{{ include("dash/partials/editor.twig") }}
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
<div id="edit-post-wrapper">
|
<div id="edit-post-wrapper">
|
||||||
<textarea id="edit" spellcheck="false">{{- content -}}</textarea>
|
<textarea id="edit" spellcheck="false">{{- content -}}</textarea>
|
||||||
<pre id="highlight">
|
<pre id="highlight">
|
||||||
<code id="highlight-content" class="language-md">
|
<code id="highlight-content" class="language-md">
|
||||||
|
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
<script src="/assets/scripts/Start.js?=erty" type="text/javascript"></script>
|
<script src="/assets/scripts/Start.js?=dfdfvd" type="text/javascript"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
{% extends "dash/_frame.twig" %}
|
{% extends "dash/_frame.twig" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{{ title }}
|
{{ title }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
<link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=adfdff">
|
<link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=adfdff">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block mainContent %}
|
{% block mainContent %}
|
||||||
<div id="dash-index">
|
<div id="dash-index">
|
||||||
<div id="dash-index-wrapper">
|
<div id="dash-index-wrapper">
|
||||||
{% if status %}
|
{% if status %}
|
||||||
{% apply spaceless %}
|
{% apply spaceless %}
|
||||||
{{ include("dash/partials/index.twig") }}
|
{{ include("dash/partials/index.twig") }}
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ include("dash/forms/login.twig") }}
|
{{ include("dash/forms/login.twig") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
<script src="/assets/scripts/Start.js?=dfdfsdf" type="text/javascript"></script>
|
<script src="/assets/scripts/Start.js?=dfdfsdf" type="text/javascript"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -13,82 +13,82 @@
|
||||||
{{ title }}
|
{{ title }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</title>
|
</title>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8"/>
|
||||||
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
|
<meta name='viewport' content='width=device-width, initial-scale=1.0'/>
|
||||||
<meta name="keywords" content="{{ info['keywords'] }}" />
|
<meta name="keywords" content="{{ info['keywords'] }}"/>
|
||||||
<meta name="description" content="{{info['description']}} " />
|
<meta name="description" content="{{info['description']}} "/>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||||
<meta property="og:image" content="{{info["image"]}}" />
|
<meta property="og:image" content="{{info["image"]}}"/>
|
||||||
<meta name="twitter:image" content="{{info["image"]}}" />
|
<meta name="twitter:image" content="{{info["image"]}}"/>
|
||||||
<link rel="stylesheet" type="text/css" href="{{ assetPath~"css/base.css?=dfvbghh" }}">
|
<link rel="stylesheet" type="text/css" href="{{ assetPath~"css/base.css?=dfvbghh" }}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!--
|
<!--
|
||||||
<header style="background: url({{ background }}) no-repeat center center; background-size: cover">
|
<header style="background: url({{ background }}) no-repeat center center; background-size: cover">
|
||||||
-->
|
-->
|
||||||
<header>
|
<header>
|
||||||
<div id="media">
|
<div id="media">
|
||||||
{% if media|length > 1 %}
|
{% if media|length > 1 %}
|
||||||
{% for item in media %}
|
{% for item in media %}
|
||||||
{% if item.type == "mp4"%}
|
{% if item.type == "mp4"%}
|
||||||
<div id="{{loop.index0}}" class="slide">
|
<div id="{{loop.index0}}" class="slide">
|
||||||
<video controls autoplay muted>
|
<video controls autoplay muted>
|
||||||
|
|
||||||
<source src="{{item.file}}" type="video/mp4">
|
<source src="{{item.file}}" type="video/mp4">
|
||||||
|
|
||||||
Please get a better browser. They're free.
|
Please get a better browser. They're free.
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="{{loop.index0}}" class="slide hide" style="background: url({{ item.file }}) no-repeat center center / cover"></div>
|
<div id="{{loop.index0}}" class="slide hide" style="background: url({{ item.file }}) no-repeat center center / cover"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if media[0] != '' %}
|
{% if media[0] != '' %}
|
||||||
{% if media[0].type == "mp4"%}
|
{% if media[0].type == "mp4"%}
|
||||||
<div id="0" class="slide">
|
<div id="0" class="slide">
|
||||||
<video controls autoplay muted>
|
<video controls autoplay muted>
|
||||||
|
|
||||||
<source src="{{media[0].file}}" type="video/mp4">
|
<source src="{{media[0].file}}" type="video/mp4">
|
||||||
|
|
||||||
Please get a better browser. They're free.
|
Please get a better browser. They're free.
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="0" class="slide" style="background: url({{ media[0].file }}) no-repeat center center / cover"></div>
|
<div id="0" class="slide" style="background: url({{ media[0].file }}) no-repeat center center / cover"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<nav>
|
<nav>
|
||||||
{% apply spaceless %}
|
{% apply spaceless %}
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<a href="/" class="logo-link">
|
<a href="/" class="logo-link">
|
||||||
<img id="logo" src="{{ assetPath~"/images/global/the-logo.svg" }}" />
|
<img id="logo" src="{{ assetPath~"/images/global/the-logo.svg" }}"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
{% if menu is defined %}
|
{% if menu is defined %}
|
||||||
{% for link in menu %}
|
{% for link in menu %}
|
||||||
{% if dynamicRender is defined %}
|
{% if dynamicRender is defined %}
|
||||||
{% if dynamicRender == 'true' %}
|
{% if dynamicRender == 'true' %}
|
||||||
<a href="{{"/"~link.slug}}" class="menu-link">{{link.title}}</a><br />
|
<a href="{{"/"~link.slug}}" class="menu-link">{{link.title}}</a><br/>
|
||||||
{% else %}
|
|
||||||
<a href="{{"/"~link.slug~".html"}}" class="menu-link">{{link.title}}</a><br />
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{"/"~link.slug~".html"}}" class="menu-link">{{link.title}}</a><br />
|
<a href="{{"/"~link.slug~".html"}}" class="menu-link">{{link.title}}</a><br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% else %}
|
||||||
{% endif %}
|
<a href="{{"/"~link.slug~".html"}}" class="menu-link">{{link.title}}</a><br/>
|
||||||
</div>
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<div id="main-content" class="container">
|
<div id="main-content" class="container">
|
||||||
{% apply spaceless %}
|
{% apply spaceless %}
|
||||||
{% block mainContent %}{% endblock %}
|
{% block mainContent %}{% endblock %}
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -97,12 +97,12 @@
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
{% if dynamicRender is defined %}
|
{% if dynamicRender is defined %}
|
||||||
{% if dynamicRender == 'true' %}
|
{% if dynamicRender == 'true' %}
|
||||||
<a href="/archives">Archives</a><br />
|
<a href="/archives">Archives</a><br/>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/archives.html">Archives</a><br />
|
<a href="/archives.html">Archives</a><br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/archives.html">Archives</a><br />
|
<a href="/archives.html">Archives</a><br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
© 2020 By Fipamo
|
© 2020 By Fipamo
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,56 +4,59 @@
|
||||||
{{ title }}
|
{{ title }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block mainContent %}
|
{% block mainContent %}
|
||||||
<section>
|
<section>
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<span>{{title}}</span>
|
<span>{{title}}</span>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<article>
|
<article>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<p>{{content | raw}}</p>
|
<p>{{content | raw}}</p>
|
||||||
<div>
|
<div>
|
||||||
<div class="page_files">
|
<div class="page_files">
|
||||||
<div class="page_doc">
|
<div class="page_doc">
|
||||||
<strong>Files</strong><br/>
|
<strong>Files</strong><br/>
|
||||||
{% for doc in files %}
|
{% for doc in files %}
|
||||||
{% if doc.type != "mp3" %}
|
{% if doc.type != "mp3" %}
|
||||||
{% set path = doc.file|split('/') %}
|
{% set path = doc.file|split('/') %}
|
||||||
<a href="{{doc.file}}">{{path[6]}}</a>
|
<a href="{{doc.file}}">{{path[6]}}</a>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="page_sounds">
|
<div class="page_sounds">
|
||||||
<strong>Sounds</strong><br/>
|
<strong>Sounds</strong><br/>
|
||||||
{% for doc in files %}
|
{% for doc in files %}
|
||||||
{% if doc.type == "mp3" %}
|
{% if doc.type == "mp3" %}
|
||||||
<audio controls>
|
<audio controls>
|
||||||
<source src="{{doc.file}}" type="audio/mpeg">
|
<source src="{{doc.file}}" type="audio/mpeg">
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio>
|
</audio>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
|
||||||
{{meta['who']}} dropped this {{ meta['when'] }}<br />
|
|
||||||
<strong>tags: </strong>
|
|
||||||
{% for tag in meta['tags'] %}
|
|
||||||
{% if dynamicRender is defined %}
|
|
||||||
{% if dynamicRender == 'true' %}
|
|
||||||
<a href="{{ "/tags/"~tag.slug }}">{{ tag.label }}</a>
|
|
||||||
{% else %}
|
|
||||||
<a href="{{ "/tags/"~tag.slug~".html" }}">{{ tag.label }}</a>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<a href="{{ "/tags/"~tag.slug~".html" }}">{{ tag.label }}</a>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<br/>
|
||||||
|
{{meta['who']}}
|
||||||
|
dropped this
|
||||||
|
{{ meta['when'] }}<br/>
|
||||||
|
<strong>tags:
|
||||||
|
</strong>
|
||||||
|
{% for tag in meta['tags'] %}
|
||||||
|
{% if dynamicRender is defined %}
|
||||||
|
{% if dynamicRender == 'true' %}
|
||||||
|
<a href="{{ "/tags/"~tag.slug }}">{{ tag.label }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ "/tags/"~tag.slug~".html" }}">{{ tag.label }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ "/tags/"~tag.slug~".html" }}">{{ tag.label }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</div>
|
||||||
{% endblock %}
|
</article>
|
||||||
|
{% endblock %}
|
||||||
|
|
156
phpcs.xml
Normal file
156
phpcs.xml
Normal file
|
@ -0,0 +1,156 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
|
||||||
|
<description>The coding standard for PHP_CodeSniffer itself.</description>
|
||||||
|
|
||||||
|
<file>autoload.php</file>
|
||||||
|
<file>bin</file>
|
||||||
|
<file>scripts</file>
|
||||||
|
<file>src</file>
|
||||||
|
<file>tests</file>
|
||||||
|
|
||||||
|
<exclude-pattern>*/src/Standards/*/Tests/*\.(inc|css|js)$</exclude-pattern>
|
||||||
|
<exclude-pattern>*/tests/Core/*/*\.(inc|css|js)$</exclude-pattern>
|
||||||
|
|
||||||
|
<arg name="basepath" value="."/>
|
||||||
|
<arg name="colors"/>
|
||||||
|
<arg name="parallel" value="75"/>
|
||||||
|
<arg value="np"/>
|
||||||
|
|
||||||
|
<!-- Don't hide tokenizer exceptions -->
|
||||||
|
<rule ref="Internal.Tokenizer.Exception">
|
||||||
|
<type>error</type>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Include the whole PEAR standard -->
|
||||||
|
<rule ref="PEAR">
|
||||||
|
<exclude name="PEAR.NamingConventions.ValidFunctionName"/>
|
||||||
|
<exclude name="PEAR.NamingConventions.ValidVariableName"/>
|
||||||
|
<exclude name="PEAR.Commenting.ClassComment"/>
|
||||||
|
<exclude name="PEAR.Commenting.FileComment.MissingCategoryTag"/>
|
||||||
|
<exclude name="PEAR.Commenting.FileComment.MissingPackageTag"/>
|
||||||
|
<exclude name="PEAR.Commenting.FileComment.MissingLinkTag"/>
|
||||||
|
<exclude name="PEAR.Commenting.FileComment.MissingVersion"/>
|
||||||
|
<exclude name="PEAR.Commenting.InlineComment"/>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Include some sniffs from other standards that don't conflict with PEAR -->
|
||||||
|
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
|
||||||
|
<rule ref="Squiz.Arrays.ArrayDeclaration"/>
|
||||||
|
<rule ref="Squiz.Commenting.ClosingDeclarationComment"/>
|
||||||
|
<rule ref="Squiz.ControlStructures.ControlSignature"/>
|
||||||
|
<rule ref="Squiz.ControlStructures.ElseIfDeclaration"/>
|
||||||
|
<rule ref="Squiz.Commenting.BlockComment"/>
|
||||||
|
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
|
||||||
|
<rule ref="Squiz.Commenting.EmptyCatchComment"/>
|
||||||
|
<rule ref="Squiz.Commenting.InlineComment"/>
|
||||||
|
<rule ref="Squiz.Commenting.LongConditionClosingComment"/>
|
||||||
|
<rule ref="Squiz.Commenting.PostStatementComment"/>
|
||||||
|
<rule ref="Squiz.Commenting.VariableComment"/>
|
||||||
|
<rule ref="Squiz.Formatting.OperatorBracket"/>
|
||||||
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"/>
|
||||||
|
<rule ref="Squiz.Operators.ComparisonOperatorUsage"/>
|
||||||
|
<rule ref="Squiz.PHP.DisallowInlineIf"/>
|
||||||
|
<rule ref="Squiz.Scope.MethodScope"/>
|
||||||
|
<rule ref="Squiz.Strings.ConcatenationSpacing">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing"/>
|
||||||
|
<rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace"/>
|
||||||
|
<rule ref="Squiz.WhiteSpace.FunctionSpacing"/>
|
||||||
|
<rule ref="Squiz.WhiteSpace.MemberVarSpacing"/>
|
||||||
|
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
|
||||||
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
|
||||||
|
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
|
||||||
|
<rule ref="Generic.Commenting.Todo"/>
|
||||||
|
<rule ref="Generic.ControlStructures.DisallowYodaConditions"/>
|
||||||
|
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
|
||||||
|
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
|
||||||
|
<rule ref="Generic.Formatting.SpaceAfterCast"/>
|
||||||
|
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
||||||
|
<rule ref="Generic.PHP.DeprecatedFunctions"/>
|
||||||
|
<rule ref="Generic.PHP.LowerCaseKeyword"/>
|
||||||
|
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
|
||||||
|
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing"/>
|
||||||
|
<rule ref="PSR2.Classes.PropertyDeclaration"/>
|
||||||
|
<rule ref="PSR2.Methods.MethodDeclaration"/>
|
||||||
|
<rule ref="PSR2.Files.EndFileNewline"/>
|
||||||
|
<rule ref="PSR12.Files.OpenTag"/>
|
||||||
|
<rule ref="Zend.Files.ClosingTag"/>
|
||||||
|
|
||||||
|
<!-- PEAR uses warnings for inline control structures, so switch back to errors -->
|
||||||
|
<rule ref="Generic.ControlStructures.InlineControlStructure">
|
||||||
|
<properties>
|
||||||
|
<property name="error" value="true"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- We use custom indent rules for arrays -->
|
||||||
|
<rule ref="Generic.Arrays.ArrayIndent"/>
|
||||||
|
<rule ref="Squiz.Arrays.ArrayDeclaration.KeyNotAligned">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Squiz.Arrays.ArrayDeclaration.ValueNotAligned">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNewLine">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Check var names, but we don't want leading underscores for private vars -->
|
||||||
|
<rule ref="Squiz.NamingConventions.ValidVariableName"/>
|
||||||
|
<rule ref="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Only one argument per line in multi-line function calls -->
|
||||||
|
<rule ref="PEAR.Functions.FunctionCallSignature">
|
||||||
|
<properties>
|
||||||
|
<property name="allowMultipleArguments" value="false"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Have 12 chars padding maximum and always show as errors -->
|
||||||
|
<rule ref="Generic.Formatting.MultipleStatementAlignment">
|
||||||
|
<properties>
|
||||||
|
<property name="maxPadding" value="12"/>
|
||||||
|
<property name="error" value="true"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Ban some functions -->
|
||||||
|
<rule ref="Generic.PHP.ForbiddenFunctions">
|
||||||
|
<properties>
|
||||||
|
<property name="forbiddenFunctions" type="array">
|
||||||
|
<element key="sizeof" value="count"/>
|
||||||
|
<element key="delete" value="unset"/>
|
||||||
|
<element key="print" value="echo"/>
|
||||||
|
<element key="is_null" value="null"/>
|
||||||
|
<element key="create_function" value="null"/>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Private methods MUST not be prefixed with an underscore -->
|
||||||
|
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
|
||||||
|
<type>error</type>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Private properties MUST not be prefixed with an underscore -->
|
||||||
|
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
|
||||||
|
<type>error</type>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- The testing bootstrap file uses string concats to stop IDEs seeing the class aliases -->
|
||||||
|
<rule ref="Generic.Strings.UnnecessaryStringConcat">
|
||||||
|
<exclude-pattern>tests/bootstrap\.php</exclude-pattern>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- This test file specifically *needs* Windows line endings for testing purposes. -->
|
||||||
|
<rule ref="Generic.Files.LineEndings.InvalidEOLChar">
|
||||||
|
<exclude-pattern>tests/Core/Tokenizer/StableCommentWhitespaceWinTest\.php</exclude-pattern>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
</ruleset>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue