diff --git a/brain/controller/DashControl.php b/brain/controller/DashControl.php index c75a724..6f2d3a6 100644 --- a/brain/controller/DashControl.php +++ b/brain/controller/DashControl.php @@ -158,9 +158,9 @@ class DashControl $page = $book->findPageById($uuid); $pageOptions = Sorting::page($page); $preview = - $settings['global']['theme']. - '/'. - $page['layout']. + $settings['global']['theme'] . + '/' . + $page['layout'] . '.twig'; $html = $display->render($preview, $pageOptions); $response->getBody()->write($html); diff --git a/brain/init/App.php b/brain/init/App.php index f3fbc03..6674ddd 100644 --- a/brain/init/App.php +++ b/brain/init/App.php @@ -5,7 +5,6 @@ namespace brain\init; use brain\utility\HandleCors; use Slim\Factory\AppFactory; use Slim\Views\Twig; -// Fipamo Core Classes use Slim\Views\TwigMiddleware; class App diff --git a/brain/utility/Sorting.php b/brain/utility/Sorting.php index 23d96c4..3c69224 100644 --- a/brain/utility/Sorting.php +++ b/brain/utility/Sorting.php @@ -129,22 +129,22 @@ class Sorting } $meta = [ - 'who' => $page['author'], - 'when' => $page['created'], - 'tags' => $tags, + 'who' => $page['author'], + 'when' => $page['created'], + 'tags' => $tags, ]; // render markdown content and clean it $parser = new Parser(); $rendered = $parser->parse($page['content']); $sanitizer = \HtmlSanitizer\Sanitizer::create([ - 'extensions' => ['basic', 'image', 'list', 'code'], - 'tags' => [ - 'img' => [ - 'allowed_attributes' => ['src', 'alt', 'title', 'class'], - 'allowed_hosts' => null, - ], - ], + 'extensions' => ['basic', 'image', 'list', 'code'], + 'tags' => [ + 'img' => [ + 'allowed_attributes' => ['src', 'alt', 'title', 'class'], + 'allowed_hosts' => null, + ], + ], ]); $preclean = $sanitizer->sanitize($rendered->getContent()); diff --git a/brain/views/dash/_frame.twig b/brain/views/dash/_frame.twig index 46f6f18..9e7f5bb 100644 --- a/brain/views/dash/_frame.twig +++ b/brain/views/dash/_frame.twig @@ -1,65 +1,66 @@ - - - - {% block title %} - {{ title }} - {% endblock %} - - {% block stylesheets %}{% endblock %} - - -
-
-
- -
-
- -
-
- -
- -
-
-

MESSAGE TEXT

-
- -
-
-
-
- {% if status %} - - {% endif %} - {% apply spaceless %} - {% block mainContent %}{% endblock %} - {% endapply %} - -
+ + + + + {% block title %} + {{ title }} + {% endblock %} + + {% block stylesheets %}{% endblock %} + + +
+
+
+ +
+
+ +
+
+ +
+ +
+
+

MESSAGE TEXT

+
+ +
+
+
+
+ {% if status %} + + {% endif %} + {% apply spaceless %} + {% block mainContent %}{% endblock %} + {% endapply %} + +
-
+
- - {% block javascripts %}{% endblock %} - - \ No newline at end of file + + {% block javascripts %}{% endblock %} + + diff --git a/brain/views/dash/start.twig b/brain/views/dash/start.twig index 9c79bdc..c5d48d6 100644 --- a/brain/views/dash/start.twig +++ b/brain/views/dash/start.twig @@ -1,27 +1,27 @@ {% extends "dash/_frame.twig" %} {% block title %} - {{ title }} + {{ title }} {% endblock %} {% block stylesheets %} - - {% endblock %} + + {% endblock %} - {% block mainContent %} -
-
- {% if status %} - {% apply spaceless %} - {{ include("dash/partials/index.twig") }} - {% endapply %} - {% else %} - {{ include("dash/forms/login.twig") }} - {% endif %} -
-
- {% endblock %} + {% block mainContent %} +
+
+ {% if status %} + {% apply spaceless %} + {{ include("dash/partials/index.twig") }} + {% endapply %} + {% else %} + {{ include("dash/forms/login.twig") }} + {% endif %} +
+
+ {% endblock %} - {% block javascripts %} - - {% endblock %} \ No newline at end of file + {% block javascripts %} + + {% endblock %} diff --git a/content/themes/fipamo-default/frame.twig b/content/themes/fipamo-default/frame.twig index 45bcf68..d38ce9e 100644 --- a/content/themes/fipamo-default/frame.twig +++ b/content/themes/fipamo-default/frame.twig @@ -13,100 +13,100 @@ {{ title }} {% endblock %} - - - - - - - + + + + + + + +
+ -->
{% if media|length > 1 %} - {% for item in media %} - {% if item.type == "mp4"%} -
- +
+ {% else %} +
+ {% endif %} + {% else %} + {% endif %} + {% endif %}
{% apply spaceless %} - {% block mainContent %}{% endblock %} + {% block mainContent %}{% endblock %} {% endapply %} - +
- \ No newline at end of file + diff --git a/content/themes/fipamo-default/page.twig b/content/themes/fipamo-default/page.twig index e3f3d53..896e694 100644 --- a/content/themes/fipamo-default/page.twig +++ b/content/themes/fipamo-default/page.twig @@ -4,56 +4,59 @@ {{ title }} {% endblock %} - {% block mainContent %} -
-
- {{title}} -
-
-
-
-

{{content | raw}}

-
-
-
+{% block mainContent %} +
+
+ {{title}} +
+
+
+
+

{{content | raw}}

+
+
+
Files
- {% for doc in files %} - {% if doc.type != "mp3" %} - {% set path = doc.file|split('/') %} - {{path[6]}} - - {% endif %} - {% endfor %} -
-
+ {% for doc in files %} + {% if doc.type != "mp3" %} + {% set path = doc.file|split('/') %} + {{path[6]}} + + {% endif %} + {% endfor %} +
+
Sounds
- {% for doc in files %} + {% for doc in files %} {% if doc.type == "mp3" %} + {% endif %} - {% endfor %} -
- + {% endfor %}
-
- {{meta['who']}} dropped this {{ meta['when'] }}
- tags: - {% for tag in meta['tags'] %} - {% if dynamicRender is defined %} - {% if dynamicRender == 'true' %} - {{ tag.label }} - {% else %} - {{ tag.label }} - {% endif %} - {% else %} - {{ tag.label }} - {% endif %} - {% endfor %} - +
+
+ {{meta['who']}} + dropped this + {{ meta['when'] }}
+ tags: + + {% for tag in meta['tags'] %} + {% if dynamicRender is defined %} + {% if dynamicRender == 'true' %} + {{ tag.label }} + {% else %} + {{ tag.label }} + {% endif %} + {% else %} + {{ tag.label }} + {% endif %} + {% endfor %} +
-
- {% endblock %} \ No newline at end of file +
+
+{% endblock %} diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..15ba3a9 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,156 @@ + + + The coding standard for PHP_CodeSniffer itself. + + autoload.php + bin + scripts + src + tests + + */src/Standards/*/Tests/*\.(inc|css|js)$ + */tests/Core/*/*\.(inc|css|js)$ + + + + + + + + + error + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + error + + + + + error + + + + + tests/bootstrap\.php + + + + + tests/Core/Tokenizer/StableCommentWhitespaceWinTest\.php + + + \ No newline at end of file