Skip to content
Merged
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
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ jobs:
composer install --optimize-autoloader
- run: |
composer validate --no-check-all --strict
- run: |
npm run build
- run: |
npm run export
- uses: actions/upload-artifact@v2
with:
name: ankur
path: build/ankur.zip
path: export/ankur.zip
- uses: JasonEtco/upload-to-release@master
with:
args: build/ankur.zip application/zip
args: export/ankur.zip application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
assets
build
export
node_modules
vendor
*.pot
13 changes: 0 additions & 13 deletions .stylelintrc.json

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

## 2.0.0

- Updated theme.json schema to 6.9.
- Moved all custom CSS to theme.json.
- Removed custom patterns.
- Removed color styles.
- Simplified loop template part.
- Added post template part for use in loop.

## 1.1.1

- Fixed broken spacing in post terms, search, and code blocks.
Expand Down
130 changes: 82 additions & 48 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,88 @@
*/

/**
* Enqueue the style.css file.
*
* @since 1.0.0
* Register custom block styles.
*/
add_action(
'wp_enqueue_scripts',
function () {
wp_enqueue_style(
'ankur-style',
get_template_directory_uri() . '/assets/css/theme.css',
array(),
filemtime( get_template_directory() . '/assets/css/theme.css' )
);
}
);
function ankur_register_block_styles() {
register_block_style(
'core/button',
array(
'name' => 'underline',
'label' => __( 'Underline', 'ankur' ),
)
);

/**
* Add block styles support.
*
* @since 1.0.0
*/
add_action(
'after_setup_theme',
function () {
add_theme_support( 'wp-block-styles' );
}
);
register_block_style(
'core/embed',
array(
'name' => 'rounded',
'label' => __( 'Rounded', 'ankur' ),
)
);

/**
* Additional editor styles.
* Using `add_editor_style` doesn't allow the styles to be inherited by child themes.
*
* @since 1.0.0
*/
add_action(
'enqueue_block_editor_assets',
function () {
wp_enqueue_style(
'ankur-editor-style',
get_template_directory_uri() . '/assets/css/editor.css',
array(),
filemtime( get_template_directory() . '/assets/css/editor.css' )
);
}
);

// Add block styles.
require get_template_directory() . '/inc/block-styles.php';

// Add block patterns.
require get_template_directory() . '/inc/block-patterns.php';
unregister_block_style( 'core/image', 'rounded' );
register_block_style(
'core/image',
array(
'name' => 'rounded',
'label' => __( 'Rounded', 'ankur' ),
)
);
register_block_style(
'core/image',
array(
'name' => 'pill',
'label' => __( 'Pill', 'ankur' ),
)
);

register_block_style(
'core/gallery',
array(
'name' => 'diamond',
'label' => __( 'Diamond', 'ankur' ),
)
);

register_block_style(
'core/video',
array(
'name' => 'rounded',
'label' => __( 'Rounded', 'ankur' ),
)
);

register_block_style(
'core/quote',
array(
'name' => 'large',
'label' => __( 'Large', 'ankur' ),
)
);

register_block_style(
'core/query-pagination',
array(
'name' => 'buttons',
'label' => __( 'Buttons', 'ankur' ),
)
);

register_block_style(
'core/post-terms',
array(
'name' => 'solid',
'label' => __( 'Solid', 'ankur' ),
)
);

register_block_style(
'core/post-terms',
array(
'name' => 'outline',
'label' => __( 'Outline', 'ankur' ),
)
);
}

add_action( 'init', 'ankur_register_block_styles' );
30 changes: 0 additions & 30 deletions inc/block-patterns.php

This file was deleted.

102 changes: 0 additions & 102 deletions inc/block-styles.php

This file was deleted.

6 changes: 0 additions & 6 deletions index.php

This file was deleted.

Loading
Loading