Skip to content

Commit

Permalink
Updated theme's styles
Browse files Browse the repository at this point in the history
  • Loading branch information
andriilive committed Feb 7, 2023
1 parent 2aec034 commit 28470a3
Show file tree
Hide file tree
Showing 27 changed files with 2,385 additions and 1,150 deletions.
1,881 changes: 1,881 additions & 0 deletions .export/title.wordpress.2023-02-07.000.xml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"ext-json": "*",
"wpackagist-plugin/svg-support": "^2.5",
"wpackagist-plugin/wordpress-importer": "^0.8.0",
"vlucas/valitron": "^1.4"
"vlucas/valitron": "^1.4",
"roots/soil": "^4.1"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
Expand Down
80 changes: 79 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified db/db.sqlite
Binary file not shown.
35 changes: 35 additions & 0 deletions web/app/themes/theme/App/API/ApiRoutes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

/**
* WordPress Core modifications.
* Be careful
*/

namespace Theme\API;

use Theme\API\APIHandler as Router;

class ApiRoutes
{
public function __construct()
{
add_action('rest_api_init', array($this, 'wp_headless_routes'));
}

/**
* Define all routes using the router in
* this function.
*
* @return void
*/
public function wp_headless_routes()
{
/** Contact API */
Router::post(
'/contact',
'Contact.submit'
);
}


}
20 changes: 11 additions & 9 deletions web/app/themes/theme/App/Acf/AcfHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ public function __construct()
remove_filter('acf_the_content', 'wpautop');
});

if (function_exists('acfe_')) {
if (class_exists('ACFE_AutoSync')) {

}
add_filter('acf/load_field_group', function ($field_group) {
$field_group['acfe_autosync'] = ['json','php'];
return $field_group;
});

// add_action('acfe/init', function () {
// acf_update_setting('acfe/modules/single_meta', true);
// });
}

// add_filter('acf/load_field_group', function ($field_group) {
// $field_group['acfe_autosync'] = ['json','php'];
// return $field_group;
// });
add_action('acfe/init', function () {
if (WP_DEBUG && WP_ENV === 'development') {
acf_update_setting('acfe/dev', true);
}
});

}

Expand Down
156 changes: 0 additions & 156 deletions web/app/themes/theme/App/Acf/Blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class Blocks
public function __construct()
{
add_action('acf/init', array($this, 'register_blocks'));
// add_filter('block_categories', array($this, 'register_block_categories'), 10, 2);
}

/**
Expand All @@ -30,161 +29,6 @@ public function __construct()
public function register_blocks()
{

/**
* Register hero block
*/
\acf_register_block_type(array(
'name' => 'hero',
'title' => __('Hero'),
'description' => __('Hero element'),
'render_template' => 'blocks/Global/Hero/Hero.php',
'category' => 'think3',
'icon' => 'cover-image',
'keywords' => array('Hero', 'Banner', 'top'),
'mode' => 'preview',
'align' => 'wide',
'supports' => array(
'mode' => false,
'align' => false
)
));

/**
* Register Media Text content
*/
\acf_register_block_type(array(
'name' => 'media-text',
'title' => __('Content & Media'),
'description' => __('Text with media'),
'render_template' => 'blocks/Global/MediaContent/MediaContent.php',
'category' => 'think3',
'icon' => '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path d="M4 17h7V6H4v11zm9-10v1.5h7V7h-7zm0 5.5h7V11h-7v1.5zm0 4h7V15h-7v1.5z"></path></svg>',
'keywords' => array('gallery', 'content', 'image'),
'mode' => 'preview',
'align' => 'full',
'supports' => array(
'mode' => false,
'align' => false,
'align_content' => true,
'align_text' => array('left', 'right'),
)
));

/**
* Register Features content
*/
\acf_register_block_type(array(
'name' => 'features',
'title' => __('Features'),
'description' => __('Grid-layout list of feature cards'),
'render_template' => 'blocks/Global/Features/Features.php',
'category' => 'think3',
'icon' => 'grid-view',
'keywords' => array('features', 'grid', 'blocks', 'list'),
'mode' => 'preview',
'align' => 'full',
'supports' => array(
'mode' => false,
'align' => false
)
));

/**
* Register testimonials content
*/
\acf_register_block_type(array(
'name' => 'testimonials',
'title' => __('Testimonials'),
'description' => __('Testimonials in slide-based format'),
'render_template' => 'blocks/Global/Testimonials/Testimonials.php',
'category' => 'think3',
'icon' => 'quote',
'keywords' => array('testimonials', 'content', 'images', 'cite'),
'mode' => 'preview',
'align' => 'full',
'supports' => array(
'mode' => false,
'align' => false
)
));

/**
* Register Call to Action content
*/
\acf_register_block_type(array(
'name' => 'call-to-action',
'title' => __('Call to Action'),
'description' => __('Call to action block with parallax'),
'render_template' => 'blocks/Global/CallToAction/CallToAction.php',
'category' => 'think3',
'icon' => 'quote',
'keywords' => array('cta', 'action', 'parallax'),
'mode' => 'preview',
'align' => 'full',
'supports' => array(
'mode' => false,
'align' => false
)
));

/**
* Register Anchor block
*/
\acf_register_block_type(array(
'name' => 'scroll-anchor',
'title' => __('Scroll Anchor'),
'description' => __('Adds a scroll anchor to the page, used by anchor links'),
'render_template' => 'blocks/Global/ScrollAnchor/ScrollAnchor.php',
'category' => 'think3',
'icon' => 'admin-post',
'keywords' => array('anchor', 'scroll', 'links'),
'mode' => 'preview',
'align' => 'full',
'supports' => array(
'mode' => false,
'align' => false,
)
));

/**
* Register News Items block
*/
\acf_register_block_type(array(
'name' => 'news-items',
'title' => __('News Items'),
'description' => __('Show latest three posts'),
'render_template' => 'blocks/Global/NewsItems/NewsItems.php',
'category' => 'think3',
'icon' => 'admin-post',
'keywords' => array('news', 'news item', 'blog'),
'mode' => 'preview',
'align' => 'full',
'supports' => array(
'mode' => false,
'align' => false,
)
));

}

/**
* Register new block categories.
*
* @param array $categories
* @param object $post
* @return array
*/
public function register_block_categories(array $categories, object $post): array
{

$new_categories = [
[
'slug' => 'common-simple',
'title' => 'Common Simple Blocks',
],
];

return array_merge($categories, $new_categories);

}
}
28 changes: 28 additions & 0 deletions web/app/themes/theme/App/CMS/AdminArea.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* WordPress Core modifications.
* Be careful
*/

namespace Theme\CMS;

class AdminArea
{
public function __construct()
{

add_action( 'admin_enqueue_scripts', array( $this, 'admin_assets' ) );


}

public function admin_assets() {

// wp_enqueue_script( 'admin-script', get_stylesheet_directory_uri() . 'admin.js', array() );

wp_enqueue_style( 'admin-style', get_stylesheet_directory_uri() . '/style.css', false );

}

}
Loading

0 comments on commit 28470a3

Please sign in to comment.