Seedlet Blocks: bring up-to-date with GB 10.3 (#3620)
* Overwrite existing array instead of concatenating * Brought in child build process * refactored Seedlet Blocks to be a child of Blank-Canvas-Blocks * Font, template and configuration changes to align with Seedlet. * inverted font parings to be correct * Make post titles a link * Add entry meta in the footer * Add entry meta to seedlet blocks * Add post meta to singular * Add author bio on singular template * Remove the troublesome 'theme' metadata * Add author bios and a footer credit * Added Seedlet Block Dev server deploy action * Include SB-BCB BCB in deploy action * Separated names of steps * make Mayland a bcb child, change typography variables * rebuilt theme.json file with new build tools * removed alignments css * defined layout for the theme * fixed hover states for buttons on bcb * updated color variables for mayland * move the google font definitions to theme.json * Corrected Button style definitions and removed duplication of collections in child theme.json file * added new post meta template part * added template part to json, changed font sizes * overriden icons * changed color to meta links * added post tags to meta * added template part to index template too * Adding SCSS build + watch workflow to Seedlet Blocks (#3575) * Adding SCSS build + watch workflow to Seedlet Blocks * Fix seedlet-bcb site title (#3576) * Added site title block themes from original Seedlet theme * Adjusted links to match Seedlet. (#3578) * Refactored build scripts to standardize (#3579) * Refactored build scripts to standardize. 'start' and 'build' script targets. * Added a start:child script target Co-authored-by: Ben Dwyer <ben@scruffian.com> * Changed target of the dev branch * Update template parts syntax in seedlet blocks * remove theme slugs from templates * Make the pony fill a dependency of mayland blocks so that it loads first * Seedlet Blocks: Update blocks .scss file names to adhere to the SASS naming convention for partials * Remove _ from the import * Fix/seedlet bcb pullquote (#3580) * Adjust styles for Seedlet BCB to match Seedlet * Added font family to citation custom styles. * Made margins above citation configurable. * Inheriting Line Height so it can be set via styles. * Added ponyfill as theme style dependency so child theme would win CSS specificity battle ties Co-authored-by: Jeff Ong <jeff.ong@automattic.com> * rebuilt theme.json and theme.css from last merge * Blank Canvas Blocks: Remove unnecessary priority parameter from ponyfill css load (#3603) * Add/bcb index query (#3604) * Add site-logo to BCB header and centered it * Add index template (with header and footer) with query loop Co-authored-by: Kjell Reigstad <kjell@kjellr.com> * Style seedlet bcb latest post Block (#3597) * Added latest post block styling * Register latest post block pattern from Seedlet * Added latest post block styles Co-authored-by: Jeff Ong <jeff.ong@automattic.com> * Fix bad merge. * Check in compiled styles. * Fix link colors in the editor. * removed supports that are on the parent theme (#3594) * Cherry pick changes to seedlet. * Remove unrelated mayland blocks change. Co-authored-by: Jason Crist <jcrist@pbking.com> Co-authored-by: Ben Dwyer <ben@scruffian.com> Co-authored-by: Maggie Cabrera <maggie.cabrera@automattic.com> Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com> Co-authored-by: Kjell Reigstad <kjell@kjellr.com>
This commit is contained in:
parent
ae57d02846
commit
b9e70f36dd
22 changed files with 4578 additions and 154 deletions
34
.github/workflows/sb_demo_deploy.yml
vendored
Normal file
34
.github/workflows/sb_demo_deploy.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Seedlet Blocks BCB Demo Deploy
|
||||
|
||||
# Controls when the action will run.
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the trunk branch
|
||||
push:
|
||||
branches: [ make/blank-canvas-blocks ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Deploy-Theme
|
||||
uses: SamKirkland/FTP-Deploy-Action@3.1.1
|
||||
with:
|
||||
ftp-server: sftp://sftp.pressable.com:22/htdocs/wp-content/themes/
|
||||
ftp-username: ${{ secrets.SB_DEMO_USERNAME }}
|
||||
ftp-password: ${{ secrets.SB_DEMO_PASSWORD }}
|
||||
git-ftp-args: --insecure
|
||||
local-dir: ./seedlet-blocks/
|
||||
- name: Deploy-Parent
|
||||
uses: SamKirkland/FTP-Deploy-Action@3.1.1
|
||||
with:
|
||||
ftp-server: sftp://sftp.pressable.com:22/htdocs/wp-content/themes/
|
||||
ftp-username: ${{ secrets.SB_DEMO_USERNAME }}
|
||||
ftp-password: ${{ secrets.SB_DEMO_PASSWORD }}
|
||||
git-ftp-args: --insecure
|
||||
local-dir: ./blank-canvas-blocks/
|
|
@ -25,5 +25,4 @@
|
|||
@import "blocks/table";
|
||||
@import "blocks/video";
|
||||
@import "blocks/columns";
|
||||
|
||||
@import "post/meta";
|
||||
@import "post/meta";
|
226
seedlet-blocks/assets/theme.css
Normal file
226
seedlet-blocks/assets/theme.css
Normal file
|
@ -0,0 +1,226 @@
|
|||
.wp-block-site-title a {
|
||||
background-image: linear-gradient(to right, var(--wp--custom--color--secondary) 100%, transparent 100%);
|
||||
background-position: 0 1.22em;
|
||||
background-repeat: repeat-x;
|
||||
background-size: 8px 1.5px;
|
||||
border-bottom: none;
|
||||
color: currentColor;
|
||||
text-shadow: 1px 0px var(--wp--custom--color--background), -1px 0px var(--wp--custom--color--background), -2px 0px var(--wp--custom--color--background), 2px 0px var(--wp--custom--color--background), -3px 0px var(--wp--custom--color--background), 3px 0px var(--wp--custom--color--background), -4px 0px var(--wp--custom--color--background), 4px 0px var(--wp--custom--color--background), -5px 0px var(--wp--custom--color--background), 5px 0px var(--wp--custom--color--background);
|
||||
transition: background-size 0.1s ease-out;
|
||||
}
|
||||
|
||||
.wp-block-site-title a:link, .wp-block-site-title a:visited, .wp-block-site-title a:active {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
.wp-block-site-title a:hover, .wp-block-site-title a:focus {
|
||||
text-decoration: none;
|
||||
color: var(--wp--custom--color--secondary);
|
||||
background-size: 8px 0px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Links in navigation
|
||||
*/
|
||||
.wp-block-navigation-link a :hover {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.4rem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Links in Content
|
||||
*/
|
||||
.is-root-container a,
|
||||
.wp-block-post-content a {
|
||||
color: var(--wp--custom--color--primary);
|
||||
text-decoration-color: var(--wp--style--color--link);
|
||||
text-decoration-thickness: 1px;
|
||||
text-underline-offset: 0.2em;
|
||||
}
|
||||
|
||||
.is-root-container a:focus, .is-root-container a:hover,
|
||||
.wp-block-post-content a:focus,
|
||||
.wp-block-post-content a:hover {
|
||||
color: var(--wp--style--color--link);
|
||||
}
|
||||
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
/**
|
||||
* These are default block editor widths in case the theme doesn't provide them.
|
||||
*/
|
||||
.wp-block-latest-posts {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.wp-block-latest-posts:not(.is-grid) > li {
|
||||
margin-top: var(--wp--custom--margin--vertical);
|
||||
margin-bottom: var(--wp--custom--margin--vertical);
|
||||
}
|
||||
|
||||
.wp-block-latest-posts:not(.is-grid) > li:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.wp-block-latest-posts:not(.is-grid) > li:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wp-block-latest-posts.is-grid > li {
|
||||
margin-bottom: var(--wp--custom--margin--vertical);
|
||||
}
|
||||
|
||||
.wp-block-latest-posts.is-grid > li:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wp-block-latest-posts.is-grid.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1),
|
||||
.wp-block-latest-posts.is-grid.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1) ~ li,
|
||||
.wp-block-latest-posts.is-grid.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1),
|
||||
.wp-block-latest-posts.is-grid.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1) ~ li,
|
||||
.wp-block-latest-posts.is-grid.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1),
|
||||
.wp-block-latest-posts.is-grid.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1) ~ li,
|
||||
.wp-block-latest-posts.is-grid.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1),
|
||||
.wp-block-latest-posts.is-grid.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1) ~ li,
|
||||
.wp-block-latest-posts.is-grid.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1),
|
||||
.wp-block-latest-posts.is-grid.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1) ~ li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wp-block-latest-posts > li > * {
|
||||
margin-top: calc(0.5 * var(--wp--custom--margin--vertical));
|
||||
margin-bottom: calc(0.5 * var(--wp--custom--margin--vertical));
|
||||
}
|
||||
|
||||
.wp-block-latest-posts > li > *:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.wp-block-latest-posts > li > *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wp-block-latest-posts > li > a {
|
||||
font-family: var(--wp--preset--font-family--headings);
|
||||
line-height: 1.3;
|
||||
font-size: var(--wp--preset--font-size--huge);
|
||||
}
|
||||
|
||||
.wp-block-latest-posts .wp-block-latest-posts__post-date {
|
||||
font-size: var(--wp--preset--font-size--sm);
|
||||
}
|
||||
|
||||
.entry-content [class*="inner-container"] .wp-block-latest-posts .wp-block-latest-posts__post-date,
|
||||
.entry-content .has-background .wp-block-latest-posts .wp-block-latest-posts__post-date {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
.wp-block-latest-posts.alignfull {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.entry-content [class*="inner-container"] .wp-block-latest-posts.alignfull,
|
||||
.entry-content .has-background .wp-block-latest-posts.alignfull {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 782px) {
|
||||
.wp-block-latest-posts.is-style-seedlet-alternating-grid {
|
||||
overflow: hidden;
|
||||
}
|
||||
.wp-block-latest-posts.is-style-seedlet-alternating-grid > li {
|
||||
width: calc(50% - (0.5 * var(--wp--custom--margin--horizontal)));
|
||||
max-width: calc(50% - (0.5 * var(--wp--custom--margin--horizontal)));
|
||||
text-align: right;
|
||||
}
|
||||
.wp-block-latest-posts.is-style-seedlet-alternating-grid > li:nth-child(2n + 1) {
|
||||
float: right;
|
||||
text-align: left;
|
||||
}
|
||||
.wp-block-latest-posts.is-style-seedlet-alternating-grid.is-grid {
|
||||
display: inherit;
|
||||
}
|
||||
.wp-block-latest-posts.is-style-seedlet-alternating-grid.is-grid > li {
|
||||
margin-top: var(--wp--custom--margin--vertical);
|
||||
margin-right: 0;
|
||||
}
|
||||
.wp-block-latest-posts.is-style-seedlet-alternating-grid.is-grid > li:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.wp-block-latest-posts.is-style-seedlet-alternating-grid.is-grid > li:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Author bio
|
||||
*/
|
||||
.author-bio {
|
||||
margin-top: calc(6 * var(--wp--custom--margin--baseline));
|
||||
}
|
||||
|
||||
.author-bio .wp-block-post-navigation-link,
|
||||
.author-bio .wp-block-post-author__name {
|
||||
font-family: var(--wp--preset--font-family--headings);
|
||||
}
|
||||
|
||||
.author-bio .wp-block-post-navigation-link {
|
||||
font-size: var(--wp--preset--font-size--large);
|
||||
}
|
||||
|
||||
.wp-block-post-navigation-links {
|
||||
margin-top: calc(9 * var(--wp--custom--margin--baseline));
|
||||
}
|
||||
|
||||
.wp-block-post-navigation-links .wp-block-post-navigation-link-byline {
|
||||
font-size: var(--wp--preset--font-size--tiny);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footer-credit {
|
||||
display: flex;
|
||||
font-family: var(--wp--preset--font-family--headings);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.footer-credit > * {
|
||||
align-self: center;
|
||||
font-size: var(--wp--preset--font-size--small);
|
||||
}
|
||||
|
||||
.footer-credit .wp-block-site-title > a {
|
||||
font-size: var(--wp--preset--font-size--small);
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=theme.css.map */
|
|
@ -2,10 +2,22 @@
|
|||
<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center","fontSize":"small"} -->
|
||||
<p class="has-text-align-center has-small-font-size">Proudly powered by <a href="https://wordpress.org">WordPress</a></p>
|
||||
<!-- wp:group {"className":"footer-credit","layout":{"inherit":false}} -->
|
||||
<div class="wp-block-group footer-credit"><!-- wp:site-title {"level":0} /-->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>, </p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph {"align":"left","fontSize":"small"} -->
|
||||
<p class="has-text-align-left has-small-font-size">Proudly powered by <a href="https://wordpress.org">WordPress</a></p>
|
||||
<!-- /wp:paragraph --></div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:spacer {"height":30} -->
|
||||
<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
|
11
seedlet-blocks/block-template-parts/post-meta.html
Normal file
11
seedlet-blocks/block-template-parts/post-meta.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!-- wp:separator {"className":"is-style-wide"} -->
|
||||
<hr class="wp-block-separator is-style-wide"/>
|
||||
<!-- /wp:separator -->
|
||||
|
||||
<!-- wp:group {"className":"post-meta"} -->
|
||||
<div class="wp-block-group post-meta"><!-- wp:post-author {"showAvatar":false,"showBio":false,"fontSize":"tiny"} /-->
|
||||
|
||||
<!-- wp:post-date {"fontSize":"tiny"} /-->
|
||||
|
||||
<!-- wp:post-hierarchical-terms {"term":"category","fontSize":"tiny"} /--></div>
|
||||
<!-- /wp:group -->
|
|
@ -1,21 +1,19 @@
|
|||
<!-- wp:template-part {"slug":"header","align":"full","tagName":"header"} /-->
|
||||
<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
|
||||
|
||||
<!-- wp:group {"align":"full","className":"site-content","tagName":"main"} -->
|
||||
<div class="wp-block-group alignfull site-content"><div class="wp-block-group__inner-container">
|
||||
<!-- wp:query {"queryId":1,"query":{"perPage":10,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":""}} -->
|
||||
<!-- wp:query-loop -->
|
||||
<!-- wp:post-title {"isLink":true} /-->
|
||||
<!-- wp:group {"layout":{"inherit":true}} -->
|
||||
<div class="wp-block-group"><!-- wp:post-title {"isLink":true} /--></div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:post-content /-->
|
||||
<!-- wp:post-content {"layout":{"inherit":true}} /-->
|
||||
|
||||
<!-- wp:post-date {"fontSize":"tiny"} /-->
|
||||
<!-- wp:template-part {"slug":"post-meta","layout":{"inherit":true}} /-->
|
||||
|
||||
<!-- wp:spacer {"height":60} -->
|
||||
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- /wp:query-loop -->
|
||||
<!-- /wp:query --></div></div>
|
||||
<!-- /wp:group -->
|
||||
<!-- /wp:query -->
|
||||
|
||||
<!-- wp:template-part {"slug":"footer","align":"full","tagName":"footer"} /-->
|
||||
<!-- wp:template-part {"slug":"footer","tagName":"footer","layout":{"inherit":true}} /-->
|
||||
|
|
|
@ -1,9 +1,33 @@
|
|||
<!-- wp:template-part {"slug":"header","align":"full","tagName":"header"} /-->
|
||||
<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
|
||||
|
||||
<!-- wp:group {"align":"full","className":"site-content","tagName":"main"} -->
|
||||
<div class="wp-block-group alignfull site-content"><div class="wp-block-group__inner-container">
|
||||
<!-- wp:post-title /-->
|
||||
<!-- wp:post-content {"align":"full"} /--></div></div>
|
||||
<!-- wp:group {"layout":{"inherit":true}} -->
|
||||
<div class="wp-block-group"><!-- wp:post-title /--></div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:template-part {"slug":"footer","align":"full","tagName":"footer"} /-->
|
||||
<!-- wp:post-content {"layout":{"inherit":true}} /-->
|
||||
|
||||
<!-- wp:template-part {"slug":"post-meta","layout":{"inherit":true}} /-->
|
||||
|
||||
<!-- wp:group {"className":"author-bio","layout":{"inherit":true}} -->
|
||||
<div class="wp-block-group author-bio"><!-- wp:post-author {"showAvatar":false,"showBio":true,"byline":"Published by","fontSize":"huge"} /-->
|
||||
|
||||
<!-- wp:columns {"className":"wp-block-post-navigation-links"} -->
|
||||
<div class="wp-block-columns wp-block-post-navigation-links"><!-- wp:column -->
|
||||
<div class="wp-block-column"><!-- wp:paragraph {"className":"wp-block-post-navigation-link-byline"} -->
|
||||
<p class="wp-block-post-navigation-link-byline">Previous Post</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:post-navigation-link {"type":"previous","showTitle":true} /--></div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column -->
|
||||
<div class="wp-block-column"><!-- wp:paragraph {"align":"right","className":"wp-block-post-navigation-link-byline"} -->
|
||||
<p class="has-text-align-right wp-block-post-navigation-link-byline">Next Post</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:post-navigation-link {"textAlign":"right","showTitle":true} /--></div>
|
||||
<!-- /wp:column --></div>
|
||||
<!-- /wp:columns --></div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:template-part {"slug":"footer","tagName":"footer","layout":{"inherit":true}} /-->
|
||||
|
|
208
seedlet-blocks/child-experimental-theme.json
Normal file
208
seedlet-blocks/child-experimental-theme.json
Normal file
|
@ -0,0 +1,208 @@
|
|||
{
|
||||
"templateParts": [
|
||||
{
|
||||
"name": "header",
|
||||
"area": "header"
|
||||
},
|
||||
{
|
||||
"name": "footer",
|
||||
"area": "footer"
|
||||
},
|
||||
{
|
||||
"name": "post-meta",
|
||||
"area": "Post Meta"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"gradients": [
|
||||
{
|
||||
"slug": "hard-diagonal",
|
||||
"gradient": "linear-gradient(to bottom right, #3C8067 49.9%, #FAFBF6 50%)"
|
||||
},
|
||||
{
|
||||
"slug": "hard-diagonal-inverted",
|
||||
"gradient": "linear-gradient(to top left, #3C8067 49.9%, #FAFBF6 50%)"
|
||||
},
|
||||
{
|
||||
"slug": "hard-horizontal",
|
||||
"gradient": "linear-gradient(to bottom, #3C8067 50%, #FAFBF6 50%)"
|
||||
},
|
||||
{
|
||||
"slug": "hard-horizontal-inverted",
|
||||
"gradient": "linear-gradient(to top, #3C8067 50%, #FAFBF6 50%)"
|
||||
},
|
||||
{
|
||||
"slug": "diagonal",
|
||||
"gradient": "linear-gradient(to bottom right, #3C8067, #FAFBF6)"
|
||||
},
|
||||
{
|
||||
"slug": "diagonal-inverted",
|
||||
"gradient": "linear-gradient(to top left, #3C8067, #FAFBF6)"
|
||||
},
|
||||
{
|
||||
"slug": "horizontal",
|
||||
"gradient": "linear-gradient(to bottom, #3C8067, #FAFBF6)"
|
||||
},
|
||||
{
|
||||
"slug": "horizontal-inverted",
|
||||
"gradient": "linear-gradient(to top, #3C8067, #FAFBF6)"
|
||||
},
|
||||
{
|
||||
"slug": "stripe",
|
||||
"gradient": "linear-gradient(to bottom, transparent 20%, #3C8067 20%, #3C8067 80%, transparent 80%)"
|
||||
}
|
||||
],
|
||||
"palette": [
|
||||
{
|
||||
"slug": "black",
|
||||
"color": "#000000",
|
||||
"name": "Black"
|
||||
},
|
||||
{
|
||||
"slug": "white",
|
||||
"color": "#ffffff",
|
||||
"name": "White"
|
||||
},
|
||||
{
|
||||
"slug": "green",
|
||||
"color": "#3C8067",
|
||||
"name": "Green"
|
||||
},
|
||||
{
|
||||
"slug": "almost-black",
|
||||
"color": "#333333",
|
||||
"name": "Almost Black"
|
||||
},
|
||||
{
|
||||
"slug": "almost-white",
|
||||
"color": "#FAFAFA",
|
||||
"name": "Almost White"
|
||||
},
|
||||
{
|
||||
"slug": "light-grey",
|
||||
"color": "#EFEFEF",
|
||||
"name": "Light Grey"
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
"typography": {
|
||||
"customFontSize": true,
|
||||
"customLineHeight": true,
|
||||
"fontSizes": [
|
||||
{
|
||||
"name": "Tiny",
|
||||
"slug": "tiny",
|
||||
"size": "14px"
|
||||
},
|
||||
{
|
||||
"name": "Small",
|
||||
"slug": "small",
|
||||
"size": "16px"
|
||||
},
|
||||
{
|
||||
"name": "Normal",
|
||||
"slug": "normal",
|
||||
"size": "18px"
|
||||
},
|
||||
{
|
||||
"name": "Large",
|
||||
"slug": "large",
|
||||
"size": "24px"
|
||||
},
|
||||
{
|
||||
"name": "Huge",
|
||||
"slug": "huge",
|
||||
"size": "28px"
|
||||
}
|
||||
],
|
||||
"fontFamilies": [
|
||||
{
|
||||
"fontFamily": "var(--font-base, 'Fira Sans', Helvetica, Arial, sans-serif)",
|
||||
"slug": "base",
|
||||
"name": "Base"
|
||||
},
|
||||
{
|
||||
"fontFamily": "var(--font-headings, 'Playfair Display', Georgia, Times, serif)",
|
||||
"slug": "headings",
|
||||
"name": "Headings"
|
||||
}
|
||||
],
|
||||
"spacing": {
|
||||
"customPadding": true,
|
||||
"units": [ "px", "em", "rem", "vh", "vw" ]
|
||||
}
|
||||
},
|
||||
"layout": {
|
||||
"contentSize": "620px",
|
||||
"wideSize": "790px"
|
||||
},
|
||||
"custom": {
|
||||
"fontsToLoadFromGoogle": [
|
||||
"family=Fira+Sans:ital,wght@0,400;0,500;1,400",
|
||||
"family=Playfair+Display:ital,wght@0,400;0,700;1,400"
|
||||
],
|
||||
"color": {
|
||||
"primary": "var(--wp--preset--color--black)",
|
||||
"secondary": "var(--wp--preset--color--green)",
|
||||
"tertiary": "var(--wp--preset--color--almost-white)",
|
||||
"foreground": "var(--wp--preset--color--almost-black)",
|
||||
"background": "var(--wp--preset--color--white)",
|
||||
"selection": "var(--wp--preset--color--almost-white)"
|
||||
},
|
||||
"margin": {
|
||||
"horizontal": "25px",
|
||||
"vertical": "30px"
|
||||
},
|
||||
"separator": {
|
||||
"margin": "calc( 9 * var(--wp--custom--margin--baseline) ) auto calc(2 * var(--wp--custom--margin--baseline) )"
|
||||
},
|
||||
"button": {
|
||||
"color": {
|
||||
"hoverBackground": "#336D58"
|
||||
}
|
||||
},
|
||||
"pullquote": {
|
||||
"citation": {
|
||||
"typography": {
|
||||
"fontFamily": "var(--wp--preset--font-family--base)"
|
||||
},
|
||||
"spacing": {
|
||||
"margin": {
|
||||
"top": "20px"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"styles": {
|
||||
"core/separator": {
|
||||
"color": {
|
||||
"text": "var(--wp--preset--color--light-grey)"
|
||||
}
|
||||
},
|
||||
"core/pullquote": {
|
||||
"typography": {
|
||||
"fontSize": "32px",
|
||||
"fontStyle": "italic",
|
||||
"lineHeight": "1.3",
|
||||
"fontFamily": "var(--wp--preset--font-family--headings)"
|
||||
},
|
||||
"border": {
|
||||
"style": "none"
|
||||
},
|
||||
"spacing": {
|
||||
"padding": {
|
||||
"left": 0,
|
||||
"right": 0,
|
||||
"top": "var(--wp--custom--margin--vertical)",
|
||||
"bottom": "var(--wp--custom--margin--vertical)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,6 +7,10 @@
|
|||
{
|
||||
"name": "footer",
|
||||
"area": "footer"
|
||||
},
|
||||
{
|
||||
"name": "post-meta",
|
||||
"area": "Post Meta"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
|
@ -52,24 +56,34 @@
|
|||
],
|
||||
"palette": [
|
||||
{
|
||||
"slug": "background",
|
||||
"color": "#FFFFFF"
|
||||
"slug": "black",
|
||||
"color": "#000000",
|
||||
"name": "Black"
|
||||
},
|
||||
{
|
||||
"slug": "foreground",
|
||||
"color": "#333333"
|
||||
"slug": "white",
|
||||
"color": "#ffffff",
|
||||
"name": "White"
|
||||
},
|
||||
{
|
||||
"slug": "primary",
|
||||
"color": "#000000"
|
||||
"slug": "green",
|
||||
"color": "#3C8067",
|
||||
"name": "Green"
|
||||
},
|
||||
{
|
||||
"slug": "secondary",
|
||||
"color": "#3C8067"
|
||||
"slug": "almost-black",
|
||||
"color": "#333333",
|
||||
"name": "Almost Black"
|
||||
},
|
||||
{
|
||||
"slug": "tertiary",
|
||||
"color": "#FAFBF6"
|
||||
"slug": "almost-white",
|
||||
"color": "#FAFAFA",
|
||||
"name": "Almost White"
|
||||
},
|
||||
{
|
||||
"slug": "light-grey",
|
||||
"color": "#EFEFEF",
|
||||
"name": "Light Grey"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -80,33 +94,427 @@
|
|||
{
|
||||
"name": "Tiny",
|
||||
"slug": "tiny",
|
||||
"size": 14
|
||||
"size": "14px"
|
||||
},
|
||||
{
|
||||
"name": "Small",
|
||||
"slug": "small",
|
||||
"size": 16
|
||||
"size": "16px"
|
||||
},
|
||||
{
|
||||
"name": "Normal",
|
||||
"slug": "normal",
|
||||
"size": 18
|
||||
"size": "18px"
|
||||
},
|
||||
{
|
||||
"name": "Large",
|
||||
"slug": "large",
|
||||
"size": 24
|
||||
"size": "24px"
|
||||
},
|
||||
{
|
||||
"name": "Huge",
|
||||
"slug": "huge",
|
||||
"size": 28
|
||||
"size": "28px"
|
||||
}
|
||||
],
|
||||
"fontFamilies": [
|
||||
{
|
||||
"fontFamily": "var(--font-base, 'Fira Sans', Helvetica, Arial, sans-serif)",
|
||||
"slug": "base",
|
||||
"name": "Base"
|
||||
},
|
||||
{
|
||||
"fontFamily": "var(--font-headings, 'Playfair Display', Georgia, Times, serif)",
|
||||
"slug": "headings",
|
||||
"name": "Headings"
|
||||
}
|
||||
],
|
||||
"spacing": {
|
||||
"customPadding": true,
|
||||
"units": [ "px", "em", "rem", "vh", "vw" ]
|
||||
"units": [
|
||||
"px",
|
||||
"em",
|
||||
"rem",
|
||||
"vh",
|
||||
"vw"
|
||||
]
|
||||
}
|
||||
},
|
||||
"spacing": {
|
||||
"customPadding": true,
|
||||
"units": [
|
||||
"px",
|
||||
"em",
|
||||
"rem",
|
||||
"vh",
|
||||
"vw"
|
||||
]
|
||||
},
|
||||
"layout": {
|
||||
"contentSize": "620px",
|
||||
"wideSize": "790px"
|
||||
},
|
||||
"custom": {
|
||||
"color": {
|
||||
"primary": "var(--wp--preset--color--black)",
|
||||
"secondary": "var(--wp--preset--color--green)",
|
||||
"tertiary": "var(--wp--preset--color--almost-white)",
|
||||
"foreground": "var(--wp--preset--color--almost-black)",
|
||||
"background": "var(--wp--preset--color--white)",
|
||||
"selection": "var(--wp--preset--color--almost-white)"
|
||||
},
|
||||
"margin": {
|
||||
"baseline": "10px",
|
||||
"horizontal": "25px",
|
||||
"vertical": "30px"
|
||||
},
|
||||
"alignment": {
|
||||
"alignedMaxWidth": "50%"
|
||||
},
|
||||
"button": {
|
||||
"typography": {
|
||||
"fontWeight": "normal",
|
||||
"fontFamily": "var(--wp--preset--font-family--base)",
|
||||
"fontSize": "var(--wp--preset--font-size--normal)",
|
||||
"lineHeight": 2
|
||||
},
|
||||
"border": {
|
||||
"radius": "4px"
|
||||
},
|
||||
"color": {
|
||||
"text": "var(--wp--custom--color--background)",
|
||||
"background": "var(--wp--custom--color--secondary)",
|
||||
"hoverText": "var(--wp--custom--color--background)",
|
||||
"hoverBackground": "#336D58"
|
||||
}
|
||||
},
|
||||
"form": {
|
||||
"padding": "calc( 0.5 * var(--wp--custom--margin--horizontal) )",
|
||||
"border": {
|
||||
"radius": "0",
|
||||
"color": "#EFEFEF",
|
||||
"width": "2px",
|
||||
"style": "solid"
|
||||
},
|
||||
"color": {
|
||||
"text": "var(--wp--custom--color--foreground)",
|
||||
"background": "transparent",
|
||||
"boxShadow": "none"
|
||||
},
|
||||
"label": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--tiny)"
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--normal)"
|
||||
}
|
||||
},
|
||||
"paragraph": {
|
||||
"dropcap": {
|
||||
"margin": ".1em .1em 0 0",
|
||||
"typography": {
|
||||
"fontFamily": "var(--wp--preset--font-family--base)",
|
||||
"fontSize": "110px",
|
||||
"fontWeight": "400"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gallery": {
|
||||
"caption": {
|
||||
"fontSize": "var(--wp--preset--font-size--small)"
|
||||
}
|
||||
},
|
||||
"quote": {
|
||||
"typography": {
|
||||
"textAlign": "left"
|
||||
},
|
||||
"citation": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--tiny)",
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pullquote": {
|
||||
"typography": {
|
||||
"textAlign": "left"
|
||||
},
|
||||
"citation": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--tiny)",
|
||||
"fontFamily": "var(--wp--preset--font-family--base)",
|
||||
"fontStyle": "italic"
|
||||
},
|
||||
"spacing": {
|
||||
"margin": {
|
||||
"top": "20px"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"separator": {
|
||||
"margin": "calc( 9 * var(--wp--custom--margin--baseline) ) auto calc(2 * var(--wp--custom--margin--baseline) )",
|
||||
"opacity": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
"video": {
|
||||
"caption": {
|
||||
"margin": "var(--wp--custom--margin--vertical) auto",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"heading": {
|
||||
"typography": {
|
||||
"fontWeight": 400,
|
||||
"lineHeight": 1.125
|
||||
}
|
||||
},
|
||||
"list": {
|
||||
"fontFamily": "var(--wp--custom--font-family--base)",
|
||||
"padding": {
|
||||
"left": "calc( 2 * var(--wp--custom--margin--horizontal) )"
|
||||
}
|
||||
},
|
||||
"navigation": {
|
||||
"mobile": {
|
||||
"menu": {
|
||||
"openLabel": "☰",
|
||||
"closeLabel": "╳",
|
||||
"color": {
|
||||
"text": "var(--wp--custom--color--foreground)"
|
||||
},
|
||||
"typography": {
|
||||
"fontWeight": 500,
|
||||
"fontSize": "24px",
|
||||
"fontFamily": "var(--wp--custom--font-family--base)"
|
||||
}
|
||||
},
|
||||
"padding": "10px",
|
||||
"verticalAlignment": "center",
|
||||
"horizontalAlignment": "center",
|
||||
"typography": {
|
||||
"fontWeight": 200,
|
||||
"fontSize": "20px",
|
||||
"fontFamily": "var(--wp--custom--font-family--base)"
|
||||
}
|
||||
},
|
||||
"padding": "10px",
|
||||
"color": {
|
||||
"text": "var(--wp--custom--color--foreground)",
|
||||
"background": "var(--wp--custom--color--background)",
|
||||
"hoverText": "var(--wp--custom--color--secondary)",
|
||||
"hoverBackground": "var(--wp--custom--color--background)"
|
||||
},
|
||||
"submenu": {
|
||||
"padding": "8px",
|
||||
"shadow": "1px 1px 3px 0px rgba(0,0,0,.2)",
|
||||
"border": {
|
||||
"radius": "0",
|
||||
"color": "0",
|
||||
"width": "1px",
|
||||
"style": "none"
|
||||
},
|
||||
"color": {
|
||||
"text": "var(--wp--custom--color--foreground)",
|
||||
"background": "var(--wp--custom--color--background)",
|
||||
"hoverText": "var(--wp--custom--color--secondary)",
|
||||
"hoverBackground": "var(--wp--custom--color--background)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"table": {
|
||||
"figcaption": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--tiny)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post-author": {
|
||||
"typography": {
|
||||
"fontWeight": "normal"
|
||||
}
|
||||
},
|
||||
"fontsToLoadFromGoogle": [
|
||||
"family=Fira+Sans:ital,wght@0,400;0,500;1,400",
|
||||
"family=Playfair+Display:ital,wght@0,400;0,700;1,400"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"styles": {
|
||||
"core/post-content": {
|
||||
"spacing": {
|
||||
"padding": {
|
||||
"left": "var(--wp--custom--margin--horizontal)",
|
||||
"right": "var(--wp--custom--margin--horizontal)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"color": {
|
||||
"background": "var(--wp--custom--color--background)",
|
||||
"text": "var(--wp--custom--color--foreground)",
|
||||
"link": "var(--wp--custom--color--secondary)"
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--normal)",
|
||||
"lineHeight": 1.6,
|
||||
"fontFamily": "var(--wp--preset--font-family--base)"
|
||||
}
|
||||
},
|
||||
"core/button": {
|
||||
"color": {
|
||||
"text": "var(--wp--custom--button--color--text)",
|
||||
"background": "var(--wp--custom--button--color--background)"
|
||||
},
|
||||
"typography": {
|
||||
"fontWeight": "var(--wp--custom--button--typography--font-weight)",
|
||||
"fontFamily": "var(--wp--custom--button--typography--font-family)",
|
||||
"fontSize": "var(--wp--custom--button--typography--font-size)",
|
||||
"lineHeight": "var(--wp--custom--button--typography--line-height)"
|
||||
},
|
||||
"border": {
|
||||
"radius": "var(--wp--custom--button--border--radius)"
|
||||
}
|
||||
},
|
||||
"core/heading/h1": {
|
||||
"typography": {
|
||||
"fontSize": "48px",
|
||||
"fontFamily": "var(--wp--preset--font-family--headings)",
|
||||
"lineHeight": "var(--wp--custom--heading--typography--line-height)",
|
||||
"fontWeight": "var(--wp--custom--heading--typography--font-weight)"
|
||||
}
|
||||
},
|
||||
"core/heading/h2": {
|
||||
"typography": {
|
||||
"fontSize": "32px",
|
||||
"fontFamily": "var(--wp--preset--font-family--headings)",
|
||||
"lineHeight": "var(--wp--custom--heading--typography--line-height)",
|
||||
"fontWeight": "var(--wp--custom--heading--typography--font-weight)"
|
||||
}
|
||||
},
|
||||
"core/heading/h3": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--huge)",
|
||||
"fontFamily": "var(--wp--preset--font-family--headings)",
|
||||
"lineHeight": "var(--wp--custom--heading--typography--line-height)",
|
||||
"fontWeight": "var(--wp--custom--heading--typography--font-weight)"
|
||||
}
|
||||
},
|
||||
"core/heading/h4": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--large)",
|
||||
"fontFamily": "var(--wp--preset--font-family--headings)",
|
||||
"lineHeight": "var(--wp--custom--heading--typography--line-height)",
|
||||
"fontWeight": "var(--wp--custom--heading--typography--font-weight)"
|
||||
}
|
||||
},
|
||||
"core/heading/h5": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--normal)",
|
||||
"fontFamily": "var(--wp--preset--font-family--headings)",
|
||||
"lineHeight": "var(--wp--custom--heading--typography--line-height)",
|
||||
"fontWeight": "var(--wp--custom--heading--typography--font-weight)"
|
||||
}
|
||||
},
|
||||
"core/heading/h6": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--small)",
|
||||
"fontFamily": "var(--wp--preset--font-family--headings)",
|
||||
"lineHeight": "var(--wp--custom--heading--typography--line-height)",
|
||||
"fontWeight": "var(--wp--custom--heading--typography--font-weight)"
|
||||
}
|
||||
},
|
||||
"core/post-title/h1": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--huge)",
|
||||
"lineHeight": "var(--wp--custom--heading--typography--line-height)"
|
||||
}
|
||||
},
|
||||
"core/post-date": {
|
||||
"color": {
|
||||
"text": "var(--wp--custom--color--foreground)",
|
||||
"link": "var(--wp--custom--color--foreground)"
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--small)"
|
||||
}
|
||||
},
|
||||
"core/site-title": {
|
||||
"typography": {
|
||||
"fontSize": "60px",
|
||||
"fontWeight": 700
|
||||
},
|
||||
"color": {
|
||||
"link": "black"
|
||||
}
|
||||
},
|
||||
"core/navigation": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--small)"
|
||||
}
|
||||
},
|
||||
"core/code": {
|
||||
"spacing": {
|
||||
"padding": {
|
||||
"left": "var(--wp--custom--margin--horizontal)",
|
||||
"right": "var(--wp--custom--margin--horizontal)",
|
||||
"top": "var(--wp--custom--margin--vertical)",
|
||||
"bottom": "var(--wp--custom--margin--vertical)"
|
||||
}
|
||||
},
|
||||
"border": {
|
||||
"radius": "0px",
|
||||
"color": "#CCCCCC",
|
||||
"style": "solid",
|
||||
"width": "2px"
|
||||
}
|
||||
},
|
||||
"core/quote": {
|
||||
"typography": {
|
||||
"fontSize": "var(--wp--preset--font-size--normal)",
|
||||
"fontStyle": "normal"
|
||||
},
|
||||
"border": {
|
||||
"color": "var(--wp--custom--color--secondary)",
|
||||
"style": "solid",
|
||||
"width": "0 0 0 1px"
|
||||
},
|
||||
"spacing": {
|
||||
"padding": {
|
||||
"left": "var(--wp--custom--margin--horizontal)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"core/pullquote": {
|
||||
"typography": {
|
||||
"fontSize": "32px",
|
||||
"fontStyle": "italic",
|
||||
"lineHeight": "1.3",
|
||||
"fontFamily": "var(--wp--preset--font-family--headings)"
|
||||
},
|
||||
"border": {
|
||||
"style": "none",
|
||||
"width": "1px 0"
|
||||
},
|
||||
"spacing": {
|
||||
"padding": {
|
||||
"left": 0,
|
||||
"right": 0,
|
||||
"top": "var(--wp--custom--margin--vertical)",
|
||||
"bottom": "var(--wp--custom--margin--vertical)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"core/separator": {
|
||||
"color": {
|
||||
"text": "var(--wp--preset--color--light-grey)"
|
||||
},
|
||||
"border": {
|
||||
"color": "currentColor",
|
||||
"style": "solid",
|
||||
"width": "0 0 1px 0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,36 +1,33 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Seedlet Blocks functions and definitions
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage seedlet_blocks
|
||||
* @since 1.0.0
|
||||
* Add Editor Styles
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'seedlet_blocks_setup' ) ) :
|
||||
/**
|
||||
* Sets up theme defaults and registers support for various WordPress features.
|
||||
*
|
||||
* Note that this function is hooked into the after_setup_theme hook, which
|
||||
* runs before the init hook. The init hook is too late for some features, such
|
||||
* as indicating support for post thumbnails.
|
||||
*/
|
||||
function seedlet_blocks_setup() {
|
||||
// Add support for editor styles.
|
||||
add_theme_support( 'editor-styles' );
|
||||
|
||||
// Enqueue editor styles.
|
||||
add_editor_style( 'style-editor.css' );
|
||||
}
|
||||
endif;
|
||||
add_action( 'after_setup_theme', 'seedlet_blocks_setup', 11 );
|
||||
function seedlet_blocks_editor_styles() {
|
||||
// Enqueue editor styles.
|
||||
add_editor_style(
|
||||
array(
|
||||
'/assets/theme.css',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'after_setup_theme', 'seedlet_blocks_editor_styles' );
|
||||
|
||||
/**
|
||||
*
|
||||
* Enqueue scripts and styles.
|
||||
*/
|
||||
function seedlet_blocks_enqueue() {
|
||||
wp_enqueue_style( 'seedlet-blocks-styles', get_stylesheet_uri() );
|
||||
function seedlet_blocks_scripts() {
|
||||
wp_enqueue_style( 'seedlet_blocks-styles', get_stylesheet_directory_uri() . '/assets/theme.css', array('blank_canvas_blocks-ponyfill'), wp_get_theme()->get( 'Version' ) );
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'seedlet_blocks_enqueue', 11 );
|
||||
add_action( 'wp_enqueue_scripts', 'seedlet_blocks_scripts' );
|
||||
|
||||
/**
|
||||
* Block Patterns.
|
||||
*/
|
||||
require get_stylesheet_directory() . '/inc/block-patterns.php';
|
||||
|
||||
/**
|
||||
* Block Styles.
|
||||
*/
|
||||
require get_stylesheet_directory() . '/inc/block-styles.php';
|
||||
|
|
34
seedlet-blocks/inc/block-patterns.php
Normal file
34
seedlet-blocks/inc/block-patterns.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* Seedlet Theme: Block Patterns
|
||||
*
|
||||
* @package Seedlet
|
||||
* @since 1.0.0
|
||||
*/
|
||||
if ( ! function_exists( 'seedlet_blocks_register_block_patterns' ) ) :
|
||||
|
||||
function seedlet_blocks_register_block_patterns() {
|
||||
|
||||
if ( function_exists( 'register_block_pattern_category' ) ) {
|
||||
register_block_pattern_category(
|
||||
'seedlet-blocks',
|
||||
array( 'label' => __( 'Seedlet', 'seedlet-blocks' ) )
|
||||
);
|
||||
}
|
||||
|
||||
if ( function_exists( 'register_block_pattern' ) ) {
|
||||
|
||||
register_block_pattern(
|
||||
'seedlet-blocks/latest-posts-alternating-grid',
|
||||
array(
|
||||
'title' => __( 'Alternating Grid of Latest Posts', 'seedlet-blocks' ),
|
||||
'categories' => array( 'seedlet-blocks' ),
|
||||
'content' => '<!-- wp:latest-posts {"displayPostContent":true,"columns":5,"className":"is-style-seedlet-alternating-grid"} /-->',
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'after_setup_theme', 'seedlet_blocks_register_block_patterns', 12 );
|
38
seedlet-blocks/inc/block-styles.php
Normal file
38
seedlet-blocks/inc/block-styles.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
/**
|
||||
* Seedlet Theme: Block Styles
|
||||
*
|
||||
* @package Seedlet
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'seedlet_blocks_register_block_styles' ) ) :
|
||||
|
||||
function seedlet_blocks_register_block_styles() {
|
||||
|
||||
if ( function_exists( 'register_block_style' ) ) {
|
||||
|
||||
/**
|
||||
* Register block styles
|
||||
*/
|
||||
register_block_style(
|
||||
'core/latest-posts',
|
||||
array(
|
||||
'name' => 'seedlet-alternating-grid',
|
||||
'label' => __( 'Alternating Grid', 'seedlet' ),
|
||||
'style_handle' => 'seedlet-alternating-grid',
|
||||
)
|
||||
);
|
||||
register_block_style(
|
||||
'a8c/blog-posts',
|
||||
array(
|
||||
'name' => 'seedlet-alternating-grid',
|
||||
'label' => __( 'Alternating Grid', 'seedlet' ),
|
||||
'style_handle' => 'seedlet-alternating-grid',
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'after_setup_theme', 'seedlet_blocks_register_block_styles' );
|
0
seedlet-blocks/index.php
Normal file
0
seedlet-blocks/index.php
Normal file
3267
seedlet-blocks/package-lock.json
generated
Normal file
3267
seedlet-blocks/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
21
seedlet-blocks/package.json
Normal file
21
seedlet-blocks/package.json
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "seedlet-blocks",
|
||||
"version": "2.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@wordpress/base-styles": "^3.4.0",
|
||||
"chokidar-cli": "^2.1.0",
|
||||
"node-sass": "^5.0.0",
|
||||
"node-sass-package-importer": "^5.3.2"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "chokidar \"**/*.scss\" child-experimental-theme.json ../blank-canvas-blocks/experimental-theme.json -c \"npm run build\" --initial",
|
||||
"build": "npm run build:theme && npm run build:scss",
|
||||
"build:theme": "node ../blank-canvas-blocks/build.js seedlet-blocks",
|
||||
"build:scss": "node-sass --importer node_modules/node-sass-package-importer/dist/cli.js sass/theme.scss assets/theme.css --output-style expanded --indent-type tab --indent-width 1 --source-map true"
|
||||
},
|
||||
"author": "",
|
||||
"license": "GPLv2"
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
=== Seedlet Blocks ===
|
||||
Contributors: Automattic
|
||||
Requires at least: 5.0
|
||||
Tested up to: 5.4.1
|
||||
Requires PHP: 7.3
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
A simple, text-driven, single-column block-based theme.
|
||||
|
||||
== Description ==
|
||||
|
||||
Seedlet is a simple, text-driven, single-column block-based theme.
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.0 =
|
||||
* Initial release
|
||||
|
||||
== Copyright ==
|
||||
|
||||
Seedlet Blocks WordPress Theme, (C) 2020 Automattic, Inc.
|
||||
Seedlet is distributed under the terms of the GNU GPL.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
Images from Smithsonian Institution
|
||||
License: CC0
|
||||
Source: https://www.si.edu/object/hymenoxys-odorata-dc:nmnhbotany_13045011
|
||||
https://www.si.edu/object/coccocypselum-guianense-aubl-k-schum:nmnhbotany_10752403
|
||||
https://www.si.edu/object/coccocypselum-guianense-aubl-k-schum:nmnhbotany_10672835
|
||||
Included in theme screenshot.
|
124
seedlet-blocks/sass/blocks/_latest-posts.scss
Normal file
124
seedlet-blocks/sass/blocks/_latest-posts.scss
Normal file
|
@ -0,0 +1,124 @@
|
|||
@import '~@wordpress/base-styles/breakpoints';
|
||||
@import '~@wordpress/base-styles/mixins';
|
||||
|
||||
.wp-block-latest-posts {
|
||||
padding-left: 0;
|
||||
|
||||
// Vertical margins logic
|
||||
&:not(.is-grid) > li {
|
||||
margin-top: var(--wp--custom--margin--vertical);
|
||||
margin-bottom: var(--wp--custom--margin--vertical);
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-grid {
|
||||
|
||||
& > li {
|
||||
margin-bottom: var(--wp--custom--margin--vertical);
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove bottom margins in grid columns
|
||||
&.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1),
|
||||
&.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1) ~ li,
|
||||
&.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1),
|
||||
&.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1) ~ li,
|
||||
&.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1),
|
||||
&.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1) ~ li,
|
||||
&.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1),
|
||||
&.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1) ~ li,
|
||||
&.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1),
|
||||
&.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1) ~ li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
& > li > * {
|
||||
margin-top: calc(0.5 * var(--wp--custom--margin--vertical));
|
||||
margin-bottom: calc(0.5 * var(--wp--custom--margin--vertical));
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Post title
|
||||
& > li > a {
|
||||
font-family: var(--wp--preset--font-family--headings);
|
||||
line-height: 1.3;
|
||||
font-size: var(--wp--preset--font-size--huge);
|
||||
}
|
||||
|
||||
// Post date
|
||||
.wp-block-latest-posts__post-date {
|
||||
font-size: var(--wp--preset--font-size--sm);
|
||||
|
||||
.entry-content [class*="inner-container"] &,
|
||||
.entry-content .has-background & {
|
||||
color: currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
// Utility classes
|
||||
&.alignfull {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
|
||||
.entry-content [class*="inner-container"] &,
|
||||
.entry-content .has-background & {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include break-medium {
|
||||
.wp-block-latest-posts.is-style-seedlet-alternating-grid {
|
||||
|
||||
// Necessary so that the block boundaries are respected.
|
||||
overflow: hidden;
|
||||
|
||||
> li {
|
||||
width: calc(50% - (0.5 * var(--wp--custom--margin--horizontal)));
|
||||
max-width: calc(50% - (0.5 * var(--wp--custom--margin--horizontal)));
|
||||
text-align: right;
|
||||
|
||||
&:nth-child(2n + 1) {
|
||||
float: right;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.is-grid {
|
||||
display: inherit;
|
||||
|
||||
> li {
|
||||
margin-top: var(--wp--custom--margin--vertical);
|
||||
margin-right: 0;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
29
seedlet-blocks/sass/blocks/_links.scss
Normal file
29
seedlet-blocks/sass/blocks/_links.scss
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Links in navigation
|
||||
*/
|
||||
.wp-block-navigation-link {
|
||||
a {
|
||||
:hover{
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.4rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Links in Content
|
||||
*/
|
||||
.is-root-container, // Editor class hack.
|
||||
.wp-block-post-content {
|
||||
a {
|
||||
color: var(--wp--custom--color--primary);
|
||||
text-decoration-color: var(--wp--style--color--link);
|
||||
text-decoration-thickness: 1px;
|
||||
text-underline-offset: 0.2em;
|
||||
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: var(--wp--style--color--link);
|
||||
}
|
||||
}
|
||||
}
|
38
seedlet-blocks/sass/blocks/_site-title.scss
Normal file
38
seedlet-blocks/sass/blocks/_site-title.scss
Normal file
|
@ -0,0 +1,38 @@
|
|||
.wp-block-site-title {
|
||||
|
||||
a {
|
||||
background-image: linear-gradient(to right, var(--wp--custom--color--secondary) 100%, transparent 100%);
|
||||
background-position: 0 1.22em;
|
||||
background-repeat: repeat-x;
|
||||
background-size: 8px 1.5px;
|
||||
border-bottom: none;
|
||||
color: currentColor;
|
||||
text-shadow:
|
||||
1px 0px var(--wp--custom--color--background),
|
||||
-1px 0px var(--wp--custom--color--background),
|
||||
-2px 0px var(--wp--custom--color--background),
|
||||
2px 0px var(--wp--custom--color--background),
|
||||
-3px 0px var(--wp--custom--color--background),
|
||||
3px 0px var(--wp--custom--color--background),
|
||||
-4px 0px var(--wp--custom--color--background),
|
||||
4px 0px var(--wp--custom--color--background),
|
||||
-5px 0px var(--wp--custom--color--background),
|
||||
5px 0px var(--wp--custom--color--background);
|
||||
transition: background-size 0.1s ease-out;
|
||||
|
||||
&:link,
|
||||
&:visited,
|
||||
&:active {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
color: var(--wp--custom--color--secondary);
|
||||
background-size: 8px 0px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
43
seedlet-blocks/sass/theme.scss
Normal file
43
seedlet-blocks/sass/theme.scss
Normal file
|
@ -0,0 +1,43 @@
|
|||
@import './blocks/site-title.scss';
|
||||
@import './blocks/links.scss';
|
||||
@import './blocks/latest-posts';
|
||||
|
||||
/**
|
||||
* Author bio
|
||||
*/
|
||||
.author-bio {
|
||||
margin-top: calc(6 * var(--wp--custom--margin--baseline) );
|
||||
}
|
||||
|
||||
.author-bio .wp-block-post-navigation-link,
|
||||
.author-bio .wp-block-post-author__name {
|
||||
font-family: var(--wp--preset--font-family--headings);
|
||||
}
|
||||
|
||||
.author-bio .wp-block-post-navigation-link {
|
||||
font-size: var(--wp--preset--font-size--large);
|
||||
}
|
||||
|
||||
.wp-block-post-navigation-links {
|
||||
margin-top: calc(9 * var(--wp--custom--margin--baseline));
|
||||
}
|
||||
|
||||
.wp-block-post-navigation-links .wp-block-post-navigation-link-byline {
|
||||
font-size: var(--wp--preset--font-size--tiny);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footer-credit {
|
||||
display: flex;
|
||||
font-family: var(--wp--preset--font-family--headings);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.footer-credit > * {
|
||||
align-self: center;
|
||||
font-size: var(--wp--preset--font-size--small);
|
||||
}
|
||||
|
||||
.footer-credit .wp-block-site-title > a {
|
||||
font-size: var(--wp--preset--font-size--small);
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/* Override Seedlet variables with values from experimental-theme.json. */
|
||||
body {
|
||||
/* Font Size */
|
||||
--global--font-size-xs: var(--wp--preset--font-size--tiny);
|
||||
--global--font-size-sm: var(--wp--preset--font-size--small);
|
||||
--global--font-size-md: var(--wp--preset--font-size--medium);
|
||||
--global--font-size-lg: var(--wp--preset--font-size--large);
|
||||
--global--font-size-xl: var(--wp--preset--font-size--extra-large);
|
||||
|
||||
/* Colors */
|
||||
--global--color-background: var(--wp--preset--color--background);
|
||||
--global--color-foreground: var(--wp--preset--color--foreground);
|
||||
--global--color-primary: var(--wp--preset--color--primary);
|
||||
--global--color-secondary: var(--wp--preset--color--secondary);
|
||||
--global--color-tertiary: var(--wp--preset--color--tertiary);
|
||||
}
|
||||
|
||||
.site-content .wp-block[data-align="full"] > [data-block], .site-content .wp-block.alignfull > [data-block] {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
|
@ -7,10 +7,10 @@ Description: A simple, text-driven, single-column block-based theme.
|
|||
Requires at least: 4.9.6
|
||||
Tested up to: 5.4.1
|
||||
Requires PHP: 7.3
|
||||
Version: 1.0
|
||||
Version: 2.0
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: LICENSE
|
||||
Template: seedlet
|
||||
Template: blank-canvas-blocks
|
||||
Text Domain: seedlet-blocks
|
||||
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
|
||||
|
||||
|
@ -27,29 +27,3 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/* Override Seedlet variables with values from experimental-theme.json.
|
||||
Doubling up on the :root selector is weird, but it just ensures these have higher specificity than everything else) */
|
||||
:root:root {
|
||||
/* Font Size */
|
||||
--global--font-size-xs: calc( 1px * var(--wp--preset--font-size--tiny) );
|
||||
--global--font-size-sm: calc( 1px * var(--wp--preset--font-size--small) );
|
||||
--global--font-size-md: calc( 1px * var(--wp--preset--font-size--normal) );
|
||||
--global--font-size-lg: calc( 1px * var(--wp--preset--font-size--large) );
|
||||
--global--font-size-xl: calc( 1px * var(--wp--preset--font-size--huge) );
|
||||
|
||||
/* Colors */
|
||||
--global--color-background: var(--wp--preset--color--background);
|
||||
--global--color-foreground: var(--wp--preset--color--foreground);
|
||||
--global--color-primary: var(--wp--preset--color--primary);
|
||||
--global--color-secondary: var(--wp--preset--color--secondary);
|
||||
--global--color-tertiary: var(--wp--preset--color--tertiary);
|
||||
}
|
||||
|
||||
/* Make sure full-width items in entry content show up as full-width. */
|
||||
.wp-block-group.site-content .wp-block-group__inner-container .entry-content {
|
||||
max-width: calc(100% + (2 * var(--global--spacing-horizontal)));
|
||||
width: calc(100% + (2 * var(--global--spacing-horizontal)));
|
||||
margin-left: calc(-1 * var(--global--spacing-horizontal));
|
||||
margin-right: auto;
|
||||
}
|
Loading…
Reference in a new issue