@airfleet/generator-init 0.30.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/plugin/templates/.github/workflows/release-plugin.yml +6 -3
- package/generators/plugin/templates/.github/workflows/test-wordpress.yml +0 -2
- package/generators/plugin/templates/composer-scoped.json.ejs +1 -1
- package/generators/plugin/templates/composer-scoped.lock.ejs +122 -122
- package/generators/plugin/templates/gitignore +1 -0
- package/generators/plugin/templates/package.json.ejs +1 -1
- package/generators/project/templates/.deployignore +4 -0
- package/generators/project/templates/.github/workflows/test-wordpress-root-lightyear.yml +0 -2
- package/generators/project-plugin/index.js +230 -0
- package/generators/project-plugin/templates/.airfleet-release +1 -0
- package/generators/project-plugin/templates/.deployignore +54 -0
- package/generators/project-plugin/templates/.editorconfig +18 -0
- package/generators/project-plugin/templates/.env +0 -0
- package/generators/project-plugin/templates/.gitattributes +12 -0
- package/generators/project-plugin/templates/.github/workflows/create-asana-attachment.yaml +19 -0
- package/generators/project-plugin/templates/.github/workflows/test-wordpress.yml +44 -0
- package/generators/project-plugin/templates/.husky/gitignore +1 -0
- package/generators/project-plugin/templates/.husky/pre-commit +4 -0
- package/generators/project-plugin/templates/.parcelrc +4 -0
- package/generators/project-plugin/templates/.prettierignore +15 -0
- package/generators/project-plugin/templates/.vscode/airfleet.code-snippets.ejs +186 -0
- package/generators/project-plugin/templates/.vscode/settings.json +33 -0
- package/generators/project-plugin/templates/CHANGELOG.md +10 -0
- package/generators/project-plugin/templates/LICENSE.ejs +2 -0
- package/generators/project-plugin/templates/README.md.ejs +16 -0
- package/generators/project-plugin/templates/acf-json/.gitkeep +0 -0
- package/generators/project-plugin/templates/acf-json/field-groups/.gitkeep +0 -0
- package/generators/project-plugin/templates/acf-json/option-pages/.gitkeep +0 -0
- package/generators/project-plugin/templates/acf-json/option-pages/airfleet-site-settings.json +22 -0
- package/generators/project-plugin/templates/acf-json/post-types/.gitkeep +0 -0
- package/generators/project-plugin/templates/acf-json/taxonomies/.gitkeep +0 -0
- package/generators/project-plugin/templates/assets/admin/styles/admin.entry.scss +2 -0
- package/generators/project-plugin/templates/assets/editor/styles/editor.entry.scss +23 -0
- package/generators/project-plugin/templates/assets/frontend/fonts/.gitkeep +0 -0
- package/generators/project-plugin/templates/assets/frontend/images/.gitkeep +0 -0
- package/generators/project-plugin/templates/assets/frontend/scripts/index.entry.js +3 -0
- package/generators/project-plugin/templates/assets/frontend/styles/_main.scss +3 -0
- package/generators/project-plugin/templates/assets/frontend/styles/_placeholders.scss +3 -0
- package/generators/project-plugin/templates/assets/frontend/styles/_root.scss +4 -0
- package/generators/project-plugin/templates/assets/frontend/styles/critical.entry.scss +1 -0
- package/generators/project-plugin/templates/assets/frontend/styles/index.entry.scss +6 -0
- package/generators/project-plugin/templates/assets/frontend/styles/main/_body.scss +6 -0
- package/generators/project-plugin/templates/assets/frontend/styles/main/_reset.scss +121 -0
- package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_button.scss +43 -0
- package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_container.scss +12 -0
- package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_sections.scss +6 -0
- package/generators/project-plugin/templates/assets/frontend/styles/root/_fonts.scss +21 -0
- package/generators/project-plugin/templates/assets/login/.gitkeep +0 -0
- package/generators/project-plugin/templates/assets/shared/styles/_figma-variables.scss +7 -0
- package/generators/project-plugin/templates/assets/shared/styles/_lib.scss +4 -0
- package/generators/project-plugin/templates/assets/shared/styles/_root.scss +6 -0
- package/generators/project-plugin/templates/assets/shared/styles/_shared.scss +1 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/_mixins.scss +6 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/_scss-variables.scss +2 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_background.scss +11 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_body.scss +4 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_breakpoints.scss +79 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_helpers.scss +35 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_list-inline.scss +23 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_position.scss +24 -0
- package/generators/project-plugin/templates/composer-scoped.json.ejs +8 -0
- package/generators/project-plugin/templates/composer-scoped.lock.ejs +124 -0
- package/generators/project-plugin/templates/composer.json.ejs +52 -0
- package/generators/project-plugin/templates/figma/design-tokens/.gitkeep +0 -0
- package/generators/project-plugin/templates/figma/design-tokens/manifest.json +5 -0
- package/generators/project-plugin/templates/gitignore +15 -0
- package/generators/project-plugin/templates/inc/Features/Menus.php.ejs +22 -0
- package/generators/project-plugin/templates/inc/Setup/AjaxVariables.php.ejs +22 -0
- package/generators/project-plugin/templates/inc/Setup/AjaxVariablesAdmin.php.ejs +22 -0
- package/generators/project-plugin/templates/inc/Setup/Breakpoints.php.ejs +18 -0
- package/generators/project-plugin/templates/inc/Setup/Colors.php.ejs +17 -0
- package/generators/project-plugin/templates/inc/Setup/RegisterViews.php.ejs +64 -0
- package/generators/project-plugin/templates/inc/Setup.php.ejs +30 -0
- package/generators/project-plugin/templates/index.php +1 -0
- package/generators/project-plugin/templates/package.json.ejs +85 -0
- package/generators/project-plugin/templates/phpcs.xml.ejs +23 -0
- package/generators/project-plugin/templates/plugin-name.php.ejs +65 -0
- package/generators/project-plugin/templates/scoper.custom.php.ejs +8 -0
- package/generators/project-plugin/templates/views/blocks/.gitkeep +0 -0
- package/generators/project-plugin/templates/views/components/.gitkeep +0 -0
- package/generators/project-plugin/templates/views/custom-templates/.gitkeep +0 -0
- package/generators/project-plugin/templates/views/parcelkeep.entry.scss +0 -0
- package/generators/project-plugin/templates/views/partials/footer/footer.blade.php.ejs +4 -0
- package/generators/project-plugin/templates/views/partials/footer/footer.php.ejs +4 -0
- package/generators/project-plugin/templates/views/partials/header/header.blade.php.ejs +12 -0
- package/generators/project-plugin/templates/views/partials/header/header.php.ejs +12 -0
- package/generators/project-plugin/templates/views/partials/layout/layout.blade.php.ejs +3 -0
- package/generators/project-plugin/templates/views/partials/layout/layout.php.ejs +5 -0
- package/generators/project-plugin/templates/views/templates/index/index.blade.php.ejs +30 -0
- package/generators/project-plugin/templates/views/templates/index/index.php.ejs +32 -0
- package/generators/project-plugin/templates/views/templates/not-found/not-found.blade.php.ejs +3 -0
- package/generators/project-plugin/templates/views/templates/not-found/not-found.php.ejs +5 -0
- package/generators/project-plugin/templates/views/templates/page/page.blade.php.ejs +10 -0
- package/generators/project-plugin/templates/views/templates/page/page.php.ejs +12 -0
- package/generators/project-plugin/templates/views/templates/single/single.blade.php.ejs +28 -0
- package/generators/project-plugin/templates/views/templates/single/single.php.ejs +30 -0
- package/generators/project-plugin/templates/views-elements/.gitkeep +0 -0
- package/generators/project-plugin/templates/views-elements/partials/button/ButtonSetup.php.ejs +32 -0
- package/generators/project-plugin/templates/views-elements/partials/button/button.entry.scss +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= packageName %>",
|
|
3
|
+
"description": "<%= answers.pluginDescription %>",
|
|
4
|
+
"version": "<%= answers.pluginVersion %>",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build:figma": "tokens-to-css --input=./figma/design-tokens --output=./assets/shared/styles/_figma-variables.scss",
|
|
7
|
+
"build:parcel": "dotenv -- parcel build --no-source-maps --log-level verbose \"./!(dist|node_modules)/**/*.entry.{js,css,scss}\"",
|
|
8
|
+
"build": "run-s build:*",
|
|
9
|
+
"start": "dotenv -- parcel serve --hmr-port 1236 --port 1234 --log-level verbose \"./!(dist|node_modules)/**/*.entry.{js,css,scss}\"",
|
|
10
|
+
"watch": "dotenv -- parcel watch --no-hmr --log-level verbose \"./!(dist|node_modules)/**/*.entry.{js,css,scss}\"",
|
|
11
|
+
"base:eslint": "eslint \"**/*.js\" --cache --ignore-path .gitignore",
|
|
12
|
+
"base:prettier": "prettier \"**/*.{css,scss}\"",
|
|
13
|
+
"base:stylelint": "stylelint \"**/*.{css,scss}\" --cache --ignore-path .gitignore --allow-empty-input",
|
|
14
|
+
"lint": "run-s --continue-on-error lint:*",
|
|
15
|
+
"lint:prettier": "npm run base:prettier -- --check",
|
|
16
|
+
"lint:eslint": "npm run base:eslint",
|
|
17
|
+
"lint:stylelint": "npm run base:stylelint",
|
|
18
|
+
"lint:phpcs": "composer run lint",
|
|
19
|
+
"fix": "run-s fix:*",
|
|
20
|
+
"fix:prettier": "npm run base:prettier -- --write",
|
|
21
|
+
"fix:eslint": "npm run base:eslint -- --fix",
|
|
22
|
+
"fix:stylelint": "npm run base:stylelint -- --fix",
|
|
23
|
+
"fix:phpcs": "composer run fix",
|
|
24
|
+
"pretest": "npm run lint",
|
|
25
|
+
"test": "echo Testing done",
|
|
26
|
+
"prepare": "husky install"
|
|
27
|
+
},
|
|
28
|
+
"private": true,
|
|
29
|
+
"keywords": [
|
|
30
|
+
"airfleet"
|
|
31
|
+
],
|
|
32
|
+
"homepage": "https://www.airfleet.co",
|
|
33
|
+
"author": {
|
|
34
|
+
"name": "Airfleet",
|
|
35
|
+
"email": "dev@airfleet.co",
|
|
36
|
+
"url": "https://www.airfleet.co/"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "<%= answers.pluginRepository %>"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": "<%- answers.pluginNodeVersion %>"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@airfleet/wordpress-dev": "^3.2.0"
|
|
48
|
+
},
|
|
49
|
+
"browserslist": [
|
|
50
|
+
"defaults",
|
|
51
|
+
"not dead",
|
|
52
|
+
"not op_mini all",
|
|
53
|
+
"not op_mob > 0",
|
|
54
|
+
"not opera > 0",
|
|
55
|
+
"not kaios > 0",
|
|
56
|
+
"not and_qq > 0",
|
|
57
|
+
"not and_uc > 0"
|
|
58
|
+
],
|
|
59
|
+
"prettier": "@airfleet/prettier-config-wordpress",
|
|
60
|
+
"stylelint": {
|
|
61
|
+
"extends": [
|
|
62
|
+
"@airfleet/stylelint-config-wordpress"
|
|
63
|
+
],
|
|
64
|
+
"ignoreFiles": [
|
|
65
|
+
"**/_figma-variables.scss"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"eslintConfig": {
|
|
69
|
+
"extends": [
|
|
70
|
+
"@airfleet/eslint-config-wordpress",
|
|
71
|
+
"plugin:no-jquery/all"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"lint-staged": {
|
|
75
|
+
"*.{js,jsx}": "eslint --cache --ignore-path .gitignore --fix",
|
|
76
|
+
"*.{css,scss}": [
|
|
77
|
+
"prettier --write",
|
|
78
|
+
"stylelint --cache --ignore-path .gitignore --fix"
|
|
79
|
+
],
|
|
80
|
+
"*.php": [
|
|
81
|
+
"composer run fix",
|
|
82
|
+
"composer run lint"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" ?>
|
|
2
|
+
<ruleset
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
+
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"
|
|
5
|
+
>
|
|
6
|
+
|
|
7
|
+
<!--
|
|
8
|
+
#############################################################################
|
|
9
|
+
COMMAND LINE ARGUMENTS
|
|
10
|
+
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
|
|
11
|
+
#############################################################################
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
<!-- Set cache file -->
|
|
15
|
+
<arg name="cache" value=".phpcscache" />
|
|
16
|
+
|
|
17
|
+
<!-- Check all files in this directory and the directories below it. -->
|
|
18
|
+
<file>.</file>
|
|
19
|
+
|
|
20
|
+
<!-- Airfleet config -->
|
|
21
|
+
<rule ref="Airfleet" />
|
|
22
|
+
|
|
23
|
+
</ruleset>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* <%= name.title %>
|
|
4
|
+
*
|
|
5
|
+
* @package Airfleet\Plugins\<%= nameNoAirfleet.pascal %>
|
|
6
|
+
* @version <%= answers.pluginVersion %>
|
|
7
|
+
* @author Airfleet
|
|
8
|
+
* @link https://www.airfleet.co/
|
|
9
|
+
*
|
|
10
|
+
* @wordpress-plugin
|
|
11
|
+
* Plugin Name: <%= name.title %>
|
|
12
|
+
* Plugin URI: https://www.airfleet.co/
|
|
13
|
+
* Description: <%= answers.pluginDescription %>
|
|
14
|
+
* Version: <%= answers.pluginVersion %>
|
|
15
|
+
* Requires PHP: <%= phpVersion %>
|
|
16
|
+
* Author: Airfleet
|
|
17
|
+
* Author URI: https://www.airfleet.co/
|
|
18
|
+
* Text Domain: <%= name.slug %>
|
|
19
|
+
* GitHub Plugin URI: <%= repositoryBase %>
|
|
20
|
+
* Primary Branch: <%= mainBranch %>
|
|
21
|
+
* Release Asset: true
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
// Exit if accessed directly.
|
|
25
|
+
if ( ! defined( 'ABSPATH' ) ) {
|
|
26
|
+
die;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Plugin constants.
|
|
30
|
+
define( '<%= name.constant %>_VERSION', '<%= answers.pluginVersion %>' );
|
|
31
|
+
define( '<%= name.constant %>_SLUG', '<%= name.slug %>' );
|
|
32
|
+
define( '<%= name.constant %>_SLUG_SHORT', '<%= nameNoAirfleet.slug %>' );
|
|
33
|
+
define( '<%= name.constant %>_TITLE', '<%= name.title %>' );
|
|
34
|
+
define( '<%= name.constant %>_TITLE_SHORT', '<%= nameNoAirfleet.title %>' );
|
|
35
|
+
define( '<%= name.constant %>_PATH', plugin_dir_path( __FILE__ ) );
|
|
36
|
+
define( '<%= name.constant %>_URL', plugin_dir_url( __FILE__ ) );
|
|
37
|
+
define( '<%= name.constant %>_FILE', __FILE__ );
|
|
38
|
+
define( '<%= name.constant %>_DIR', __DIR__ );
|
|
39
|
+
define( '<%= name.constant %>_IMAGES_OPTIONS_URL', <%= name.constant %>_URL . '/assets/admin/images/options' );
|
|
40
|
+
|
|
41
|
+
// Autoload classes.
|
|
42
|
+
require_once __DIR__ . '/vendor/autoload.php';
|
|
43
|
+
require_once __DIR__ . '/vendor-scoped/scoper-autoload.php';
|
|
44
|
+
|
|
45
|
+
// Initialize plugin.
|
|
46
|
+
$<%= name.snake %> = new \Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup(
|
|
47
|
+
[
|
|
48
|
+
'slug' => \<%= name.constant %>_SLUG,
|
|
49
|
+
'short_slug' => \<%= name.constant %>_SLUG_SHORT,
|
|
50
|
+
'title' => \<%= name.constant %>_TITLE,
|
|
51
|
+
'short_title' => \<%= name.constant %>_TITLE_SHORT,
|
|
52
|
+
'url' => \<%= name.constant %>_URL,
|
|
53
|
+
'path' => \<%= name.constant %>_PATH,
|
|
54
|
+
'version' => \<%= name.constant %>_VERSION,
|
|
55
|
+
]
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
$<%= name.snake %>->initialize();
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
62
|
+
* ! Do not make changes to this file.
|
|
63
|
+
* ! Edit the plugin class in folder inc/.
|
|
64
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
65
|
+
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@php apply_filters( 'airfleet/theme/header/hook', true ) && do_action( 'get_header' ) @endphp
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html @php language_attributes() @endphp>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="@php bloginfo( 'charset' ) @endphp" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
7
|
+
<link rel="profile" href="http://gmpg.org/xfn/11" />
|
|
8
|
+
<link rel="pingback" href="@php bloginfo( 'pingback_url' ) @endphp" />
|
|
9
|
+
@php wp_head() @endphp
|
|
10
|
+
</head>
|
|
11
|
+
<body @php body_class() @endphp>
|
|
12
|
+
@php wp_body_open() @endphp
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?php apply_filters( 'airfleet/theme/header/hook', true ) && do_action( 'get_header' ); ?>
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html <?php language_attributes(); ?>>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="<?php bloginfo( 'charset' ) ?>" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
7
|
+
<link rel="profile" href="http://gmpg.org/xfn/11" />
|
|
8
|
+
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ) ?>" />
|
|
9
|
+
<?php wp_head(); ?>
|
|
10
|
+
</head>
|
|
11
|
+
<body <?php body_class(); ?>>
|
|
12
|
+
<?php wp_body_open(); ?>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@view_start( 'partials-layout' )
|
|
2
|
+
@if( have_posts() )
|
|
3
|
+
@while( have_posts() )
|
|
4
|
+
@php the_post() @endphp
|
|
5
|
+
<article @php post_class( 'article article--index' ) @endphp>
|
|
6
|
+
<header class="article__head">
|
|
7
|
+
@if ( has_post_thumbnail() )
|
|
8
|
+
<div class="article__thumbnail">
|
|
9
|
+
@php the_post_thumbnail() @endphp
|
|
10
|
+
</div>
|
|
11
|
+
@endif
|
|
12
|
+
<h2 class="article__title">
|
|
13
|
+
<a href="@php the_permalink() @endphp">
|
|
14
|
+
@php the_title() @endphp
|
|
15
|
+
</a>
|
|
16
|
+
</h2>
|
|
17
|
+
<div class="article__meta">
|
|
18
|
+
<p>
|
|
19
|
+
@php the_time( 'F jS, Y ' ) @endphp
|
|
20
|
+
@php the_author() @endphp
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
</header>
|
|
24
|
+
<div class="article__body">
|
|
25
|
+
@php the_excerpt() @endphp
|
|
26
|
+
</div>
|
|
27
|
+
</article>
|
|
28
|
+
@endwhile
|
|
29
|
+
@endif
|
|
30
|
+
@view_end()
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<?php $_view_start( 'partials-layout' ); ?>
|
|
2
|
+
|
|
3
|
+
<?php if( have_posts() ) : ?>
|
|
4
|
+
<?php while( have_posts() ) : ?>
|
|
5
|
+
<?php the_post(); ?>
|
|
6
|
+
<article <?php post_class( 'article article--index' ); ?>>
|
|
7
|
+
<header class="article__head">
|
|
8
|
+
<?php if( has_post_thumbnail() ) : ?>
|
|
9
|
+
<div class="article__thumbnail">
|
|
10
|
+
<?php the_post_thumbnail(); ?>
|
|
11
|
+
</div>
|
|
12
|
+
<?php endif; ?>
|
|
13
|
+
<h2 class="article__title">
|
|
14
|
+
<a href="<?php the_permalink() ?>">
|
|
15
|
+
<?php the_title(); ?>
|
|
16
|
+
</a>
|
|
17
|
+
</h2>
|
|
18
|
+
<div class="article__meta">
|
|
19
|
+
<p>
|
|
20
|
+
<?php the_time( 'F jS, Y ' ); ?>
|
|
21
|
+
<?php the_author(); ?>
|
|
22
|
+
</p>
|
|
23
|
+
</div>
|
|
24
|
+
</header>
|
|
25
|
+
<div class="article__body">
|
|
26
|
+
<?php the_excerpt(); ?>
|
|
27
|
+
</div>
|
|
28
|
+
</article>
|
|
29
|
+
<?php endwhile; ?>
|
|
30
|
+
<?php endif; ?>
|
|
31
|
+
|
|
32
|
+
<?php $_view_end(); ?>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?php $_view_start( 'partials-layout' ); ?>
|
|
2
|
+
|
|
3
|
+
<?php if( have_posts() ) : ?>
|
|
4
|
+
<?php while( have_posts() ) : ?>
|
|
5
|
+
<?php the_post(); ?>
|
|
6
|
+
<article <?php post_class( 'page' ); ?>>
|
|
7
|
+
<?php the_content(); ?>
|
|
8
|
+
</article>
|
|
9
|
+
<?php endwhile; ?>
|
|
10
|
+
<?php endif; ?>
|
|
11
|
+
|
|
12
|
+
<?php $_view_end(); ?>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@view_start( 'partials-layout' )
|
|
2
|
+
@if( have_posts() )
|
|
3
|
+
@while( have_posts() )
|
|
4
|
+
@php the_post() @endphp
|
|
5
|
+
<article @php post_class( 'article article--single' ) @endphp>
|
|
6
|
+
<header class="article__head">
|
|
7
|
+
@if ( has_post_thumbnail() )
|
|
8
|
+
<div class="article__thumbnail">
|
|
9
|
+
@php the_post_thumbnail() @endphp
|
|
10
|
+
</div>
|
|
11
|
+
@endif
|
|
12
|
+
<h2 class="article__title">
|
|
13
|
+
@php the_title() @endphp
|
|
14
|
+
</h2>
|
|
15
|
+
<div class="article__meta">
|
|
16
|
+
<p>
|
|
17
|
+
@php the_time( 'F jS, Y ' ) @endphp
|
|
18
|
+
@php the_author() @endphp
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
</header>
|
|
22
|
+
<div class="article__body">
|
|
23
|
+
@php the_content() @endphp
|
|
24
|
+
</div>
|
|
25
|
+
</article>
|
|
26
|
+
@endwhile
|
|
27
|
+
@endif
|
|
28
|
+
@view_end()
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?php $_view_start( 'partials-layout' ); ?>
|
|
2
|
+
|
|
3
|
+
<?php if( have_posts() ) : ?>
|
|
4
|
+
<?php while( have_posts() ) : ?>
|
|
5
|
+
<?php the_post(); ?>
|
|
6
|
+
<article <?php post_class( 'article article--single' ); ?>>
|
|
7
|
+
<header class="article__head">
|
|
8
|
+
<?php if ( has_post_thumbnail() ) : ?>
|
|
9
|
+
<div class="article__thumbnail">
|
|
10
|
+
<?php the_post_thumbnail(); ?>
|
|
11
|
+
</div>
|
|
12
|
+
<?php endif; ?>
|
|
13
|
+
<h2 class="article__title">
|
|
14
|
+
<?php the_title(); ?>
|
|
15
|
+
</h2>
|
|
16
|
+
<div class="article__meta">
|
|
17
|
+
<p>
|
|
18
|
+
<?php the_time( 'F jS, Y ' ); ?>
|
|
19
|
+
<?php the_author(); ?>
|
|
20
|
+
</p>
|
|
21
|
+
</div>
|
|
22
|
+
</header>
|
|
23
|
+
<div class="article__body">
|
|
24
|
+
<?php the_content(); ?>
|
|
25
|
+
</div>
|
|
26
|
+
</article>
|
|
27
|
+
<?php endwhile; ?>
|
|
28
|
+
<?php endif; ?>
|
|
29
|
+
|
|
30
|
+
<?php $_view_end(); ?>
|
|
File without changes
|
package/generators/project-plugin/templates/views-elements/partials/button/ButtonSetup.php.ejs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\ViewsElements\Partials\Button;
|
|
4
|
+
|
|
5
|
+
use Airfleet\Plugins\Views\View\ViewSetup;
|
|
6
|
+
|
|
7
|
+
class ButtonSetup extends ViewSetup {
|
|
8
|
+
public function initialize(): void {
|
|
9
|
+
$this->filter_styles();
|
|
10
|
+
$this->filter_variations();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
protected function filter_styles(): void {
|
|
14
|
+
add_filter(
|
|
15
|
+
'airfleet/elements/button/style',
|
|
16
|
+
function ( $choices ) {
|
|
17
|
+
// ? Customize button styles. See https://www.notion.so/codersclan/Airfleet-Elements-Buttons-ddb5303409d143edaf9044bf4403247f?p=67c54d5f1343454c9c949be42c80fb1a&pm=c
|
|
18
|
+
return $choices;
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
protected function filter_variations(): void {
|
|
24
|
+
add_filter(
|
|
25
|
+
'airfleet/elements/button/variations',
|
|
26
|
+
function ( $choices ) {
|
|
27
|
+
// ? Customize button variations. See https://www.notion.so/codersclan/Airfleet-Elements-Buttons-ddb5303409d143edaf9044bf4403247f?p=1b753e0924d34b378713baee5611953b&pm=c
|
|
28
|
+
return $choices;
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|