Skip to content
This repository has been archived by the owner on Apr 30, 2020. It is now read-only.

feat(Features/Templates): remove template configs #293

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Features/Templates/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions Features/Templates/functions.php

This file was deleted.

Empty file removed config/templates/.gitkeep
Empty file.
26 changes: 0 additions & 26 deletions config/templates/404.json

This file was deleted.

26 changes: 0 additions & 26 deletions config/templates/archive.json

This file was deleted.

29 changes: 0 additions & 29 deletions config/templates/default.json

This file was deleted.

3 changes: 0 additions & 3 deletions lib/Init.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ function initTheme()
// enable admin notices
add_theme_support('flynt-admin-notices');

// set correct config dir (+ more?)
add_theme_support('flynt-templates');

// use timber rendering
add_theme_support('flynt-timber-loader');

Expand Down
27 changes: 26 additions & 1 deletion templates/404.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
<?php

Flynt\echoHtmlFromConfigFile('404.json');
Flynt\echoHtmlFromConfig([
'name' => 'DocumentDefault',
'areas' => [
'layout' => [
[
'name' => 'LayoutSinglePost',
'areas' => [
'mainHeader' => [
[
'name' => 'NavigationMain',
'customData' => [
'menuSlug' => 'navigation_main',
],
],
],
'pageComponents' => [
[
'name' => 'BlockNotFound',
],
],
'mainFooter' => [],
],
],
],
],
]);
27 changes: 26 additions & 1 deletion templates/archive.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
<?php

Flynt\echoHtmlFromConfigFile('archive.json');
Flynt\echoHtmlFromConfig([
"name" => "DocumentDefault",
"areas" => [
"layout" => [
[
"name" => "LayoutMultiplePosts",
"areas" => [
"mainHeader" => [
[
"name" => "NavigationMain",
"customData" => [
"menuSlug" => "navigation_main"
]
]
],
"pageComponents" => [
[
"name" => "ListPosts"
]
],
"mainFooter" => []
]
]
]
]
]);
27 changes: 26 additions & 1 deletion templates/home.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
<?php

Flynt\echoHtmlFromConfigFile('archive.json');
Flynt\echoHtmlFromConfig([
"name" => "DocumentDefault",
"areas" => [
"layout" => [
[
"name" => "LayoutMultiplePosts",
"areas" => [
"mainHeader" => [
[
"name" => "NavigationMain",
"customData" => [
"menuSlug" => "navigation_main"
]
]
],
"pageComponents" => [
[
"name" => "ListPosts"
]
],
"mainFooter" => []
]
]
]
]
]);
30 changes: 29 additions & 1 deletion templates/index.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
<?php

Flynt\echoHtmlFromConfigFile('default.json');
Flynt\echoHtmlFromConfig([
"name" => "DocumentDefault",
"areas" => [
"layout" => [
[
"name" => "LayoutSinglePost",
"areas" => [
"mainHeader" => [
[
"name" => "NavigationMain",
"customData" => [
"menuSlug" => "navigation_main"
]
]
],
"pageComponents" => [
[
"name" => "ComponentLoaderFlexible",
"customData" => [
"fieldGroup" => "pageComponents"
]
]
],
"mainFooter" => []
]
]
]
]
]);