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

Fewer: block-based boilerplate #2822

Closed
wants to merge 6 commits into from
Closed
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
87 changes: 87 additions & 0 deletions fewer/assets/alignments-front.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* Alignments, loaded in the front-end only.
*/

body {
margin: 0;
}

* {
box-sizing: border-box;
}

.alignfull {
margin: 0 calc(50% - 50vw);
max-width: 100vw;
width: 100vw;
}

/*
.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));
}
}
*/
Binary file added fewer/assets/images/about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fewer/assets/images/services-cover-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fewer/assets/images/team1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fewer/assets/images/team2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fewer/assets/images/team3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fewer/assets/images/team4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions fewer/assets/style-editor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*--------------------------------------------------------------
# Editor Alignment Widths
--------------------------------------------------------------*/

.wp-block {
max-width: inherit;
}
27 changes: 27 additions & 0 deletions fewer/block-template-parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- wp:separator {"customColor":"#000000","align":"full","className":"is-style-wide"} -->
<hr class="wp-block-separator alignfull has-text-color has-background is-style-wide" style="background-color:#000000;color:#000000"/>
<!-- /wp:separator -->

<!-- wp:group {"style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}}} -->
<div class="wp-block-group" style="padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px"><div class="wp-block-group__inner-container"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:site-title {"level":0} /--></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>Oliefabriksvej 29, 43, 2770<br>Kastrup, Denmark</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>[email protected]<br>+4536562983</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>Follow Us<br>@agardbolding</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div></div>
<!-- /wp:group -->
27 changes: 27 additions & 0 deletions fewer/block-template-parts/new-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:site-title /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:navigation {"orientation":"horizontal","itemsJustification":"right"} -->
<!-- wp:navigation-link {"label":"Test page","url":"http:\/\/localhost:4759\/?page_id=15"} /-->

<!-- wp:navigation-link {"label":"Another test page","url":"http:\/\/localhost:4759\/?page_id=30"} /-->

<!-- wp:navigation-link {"label":"About","url":"http:\/\/localhost:4759\/?page_id=39"} /-->

<!-- wp:navigation-link {"label":"Services","url":"http:\/\/localhost:4759\/?page_id=47"} /-->

<!-- wp:navigation-link {"label":"home","url":"http:\/\/localhost:4759\/"} /-->

<!-- wp:navigation-link {"label":"Headings","url":"http:\/\/localhost:4759\/?page_id=113"} /-->

<!-- wp:search {"label":"Search","showLabel":false,"buttonText":"Search","buttonPosition":"button-only","buttonUseIcon":true} /-->
<!-- /wp:navigation --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:separator {"align":"full","className":"is-style-wide"} -->
<hr class="wp-block-separator alignfull is-style-wide"/>
<!-- /wp:separator -->
29 changes: 29 additions & 0 deletions fewer/block-template-parts/post-content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:post-hierarchical-terms {"term":"category"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:post-title /-->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:separator {"align":"full","className":"is-style-wide"} -->
<hr class="wp-block-separator alignfull is-style-wide"/>
<!-- /wp:separator -->

<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:post-author /-->

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

<!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:post-content /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
7 changes: 7 additions & 0 deletions fewer/block-templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"20px","right":"20px","bottom":"20px","left":"20px"}}}} -->
<div class="wp-block-group" style="padding-bottom:20px;padding-left:20px;padding-right:20px;padding-top:20px"><div class="wp-block-group__inner-container"><!-- wp:template-part {"postId":184,"slug":"new-header"} /-->

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

<!-- wp:template-part {"postId":147,"slug":"footer"} /--></div></div>
<!-- /wp:group -->
7 changes: 7 additions & 0 deletions fewer/block-templates/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"20px","right":"20px","bottom":"20px","left":"20px"}}}} -->
<div class="wp-block-group" style="padding-bottom:20px;padding-left:20px;padding-right:20px;padding-top:20px"><div class="wp-block-group__inner-container"><!-- wp:template-part {"postId":184,"slug":"new-header"} /-->

<!-- wp:template-part {"postId":192,"slug":"post-content"} /-->

<!-- wp:template-part {"postId":147,"slug":"footer"} /--></div></div>
<!-- /wp:group -->
149 changes: 149 additions & 0 deletions fewer/experimental-theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{
"global": {
"settings": {
"color": {
"palette": [
{
"slug": "black",
"color": "#000000",
"name": "Black"
},
{
"slug": "accent",
"color": "#D13400",
"name": "Accent"
},
{
"slug": "background",
"color": "#f5f5f5",
"name": "Background"
},
{
"slug": "grey",
"color": "#767676",
"name": "Grey"
}
],
"gradients": [ ]

},
"typography": {
"customLineHeight": true,
"fontFamilies": [
{
"fontFamily": "\"Epilogue\", sans-serif",
"slug": "epilogue",
"name": "Epilogue"
}
],
"fontSizes": [
{
"slug": "small",
"size": "15px",
"name": "Small"
},
{
"slug": "normal",
"size": "23px",
"name": "Normal"
},
{
"slug": "large",
"size": "35px",
"name": "Large"
},
{
"slug": "extra-large",
"size": "60px",
"name": "Extra large"
}
],
"spacing": {
"customSpacing": true
}
},
"custom": {
"line-height": {
"body": 1.4
},
"margin": {
"horizontal": "0"
},
"width": {
"default": "960px",
"wide": "1100px"
}
}
},
"styles": {
"color": {
"background": "var(--wp--preset--color--background)",
"text": "var(--wp--preset--color--black)",
"link": "var(--wp--preset--color--black)"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--epilogue)",
"fontSize": "var(--wp--preset--font-size--normal)",
"fontStyle": "var(--wp--preset--font-style--normal)",
"fontWeight": "var(--wp--preset--font-weight--300)",
"lineHeight": "var(--wp--custom--line-height--body)"
}
}
},
"core/site-title": {
"styles": {
"typography": {
"fontSize": "var(--wp--preset--font-size--normal)",
"textDecoration": "none"
}
}
},
"core/heading/h1": {
"styles": {
"typography": {
"fontSize": "var(--wp--preset--font-size--extra-large)"
}
}
},
"core/heading/h2": {
"styles": {
"typography": {
"fontSize": "var(--wp--preset--font-size--large)"
}
}
},
"core/heading/h3": {
"styles": {
"typography": {
"fontSize": "var(--wp--preset--font-size--normal)"
}
}
},
"core/heading/h4": {
"styles": {
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
}
}
},
"core/heading/h5": {
"styles": {
"color": {
"text": "var(--wp--preset--color--grey)"
},
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
}
}
},
"core/heading/h6": {
"styles": {
"color": {
"text": "var(--wp--preset--color--grey)"
},
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
}
}
}
}
Loading