Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monticello: block-based boilerplate #2821

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
de049aa
Boiler plate.
jffng Nov 16, 2020
bdfbf5d
Button styles, etc.
jffng Nov 16, 2020
a1c829b
Add google fonts.
jffng Nov 17, 2020
2d3654b
Monticello: Add theme color pallete swatches to editor pallete.
allancole Nov 17, 2020
eff33ec
Adding basic button styles
pbking Nov 17, 2020
af770a3
Add learn more block pattern.
jffng Nov 17, 2020
c8fc607
Updated global variable usage for width and alignmnet per: https://gi…
pbking Nov 18, 2020
54470eb
Removed unused <p> block from default footer
pbking Nov 18, 2020
b254add
Add typography styles.
jffng Nov 18, 2020
d4ac9f2
A first pass at creating and styling block patterns for a menu
pbking Nov 18, 2020
e56b87d
A first pass at creating and styling block patterns for a menu
pbking Nov 18, 2020
749c0e6
Moved 'menu list item' styles from block-styles to theme style. Made…
pbking Nov 19, 2020
082db97
Merge pull request #2833 from Automattic/try/monticello-block-menu-pa…
pbking Nov 19, 2020
bef325f
Minor padding tweaks to highlighted group style
pbking Nov 19, 2020
6dffe8b
menu list item was previously moved to a block-pattern. this commit …
pbking Nov 19, 2020
340613c
Add a header template part and some basic styles.
jffng Nov 19, 2020
d74b155
Update the learn more block pattern to use built in type sizes.
jffng Nov 19, 2020
ce3d01d
Match grays to the palette slugs.
jffng Nov 19, 2020
2c0e498
Update footer.
jffng Nov 19, 2020
5be224f
Add three images block pattern.
jffng Nov 19, 2020
fc51770
Add a background color to the column in the header if no featured ima…
jffng Nov 19, 2020
73431d2
Our menu block pattern.
jffng Nov 19, 2020
2a13848
Make the background color beige.
jffng Nov 19, 2020
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
79 changes: 79 additions & 0 deletions monticello/assets/alignments-front.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Alignments, loaded in the front-end only.
*/

body {
margin: 0;
}

* {
box-sizing: border-box;
}

.wp-site-blocks,
.wp-block-template-part.alignfull {
padding: 0 var(--wp--custom--margin--horizontal);
}

.wp-site-blocks > *:not(.wp-block-post-content),
.wp-site-blocks .wp-block-post-content > * {
max-width: var(--wp--custom--width--default);
margin-left: auto;
margin-right: auto;
}

.wp-site-blocks .alignwide {
width: var(--wp--custom--width--wide);
max-width: 100%;
margin-left: auto;
margin-right: auto;
}

.wp-site-blocks .alignfull {
transform: translateX(calc(0px - var(--wp--custom--margin--horizontal)));
width: calc(100% + (2 * var(--wp--custom--margin--horizontal)));
max-width: calc(100% + (2 * var(--wp--custom--margin--horizontal)));
margin-left: 0;
margin-right: 0;
box-sizing: content-box;
}

.wp-site-blocks .wp-block-template-part.alignfull {
width: 100%;
max-width: 100%;
}

.wp-site-blocks .wp-block-columns.alignfull {
width: 100%;
max-width: 100%;
}

.aligncenter {
text-align: center;
}

.wp-site-blocks .alignleft {
float: left;
margin-right: 2em;
max-width: 360px;
}

.wp-site-blocks .alignright {
float: right;
margin-left: 2em;
max-width: 360px;
}

@media screen and (min-width: 1290px) {

.wp-site-blocks,
.wp-block-template-part.alignfull {
padding: 0;
}

.wp-site-blocks .alignfull {
transform: translateX(0px);
width: 100% + var(--wp--custom--margin--horizontal);
max-width: calc(100% + var(--wp--custom--margin--horizontal));
}
}
37 changes: 37 additions & 0 deletions monticello/block-template-parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- wp:columns {"verticalAlignment":"center","align":"full"} -->
<div class="wp-block-columns alignfull are-vertically-aligned-center"><!-- wp:column {"verticalAlignment":"center"} -->
<div class="wp-block-column is-vertically-aligned-center"><!-- wp:group {"backgroundColor":"light-beige-2"} -->
<div class="wp-block-group has-light-beige-2-background-color has-background"><div class="wp-block-group__inner-container"><!-- wp:heading -->
<h2>Contact</h2>
<!-- /wp:heading -->

<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>(123) 456-7890<br>321 Main Street<br>New York, NY, 10001</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:social-links -->
<ul class="wp-block-social-links"><!-- wp:social-link {"url":"instagram.com/wordpress","service":"instagram"} /-->

<!-- wp:social-link {"url":"instagram.com/facebook","service":"facebook"} /-->

<!-- wp:social-link {"url":"twitter.com/wordpress","service":"twitter"} /--></ul>
<!-- /wp:social-links --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div></div>
<!-- /wp:group --></div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"center"} -->
<div class="wp-block-column is-vertically-aligned-center"><!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">Proudly Powered by WordPress</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">©2020 Java the Hut</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
17 changes: 17 additions & 0 deletions monticello/block-template-parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- wp:group {"align":"full"} -->
<div class="wp-block-group alignfull"><div class="wp-block-group__inner-container"><!-- wp:group {"className":"site-info"} -->
<div class="wp-block-group site-info"><div class="wp-block-group__inner-container"><!-- wp:site-title {"level":0} /-->

<!-- wp:site-tagline /--></div></div>
<!-- /wp:group -->

<!-- wp:columns {"align":"full"} -->
<div class="wp-block-columns alignfull"><!-- wp:column {"className":"has-background-color-beige"} -->
<div class="wp-block-column has-background-color-beige"><!-- wp:post-featured-image /--></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:post-title {"level":1} /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div></div>
<!-- /wp:group -->
13 changes: 13 additions & 0 deletions monticello/block-templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- wp:template-part {"slug":"header","theme":"monticello","align":"full"} /-->

<!-- wp:query {"queryId":0,"query":{"perPage":10,"pages":1,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":""}} -->
<!-- wp:query-loop -->
<!-- wp:post-featured-image /-->

<!-- wp:post-date /-->

<!-- wp:post-title /-->
<!-- /wp:query-loop -->
<!-- /wp:query -->

<!-- wp:template-part {"slug":"footer","theme":"monticello","align":"full"} /-->
5 changes: 5 additions & 0 deletions monticello/block-templates/singular.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"monticello","align":"full"} /-->

<!-- wp:post-content {"align":"full"} /-->

<!-- wp:template-part {"slug":"footer","theme":"monticello","align":"full"} /-->
198 changes: 198 additions & 0 deletions monticello/experimental-theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
{
"global": {
"settings": {
"color": {
"gradients": [ ],
"palette": [
{
"name": "Light Beige 3",
"slug": "light-beige-3",
"color": "#FCF8F3"
},
{
"name": "Light Beige 2",
"slug": "light-beige-2",
"color": "#FBE8D0"
},
{
"name": "Light Beige 1",
"slug": "light-beige-1",
"color": "#E8DAC9"
},
{
"name": "Beige",
"slug": "beige",
"color": "#E9D4BB"
},
{
"name": "Dark Beige 1",
"slug": "dark-beige-1",
"color": "#726E69"
},
{
"name": "Dark Beige 2",
"slug": "dark-beige-2",
"color": "#43403D"
},
{
"name": "Dark Beige 3",
"slug": "dark-beige-3",
"color": "#302E2C"
},
{
"name": "Dark Beige 4",
"slug": "dark-beige-4",
"color": "#1B1A18"
},
{
"name": "Orange",
"slug": "orange",
"color": "#DB6D3C"
},
{
"name": "Red",
"slug": "red",
"color": "#C53A29"
},
{
"name": "Bronze",
"slug": "bronze",
"color": "#C9AE6B"
},
{
"name": "Green",
"slug": "green",
"color": "#648C24"
}
]
},
"typography": {
"customLineHeight": true,
"fontFamilies": [
{
"fontFamily": "Helvetica, Arial",
"slug": "helvetica-arial",
"name": "Helvetica Arial"
},
{
"fontFamily": "Manuale",
"slug": "manuale",
"name": "Manuale"
}
],
"fontSizes": [
{
"slug": "extra-small",
"name": "Extra Small",
"size": "16px"
},
{
"slug": "small",
"name": "Small",
"size": "18px"
},
{
"slug": "regular",
"name": "Regular",
"size": "22px"
},
{
"slug": "medium",
"name": "Medium",
"size": "32px"
},
{
"slug": "large",
"name": "Large",
"size": "46px"
},
{
"slug": "extra-large",
"name": "Extra Large",
"size": "72px"
},
{
"slug": "huge",
"name": "Huge",
"size": "130px"
}
],
"spacing": {
"customPadding": true
}
},
"custom": {
"width": {
"default": "840px",
"wide": "1100px"
},
"margin": {
"horizontal": "14px"
},
"fontFamily": {
"primary": "\"Poppins\"",
"secondary": "\"Manuale\""
}
}
},
"styles": {
"color": {
"background": "var(--wp--preset--color--light-beige-3)",
"link": "var(--wp--preset--color--dark-beige-4)",
"text": "var(--wp--preset--color--dark-beige-3)"
},
"typography": {
"fontFamily": "var(--wp--custom--font-family--secondary)",
"lineHeight": 1.6
}
}
},
"core/site-title": {
"styles": {
"color": {
"link": "var(--wp--preset--color--dark-beige-4)",
"text": "var(--wp--preset--color--dark-beige-3)"
},
"typography": {
"fontFamily": "var(--wp--custom--font-family--primary)",
"lineHeight": 1.6
}
}
},
"core/heading/h1": {
"styles": {
"typography": {
"fontFamily": "var(--wp--custom--font-family--primary)",
"fontSize": "var(--wp--preset--font-size--huge)",
"lineHeight": 1.05
}
}
},
"core/heading/h2": {
"styles": {
"typography": {
"fontFamily": "var(--wp--custom--font-family--primary)",
"fontSize": "var(--wp--preset--font-size--extra-large)",
"lineHeight": 1.1
}
}
},
"core/heading/h3": {
"styles": {
"typography": {
"fontFamily": "var(--wp--custom--font-family--primary)",
"fontSize": "var(--wp--preset--font-size--large)",
"lineHeight": 1.3
}
}
},
"core/heading/h4": {
"styles": {
"typography": {
"fontFamily": "var(--wp--custom--font-family--secondary)",
"fontSize": "var(--wp--preset--font-size--medium)",
"lineHeight": 1.4
}
}
}
}
Loading