Skip to content

Commit

Permalink
Merge pull request #26 from peiche/v1.1.0
Browse files Browse the repository at this point in the history
V1.1.0
  • Loading branch information
peiche authored Jun 4, 2024
2 parents ac1d413 + e42f8d4 commit 2bbf270
Show file tree
Hide file tree
Showing 28 changed files with 82 additions and 134 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 1.1.0

- Now using v3 of theme.json schema.
- Removed defined spacing sizes in favor of spacing scale generated ones.
- Replaced spacing class names with equivalents.

## 1.0.4

- Fixed responsive font sizes to improve readability.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ankur",
"version": "1.0.4",
"version": "1.1.0",
"description": "WordPress block theme supporting full site editing",
"scripts": {
"lint:css": "wp-scripts lint-style \"src/**/*.scss\"",
Expand Down
4 changes: 2 additions & 2 deletions parts/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<div
class="wp-block-group"
style="
padding-top: var(--wp--preset--spacing--unit);
padding-top: var(--wp--preset--spacing--40);
padding-right: 1rem;
padding-bottom: var(--wp--preset--spacing--unit);
padding-bottom: var(--wp--preset--spacing--40);
padding-left: 1rem;
"
>
Expand Down
2 changes: 1 addition & 1 deletion patterns/footer-default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
?>

<!-- wp:group {"tagName":"footer","style":{"spacing":{"padding":{"top":"var:preset|spacing|component-padding","bottom":"var:preset|spacing|component-padding"}}},"layout":{"type":"constrained"}} -->
<footer class="wp-block-group" style="padding-top:var(--wp--preset--spacing--component-padding);padding-bottom:var(--wp--preset--spacing--component-padding)"><!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<footer class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)"><!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<div class="wp-block-group"><!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:site-title /-->

Expand Down
2 changes: 1 addition & 1 deletion patterns/footer-simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
?>

<!-- wp:group {"tagName":"footer","style":{"spacing":{"padding":{"top":"var:preset|spacing|component-padding","bottom":"var:preset|spacing|component-padding"}}},"layout":{"type":"constrained"}} -->
<footer class="wp-block-group" style="padding-top:var(--wp--preset--spacing--component-padding);padding-bottom:var(--wp--preset--spacing--component-padding)"><!-- wp:paragraph {"align":"center"} -->
<footer class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)"><!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">
<?php
printf(
Expand Down
2 changes: 1 addition & 1 deletion patterns/header-centered.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
?>

<!-- wp:group {"tagName":"header","align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|component-padding","left":"var:preset|spacing|component-padding"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<header class="wp-block-group alignfull" style="padding-right:var(--wp--preset--spacing--component-padding);padding-left:var(--wp--preset--spacing--component-padding)"><!-- wp:social-links -->
<header class="wp-block-group alignfull" style="padding-right:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:social-links -->
<ul class="wp-block-social-links"></ul>
<!-- /wp:social-links -->

Expand Down
2 changes: 1 addition & 1 deletion patterns/header-default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
?>

<!-- wp:group {"tagName":"header","align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|component-padding","left":"var:preset|spacing|component-padding"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<header class="wp-block-group alignfull" style="padding-right:var(--wp--preset--spacing--component-padding);padding-left:var(--wp--preset--spacing--component-padding)"><!-- wp:site-title /-->
<header class="wp-block-group alignfull" style="padding-right:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:site-title /-->

<!-- wp:navigation {} /--></header>
<!-- /wp:group -->
4 changes: 2 additions & 2 deletions patterns/post-card.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
?>

<!-- wp:group {"style":{"border":{"radius":"4px"},"spacing":{"padding":{"bottom":"var:preset|spacing|component-padding","left":"0","right":"0","top":"0"}},"elements":{"link":{"color":{"text":"var:preset|color|contrast-high"}}}},"backgroundColor":"bg","textColor":"contrast-high","layout":{"type":"default"}} -->
<div class="wp-block-group has-contrast-high-color has-bg-background-color has-text-color has-background has-link-color" style="border-radius:4px;padding-top:0;padding-right:0;padding-bottom:var(--wp--preset--spacing--component-padding);padding-left:0"><!-- wp:post-featured-image {"isLink":true,"height":"14rem","style":{"border":{"radius":"0px"}}} /-->
<div class="wp-block-group has-contrast-high-color has-bg-background-color has-text-color has-background has-link-color" style="border-radius:4px;padding-top:0;padding-right:0;padding-bottom:var(--wp--preset--spacing--40);padding-left:0"><!-- wp:post-featured-image {"isLink":true,"height":"14rem","style":{"border":{"radius":"0px"}}} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|component-padding","left":"var:preset|spacing|component-padding"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--component-padding);padding-left:var(--wp--preset--spacing--component-padding)"><!-- wp:post-title {"isLink":true,"fontSize":"lg"} /-->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:post-title {"isLink":true,"fontSize":"lg"} /-->

<!-- wp:post-excerpt {"moreText":""} /-->

Expand Down
2 changes: 1 addition & 1 deletion patterns/quote-full-width.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
?>

<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|unit","left":"1rem","top":"8rem","bottom":"8rem"}}},"backgroundColor":"contrast-lower"} -->
<div class="wp-block-group has-contrast-lower-background-color has-background" style="padding-top:8rem;padding-right:var(--wp--preset--spacing--unit);padding-bottom:8rem;padding-left:1rem"><!-- wp:group {"textColor":"contrast-low","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"center"},"fontSize":"xxxxl"} -->
<div class="wp-block-group has-contrast-lower-background-color has-background" style="padding-top:8rem;padding-right:var(--wp--preset--spacing--40);padding-bottom:8rem;padding-left:1rem"><!-- wp:group {"textColor":"contrast-low","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"center"},"fontSize":"xxxxl"} -->
<div class="wp-block-group has-contrast-low-color has-text-color has-xxxxl-font-size"><!-- wp:html -->
<svg class="icon" aria-hidden="true" viewBox="0 0 64 64"><polygon fill="currentColor" points="2 36 17 2 26 2 15 36 26 36 26 62 2 62 2 36"></polygon><polygon fill="currentColor" points="38 36 53 2 62 2 51 36 62 36 62 62 38 62 38 36"></polygon></svg>
<!-- /wp:html --></div>
Expand Down
2 changes: 1 addition & 1 deletion src/scss/blocks/embed/_editor.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@use "./base" as *;

.wp-block-embed {
margin-top: var(--wp--preset--spacing--component-padding);
margin-top: var(--wp--preset--spacing--40);

&.is-loading {
flex-direction: column;
Expand Down
4 changes: 4 additions & 0 deletions src/scss/blocks/gallery/_base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.wp-block-gallery {
&:not(.has-nested-images) {
margin-top: var(--wp--preset--spacing--40);
}

&.has-nested-images {
figure.wp-block-image figcaption,
figure.wp-block-image.is-style-rounded figcaption.wp-element-caption {
Expand Down
2 changes: 1 addition & 1 deletion src/scss/blocks/image/_editor.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "./base" as *;

.wp-block-image {
margin-block-start: var(--wp--preset--spacing--component-padding);
margin-block-start: var(--wp--preset--spacing--40);
}
2 changes: 1 addition & 1 deletion src/scss/blocks/pagination/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
color: var(--wp--preset--color--contrast-high);
text-decoration: none;
border-radius: var(--wp--custom--radius-lg);
padding: var(--wp--preset--spacing--xxxs) var(--wp--preset--spacing--xs);
padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
display: inline-block;
margin: 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/scss/blocks/post-comments-form/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.comment-form-comment {
label {
display: block;
margin-bottom: var(--wp--preset--spacing--xxs);
margin-bottom: var(--wp--preset--spacing--30);
font-size: var(--wp--preset--font-size--sm);
}
}
Expand All @@ -21,7 +21,7 @@
var(--wp--custom--line-height-body) *
var(--wp--custom--line-height-multiplier, 1)
);
padding: var(--wp--preset--spacing--xxs) var(--wp--preset--spacing--xs);
padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
border-radius: var(--wp--custom--radius-md);
box-shadow: inset 0 0 0 1px var(--wp--preset--color--contrast-lower);
}
Expand Down
4 changes: 2 additions & 2 deletions src/scss/blocks/post-navigation/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
.post-nav-links {
display: flex;
align-items: center;
gap: var(--wp--preset--spacing--xxxs);
gap: var(--wp--preset--spacing--20);

.post-page-numbers {
background-color: var(--wp--preset--color--contrast-lower);
color: var(--wp--preset--color--contrast-high);
text-decoration: none;
border-radius: var(--wp--custom--radius-lg);
padding: var(--wp--preset--spacing--xxxs) var(--wp--preset--spacing--xs);
padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
display: inline-block;
margin: 0;

Expand Down
4 changes: 2 additions & 2 deletions src/scss/blocks/post-terms/_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
color: var(--wp--preset--color--contrast-high);
text-decoration: none;
border-radius: 9999px;
padding: var(--wp--preset--spacing--xxxs) var(--wp--preset--spacing--xs);
padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);

&::after {
content: "";
Expand All @@ -19,6 +19,6 @@
background-color: transparent;
color: var(--wp--preset--color--contrast-high);
border: 2px solid var(--wp--preset--color--contrast-low);
padding: var(--wp--preset--spacing--xxxxs) var(--wp--preset--spacing--xxs);
padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
}
}
4 changes: 2 additions & 2 deletions src/scss/blocks/post-terms/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
.wp-block-post-terms {
&.is-style-buttons a {
background-color: var(--wp--preset--color--contrast-lower);
padding: var(--wp--preset--spacing--xxxs) var(--wp--preset--spacing--xs);
padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
}

&.is-style-outline a {
background-color: transparent;
border: 2px solid var(--wp--preset--color--contrast-low);
padding: var(--wp--preset--spacing--xxxxs) var(--wp--preset--spacing--xxs);
padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
}

&.is-style-buttons,
Expand Down
2 changes: 1 addition & 1 deletion src/scss/blocks/quote/_base.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.wp-block-quote {
margin-block-start: var(--wp--preset--spacing--component-padding);
margin-block-start: var(--wp--preset--spacing--40);

&.wp-block-quote.is-style-large {
padding-left: 0;
Expand Down
11 changes: 5 additions & 6 deletions src/scss/blocks/search/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@
&.has-icon {
margin: 0;
border: 0;
padding: var(--wp--preset--spacing--xxxxs);
padding: var(--wp--preset--spacing--10);
}
}

&__inside-wrapper {
background-color: var(--wp--preset--color--white);
margin-top: 0;
padding: var(--wp--preset--spacing--xxxs) var(--wp--preset--spacing--xxxs)
var(--wp--preset--spacing--xxxs) var(--wp--preset--spacing--xxs);
padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--20)
var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);

@media (min-width: 64rem) {
padding: var(--wp--preset--spacing--xxxxs)
var(--wp--preset--spacing--xxxxs) var(--wp--preset--spacing--xxxxs)
var(--wp--preset--spacing--xxxs);
padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--10)
var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/scss/blocks/social-links/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "./base" as *;

.wp-block-social-links {
gap: var(--wp--preset--spacing--xs);
gap: var(--wp--preset--spacing--40);
}
2 changes: 1 addition & 1 deletion src/scss/blocks/term-description/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
margin-block-end: 0;

+ * {
margin-block-start: var(--wp--preset--spacing--component-padding);
margin-block-start: var(--wp--preset--spacing--40);
}
}
2 changes: 1 addition & 1 deletion src/scss/editor/_media.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.wp-block-gallery figcaption {
margin-top: calc(
(-1 * var(--wp--style--block-gap)) + var(--wp--preset--spacing--xxs)
(-1 * var(--wp--style--block-gap)) + var(--wp--preset--spacing--30)
);
}
8 changes: 4 additions & 4 deletions src/scss/editor/_spacing.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.is-root-container,
.edit-post-visual-editor__post-title-wrapper {
margin-bottom: 1rem;
padding-left: var(--wp--preset--spacing--component-padding);
padding-right: var(--wp--preset--spacing--component-padding);
padding-left: var(--wp--preset--spacing--40);
padding-right: var(--wp--preset--spacing--40);

> .alignfull {
margin-left: calc(-1 * var(--wp--preset--spacing--component-padding));
margin-right: calc(-1 * var(--wp--preset--spacing--component-padding));
margin-left: calc(-1 * var(--wp--preset--spacing--40));
margin-right: calc(-1 * var(--wp--preset--spacing--40));
}
}
4 changes: 2 additions & 2 deletions src/scss/theme/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
.wp-block-image figcaption,
.wp-block-table figcaption,
.wp-block-video figcaption {
margin-top: var(--wp--preset--spacing--xxs);
margin-top: var(--wp--preset--spacing--30);
}

.wp-block-gallery figcaption {
margin-top: calc(
(-1 * var(--wp--style--block-gap)) + var(--wp--preset--spacing--xxs)
(-1 * var(--wp--style--block-gap)) + var(--wp--preset--spacing--30)
);
}
5 changes: 2 additions & 3 deletions src/scss/theme/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@

@media (min-width: 64rem) {
body {
--wp--preset--spacing--unit: 1.25rem;
--wp--custom--text-scale-ratio: 1.25;
--wp--preset--spacing--40: 1.25rem;
}
}

.entry-content :not(.wp-block-code) > code {
background-color: var(--wp--preset--color--contrast-lower);
padding: var(--wp--preset--spacing--xxxxs) var(--wp--preset--spacing--xxxxs);
padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--10);
border-radius: var(--wp--custom--radius-sm);
}

Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Theme Name: Ankur
Author: Paul Eiche
Description: WordPress block theme with support for color variations and custom patterns.
Version: 1.0.4
Version: 1.1.0
Requires at least: 5.9
Tested up to: 6.0
Requires PHP: 7.4
Expand Down
Loading

0 comments on commit 2bbf270

Please sign in to comment.